Changeset 2515
- Timestamp:
- 04/14/10 10:05:18 (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/common_functions.js
r2497 r2515 598 598 599 599 function url_encode(str){ 600 var hex_chars = "0123456789ABCDEF"; 601 var noEncode = /^([a-zA-Z0-9\_\-\.])$/; 602 var n, strCode, hex1, hex2, strEncode = ""; 603 604 for(n = 0; n < str.length; n++) { 605 if (noEncode.test(str.charAt(n))) { 606 strEncode += str.charAt(n); 607 } else { 608 strCode = str.charCodeAt(n); 609 hex1 = hex_chars.charAt(Math.floor(strCode / 16)); 610 hex2 = hex_chars.charAt(strCode % 16); 611 strEncode += "%" + (hex1 + hex2); 612 } 613 } 614 return strEncode; 600 return escape(str); 615 601 } 616 602 617 603 function url_decode(str) { 618 619 var n, strCode, strDecode = ""; 620 for (n = 0; n < str.length; n++) { 621 if (str.charAt(n) == "%") { 622 strCode = str.charAt(n + 1) + str.charAt(n + 2); 623 strDecode += String.fromCharCode(parseInt(strCode, 16)); 624 n += 2; 625 } else { 626 strDecode += str.charAt(n); 627 } 628 } 629 return strDecode; 604 return unescape(str); 630 605 } 631 606 -
trunk/phpgwapi/js/expressoAjax/expressoAjax.js
r2403 r2515 320 320 cConnector.prototype.newRequest = function (id, target, method, handler, data) 321 321 { 322 var params = data;323 322 this.tid = id; 324 323 if (this.requests[id]) { … … 339 338 var sub_handler = function () 340 339 { 341 var progressBar = _thisObject.progressBar;342 343 340 try 344 341 { … … 367 364 } 368 365 handler(data); 369 _thisObject.addToCache( params?id+"&"+params:id,data);366 _thisObject.addToCache(data?id+"&"+data:id,data); 370 367 delete _thisObject.requests[id]; 371 368 _thisObject.requests[id] = null;
Note: See TracChangeset
for help on using the changeset viewer.