Changeset da5cadc in github
- Timestamp:
- Apr 22, 2012 1:15:39 PM (14 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo
- Children:
- 390959b
- Parents:
- 55dce68
- File:
-
- 1 edited
-
program/js/app.js (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/js/app.js
r5a79416 rda5cadc 273 273 else if (this.env.action == 'print' && this.env.uid) 274 274 if (bw.safari) 275 window.setTimeout('window.print()', 10);275 setTimeout('window.print()', 10); 276 276 else 277 277 window.print(); … … 772 772 if (this.env.uid && this.env.sender) { 773 773 this.add_contact(urlencode(this.env.sender)); 774 window.setTimeout(function(){ ref.command('load-images'); }, 300);774 setTimeout(function(){ ref.command('load-images'); }, 300); 775 775 break; 776 776 } … … 790 790 this.attachment_win = window.open(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1', 'rcubemailattachment'); 791 791 if (this.attachment_win) { 792 window.setTimeout(function(){ ref.attachment_win.focus(); }, 10);792 setTimeout(function(){ ref.attachment_win.focus(); }, 10); 793 793 break; 794 794 } … … 913 913 914 914 case 'savedraft': 915 var form = this.gui_objects.messageform, msgid; 916 915 917 // Reset the auto-save timer 916 self.clearTimeout(this.save_timer); 917 918 if (!this.gui_objects.messageform) 918 clearTimeout(this.save_timer); 919 920 // saving Drafts is disabled 921 if (!form) 919 922 break; 920 923 921 // if saving Drafts is disabled in main.inc.php922 // or if compose form did not change923 if (!this.env.drafts_mailbox || this.cmp_hash == this.compose_field_hash())924 // compose form did not change 925 if (this.cmp_hash == this.compose_field_hash()) { 926 this.auto_save_start(); 924 927 break; 925 926 var form = this.gui_objects.messageform, 927 msgid = this.set_busy(true, 'savingmessage'); 928 } 929 930 // re-set keep-alive timeout 931 this.start_keepalive(); 932 933 msgid = this.set_busy(true, 'savingmessage'); 928 934 929 935 form.target = "savetarget"; … … 941 947 942 948 // Reset the auto-save timer 943 self.clearTimeout(this.save_timer);949 clearTimeout(this.save_timer); 944 950 945 951 // all checks passed, send message … … 960 966 case 'send-attachment': 961 967 // Reset the auto-save timer 962 self.clearTimeout(this.save_timer);968 clearTimeout(this.save_timer); 963 969 964 970 this.upload_file(props || this.gui_objects.uploadform); … … 1007 1013 ref.printwin = window.open(this.env.comm_path+'&_action=print&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox)+(this.env.safemode ? '&_safe=1' : '')); 1008 1014 if (this.printwin) { 1009 window.setTimeout(function(){ ref.printwin.focus(); }, 20);1015 setTimeout(function(){ ref.printwin.focus(); }, 20); 1010 1016 if (this.env.action != 'show') 1011 1017 this.mark_message('read', uid); … … 1018 1024 ref.sourcewin = window.open(this.env.comm_path+'&_action=viewsource&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox)); 1019 1025 if (this.sourcewin) 1020 window.setTimeout(function(){ ref.sourcewin.focus(); }, 20);1026 setTimeout(function(){ ref.sourcewin.focus(); }, 20); 1021 1027 } 1022 1028 break; … … 1163 1169 // set timer for requests 1164 1170 if (a && this.env.request_timeout) 1165 this.request_timer = window.setTimeout(function(){ ref.request_timed_out(); }, this.env.request_timeout * 1000);1171 this.request_timer = setTimeout(function(){ ref.request_timed_out(); }, this.env.request_timeout * 1000); 1166 1172 1167 1173 return id; … … 1215 1221 parent.rcmail.reload(delay); 1216 1222 else if (delay) 1217 window.setTimeout(function(){ rcmail.reload(); }, delay);1223 setTimeout(function(){ rcmail.reload(); }, delay); 1218 1224 else if (window.location) 1219 1225 location.href = this.env.comm_path + (this.env.action ? '&_action='+this.env.action : ''); … … 1348 1354 1349 1355 if (this.folder_auto_timer) { 1350 window.clearTimeout(this.folder_auto_timer);1356 clearTimeout(this.folder_auto_timer); 1351 1357 this.folder_auto_timer = null; 1352 1358 this.folder_auto_expand = null; … … 1401 1407 if (div.hasClass('collapsed')) { 1402 1408 if (this.folder_auto_timer) 1403 window.clearTimeout(this.folder_auto_timer);1409 clearTimeout(this.folder_auto_timer); 1404 1410 1405 1411 this.folder_auto_expand = this.env.mailboxes[k].id; 1406 this.folder_auto_timer = window.setTimeout(function() {1412 this.folder_auto_timer = setTimeout(function() { 1407 1413 rcmail.command('collapse-folder', rcmail.folder_auto_expand); 1408 1414 rcmail.drag_start(null); 1409 1415 }, 1000); 1410 1416 } else if (this.folder_auto_timer) { 1411 window.clearTimeout(this.folder_auto_timer);1417 clearTimeout(this.folder_auto_timer); 1412 1418 this.folder_auto_timer = null; 1413 1419 this.folder_auto_expand = null; … … 1561 1567 // start timer for message preview (wait for double click) 1562 1568 if (selected && this.env.contentframe && !list.multi_selecting && !this.dummy_select) 1563 this.preview_timer = window.setTimeout(function(){ ref.msglist_get_preview(); }, 200);1569 this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200); 1564 1570 else if (this.env.contentframe) 1565 1571 this.show_contentframe(false); … … 1578 1584 if (this.preview_read_timer) 1579 1585 clearTimeout(this.preview_read_timer); 1580 this.preview_timer = window.setTimeout(function(){ ref.msglist_get_preview(); }, 200);1586 this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200); 1581 1587 } 1582 1588 } … … 1964 1970 // mark as read and change mbox unread counter 1965 1971 if (action == 'preview' && this.message_list && this.message_list.rows[id] && this.message_list.rows[id].unread && this.env.preview_pane_mark_read >= 0) { 1966 this.preview_read_timer = window.setTimeout(function() {1972 this.preview_read_timer = setTimeout(function() { 1967 1973 ref.set_message(id, 'unread', false); 1968 1974 ref.update_thread_root(id, 'read'); … … 3153 3159 3154 3160 if (this.env.default_font) 3155 window.setTimeout(function() {3161 setTimeout(function() { 3156 3162 $(tinyMCE.get(props.id).getBody()).css('font-family', rcmail.env.default_font); 3157 3163 }, 500); … … 3252 3258 { 3253 3259 if (this.env.draft_autosave) 3254 this.save_timer = se lf.setTimeout(function(){ ref.command("savedraft"); }, this.env.draft_autosave * 1000);3260 this.save_timer = setTimeout(function(){ ref.command("savedraft"); }, this.env.draft_autosave * 1000); 3255 3261 3256 3262 // Unlock interface now that saving is complete … … 3537 3543 this.upload_progress_start = function(action, name) 3538 3544 { 3539 window.setTimeout(function() { rcmail.http_request(action, {_progress: name}); },3545 setTimeout(function() { rcmail.http_request(action, {_progress: name}); }, 3540 3546 this.env.upload_progress_time * 1000); 3541 3547 }; … … 3642 3648 this.display_message(msg, type); 3643 3649 // before redirect we need to wait some time for Chrome (#1486177) 3644 window.setTimeout(function(){ ref.list_mailbox(); }, 500);3650 setTimeout(function(){ ref.list_mailbox(); }, 500); 3645 3651 }; 3646 3652 … … 3700 3706 case 39: // right 3701 3707 if (mod != SHIFT_KEY) 3702 return;3708 return; 3703 3709 } 3704 3710 3705 3711 // start timer 3706 this.ksearch_timer = window.setTimeout(function(){ ref.ksearch_get_results(props); }, 200);3712 this.ksearch_timer = setTimeout(function(){ ref.ksearch_get_results(props); }, 200); 3707 3713 this.ksearch_input = obj; 3708 3714 … … 4012 4018 4013 4019 if (id = list.get_single_selection()) 4014 this.preview_timer = window.setTimeout(function(){ ref.load_contact(id, 'show'); }, 200);4020 this.preview_timer = setTimeout(function(){ ref.load_contact(id, 'show'); }, 200); 4015 4021 else if (this.env.contentframe) 4016 4022 this.show_contentframe(false); … … 5554 5560 // add element and set timeout 5555 5561 this.messages[key].elements.push(id); 5556 window.setTimeout(function() { ref.hide_message(id, type == 'loading'); }, timeout);5562 setTimeout(function() { ref.hide_message(id, type == 'loading'); }, timeout); 5557 5563 return id; 5558 5564 } … … 5574 5580 5575 5581 if (timeout > 0) 5576 window.setTimeout(function() { ref.hide_message(id, type == 'loading'); }, timeout);5582 setTimeout(function() { ref.hide_message(id, type == 'loading'); }, timeout); 5577 5583 return id; 5578 5584 };
Note: See TracChangeset
for help on using the changeset viewer.
