Changeset 3068 for branches/2.2/expressoMail1_2/js
- Timestamp:
- 07/19/10 15:14:22 (14 years ago)
- Location:
- branches/2.2/expressoMail1_2/js
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/js/abas.js
r3018 r3068 67 67 if(ID){ 68 68 connector.loadScript("rich_text_editor"); 69 if(typeof(RichTextEditor) == 'undefined'){ 70 setTimeout('alernate_border(\''+ID+'\');',500); 71 return false; 72 } 69 73 RichTextEditor.loadEditor(ID); 70 74 } -
branches/2.2/expressoMail1_2/js/common_functions.js
r3064 r3068 505 505 { 506 506 connector.loadScript("QuickCatalogSearch"); 507 if (typeof(QuickCatalogSearch) == 'undefined'){ 508 setTimeout('emQuickSearch("'+emailList+'", "'+field+'", "'+ID+'")',500); 509 return false; 510 } 507 511 QuickCatalogSearch.showList(data, quickSearchKeyBegin, quickSearchKeyEnd); 508 512 } … … 510 514 { 511 515 connector.loadScript("QuickSearchUser"); 516 if (typeof(QuickSearchUser) == 'undefined'){ 517 setTimeout('emQuickSearch("'+emailList+'", "'+field+'", "'+ID+'")',500); 518 return false; 519 } 512 520 QuickSearchUser.showList(data); 513 521 } … … 548 556 function folderbox(){ 549 557 connector.loadScript("TreeS"); 558 if (typeof(ttree) == 'undefined'){ 559 setTimeout('folderbox()',500); 560 return false; 561 } 550 562 ttree.make_Window(); 551 563 } … … 554 566 connector.loadScript("filter"); 555 567 connector.loadScript("filters"); 568 if (typeof(filters) == 'undefined') 569 { 570 setTimeout('filterbox()',500); 571 return false; 572 } 556 573 filters.Forms(); 557 574 } … … 566 583 } 567 584 connector.loadScript("sharemailbox"); 585 if (typeof(sharemailbox) == 'undefined') 586 { 587 setTimeout('sharebox()',500); 588 return false; 589 } 568 590 sharemailbox.makeWindow(options); 569 591 } … … 576 598 577 599 function search_emails(value){ 600 connector.loadScript("TreeS"); 578 601 connector.loadScript("search"); 602 if (typeof(EsearchE) == 'undefined' || typeof(ttree) == 'undefined'){ 603 setTimeout('search_emails("'+value+'")',500); 604 return false; 605 } 579 606 EsearchE.showForms(value); 580 607 } … … 589 616 590 617 function url_encode(str){ 591 var hex_chars = "0123456789ABCDEF"; 592 var noEncode = /^([a-zA-Z0-9\_\-\.])$/; 593 var n, strCode, hex1, hex2, strEncode = ""; 594 595 for(n = 0; n < str.length; n++) { 596 if (noEncode.test(str.charAt(n))) { 597 strEncode += str.charAt(n); 598 } else { 599 strCode = str.charCodeAt(n); 600 hex1 = hex_chars.charAt(Math.floor(strCode / 16)); 601 hex2 = hex_chars.charAt(strCode % 16); 602 strEncode += "%" + (hex1 + hex2); 603 } 604 } 605 return strEncode; 606 } 607 608 function url_decode(str) { 609 610 var n, strCode, strDecode = ""; 611 for (n = 0; n < str.length; n++) { 612 if (str.charAt(n) == "%") { 613 strCode = str.charAt(n + 1) + str.charAt(n + 2); 614 strDecode += String.fromCharCode(parseInt(strCode, 16)); 615 n += 2; 616 } else { 617 strDecode += str.charAt(n); 618 } 619 } 620 return strDecode; 621 } 618 var hex_chars = "0123456789ABCDEF"; 619 var noEncode = /^([a-zA-Z0-9\_\-\.])$/; 620 var n, strCode, hex1, hex2, strEncode = ""; 621 622 for(n = 0; n < str.length; n++) { 623 if (noEncode.test(str.charAt(n))) { 624 strEncode += str.charAt(n); 625 } else { 626 strCode = str.charCodeAt(n); 627 hex1 = hex_chars.charAt(Math.floor(strCode / 16)); 628 hex2 = hex_chars.charAt(strCode % 16); 629 strEncode += "%" + (hex1 + hex2); 630 } 631 } 632 return strEncode; 633 } 634 635 function url_decode(str) { 636 637 var n, strCode, strDecode = ""; 638 for (n = 0; n < str.length; n++) { 639 if (str.charAt(n) == "%") { 640 strCode = str.charAt(n + 1) + str.charAt(n + 2); 641 strDecode += String.fromCharCode(parseInt(strCode, 16)); 642 n += 2; 643 } else { 644 strDecode += str.charAt(n); 645 } 646 } 647 return strDecode; 648 } 622 649 623 650 function Element (el) { -
branches/2.2/expressoMail1_2/js/connector.js
r3018 r3068 451 451 452 452 cConnector.prototype.loadAllScripts = function(scripts) { 453 454 453 for(var i = 0; i < scripts.length; i++){ 454 this.loadScript(scripts[i]); 455 455 } 456 456 } … … 464 464 script.id = 'uploadscript_'+scriptPath; 465 465 script.type = 'text/javascript'; 466 467 466 if(is_ie) { 468 469 467 this.oxmlhttp.open("GET", "js/"+scriptPath+".js?"+this.updateVersion, false); 470 468 this.oxmlhttp.setRequestHeader('Content-Type','text/plain'); 471 469 this.oxmlhttp.send(null); 472 470 if(this.oxmlhttp.status != 0 && this.oxmlhttp.status != 200 || this.oxmlhttp.status == 0 && this.oxmlhttp.responseText.length == 0) 473 471 throw new Error("Error " + this.oxmlhttp.status + "("+this.oxmlhttp.statusText+") when loading script file '"+scriptPath+"'"); 474 script.text = this.oxmlhttp.responseText; 472 script.text = this.oxmlhttp.responseText; 475 473 } 476 474 else { … … 479 477 480 478 head.appendChild(script); 481 return; 479 return; 482 480 } 483 481 //------------------------------------ END: Functions for Progress Bar -------------------------------------------------// -
branches/2.2/expressoMail1_2/js/draw_api.js
r3064 r3068 778 778 Element('msg_number').value = ''; 779 779 } 780 781 if(!is_ie) { 782 var scripts = new Array("ccQuickAdd", 783 "color_palette", 784 "filter", 785 "filters", 786 "html2xhtml", 787 "preferences", 788 "QuickCatalogSearch", 789 "QuickSearchUser", 790 "rich_text_editor", 791 "sharemailbox", 792 "search", 793 "TreeS", 794 "TreeShow"); 795 796 connector.loadAllScripts(scripts); 797 } 780 var scripts = new Array("InfoContact", 781 "messages_controller", 782 "local_messages"); 783 connector.loadAllScripts(scripts); 798 784 } 799 785 … … 2024 2010 } 2025 2011 function draw_new_message(border_ID){ 2012 connector.loadScript("rich_text_editor"); 2013 connector.loadScript("color_palette"); 2014 if(typeof(RichTextEditor) == 'undefined' || typeof(ColorPalette) == 'undefined'){ 2015 setTimeout('draw_new_message(\''+border_ID+'\');',500); 2016 return false; 2017 } 2018 2026 2019 var ID = create_border("",border_ID); 2027 2020 if (ID == false) … … 2571 2564 table_message.appendChild(tbody_message); 2572 2565 form.appendChild(table_message); 2573 connector.loadScript("rich_text_editor");2574 2566 RichTextEditor.loadEditor(ID); 2575 2567 ////////////////////////////////////////////////////////////////////////////////////////////////////// -
branches/2.2/expressoMail1_2/js/mail_sync.js
r1969 r3068 11 11 */ 12 12 function mail_sync() { 13 if (typeof(google) == 'undefined') 14 return false; 13 15 // this.dbGears = null; 14 16 // this.localServer = null;
Note: See TracChangeset
for help on using the changeset viewer.