Changeset 3569 for branches/2.2/filemanager/tp/expressowindow/js/makeW.js
- Timestamp:
- 12/09/10 16:47:45 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.