Changeset 2642


Ignore:
Timestamp:
04/27/10 16:58:10 (14 years ago)
Author:
rodsouza
Message:

Ticket #1009 - Corigindo problemas com o ordenamento referente aos javascripts.

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/index.php

    r2603 r2642  
    1111\**************************************************************************/ 
    1212 
    13 $GLOBALS['phpgw_info']['flags'] = array( 
    14         //'noheader' => False, 
    15         //'nonavbar' => False, 
     13$GLOBALS['phpgw_info']['flags'] = array 
     14( 
    1615        'currentapp' => 'expressoMail1_2', 
    1716        'update_version'        => '1.235', 
     
    2019 
    2120require_once('../header.inc.php'); 
    22  
    23 //include_once("inc/load_lang.php"); 
    2421 
    2522$_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 
     
    120117$_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam'] = $current_config['expressoMail_command_for_spam']; 
    121118$_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter']; 
    122 echo '<script> var use_spam_filter = "' . $current_config['expressoMail_use_spam_filter'] . '"</script>'; 
    123119// End Set Anti-Spam options. 
    124120 
     
    148144 
    149145//$GLOBALS['phpgw']->js->validate_file( 'modal', 'modal', 'expressoMail1_2' ); 
    150 $GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'calendar', 'expressoMail1_2' ); 
    151 $GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'calendar-setup', 'expressoMail1_2' ); 
    152 $GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'lang/calendar-br', 'expressoMail1_2' ); 
    153 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'globals', 'expressoMail1_2' ); 
    154 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'sniff_browser', 'expressoMail1_2' ); 
    155 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'common_functions', 'expressoMail1_2' ); 
    156 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'abas', 'expressoMail1_2' ); 
    157 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'doiMenuData', 'expressoMail1_2' ); 
    158 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'drag_area', 'expressoMail1_2' ); 
    159 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'draw_api_messages', 'expressoMail1_2' ); 
    160 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'draw_api_folders', 'expressoMail1_2' ); 
    161 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'DropDownContacts', 'expressoMail1_2' ); 
    162 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'InfoContact', 'expressoMail1_2' ); 
    163 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'local_messages', 'expressoMail1_2' ); 
    164 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'messages_controller', 'expressoMail1_2' ); 
    165 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'rich_text_editor', 'expressoMail1_2' ); 
    166 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'wfolders', 'expressoMail1_2' ); 
    167 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'main', 'expressoMail1_2' ); 
     146$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscalendar', 'calendar', 'expressoMail1_2' ); 
     147$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscalendar', 'calendar-setup', 'expressoMail1_2' ); 
     148$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscalendar', 'lang/calendar-br', 'expressoMail1_2' ); 
     149$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'globals', 'expressoMail1_2' ); 
     150$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'sniff_browser', 'expressoMail1_2' ); 
     151$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'common_functions', 'expressoMail1_2' ); 
     152$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'abas', 'expressoMail1_2' ); 
     153$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'doiMenuData', 'expressoMail1_2' ); 
     154$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'drag_area', 'expressoMail1_2' ); 
     155$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'draw_api_messages', 'expressoMail1_2' ); 
     156$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'draw_api_folders', 'expressoMail1_2' ); 
     157$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'DropDownContacts', 'expressoMail1_2' ); 
     158$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'InfoContact', 'expressoMail1_2' ); 
     159$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'local_messages', 'expressoMail1_2' ); 
     160$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'messages_controller', 'expressoMail1_2' ); 
     161$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'rich_text_editor', 'expressoMail1_2' ); 
     162$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'wfolders', 'expressoMail1_2' ); 
     163$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'main', 'expressoMail1_2' ); 
    168164 
    169165if ( $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'expressoMail' ][ 'use_shortcuts' ] ) 
     
    181177$script .= '<style type="text/css">@import url(' . $phpgwapi_url . '/js/jscalendar/calendar-win2k-1.css);</style>'; 
    182178$script .= '<script type="text/javascript">'; 
     179$script .= '    use_spam_filter = "' . $current_config['expressoMail_use_spam_filter'] . '";'; 
    183180$script .= '    special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'].'"] = \'Trash\';'; 
    184181$script .= '    special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'].'"] = \'Drafts\';'; 
     
    192189$script .= '    var locale = "'.$GLOBALS['phpgw']->common->getPreferredLanguage().'";'; 
    193190$script .= '    var account_id = ' . $GLOBALS['phpgw_info']['user']['account_id'] . ';'; 
    194 $script .= '    expresso.connector.updateVersion = "'. $GLOBALS['phpgw_info']['flags']['update_version'] . '";'; 
    195191$script .= '    var cyrus_delimiter = "' . $_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'] . '";'; 
    196192$script .= ( ( array_key_exists( 'HTTP_BACKGROUNDREQUEST', $_SERVER ) || array_key_exists( 'BackgroundRequest', $_GET ) ) ? 'init( );' : 'XEvents.add( window, "onload", init)' ); 
  • trunk/expressoMail1_2/js/jscode/abas.js

    r2630 r2642  
    1 var BordersArray = new Array(); 
    2 BordersArray[0] = new setBorderAttributes(0); 
    3  
    41function setBorderAttributes(ID) 
    52{ 
  • trunk/expressoMail1_2/js/jscode/common_functions.js

    r2618 r2642  
    11// BEGIN: FUNCTION RESIZE WINDOW 
    2 /* 
    32if (!expresso_offline) { 
    43        var _showBar = showBar; 
    54        var _hideBar = hideBar; 
    65} 
    7 */ 
    86 
    97function __showBar(){ 
     
    1917hideBar = __hideBar; 
    2018 
    21 window.onresize = resizeWindow; 
     19XEvents.add( window, 'onresize', resizeWindow ); 
    2220 
    2321function resizeWindow(){ 
     
    3634                        var div = Element("content_id_"+BordersArray[i].sequence); 
    3735 
    38                         // This comented code cause/avoid (!?) Firefox to stuck some request 
    3936                        if(div) 
    40 //                              div.setAttribute("style","height: "+parseInt(defaultHeight - 90)+"px;"); 
    41                                 div.style.height = defaultHeight - 90; 
     37                                div.style.height = ( defaultHeight - 90 ) + 'px'; 
    4238                        if(div_scroll) 
    43 //                              div_scroll.setAttribute("style","height: "+parseInt(defaultHeight - 130)+"px;"); 
    44                                 div_scroll.style.height = defaultHeight - 130; 
     39                                div_scroll.style.height = ( defaultHeight - 130 ) + 'px'; 
    4540                } 
    4641        } 
  • trunk/expressoMail1_2/js/jscode/draw_api_folders.js

    r2630 r2642  
    224224        else{ 
    225225                if(div) 
     226                { 
    226227                        div.innerHTML = ''; 
    227                 value = data['quota_percent']; 
    228                 q_used = data['quota_used']; 
    229                 table = document.getElementById("table_quota"); 
    230                 if(table) 
    231                         table.parentNode.removeChild(table); 
    232                 table = document.createElement("TABLE");         
    233                 tbody = document.createElement("TBODY");         
    234                 table.appendChild(tbody); 
    235                 table.id = "table_quota"; 
    236                 table.width="102"; 
    237                 table.border="0"; 
    238                 table.cellSpacing = 0; 
    239                 table.cellPadding = 0; 
    240  
    241                 //tr1 = document.createElement("TR"); 
    242                 td11 = document.createElement("TD"); 
    243                 td11.align="center"; 
    244                 td11.setAttribute("noWrap","true"); 
    245                 td11.innerHTML += '&nbsp;<span class="boxHeaderText">' + value+"% ("+q_used+"M/"+q_limit+"M)</span>"; 
    246                 //tr1.appendChild(td11); 
    247  
    248                 tr2 = document.createElement("TR"); 
    249                 td21 = document.createElement("TD"); 
    250                 td21.setAttribute("noWrap","true"); 
    251                 td21.height="15"; 
    252                 td22 = document.createElement("TD");     
    253                 td21.setAttribute("background", URL_SERVER + 'phpgwapi/templates/' + template + '/images/dsunused.gif'); 
    254                 table221 = document.createElement("TABLE"); 
    255                 tbody221 = document.createElement("TBODY"); 
    256                 table221.appendChild(tbody221); 
    257                 table221.style.width=value+"%";  
    258                 td21.width="102"; 
    259                 table221.border="0"; 
    260                 table221.cellSpacing = 0; 
    261                 table221.cellPadding = 0; 
    262                 tr221 = document.createElement("TR"); 
    263                 td221 = document.createElement("TD"); 
    264                 td221.height="15"; 
    265                 if(value > 90) { 
    266                         if(value >= 100) 
    267                                 write_msg(get_lang("Your Mailbox is 100% full! You must free more space or will not receive messages.")); 
     228                        value = data['quota_percent']; 
     229                        q_used = data['quota_used']; 
     230                        table = document.getElementById("table_quota"); 
     231                        if(table) 
     232                                table.parentNode.removeChild(table); 
     233                        table = document.createElement("TABLE");         
     234                        tbody = document.createElement("TBODY");         
     235                        table.appendChild(tbody); 
     236                        table.id = "table_quota"; 
     237                        table.width="102"; 
     238                        table.border="0"; 
     239                        table.cellSpacing = 0; 
     240                        table.cellPadding = 0; 
     241 
     242                        //tr1 = document.createElement("TR"); 
     243                        td11 = document.createElement("TD"); 
     244                        td11.align="center"; 
     245                        td11.setAttribute("noWrap","true"); 
     246                        td11.innerHTML += '&nbsp;<span class="boxHeaderText">' + value+"% ("+q_used+"M/"+q_limit+"M)</span>"; 
     247                        //tr1.appendChild(td11); 
     248 
     249                        tr2 = document.createElement("TR"); 
     250                        td21 = document.createElement("TD"); 
     251                        td21.setAttribute("noWrap","true"); 
     252                        td21.height="15"; 
     253                        td22 = document.createElement("TD");     
     254                        td21.setAttribute("background", URL_SERVER + 'phpgwapi/templates/' + template + '/images/dsunused.gif'); 
     255                        table221 = document.createElement("TABLE"); 
     256                        tbody221 = document.createElement("TBODY"); 
     257                        table221.appendChild(tbody221); 
     258                        table221.style.width=value+"%";  
     259                        td21.width="102"; 
     260                        table221.border="0"; 
     261                        table221.cellSpacing = 0; 
     262                        table221.cellPadding = 0; 
     263                        tr221 = document.createElement("TR"); 
     264                        td221 = document.createElement("TD"); 
     265                        td221.height="15"; 
     266                        if(value > 90) { 
     267                                if(value >= 100) 
     268                                        write_msg(get_lang("Your Mailbox is 100% full! You must free more space or will not receive messages.")); 
     269                                else 
     270                                        write_msg(get_lang("Warning: Your Mailbox is almost full!")); 
     271                                td221.setAttribute("background","templates/"+template+"/images/dsalert.gif"); 
     272                        } 
     273                        else if(value > 80) 
     274                                td221.setAttribute("background", URL_SERVER + 'expressoMail1_2/templates/' + template + '/images/dswarn.gif'); 
    268275                        else 
    269                                 write_msg(get_lang("Warning: Your Mailbox is almost full!")); 
    270                         td221.setAttribute("background","templates/"+template+"/images/dsalert.gif"); 
    271                 } 
    272                 else if(value > 80) 
    273                         td221.setAttribute("background", URL_SERVER + 'expressoMail1_2/templates/' + template + '/images/dswarn.gif'); 
    274                 else 
    275                         td221.className = 'dsused'; 
    276  
    277                 tr221.appendChild(td221); 
    278                 tbody221.appendChild(tr221); 
    279                 td21.appendChild(table221);      
    280                 tr2.appendChild(td21); 
    281                 tr2.appendChild(td11); 
    282  
    283                 //tr2.appendChild(td1); 
    284  
    285                 tbody.appendChild(tr2); //Desenho 
    286                 //tbody.appendChild(tr1); //Letras 
    287                 div.appendChild(table); 
     276                                td221.className = 'dsused'; 
     277 
     278                        tr221.appendChild(td221); 
     279                        tbody221.appendChild(tr221); 
     280                        td21.appendChild(table221);      
     281                        tr2.appendChild(td21); 
     282                        tr2.appendChild(td11); 
     283 
     284                        //tr2.appendChild(td1); 
     285 
     286                        tbody.appendChild(tr2); //Desenho 
     287                        //tbody.appendChild(tr1); //Letras 
     288                        div.appendChild(table); 
     289                } 
    288290        } 
    289291} 
     
    318320                span_paging.className = "boxHeaderText"; 
    319321                span_paging.align="right"; 
    320                 document.getElementById("div_menu_c3").appendChild(span_paging);         
     322                var div_menu_c3 = document.getElementById("div_menu_c3"); 
     323                if ( div_menu_c3 ) 
     324                        div_menu_c3.appendChild(span_paging);    
    321325        } 
    322326        span_paging.style.width="100%";                                  
  • trunk/expressoMail1_2/js/jscode/globals.js

    r2630 r2642  
    4646 
    4747var special_folders = new Array(4); 
     48special_folders[ 'Trash' ] = 'Trash'; 
     49special_folders[ 'Drafts' ] = 'Drafts'; 
     50special_folders[ 'Spam' ] = 'Spam'; 
     51special_folders[ 'Sent' ] = 'Sent'; 
    4852var trashfolder = 'Trash'; 
    4953var draftsfolder = 'Drafts'; 
     
    6165        "controller" : "/controller.php?action=" 
    6266} ); 
     67 
     68var BordersArray = new Array(); 
     69var expresso_local_messages; 
     70var proxy_mensagens; 
     71var wfolders; 
     72var use_spam_filter; 
  • trunk/expressoMail1_2/js/jscode/local_messages.js

    r2566 r2642  
    15881588        }; 
    15891589 
    1590         var expresso_local_messages; 
    1591         expresso_local_messages = new local_messages(); 
    1592         expresso_local_messages.create_objects(); 
  • trunk/expressoMail1_2/js/jscode/main.js

    r2630 r2642  
    66 
    77function init(){ 
     8        BordersArray[0] = new setBorderAttributes(0); 
     9        expresso_local_messages = new local_messages(); 
     10        expresso_local_messages.create_objects(); 
     11        proxy_mensagens = new messages_proxy(); 
     12        wfolders = new cWFolders(); 
     13 
    814        current_folder = "INBOX"; 
    915        if (!is_ie) 
  • trunk/expressoMail1_2/js/jscode/messages_controller.js

    r2572 r2642  
    324324        }; 
    325325 
    326         var proxy_mensagens; 
    327         proxy_mensagens = new messages_proxy(); 
  • trunk/expressoMail1_2/js/jscode/wfolders.js

    r2572 r2642  
    160160         
    161161/* Build the Object */ 
    162         var wfolders; 
    163         wfolders = new cWFolders(); 
  • trunk/phpgwapi/js/tools/xconnector.js

    r2628 r2642  
    108108                                                                        try 
    109109                                                                        { 
    110                                                                                 _request( _data ); 
     110                                                                          _request( _data ); 
    111111                                                                        } 
    112                                                                         catch( e ) 
     112                                                                        catch ( _e ) 
    113113                                                                        { 
    114                                                                                 //alert("#request\n\n" + _ID + "\n\n" + _e + "\n\n" + _e.description); 
     114                                                                                alert("#request\n\n" + _ID + "\n\n" + _e + "\n\n" + _e.description); 
    115115                                                                        } 
    116116 
     
    126126                                        catch( e ) 
    127127                                        { 
     128                                                //alert( "e\n\n" + e ); 
    128129                                        } 
    129130                                break; 
     
    141142 
    142143                var _SEND = null; 
    143  
    144                 //if ( _THREADS[_ID]._METHOD == 'GET' ) 
    145                 //      _TARGET += '?' + _ACTION; 
    146  
    147                 //_TARGET += _ID; 
    148144 
    149145                _THREADS[ _ID ]._XHR.open( ( ( _THREADS[ _ID ]._POST ) ? 'POST' : 'GET' ), _TARGET, true); 
  • trunk/phpgwapi/js/tools/xlink.js

    r2630 r2642  
    6262                                                        _container.appendChild( el.firstChild ); 
    6363 
    64                                                 var _inline = [ ]; 
    65                                                 for ( var i = 0; i < _new_scripts.length; i++ ) 
    66                                                         if ( _new_scripts[ i ][ 2 ] == undefined || _new_scripts[ i ][ 2 ].length == 0 ) 
    67                                                                 _inline[ _inline.length ] = _new_scripts[ i ][ 3 ]; 
     64                                                var _count = 0; 
     65                                                function _scripts( ) 
     66                                                { 
     67                                                        if ( _new_scripts[ _count ][ 2 ] == undefined || _new_scripts[ _count ][ 2 ].length == 0 ) 
     68                                                                _script.load( function( ) 
     69                                                                { 
     70                                                                        if ( ++_count < _new_scripts.length ) 
     71                                                                                _scripts( ); 
     72                                                                }, _new_scripts[ _count ][ 3 ] ); 
    6873                                                        else 
    69                                                                 _script.add( _new_scripts[ i ][ 2 ].substr( 
    70                                                                         URL_SERVER.length - 1, 
    71                                                                         _new_scripts[ i ][ 2 ].indexOf( '?' ) - URL_SERVER.length + 1 
    72                                                                 ) ); 
     74                                                        { 
     75                                                                _script.add( 
     76                                                                        _new_scripts[ _count ][ 2 ].substr( 
     77                                                                                URL_SERVER.length - 1, 
     78                                                                                _new_scripts[ _count ][ 2 ].indexOf( '?' ) - URL_SERVER.length + 1 
     79                                                                        ) 
     80                                                                ); 
     81                                                                if ( ++_count < _new_scripts.length ) 
     82                                                                        _scripts( ); 
     83                                                        } 
     84                                                } 
    7385 
    74                                                 var _it_has_loaded = _script.load( function( ) 
     86                                                if ( _new_scripts.length ) 
    7587                                                { 
    76                                                         if ( _inline.length ) 
    77                                                                 window.eval( _inline.join( '' ) ); 
    78                                                 } ); 
    79  
    80                                                 if ( ! _it_has_loaded && _inline.length ) 
    81                                                         window.eval( _inline.join( '' ) ); 
     88                                                        _scripts( ); 
     89                                                        _script.load( ); 
     90                                                } 
    8291                                        } 
    8392                                } ); 
  • trunk/phpgwapi/js/tools/xscript.js

    r2630 r2642  
    1818        function _load( ) 
    1919        { 
    20                 if ( ! _new.length ) 
    21                         return false; 
    22  
    2320                var _handler = null; 
    2421                if ( arguments.length && typeof arguments[ 0 ] == 'function' ) 
    2522                        _handler = arguments[ 0 ]; 
    2623 
    27                 _connector.go( { 
    28                         "access" : URL_SERVER + 'controller.php?action=phpgwapi.javascript.get_source&source=' + _new.join( ';' ), 
    29                         "handler" : function( data ) 
    30                         { 
    31                                 for ( var i = 0; i < _new.length; i++ ) 
    32                                         _loaded[ _loaded.length ] = _new[ i ]; 
     24                var _inline = ''; 
     25                if ( arguments.length && typeof arguments[ 1 ] == 'string' ) 
     26                        _inline = arguments[ 1 ]; 
    3327 
    34                                 _new = [ ]; 
     28                if ( ! _new.length ) 
     29                { 
     30                        window.eval( _inline); 
     31                        if ( _handler ) 
     32                                _handler( ); 
     33                } 
     34                else 
     35                { 
     36                        var _scripts = _new.join( ';' ); 
    3537 
    36                                 window.eval( data ); 
     38                        for ( var i = 0; i < _new.length; i++ ) 
     39                                _loaded[ _loaded.length ] = _new[ i ]; 
    3740 
    38                                 if ( _handler ) 
    39                                         _handler( data ); 
    40                         } 
    41                 } ); 
     41                        _new = [ ]; 
     42 
     43                        _connector.go( { 
     44                                "access" : URL_SERVER + 'controller.php?action=phpgwapi.javascript.get_source&source=' + _scripts, 
     45                                "handler" : function( data ) 
     46                                { 
     47                                        window.eval( data + _inline); 
     48 
     49                                        if ( _handler ) 
     50                                                _handler( ); 
     51                                } 
     52                        } ); 
     53                } 
    4254        } 
    4355 
Note: See TracChangeset for help on using the changeset viewer.