Changeset 2787 for sandbox/jabberit_messenger/trophy_expresso/js/makeW.js
- Timestamp:
- 05/14/10 14:53:17 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/jabberit_messenger/trophy_expresso/js/makeW.js
r2750 r2787 4 4 var dragDrop = null; 5 5 var path = path_jabberit; 6 7 var _dialogs = [ ]; 6 8 7 9 function build(pObj) … … 35 37 window.document.body.insertBefore( _window, document.body.lastChild ); 36 38 37 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; 38 45 39 46 if( pObj.draggable ) … … 45 52 else 46 53 { 47 load(pObj.id_window, "display"); 54 if ( pObj.barejid && loadscript.windowPOPUP( pObj.barejid ) ) 55 return false; 56 57 load(pObj.id_window, "display"); 48 58 } 49 59 } … … 83 93 if( arguments.length > 0 ) 84 94 { 95 var pId = null; 85 96 if( arguments.length == 1 ) 86 97 { 87 98 var obj = arguments[0]; 99 pId = obj.id_window 88 100 build(obj); 89 101 } … … 91 103 if( arguments.length == 2 ) 92 104 { 93 load( arguments[0], arguments[1]);105 load( ( pId = arguments[0] ), arguments[1]); 94 106 } 95 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 } ); 96 119 } 97 120 … … 105 128 { 106 129 if( arguments.length == 1 ) 107 _win = newbWindow( arguments[0] );130 return bWindow( arguments[0] ); 108 131 109 132 if( arguments.length == 2 ) 110 _win = newbWindow( arguments[0], arguments[1]);133 return bWindow( arguments[0], arguments[1]); 111 134 } 135 return false; 112 136 }
Note: See TracChangeset
for help on using the changeset viewer.