Changeset 2617
- Timestamp:
- 04/22/10 14:00:41 (14 years ago)
- Location:
- trunk/phpgwapi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/js/expressoAjax/dom.js
r2616 r2617 47 47 48 48 49 / /Make decimal round, using in size message49 /* Make decimal round, using in size message 50 50 function round(value, decimal){ 51 51 var return_value = Math.round( value * Math.pow( 10 , decimal ) ) / Math.pow( 10 , decimal ); 52 52 return( return_value ); 53 } 53 }*/ 54 54 55 55 function removeAll(id){ … … 81 81 82 82 function trim(inputString) { 83 if (typeof inputString != "string") 83 if (typeof inputString != "string") 84 84 return inputString; 85 85 86 86 var retValue = inputString; 87 87 var ch = retValue.substring(0, 1); 88 while (ch == " ") { 88 while (ch == " ") { 89 89 retValue = retValue.substring(1, retValue.length); 90 90 ch = retValue.substring(0, 1); 91 91 } 92 92 ch = retValue.substring(retValue.length-1, retValue.length); 93 while (ch == " ") { 93 while (ch == " ") { 94 94 retValue = retValue.substring(0, retValue.length-1); 95 95 ch = retValue.substring(retValue.length-1, retValue.length); 96 96 } 97 while (retValue.indexOf(" ") != -1) { 97 while (retValue.indexOf(" ") != -1) { 98 98 retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ")+1, retValue.length); 99 99 } 100 return retValue; 100 return retValue; 101 101 } 102 102 … … 164 164 return false; 165 165 } 166 } 167 168 function showBar(){ 169 bar = document.getElementById("toolbar"); 170 bar.style.visibility = ""; 171 bar.style.position ="static"; 172 but = document.getElementById("hiddenButton"); 173 but.style.visibility = ""; 174 but.style.position = "absolute"; 175 but.style.top = "55px"; 176 but.style.left = "2px"; 177 title = "{hide_bar_txt}"; 178 extra = document.getElementById("extraButton"); 179 extra.style.visibility = "hidden"; 180 but.innerHTML="<a title='"+title+"' onClick='javascript:changeBar()'><img src="+URL_SERVER+"'/phpgwapi/templates/default/images/up.button.png'></a>"; 181 var neverExpires = new Date("January 01, 2100 00:00:00"); 182 document.cookie = "showHeader=true"+ 183 ";expires=" + neverExpires.toGMTString()+ 184 ";path=/"; 185 } 186 187 function hideBar(){ 188 bar = document.getElementById("toolbar"); 189 bar.style.position ="absolute"; 190 bar.style.visibility = "hidden"; 191 but = document.getElementById("hiddenButton"); 192 but.style.visibility = "hidden"; 193 title = "{show_bar_txt}"; 194 extra = document.getElementById("extraButton"); 195 extra.style.visibility = "" 196 extra.style.top = "-11px"; 197 extra.style.left = "-10px"; 198 var neverExpires = new Date("January 01, 2100 00:00:00"); 199 document.cookie = "showHeader=false"+ 200 ";expires=" + neverExpires.toGMTString()+ 201 ";path=/"; 202 } 203 function changeBar(){ 204 bar = document.getElementById("toolbar"); 205 if(bar.style.visibility == "hidden") 206 showBar(); 207 else 208 hideBar(); 209 } 210 function initBar(val){ 211 212 if(val == 'true') 213 showBar(); 214 else 215 hideBar(); 216 } 217 var zoominTimer = new Array(); 218 var zoomoutTimer = new Array(); 219 function zoom_in(id) 220 { 221 clearTimeout(zoomoutTimer[id]); 222 var elem = document.getElementById(id); 223 if (elem.height > 34) 224 { 225 clearTimeout(zoominTimer[id]); 226 return false; 227 } 228 elem.height += 4; 229 elem.width += 4; 230 zoominTimer[id] = setTimeout('zoom_in("'+id+'");',30); 231 } 232 function zoom_out(id) 233 { 234 clearTimeout(zoominTimer[id]); 235 var elem = document.getElementById(id); 236 if ( ! elem ) 237 return; 238 if (elem.height < 24) 239 { 240 clearTimeout(zoomoutTimer[id]); 241 return false; 242 } 243 elem.height -= 2; 244 elem.width -= 2; 245 zoomoutTimer[id] = setTimeout('zoom_out("'+id+'");',30); 166 246 }; 167 247 -
trunk/phpgwapi/templates/default/navbar.tpl
r2578 r2617 6 6 </div> 7 7 {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 else49 hideBar();50 }51 function initBar(val){52 53 if(val == 'true')54 showBar();55 else56 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>89 8 90 9 <div class="toolbar" id="toolbar" style="visibility:hidden">
Note: See TracChangeset
for help on using the changeset viewer.