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

Ticket #1009 - Verificando a inclusão de javascript para que seja feita apenas uma vez.

Location:
trunk/phpgwapi/templates/default
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/templates/default/navbar.inc.php

    r2529 r2578  
    6464        } 
    6565 
     66        $curr_app = NULL; 
    6667        $i = 0; 
    6768        foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) 
     
    7980                        { 
    8081                                $current_app = True; 
    81                                 echo '<script>var curr_app = "' . str_replace('_','',$app) . 'id";</script>'; 
     82                                $curr_app = $app; 
    8283                        } 
    8384 
     
    120121                                        . ' onmouseout="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_but\'; zoom_out(this.firstChild.firstChild.id);}"' 
    121122                                        . ' onclick="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_butOut\'; zoom_out(curr_app);' 
    122                                         . 'document.getElementById(curr_app).parentNode.parentNode.className=\'navbar_but\';curr_app=\'' . str_replace('_','',$app) . 'id\'}"' 
     123                                        . 'var app = document.getElementById(curr_app); if ( app ) app.parentNode.parentNode.className=\'navbar_but\';curr_app=\'' . str_replace('_','',$app) . 'id\'}"' 
    123124                                        . ' class="navbar_but'.($current_app?'Out':'').'">'; 
    124125 
     
    162163                } 
    163164        } 
     165 
     166        echo '<script>var curr_app = "' . ( ( $curr_app ) ? str_replace( '_','',$curr_app ) . 'id' : '' ) . '";</script>'; 
    164167 
    165168        if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')      
  • trunk/phpgwapi/templates/default/navbar.tpl

    r2529 r2578  
    7575        clearTimeout(zoominTimer[id]);           
    7676        var elem = document.getElementById(id); 
     77        if ( ! elem ) 
     78                return; 
    7779        if (elem.height < 24) 
    7880        { 
Note: See TracChangeset for help on using the changeset viewer.