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

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

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  
    66        var _parent             = null; 
    77 
    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' ) 
    1111                { 
    1212                        if ( pEvent.substring(0, 2) == 'on' ) 
     
    2222                        else if ( arguments.length == 4 ) 
    2323                        { 
    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                                } 
    2628                                else if ( pObj.detachEvent ) 
    27                                         pObj.detachEvent('on' + pEvent, pHandler); 
     29                                { 
     30                                        pObj.detachEvent( 'on' + pEvent, pHandler ); 
     31                                } 
    2832                        } 
    2933                } 
     
    148152                if ( _element ) 
    149153                { 
    150                         _mouseUpShadow(); 
    151                          
    152154                        _configEvent(_element, 'onmousemove', _mouseMove, 'remove'); 
    153155                        _configEvent(top.document, 'onmousemove', _mouseMove, 'remove'); 
     
    157159 
    158160                        _element.mouseOffset = null; 
    159                         _element = null; 
     161                        _mouseUpShadow(); 
    160162                } 
    161163        } 
  • 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} 
  • branches/2.2/filemanager/tp/expressowindow/js/xtools.js

    r3436 r3569  
    9090                                var params = arguments[2]; 
    9191                                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] ) ); 
    9394                        } 
    9495 
     
    112113                                var params = arguments[2]; 
    113114                                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                                        } 
    115119                        } 
    116120 
Note: See TracChangeset for help on using the changeset viewer.