fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [6632] merge 6628:6631 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [6632] merge 6628:6631 from trunk
Date: Wed, 24 Nov 2010 10:18:45 +0000

Revision: 6632
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6632
Author:   sigurdne
Date:     2010-11-24 10:18:44 +0000 (Wed, 24 Nov 2010)
Log Message:
-----------
merge 6628:6631 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/property/inc/class.fileuploader.inc.php
    branches/Version-1_0-branch/property/inc/class.uientity.inc.php
    branches/Version-1_0-branch/property/js/yahoo/entity.edit.js
    branches/Version-1_0-branch/property/js/yahoo/property.js
    branches/Version-1_0-branch/property/templates/base/entity.xsl
    branches/Version-1_0-branch/property/templates/base/files.xsl
    branches/Version-1_0-branch/property/templates/base/fileuploader.xsl

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6627
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6627,6629-6631

Modified: branches/Version-1_0-branch/property/inc/class.fileuploader.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.fileuploader.inc.php 
2010-11-24 10:15:08 UTC (rev 6631)
+++ branches/Version-1_0-branch/property/inc/class.fileuploader.inc.php 
2010-11-24 10:18:44 UTC (rev 6632)
@@ -44,215 +44,216 @@
                function __construct()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app']             
        = true;
-                       $GLOBALS['phpgw_info']['flags']['noframework']          
= true;
-                       $GLOBALS['phpgw_info']['flags']['no_reset_fonts']       
= true;
+                       $GLOBALS['phpgw_info']['flags']['noframework']          
= true;
+                       $GLOBALS['phpgw_info']['flags']['no_reset_fonts']       
= true;
                }
 
-               function add()
-               {
-                       $upload_target  = phpgw::get_var('upload_target');
-                       $id                             = phpgw::get_var('id');
-
-                       $link_data = array
-                       (
-                               'menuaction'                    => 
$upload_target,
-                               'id'                                    => $id,
-                               'last_loginid'                  => 
phpgw::get_var('last_loginid'),
-                               'last_domain'                   => 
phpgw::get_var('last_domain'),
-                               'sessionphpgwsessid'    => 
phpgw::get_var('sessionphpgwsessid'),
-                               'domain'                                => 
phpgw::get_var('domain')
-                       );
-                               
-                       foreach ($_GET as $varname => $value)
-                       {
-                               if(strpos($varname, '_')===0)
-                               {
-                                       
$link_data[substr($varname,1,strlen($varname)-1)] =  $value;
-                               }
-                       }
-
-                       $upload_url     = $GLOBALS['phpgw']->link('/index.php', 
$link_data);
-
-                       $js_code = self::get_js($upload_url);
-               
-                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
-                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/fonts/fonts-min.css');
-                       phpgwapi_yui::load_widget('uploader');
-
-                       
$GLOBALS['phpgw']->xslttpl->add_file(array('fileuploader'));
-                       $data = array
-                       (
-                               'js_code' => $js_code,
-                       );
-                       $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
array('fileuploader' => $data));
+               function add()
+               {
+                       $upload_target  = phpgw::get_var('upload_target');
+                       $id                             = phpgw::get_var('id');
+
+                       $link_data = array
+                       (
+                               'menuaction'                    => 
$upload_target,
+                               'id'                                    => $id,
+                               'last_loginid'                  => 
phpgw::get_var('last_loginid'),
+                               'last_domain'                   => 
phpgw::get_var('last_domain'),
+                               'sessionphpgwsessid'    => 
phpgw::get_var('sessionphpgwsessid'),
+                               'domain'                                => 
phpgw::get_var('domain')
+                       );
+                               
+                       foreach ($_GET as $varname => $value)
+                       {
+                               if(strpos($varname, '_')===0)
+                               {
+                                       
$link_data[substr($varname,1,strlen($varname)-1)] =  $value;
+                               }
+                       }
+
+                       $upload_url     = $GLOBALS['phpgw']->link('/index.php', 
$link_data);
+
+                       $js_code = self::get_js($upload_url);
+               
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/fonts/fonts-min.css');
+                       phpgwapi_yui::load_widget('uploader');
+
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('fileuploader'));
+                       $data = array
+                       (
+                               'js_code' => $js_code,
+                       );
+                       $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
array('fileuploader' => $data));
                }
-
-               
-               static function get_js($upload_url = '')
-               {
-                       $js_code = <<<JS
-                       YAHOO.util.Event.onDOMReady(function () { 
-                       var uiLayer = YAHOO.util.Dom.getRegion('selectLink');
-                       var overlay = YAHOO.util.Dom.get('uploaderOverlay');
-                       YAHOO.util.Dom.setStyle(overlay, 'width', 
uiLayer.right-uiLayer.left + "px");
-                       YAHOO.util.Dom.setStyle(overlay, 'height', 
uiLayer.bottom-uiLayer.top + "px");
-                       });
-
-                       // Custom URL for the uploader swf file (same folder).
-
-                       YAHOO.widget.Uploader.SWFURL = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/js/yahoo/uploader/assets/uploader.swf";
-
-                       // Instantiate the uploader and write it to its 
placeholder div.
-                       var uploader = new YAHOO.widget.Uploader( 
"uploaderOverlay" );
-                       
-                       // Add event listeners to various events on the 
uploader.
-                       // Methods on the uploader should only be called once 
the 
-                       // contentReady event has fired.
-       
-                       uploader.addListener('contentReady', 
handleContentReady);
-                       uploader.addListener('fileSelect', onFileSelect)
-                       uploader.addListener('uploadStart', onUploadStart);
-                       uploader.addListener('uploadProgress', 
onUploadProgress);
-                       uploader.addListener('uploadCancel', onUploadCancel);
-                       uploader.addListener('uploadComplete', 
onUploadComplete);
-                       uploader.addListener('uploadCompleteData', 
onUploadResponse);
-                       uploader.addListener('uploadError', onUploadError);
-                       uploader.addListener('rollOver', handleRollOver);
-                       uploader.addListener('rollOut', handleRollOut);
-                       uploader.addListener('click', handleClick);
-       
-                       // Variable for holding the filelist.
-                       var fileList;
-       
-                       // When the mouse rolls over the uploader, this function
-                       // is called in response to the rollOver event.
-                       // It changes the appearance of the UI element below 
the Flash overlay.
-                       function handleRollOver () {
-                               
YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get('selectLink'), 'color', "#FFFFFF");
-                               
YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get('selectLink'), 'background-color', 
"#000000");
-                       }
-
-                       // On rollOut event, this function is called, which 
changes the appearance of the
-                       // UI element below the Flash layer back to its 
original state.
-                       function handleRollOut () {
-                               
YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get('selectLink'), 'color', "#0000CC");
-                               
YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get('selectLink'), 'background-color', 
"#FFFFFF");
-                       }
-
-                       // When the Flash layer is clicked, the "Browse" dialog 
is invoked.
-                       // The click event handler allows you to do something 
else if you need to.
-                       function handleClick () {
-                       }
-
-                       // When contentReady event is fired, you can call 
methods on the uploader.
-                       function handleContentReady () {
-                           // Allows the uploader to send log messages to 
trace, as well as to YAHOO.log
-                               uploader.setAllowLogging(true);
-
-                               // Allows multiple file selection in "Browse" 
dialog.
-                               uploader.setAllowMultipleFiles(true);
-
-                               // New set of file filters.
-                               var ff = new Array({description:"Images", 
extensions:"*.jpg;*.png;*.gif"},
-                                                  {description:"Videos", 
extensions:"*.avi;*.mov;*.mpg"});
-
-                               // Apply new set of file filters to the 
uploader.
-//                             uploader.setFileFilters(ff);
-                       }
-
-                       // Actually uploads the files. In this case,
-                       // uploadAll() is used for automated queueing and 
upload 
-                       // of all files on the list.
-                       // You can manage the queue on your own and use 
"upload" instead,
-                       // if you need to modify the properties of the request 
for each
-                       // individual file.
-                       function upload() {
-                               if (fileList != null) {
-                                       
uploader.setSimUploadLimit(parseInt(document.getElementById("simulUploads").value));
-                                       uploader.uploadAll("{$upload_url}", 
"POST", null, "Filedata");
-                               }       
-                       }
-
-                       // Fired when the user selects files in the "Browse" 
dialog
-                       // and clicks "Ok".
-                       function onFileSelect(event) {
-                               if('fileList' in event && event.fileList != 
null) {
-                                       fileList = event.fileList;
-                                       createDataTable(fileList);
-                               }
-                       }
-
-                       function createDataTable(entries) {
-                         rowCounter = 0;
-                         this.fileIdHash = {};
-                         this.dataArr = [];
-                         for(var i in entries) {
-                            var entry = entries[i];
-                                entry["progress"] = "<div 
style='height:5px;width:100px;background-color:#CCC;'></div>";
-                            dataArr.unshift(entry);
-                         }
-
-                         for (var j = 0; j < dataArr.length; j++) {
-                           this.fileIdHash[dataArr[j].id] = j;
-                         }
-
-                           var myColumnDefs = [
-                               {key:"name", label: "File Name", 
sortable:false},
-                               {key:"size", label: "Size", sortable:false},
-                               {key:"progress", label: "Upload progress", 
sortable:false}
-                           ];
-
-                       this.myDataSource = new YAHOO.util.DataSource(dataArr);
-                       this.myDataSource.responseType = 
YAHOO.util.DataSource.TYPE_JSARRAY;
-                       this.myDataSource.responseSchema = {
-                       fields: ["id","name","created","modified","type", 
"size", "progress"]
-               };
-
-                       this.singleSelectDataTable = new 
YAHOO.widget.DataTable("dataTableContainer",
-                                  myColumnDefs, this.myDataSource, {
-                                      caption:"Files To Upload",
-                                      selectionMode:"single"
-                                  });
-                       }
-
-                       // Do something on each file's upload start.
-                       function onUploadStart(event) {
-                       
-                       }
-
-                       // Do something on each file's upload progress event.
-                       function onUploadProgress(event) {
-                               rowNum = fileIdHash[event["id"]];
-                               prog = 
Math.round(100*(event["bytesLoaded"]/event["bytesTotal"]));
-                               progbar = "<div 
style='height:5px;width:100px;background-color:#CCC;'><div 
style='height:5px;background-color:#F00;width:" + prog + "px;'></div></div>";
-                               singleSelectDataTable.updateRow(rowNum, {name: 
dataArr[rowNum]["name"], size: dataArr[rowNum]["size"], progress: progbar});    
 
-                       }
-
-                       // Do something when each file's upload is complete.
-                       function onUploadComplete(event) {
-                               rowNum = fileIdHash[event["id"]];
-                               prog = 
Math.round(100*(event["bytesLoaded"]/event["bytesTotal"]));
-                               progbar = "<div 
style='height:5px;width:100px;background-color:#CCC;'><div 
style='height:5px;background-color:#F00;width:100px;'></div></div>";
-                               singleSelectDataTable.updateRow(rowNum, {name: 
dataArr[rowNum]["name"], size: dataArr[rowNum]["size"], progress: progbar});
-                       }
-
-                       // Do something if a file upload throws an error.
-                       // (When uploadAll() is used, the Uploader will
-                       // attempt to continue uploading.
-                       function onUploadError(event) {
-
-                       }
-
-                       // Do something if an upload is cancelled.
-                       function onUploadCancel(event) {
-
-                       }
-
-                       // Do something when data is received back from the 
server.
-                       function onUploadResponse(event) {
-
-                       }
-JS;
-                       return $js_code;
-               }
+
+               
+               static function get_js($upload_url = '')
+               {
+                       $js_code = <<<JS
+                       YAHOO.util.Event.onDOMReady(function () { 
+                       var uiLayer = YAHOO.util.Dom.getRegion('selectLink');
+                       var overlay = YAHOO.util.Dom.get('uploaderOverlay');
+                       YAHOO.util.Dom.setStyle(overlay, 'width', 
uiLayer.right-uiLayer.left + "px");
+                       YAHOO.util.Dom.setStyle(overlay, 'height', 
uiLayer.bottom-uiLayer.top + "px");
+                       });
+
+                       // Custom URL for the uploader swf file (same folder).
+
+                       YAHOO.widget.Uploader.SWFURL = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/js/yahoo/uploader/assets/uploader.swf";
+
+                       // Instantiate the uploader and write it to its 
placeholder div.
+                       var uploader = new YAHOO.widget.Uploader( 
"uploaderOverlay" );
+                       
+                       // Add event listeners to various events on the 
uploader.
+                       // Methods on the uploader should only be called once 
the 
+                       // contentReady event has fired.
+       
+                       uploader.addListener('contentReady', 
handleContentReady);
+                       uploader.addListener('fileSelect', onFileSelect)
+                       uploader.addListener('uploadStart', onUploadStart);
+                       uploader.addListener('uploadProgress', 
onUploadProgress);
+                       uploader.addListener('uploadCancel', onUploadCancel);
+                       uploader.addListener('uploadComplete', 
onUploadComplete);
+                       uploader.addListener('uploadCompleteData', 
onUploadResponse);
+                       uploader.addListener('uploadError', onUploadError);
+                       uploader.addListener('rollOver', handleRollOver);
+                       uploader.addListener('rollOut', handleRollOut);
+                       uploader.addListener('click', handleClick);
+       
+                       // Variable for holding the filelist.
+                       var fileList;
+       
+                       // When the mouse rolls over the uploader, this function
+                       // is called in response to the rollOver event.
+                       // It changes the appearance of the UI element below 
the Flash overlay.
+                       function handleRollOver () {
+                               
YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get('selectLink'), 'color', "#FFFFFF");
+                               
YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get('selectLink'), 'background-color', 
"#000000");
+                       }
+
+                       // On rollOut event, this function is called, which 
changes the appearance of the
+                       // UI element below the Flash layer back to its 
original state.
+                       function handleRollOut () {
+                               
YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get('selectLink'), 'color', "#0000CC");
+                               
YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get('selectLink'), 'background-color', 
"#FFFFFF");
+                       }
+
+                       // When the Flash layer is clicked, the "Browse" dialog 
is invoked.
+                       // The click event handler allows you to do something 
else if you need to.
+                       function handleClick () {
+                       }
+
+                       // When contentReady event is fired, you can call 
methods on the uploader.
+                       function handleContentReady () {
+                           // Allows the uploader to send log messages to 
trace, as well as to YAHOO.log
+                               uploader.setAllowLogging(true);
+
+                               // Allows multiple file selection in "Browse" 
dialog.
+                               uploader.setAllowMultipleFiles(true);
+
+                               // New set of file filters.
+                               var ff = new Array({description:"Images", 
extensions:"*.jpg;*.png;*.gif"},
+                                                  {description:"Videos", 
extensions:"*.avi;*.mov;*.mpg"});
+
+                               // Apply new set of file filters to the 
uploader.
+//                             uploader.setFileFilters(ff);
+                       }
+
+                       // Actually uploads the files. In this case,
+                       // uploadAll() is used for automated queueing and 
upload 
+                       // of all files on the list.
+                       // You can manage the queue on your own and use 
"upload" instead,
+                       // if you need to modify the properties of the request 
for each
+                       // individual file.
+                       function upload() {
+                               if (fileList != null) {
+//                                     
uploader.setSimUploadLimit(parseInt(document.getElementById("simulUploads").value));
+                                       uploader.setSimUploadLimit(1);
+                                       uploader.uploadAll("{$upload_url}", 
"POST", null, "Filedata");
+                               }       
+                       }
+
+                       // Fired when the user selects files in the "Browse" 
dialog
+                       // and clicks "Ok".
+                       function onFileSelect(event) {
+                               if('fileList' in event && event.fileList != 
null) {
+                                       fileList = event.fileList;
+                                       createDataTable(fileList);
+                               }
+                       }
+
+                       function createDataTable(entries) {
+                         rowCounter = 0;
+                         this.fileIdHash = {};
+                         this.dataArr = [];
+                         for(var i in entries) {
+                            var entry = entries[i];
+                                entry["progress"] = "<div 
style='height:5px;width:100px;background-color:#CCC;'></div>";
+                            dataArr.unshift(entry);
+                         }
+
+                         for (var j = 0; j < dataArr.length; j++) {
+                           this.fileIdHash[dataArr[j].id] = j;
+                         }
+
+                           var myColumnDefs = [
+                               {key:"name", label: "File Name", 
sortable:false},
+                               {key:"size", label: "Size", sortable:false},
+                               {key:"progress", label: "Upload progress", 
sortable:false}
+                           ];
+
+                       this.myDataSource = new YAHOO.util.DataSource(dataArr);
+                       this.myDataSource.responseType = 
YAHOO.util.DataSource.TYPE_JSARRAY;
+                       this.myDataSource.responseSchema = {
+                       fields: ["id","name","created","modified","type", 
"size", "progress"]
+               };
+
+                       this.singleSelectDataTable = new 
YAHOO.widget.DataTable("dataTableContainer",
+                                  myColumnDefs, this.myDataSource, {
+                                      caption:"Files To Upload",
+                                      selectionMode:"single"
+                                  });
+                       }
+
+                       // Do something on each file's upload start.
+                       function onUploadStart(event) {
+                       
+                       }
+
+                       // Do something on each file's upload progress event.
+                       function onUploadProgress(event) {
+                               rowNum = fileIdHash[event["id"]];
+                               prog = 
Math.round(100*(event["bytesLoaded"]/event["bytesTotal"]));
+                               progbar = "<div 
style='height:5px;width:100px;background-color:#CCC;'><div 
style='height:5px;background-color:#F00;width:" + prog + "px;'></div></div>";
+                               singleSelectDataTable.updateRow(rowNum, {name: 
dataArr[rowNum]["name"], size: dataArr[rowNum]["size"], progress: progbar});    
 
+                       }
+
+                       // Do something when each file's upload is complete.
+                       function onUploadComplete(event) {
+                               rowNum = fileIdHash[event["id"]];
+                               prog = 
Math.round(100*(event["bytesLoaded"]/event["bytesTotal"]));
+                               progbar = "<div 
style='height:5px;width:100px;background-color:#CCC;'><div 
style='height:5px;background-color:#F00;width:100px;'></div></div>";
+                               singleSelectDataTable.updateRow(rowNum, {name: 
dataArr[rowNum]["name"], size: dataArr[rowNum]["size"], progress: progbar});
+                       }
+
+                       // Do something if a file upload throws an error.
+                       // (When uploadAll() is used, the Uploader will
+                       // attempt to continue uploading.
+                       function onUploadError(event) {
+                               console.log(event);
+                       }
+
+                       // Do something if an upload is cancelled.
+                       function onUploadCancel(event) {
+
+                       }
+
+                       // Do something when data is received back from the 
server.
+                       function onUploadResponse(event) {
+
+                       }
+JS;
+                       return $js_code;
+               }
  }

Modified: branches/Version-1_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uientity.inc.php     
2010-11-24 10:15:08 UTC (rev 6631)
+++ branches/Version-1_0-branch/property/inc/class.uientity.inc.php     
2010-11-24 10:18:44 UTC (rev 6632)
@@ -152,6 +152,9 @@
                function addfiles()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
+                       $GLOBALS['phpgw_info']['flags']['noframework'] = true;
+                       $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+
                        $id                             = phpgw::get_var('id', 
'int');
                        $jasperfile             = phpgw::get_var('jasperfile', 
'bool');
 
@@ -1708,17 +1711,12 @@
                                'lang_upload_file'                              
=> lang('Upload file'),
                                'lang_file_statustext'                  => 
lang('Select file to upload'),
                                'multiple_uploader'                             
=> $id ? true : '',
-                               'fileuploader_action'                   => 
"javascript:openwindow('"
-                                                                               
                 . $GLOBALS['phpgw']->link('/index.php', array
-                                                                               
                 (
-                                                                               
                        'menuaction'    => 'property.fileuploader.add',
-                                                                               
                        'upload_target' => 'property.uientity.addfiles',
-                                                                               
                        'id'                    => $id,
-                                                                               
                        '_entity_id'    => $this->entity_id,
-                                                                               
                        '_cat_id'               => $this->cat_id,
-                                                                               
                        '_type'                 => $this->type
-                                                                               
                 )) . "','400','400')",
-
+                               'fileuploader_action'                   => 
"{menuaction:'property.fileuploader.add',"
+                                                                               
                 ."upload_target:'property.uientity.addfiles',"
+                                                                               
                 ."id:'{$id}',"
+                                                                               
                 ."_entity_id:'{$this->entity_id}',"
+                                                                               
                 ."_cat_id:'{$this->cat_id}',"
+                                                                               
                 ."_type:'{$this->type}'}",
                                'value_origin'                                  
=> isset($values['origin'])?$values['origin']:'',
                                'value_origin_type'                             
=> isset($origin)?$origin:'',
                                'value_origin_id'                               
=> isset($origin_id)?$origin_id:'',

Modified: branches/Version-1_0-branch/property/js/yahoo/entity.edit.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/entity.edit.js        
2010-11-24 10:15:08 UTC (rev 6631)
+++ branches/Version-1_0-branch/property/js/yahoo/entity.edit.js        
2010-11-24 10:18:44 UTC (rev 6632)
@@ -10,6 +10,27 @@
 
 
/********************************************************************************/
 
+       this.myParticularRenderEvent = function()
+       {
+       }
+
+
+       this.fileuploader = function()
+       {
+               var sUrl = phpGWLink('index.php', fileuploader_action);
+               var onDialogShow = function(e, args, o)
+               {
+                       var frame = document.createElement('iframe');
+                       frame.src = sUrl;
+                       frame.width = "100%";
+                       frame.height = "350";
+                       o.setBody(frame);
+               };
+               lightbox.showEvent.subscribe(onDialogShow, lightbox);
+               lightbox.show();
+       }
+
+
 YAHOO.util.Event.addListener(window, "load", function()
                {
                        var loader = new YAHOO.util.YUILoader();
@@ -25,7 +46,7 @@
 
 YAHOO.util.Event.addListener(window, "load", function()
 {
-               lightbox = new YAHOO.widget.Dialog("test",
+               lightbox = new YAHOO.widget.Dialog("lightbox-placeholder",
                {
                        width : "600px",
                        fixedcenter : true,
@@ -37,5 +58,5 @@
 
                lightbox.render();
 
-               YAHOO.util.Dom.setStyle('test', 'display', 'block');
+               YAHOO.util.Dom.setStyle('lightbox-placeholder', 'display', 
'block');
 });

Modified: branches/Version-1_0-branch/property/js/yahoo/property.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/property.js   2010-11-24 
10:15:08 UTC (rev 6631)
+++ branches/Version-1_0-branch/property/js/yahoo/property.js   2010-11-24 
10:18:44 UTC (rev 6632)
@@ -554,6 +554,7 @@
  */
        this.onContextMenuBeforeShow = function(p_sType, p_aArgs)
        {
+               var prefixSelected = '';
                var oTarget = this.contextEventTarget;
                if (this.getRoot() == this)
                {
@@ -572,6 +573,7 @@
  */
        this.onContextMenuHide = function(p_sType, p_aArgs)
        {
+               var prefixSelected = '';
                if (this.getRoot() == this && oSelectedTR)
                {
                        oSelectedTR.style.backgroundColor  = "" ;

Modified: branches/Version-1_0-branch/property/templates/base/entity.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/entity.xsl      
2010-11-24 10:15:08 UTC (rev 6631)
+++ branches/Version-1_0-branch/property/templates/base/entity.xsl      
2010-11-24 10:18:44 UTC (rev 6632)
@@ -5,204 +5,17 @@
                        <xsl:when test="edit">
                                <xsl:apply-templates select="edit"/>
                        </xsl:when>
-                       <xsl:when test="view">
-                               <xsl:apply-templates select="view"/>
-                       </xsl:when>
                        <xsl:when test="empty">
                                <xsl:apply-templates select="empty"/>
                        </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:apply-templates select="list"/>
-                       </xsl:otherwise>
                </xsl:choose>
        </xsl:template>
        
-       <xsl:template match="list">
-               <xsl:apply-templates select="menu"/> 
-               <xsl:choose>
-                       <xsl:when test="msgbox_data != ''">
-                               <table align = "center">
-                               <tr>
-                                       <td align="center" colspan="3">
-                                               <xsl:call-template 
name="msgbox"/>
-                                       </td>
-                               </tr>
-                               </table>
-                       </xsl:when>
-               </xsl:choose>
-               <table width="100%"  cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                       <xsl:choose>
-                               <xsl:when test="group_filters != ''">
-                                       <xsl:variable 
name="select_action"><xsl:value-of select="select_action"/></xsl:variable>
-                                       <form method="post" name="search" 
action="{$select_action}">
-                                               <td>
-                                                       <xsl:call-template 
name="cat_select"/>
-                                               </td>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="district_list != ''">
-                                                               <td>
-                                                                       
<xsl:call-template name="select_district"/>
-                                                               </td>
-                                                       </xsl:when>
-                                               </xsl:choose>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="status_list!=''">
-                                                               <td 
align="left">
-                                                                       
<xsl:call-template name="status_select"/>
-                                                               </td>
-                                                       </xsl:when>
-                                               </xsl:choose>
-                                               <td align="center">
-                                                       <xsl:call-template 
name="user_id_select"/>
-                                               </td>
-                                                       <td align="right">
-                                                               
<xsl:call-template name="search_field_grouped"/>
-                                                       </td>
-                                               </form>
-                                       </xsl:when>
-                               <xsl:otherwise>
-                                       <td>
-                                               <xsl:call-template 
name="cat_filter"/>
-                                       </td>
-                                       <xsl:choose>
-                                               <xsl:when 
test="district_list!=''">
-                                                       <td align="left">
-                                               <xsl:call-template 
name="filter_district"/>
-                                                       </td>
-                                               </xsl:when>
-                                       </xsl:choose>
-                                       <xsl:choose>
-                                               <xsl:when 
test="status_list!=''">
-                                                       <td align="left">
-                                                               
<xsl:call-template name="status_filter"/>
-                                                       </td>
-                                               </xsl:when>
-                                       </xsl:choose>
-                                       <td align="center">
-                                               <xsl:call-template 
name="user_id_filter"/>
-                                       </td>
-                                       <td align="right">
-                                               <xsl:call-template 
name="search_field"/>
-                                       </td>
-                               </xsl:otherwise>
-                       </xsl:choose>
-                               <td valign ="top">
-                               <table>
-                               <tr>
-                               <td class="small_text" valign="top" 
align="left">
-                                       <xsl:variable 
name="link_download"><xsl:value-of select="link_download"/></xsl:variable>
-                                       <xsl:variable 
name="lang_download_help"><xsl:value-of 
select="lang_download_help"/></xsl:variable>
-                                       <xsl:variable 
name="lang_download"><xsl:value-of select="lang_download"/></xsl:variable>
-                                       <a href="javascript:var 
w=window.open('{$link_download}','','')"
-                                               
onMouseOver="overlib('{$lang_download_help}', CAPTION, '{$lang_download}')"
-                                               onMouseOut="nd()">
-                                               <xsl:value-of 
select="lang_download"/></a>
-                               </td>
-                               </tr>
-                               <tr>
-                               <td class="small_text" valign="top" 
align="left">
-                                       <xsl:variable 
name="link_columns"><xsl:value-of select="link_columns"/></xsl:variable>
-                                       <xsl:variable 
name="lang_columns_help"><xsl:value-of 
select="lang_columns_help"/></xsl:variable>
-                                       <xsl:variable 
name="lang_columns"><xsl:value-of select="lang_columns"/></xsl:variable>
-                                       <a href="javascript:var 
w=window.open('{$link_columns}','','width=300,height=600')"
-                                               
onMouseOver="overlib('{$lang_columns_help}', CAPTION, '{$lang_columns}')"
-                                               onMouseOut="nd()">
-                                               <xsl:value-of 
select="lang_columns"/></a>
-                               </td>
-                               </tr>
-                               </table>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="7" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                               <xsl:call-template name="table_header_entity"/>
-                               <xsl:call-template name="values"/>
-                               <xsl:choose>
-                                       <xsl:when test="table_add !=''">
-                                               <xsl:apply-templates 
select="table_add"/>
-                                       </xsl:when>
-                               </xsl:choose>   
-               </table>
-       </xsl:template>
 
-       <xsl:template name="table_header_entity">
-                       <tr class="th">
-                               <xsl:for-each select="table_header" >
-                                       <td class="th_text" width="{with}" 
align="{align}">
-                                               <xsl:choose>
-                                                       <xsl:when 
test="sort_link!=''">
-                                                               <a 
href="{sort}" onMouseover="window.status='{header}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of select="header"/></a>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               <xsl:value-of 
select="header"/>                                 
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
-                                       </td>
-                               </xsl:for-each>
-                       </tr>
-       </xsl:template>
 
-       <xsl:template name="values">
-               <xsl:for-each select="values" >
-                       <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                               <xsl:for-each select="row" >
-                                       <xsl:choose>
-                                               <xsl:when test="link">
-                                                       <td class="small_text" 
align="center">
-                                                               <a 
href="{link}" onMouseover="window.status='{statustext}';return true;" 
onMouseout="window.status='';return true;" target = "{target}"><xsl:value-of 
select="text"/></a>
-                                                       </td>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       <td class="small_text" 
align="left">
-                                                               <xsl:value-of 
select="value"/>                                  
-                                                       </td>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </xsl:for-each>
-                       </tr>
-               </xsl:for-each>
-       </xsl:template>
-
-       <xsl:template match="table_add">
-                       <tr>
-                               <td height="50">
-                                       <xsl:variable 
name="add_action"><xsl:value-of select="add_action"/></xsl:variable>
-                                       <xsl:variable 
name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
-                                       <form method="post" 
action="{$add_action}">
-                                               <input type="submit" name="add" 
value="{$lang_add}" onMouseout="window.status='';return true;">
-                                                       <xsl:attribute 
name="onMouseover">
-                                                               
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_add_statustext"/>
-                                                               <xsl:text>'; 
return true;</xsl:text>
-                                                       </xsl:attribute>
-                                               </input>
-                                       </form>
-                               </td>
-                       </tr>
-       </xsl:template>
-
 <!-- add / edit -->
 
-       <xsl:template match="edit">
+       <xsl:template match="edit" xmlns:php="http://php.net/xsl";>
                <xsl:choose>
                        <xsl:when test="mode = 'edit'">
                                <script type="text/javascript">
@@ -408,6 +221,10 @@
                <xsl:choose>
                        <xsl:when test="files!='' or fileupload = 1">
                                <div id="files">
+                               <script type="text/javascript">
+                                       var fileuploader_action = <xsl:value-of 
select="fileuploader_action" />;
+                               </script>
+
                                        <table cellpadding="2" cellspacing="2" 
width="80%" align="center">
                                        <!-- <xsl:call-template 
name="file_list"/> -->
                                                <tr>
@@ -513,6 +330,12 @@
                                </xsl:when>
                </xsl:choose>
                </div>
+
+       <div id="lightbox-placeholder" 
style="background-color:#000000;color:#FFFFFF;display:none">
+               <div class="hd" style="background-color:#000000;color:#000000; 
border:0; text-align:center"> <xsl:value-of select="php:function('lang', 
'fileuploader')" /> </div>
+               <div class="bd" style="text-align:center;"> </div>
+       </div>
+
        </xsl:template>
 
 

Modified: branches/Version-1_0-branch/property/templates/base/files.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/files.xsl       
2010-11-24 10:15:08 UTC (rev 6631)
+++ branches/Version-1_0-branch/property/templates/base/files.xsl       
2010-11-24 10:18:44 UTC (rev 6632)
@@ -119,7 +119,7 @@
                        <xsl:when test="multiple_uploader!=''">
                                <tr>
                                        <td>
-                                               <a href="{fileuploader_action}">
+                                               <a 
href="javascript:fileuploader()">
                                                        <xsl:attribute 
name="title">
                                                                <xsl:value-of 
select="php:function('lang', 'upload multiple files')" />
                                                        </xsl:attribute>

Modified: branches/Version-1_0-branch/property/templates/base/fileuploader.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/fileuploader.xsl        
2010-11-24 10:15:08 UTC (rev 6631)
+++ branches/Version-1_0-branch/property/templates/base/fileuploader.xsl        
2010-11-24 10:18:44 UTC (rev 6632)
@@ -3,6 +3,7 @@
                        <h2><xsl:value-of select="php:function('lang', 
'fileuploader')" /></h2>
                </div>
 
+<!--
                <style>
                        #selectFilesLink a, #uploadFilesLink a, #clearFilesLink 
a {
                                color: #0000CC;
@@ -19,15 +20,28 @@
                                background-color: #000000;
                        }
                </style>
-
+-->
                <div id="uiElements" style="display:inline;">
                        <div id="uploaderContainer">
                                <div id="uploaderOverlay" 
style="position:absolute; z-index:2"></div>
-                               <div id="selectFilesLink" style="z-index:1"><a 
id="selectLink" href="#">Select Files</a></div>
+                               <div id="selectFilesLink" style="z-index:1">
+                                       <input id="selectLink" type="button" 
name="selectLink" title="">
+                                               <xsl:attribute name="value">
+                                                       <xsl:value-of 
select="php:function('lang', 'Select Files')" />
+                                               </xsl:attribute>
+                                       </input>
+                               </div>
                        </div>
-                       <div id="uploadFilesLink"><a id="uploadLink" 
onClick="upload(); return false;" href="#">Upload Files</a></div>
+                       <div id="uploadFilesLink">
+                                       <input id="uploadLink" type="button" 
name="uploadLink" title="" onClick="upload(); return false;">
+                                               <xsl:attribute name="value">
+                                                       <xsl:value-of 
select="php:function('lang', 'Upload Files')" />
+                                               </xsl:attribute>
+                                       </input>
+                       </div>
                </div>
 
+<!--
                <div id="simUploads"> Number of simultaneous uploads:
                        <select id="simulUploads">
                                <option value="1">1</option>
@@ -36,7 +50,7 @@
                                <option value="4">4</option>
                        </select>
                </div>
-
+-->
                <div id="dataTableContainer"></div>
                <script type="text/javascript">
                        <xsl:value-of select="js_code"/>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]