Changeset 3569 for branches/2.2/filemanager/tp/expressowindow/js
- Timestamp:
- 12/09/10 16:47:45 (14 years ago)
- Location:
- branches/2.2/filemanager/tp/expressowindow/js
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/tp/expressowindow/js/dragdrop.js
r3436 r3569 6 6 var _parent = null; 7 7 8 function _configEvent( pObj, pEvent, pHandler)9 { 10 if ( typeof pObj == 'object' )8 function _configEvent( pObj, pEvent, pHandler ) 9 { 10 if ( pObj && typeof pObj == 'object' ) 11 11 { 12 12 if ( pEvent.substring(0, 2) == 'on' ) … … 22 22 else if ( arguments.length == 4 ) 23 23 { 24 if ( pObj.removeEventListener && pObj.removeEventListener != 'undefined') 25 pObj.removeEventListener(pEvent, pHandler, false); 24 if ( pObj.removeEventListener ) 25 { 26 pObj.removeEventListener( pEvent, pHandler, false ); 27 } 26 28 else if ( pObj.detachEvent ) 27 pObj.detachEvent('on' + pEvent, pHandler); 29 { 30 pObj.detachEvent( 'on' + pEvent, pHandler ); 31 } 28 32 } 29 33 } … … 148 152 if ( _element ) 149 153 { 150 _mouseUpShadow();151 152 154 _configEvent(_element, 'onmousemove', _mouseMove, 'remove'); 153 155 _configEvent(top.document, 'onmousemove', _mouseMove, 'remove'); … … 157 159 158 160 _element.mouseOffset = null; 159 _ element = null;161 _mouseUpShadow(); 160 162 } 161 163 } -
branches/2.2/filemanager/tp/expressowindow/js/makeW.js
r3568 r3569 4 4 var dragDrop = null; 5 5 var path = path_filemanager + "tp/expressowindow/"; 6 7 var _dialogs = [ ]; 6 8 7 9 function build(pObj) … … 30 32 _window.setAttribute("leftOld", pObj.left + "px" ); 31 33 34 if( pObj.leftOld ) 35 _window.setAttribute("leftOld", pObj.leftOld + "px" ); 36 32 37 window.document.body.insertBefore( _window, document.body.lastChild ); 33 38 34 getElement(pObj.id_window + '__content').innerHTML = pObj.content; 39 if ( pObj.content.constructor == String ) 40 getElement(pObj.id_window + '__content').innerHTML = pObj.content; 41 else 42 getElement(pObj.id_window + '__content').appendChild( pObj.content ); 43 44 _dialogs[ pObj.id_window ] = getElement(pObj.id_window + '__content').firstChild; 35 45 36 46 if( pObj.draggable ) … … 42 52 else 43 53 { 44 load(pObj.id_window, "display"); 54 if ( pObj.barejid && loadscript.windowPOPUP( pObj.barejid ) ) 55 return false; 56 57 load(pObj.id_window, "display"); 45 58 } 46 59 } … … 59 72 if ( pVisible == "display" ) 60 73 { 61 _window.style.left = _window.getAttribute("leftOld"); 74 if( _window.style.left == "-1500px" ) 75 _window.style.left = _window.getAttribute("leftOld"); 62 76 } 63 77 … … 79 93 if( arguments.length > 0 ) 80 94 { 95 var pId = null; 81 96 if( arguments.length == 1 ) 82 97 { 83 JSLoader.load([path + "css/" + theme_filemanager]);84 85 98 var obj = arguments[0]; 86 87 setTimeout(function(){ build(obj);}, 200);99 pId = obj.id_window 100 build(obj); 88 101 } 89 102 90 103 if( arguments.length == 2 ) 91 104 { 92 load( arguments[0], arguments[1]);105 load( ( pId = arguments[0] ), arguments[1]); 93 106 } 94 107 } 108 109 return ( new function( ) 110 { 111 this.content = function( ) 112 { 113 if ( arguments.length ) 114 getElement( pId + '__content').appendChild( _dialogs[ pId ] ); 115 116 return _dialogs[ obj.id_window ]; 117 }; 118 } ); 95 119 } 96 120 … … 104 128 { 105 129 if( arguments.length == 1 ) 106 _win = newbWindow( arguments[0] );130 return bWindow( arguments[0] ); 107 131 108 132 if( arguments.length == 2 ) 109 _win = newbWindow( arguments[0], arguments[1]);133 return bWindow( arguments[0], arguments[1]); 110 134 } 135 return false; 111 136 } -
branches/2.2/filemanager/tp/expressowindow/js/xtools.js
r3436 r3569 90 90 var params = arguments[2]; 91 91 for (var i in params ) 92 xslProc.setParameter(null, i, params[i]); 92 if ( params[ i ] && params[ i ].constructor != Function ) 93 xslProc.setParameter(null, String( i ), String( params[i] ) ); 93 94 } 94 95 … … 112 113 var params = arguments[2]; 113 114 for (var i in params ) 114 xslProc.addParameter(i, params[i], ''); 115 if ( params[ i ] && params[ i ].constructor != Function ) 116 { 117 xslProc.addParameter( String( i ), String( params[i] ), ''); 118 } 115 119 } 116 120
Note: See TracChangeset
for help on using the changeset viewer.