Ignore:
Timestamp:
04/22/10 14:00:41 (14 years ago)
Author:
amuller
Message:

Ticket #911 - Aproveitamento de funções comuns do navbar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/templates/default/navbar.tpl

    r2578 r2617  
    66</div> 
    77{app_extra_icons_div} 
    8 <script language="Javascript">    
    9         function showBar(){ 
    10                 bar = document.getElementById("toolbar");        
    11                 bar.style.visibility = ""; 
    12                 bar.style.position ="static"; 
    13                 but = document.getElementById("hiddenButton");           
    14                 but.style.visibility = ""; 
    15                 but.style.position = "absolute";                 
    16                 but.style.top = "55px";          
    17                 but.style.left = "2px";          
    18                 title = "{hide_bar_txt}"; 
    19                 extra = document.getElementById("extraButton"); 
    20                 extra.style.visibility = "hidden";               
    21                 but.innerHTML="<a title='"+title+"' onClick='javascript:changeBar()'><img src='{img_root}/up.button.png'></a>"; 
    22                 var neverExpires = new Date("January 01, 2100 00:00:00"); 
    23                 document.cookie = "showHeader=true"+ 
    24                                                   ";expires=" + neverExpires.toGMTString()+ 
    25                                                   ";path=/"; 
    26         } 
    27  
    28         function hideBar(){ 
    29                 bar = document.getElementById("toolbar");        
    30                 bar.style.position ="absolute"; 
    31                 bar.style.visibility = "hidden"; 
    32                 but = document.getElementById("hiddenButton");           
    33                 but.style.visibility = "hidden"; 
    34                 title = "{show_bar_txt}"; 
    35                 extra = document.getElementById("extraButton"); 
    36                 extra.style.visibility = "" 
    37                 extra.style.top = "-11px";               
    38                 extra.style.left = "-10px";              
    39                 var neverExpires = new Date("January 01, 2100 00:00:00"); 
    40                 document.cookie = "showHeader=false"+ 
    41                                                   ";expires=" + neverExpires.toGMTString()+ 
    42                                                   ";path=/"; 
    43         } 
    44         function changeBar(){ 
    45                 bar = document.getElementById("toolbar");                        
    46                 if(bar.style.visibility == "hidden") 
    47                         showBar();               
    48                 else 
    49                         hideBar(); 
    50         } 
    51         function initBar(val){ 
    52  
    53                 if(val == 'true') 
    54                         showBar();               
    55                 else 
    56                         hideBar();               
    57         } 
    58 var zoominTimer = new Array(); 
    59 var zoomoutTimer = new Array(); 
    60 function zoom_in(id) 
    61 { 
    62         clearTimeout(zoomoutTimer[id]); 
    63         var elem = document.getElementById(id); 
    64         if (elem.height > 34) 
    65         { 
    66                 clearTimeout(zoominTimer[id]); 
    67                 return false; 
    68         }        
    69         elem.height += 4; 
    70         elem.width += 4; 
    71         zoominTimer[id] = setTimeout('zoom_in("'+id+'");',30); 
    72 } 
    73 function zoom_out(id) 
    74 { 
    75         clearTimeout(zoominTimer[id]);           
    76         var elem = document.getElementById(id); 
    77         if ( ! elem ) 
    78                 return; 
    79         if (elem.height < 24) 
    80         { 
    81                 clearTimeout(zoomoutTimer[id]); 
    82                 return false; 
    83         }        
    84         elem.height -= 2; 
    85         elem.width -= 2; 
    86         zoomoutTimer[id] = setTimeout('zoom_out("'+id+'");',30); 
    87 } 
    88 </script> 
    898 
    909<div class="toolbar" id="toolbar" style="visibility:hidden"> 
Note: See TracChangeset for help on using the changeset viewer.