Ignore:
Timestamp:
05/18/10 09:41:04 (14 years ago)
Author:
rodsouza
Message:

Ticket #1058 - Permitindo o envio de formulário por requisição background

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/js/expressolivre/expressolivre.js

    r2732 r2802  
    1414 
    1515        var _loading = new Image( ); 
     16 
     17        function _form( ) 
     18        { 
     19                if ( ! arguments.length ) 
     20                        return false; 
     21 
     22                var _handler = null; 
     23 
     24                if ( arguments.length > 1 && arguments[ 1 ] && arguments[ 1 ].constructor == Function ) 
     25                        _handler = arguments[ 1 ]; 
     26                else 
     27                        _handler = _xlink.manipulator; 
     28 
     29                _wait( ); 
     30 
     31                return XForm( arguments[ 0 ], _handler ); 
     32        } 
    1633 
    1734        function _go( ) 
     
    7390        } 
    7491 
     92        function _wait( ) 
     93        { 
     94                if ( _divAppboxHeader ) 
     95                        _divAppboxHeader.innerHTML = ''; 
     96 
     97                if ( _divAppbox ) 
     98                { 
     99                        var _center = document.createElement( 'center' ); 
     100                        _center.appendChild( _loading ); 
     101 
     102                        _divAppbox.innerHTML = ''; 
     103                        _divAppbox.appendChild( _center ); 
     104                } 
     105        } 
     106 
    75107        function _ExpressoLivre( ) 
    76108        { 
    77109                return ( new function( ) 
    78110                { 
     111                        this.form = _form; 
    79112                        this.go = _go; 
    80113                        this.lang = _lang; 
     
    91124        _xlink = new XLink( _path( ) ); 
    92125        _xlink.handler( { 
    93                         "before" : function( ) 
    94                         { 
    95                                 if ( _divAppboxHeader ) 
    96                                         _divAppboxHeader.innerHTML = ''; 
     126                "before" : _wait, 
     127                "after" : function( ) 
     128                { 
     129                        if ( _divAppbox ) 
     130                                _divAppbox.innerHTML = ''; 
    97131 
    98                                 if ( _divAppbox ) 
    99                                 { 
    100                                         var _center = document.createElement( 'center' ); 
    101                                         _center.appendChild( _loading ); 
    102  
    103                                         _divAppbox.innerHTML = ''; 
    104                                         _divAppbox.appendChild( _center ); 
    105                                 } 
    106                         }, 
    107                         "after" : function( ) 
    108                         { 
    109                                 if ( _divAppbox ) 
    110                                         _divAppbox.innerHTML = ''; 
    111  
    112                                 while ( arguments[ 0 ].hasChildNodes( ) ) 
    113                                         _divAppbox.appendChild( arguments[ 0 ].firstChild ); 
    114                         } 
     132                        while ( arguments[ 0 ].hasChildNodes( ) ) 
     133                                _divAppbox.appendChild( arguments[ 0 ].firstChild ); 
     134                } 
    115135        } ); 
    116136 
     
    129149                _divAppbox = document.getElementById( 'divAppbox' ); 
    130150                _divAppbox.innerHTML = ''; 
     151 
     152                document.title = 'ExpressoLivre'; 
    131153 
    132154                document.getElementsByTagName( 'body' ).item( 0 ).style.overflowY = 'scroll'; 
Note: See TracChangeset for help on using the changeset viewer.