Ignore:
Timestamp:
05/14/10 14:53:17 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #986 - Implementado os popups para as janelas de conversa e somente para navegadores Firefox.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/jabberit_messenger/trophy_expresso/js/makeW.js

    r2750 r2787  
    44        var dragDrop    = null; 
    55        var path                = path_jabberit; 
     6         
     7        var _dialogs = [ ]; 
    68         
    79        function build(pObj) 
     
    3537                        window.document.body.insertBefore( _window, document.body.lastChild ); 
    3638                         
    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; 
    3845                         
    3946                        if( pObj.draggable ) 
     
    4552                else 
    4653                { 
    47                         load(pObj.id_window, "display"); 
     54                if ( pObj.barejid && loadscript.windowPOPUP( pObj.barejid ) ) 
     55                        return false; 
     56 
     57                load(pObj.id_window, "display"); 
    4858                } 
    4959        } 
     
    8393                if( arguments.length > 0 ) 
    8494                { 
     95                        var pId = null; 
    8596                        if( arguments.length == 1 ) 
    8697                        { 
    8798                                var obj = arguments[0]; 
     99                                pId = obj.id_window 
    88100                                build(obj); 
    89101                        } 
     
    91103                        if( arguments.length == 2 ) 
    92104                        { 
    93                                 load(arguments[0], arguments[1]); 
     105                                load( ( pId = arguments[0] ), arguments[1]); 
    94106                        }        
    95107                } 
     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                } ); 
    96119        } 
    97120 
     
    105128        {        
    106129                if( arguments.length == 1 ) 
    107                         _win = new bWindow( arguments[0] ); 
     130                        return bWindow( arguments[0] ); 
    108131                 
    109132                if( arguments.length == 2 ) 
    110                         _win = new bWindow( arguments[0], arguments[1]);         
     133                        return bWindow( arguments[0], arguments[1]);     
    111134        } 
     135        return false; 
    112136} 
Note: See TracChangeset for help on using the changeset viewer.