Changeset 2617 for trunk/phpgwapi/js
- Timestamp:
- 04/22/10 14:00:41 (14 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.