Ignore:
Timestamp:
12/09/10 16:47:45 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #1395 - Padronizacao das janelas do filemanager com as do Expresso.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/filemanager/tp/expressowindow/js/makeW.js

    r3568 r3569  
    44        var dragDrop    = null; 
    55        var path                = path_filemanager + "tp/expressowindow/"; 
     6                 
     7        var _dialogs = [ ]; 
    68         
    79        function build(pObj) 
     
    3032                                _window.setAttribute("leftOld", pObj.left + "px" ); 
    3133                         
     34                        if( pObj.leftOld ) 
     35                                _window.setAttribute("leftOld", pObj.leftOld + "px" ); 
     36                         
    3237                        window.document.body.insertBefore( _window, document.body.lastChild ); 
    3338                         
    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; 
    3545                         
    3646                        if( pObj.draggable ) 
     
    4252                else 
    4353                { 
    44                         load(pObj.id_window, "display"); 
     54                if ( pObj.barejid && loadscript.windowPOPUP( pObj.barejid ) ) 
     55                        return false; 
     56 
     57                load(pObj.id_window, "display"); 
    4558                } 
    4659        } 
     
    5972                        if ( pVisible == "display" ) 
    6073                        { 
    61                                 _window.style.left = _window.getAttribute("leftOld"); 
     74                                if( _window.style.left == "-1500px" ) 
     75                                        _window.style.left = _window.getAttribute("leftOld"); 
    6276                        } 
    6377                         
     
    7993                if( arguments.length > 0 ) 
    8094                { 
     95                        var pId = null; 
    8196                        if( arguments.length == 1 ) 
    8297                        { 
    83                                 JSLoader.load([path + "css/" + theme_filemanager]); 
    84                                  
    8598                                var obj = arguments[0]; 
    86                                  
    87                                 setTimeout(function(){ build(obj);}, 200); 
     99                                pId = obj.id_window 
     100                                build(obj); 
    88101                        } 
    89102                         
    90103                        if( arguments.length == 2 ) 
    91104                        { 
    92                                 load(arguments[0], arguments[1]); 
     105                                load( ( pId = arguments[0] ), arguments[1]); 
    93106                        }        
    94107                } 
     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                } ); 
    95119        } 
    96120 
     
    104128        {        
    105129                if( arguments.length == 1 ) 
    106                         _win = new bWindow( arguments[0] ); 
     130                        return bWindow( arguments[0] ); 
    107131                 
    108132                if( arguments.length == 2 ) 
    109                         _win = new bWindow( arguments[0], arguments[1]);         
     133                        return bWindow( arguments[0], arguments[1]);     
    110134        } 
     135        return false; 
    111136} 
Note: See TracChangeset for help on using the changeset viewer.