| | |
| | | |
| | | case 'mail': |
| | | // enable mail commands |
| | | this.enable_command('list', 'checkmail', 'add-contact', 'search', 'reset-search', 'collapse-folder', true); |
| | | this.enable_command('list', 'checkmail', 'add-contact', 'search', 'reset-search', 'collapse-folder', 'import-messages', true); |
| | | |
| | | if (this.gui_objects.messagelist) { |
| | | this.message_list = new rcube_list_widget(this.gui_objects.messagelist, { |
| | |
| | | this.init_messageform(); |
| | | } |
| | | // show printing dialog |
| | | else if (this.env.action == 'print' && this.env.uid) |
| | | else if (this.env.action == 'print' && this.env.uid) { |
| | | if (bw.safari) |
| | | setTimeout('window.print()', 10); |
| | | else |
| | | window.print(); |
| | | } |
| | | |
| | | // get unread count for each mailbox |
| | | if (this.gui_objects.mailboxlist) { |
| | |
| | | // Reset the auto-save timer |
| | | clearTimeout(this.save_timer); |
| | | |
| | | this.upload_file(props || this.gui_objects.uploadform); |
| | | this.upload_file(props || this.gui_objects.uploadform, 'upload'); |
| | | break; |
| | | |
| | | case 'insert-sig': |
| | |
| | | case 'listgroup': |
| | | this.reset_qsearch(); |
| | | this.list_contacts(props.source, props.id); |
| | | break; |
| | | |
| | | case 'import-messages': |
| | | var form = props || this.gui_objects.importform; |
| | | $('input[name="_unlock"]', form).val(this.set_busy(true, 'importwait')); |
| | | this.upload_file(form, 'import'); |
| | | break; |
| | | |
| | | case 'import': |
| | |
| | | return true; |
| | | }; |
| | | |
| | | // upload attachment file |
| | | this.upload_file = function(form) |
| | | // upload (attachment) file |
| | | this.upload_file = function(form, action) |
| | | { |
| | | if (!form) |
| | | return false; |
| | |
| | | return; |
| | | } |
| | | |
| | | var frame_name = this.async_upload_form(form, 'upload', function(e) { |
| | | var frame_name = this.async_upload_form(form, action || 'upload', function(e) { |
| | | var d, content = ''; |
| | | try { |
| | | if (this.contentDocument) { |