| | |
| | | else |
| | | this.message_list.focus(); |
| | | } |
| | | |
| | | if (this.env.coltypes) |
| | | this.set_message_coltypes(this.env.coltypes); |
| | | |
| | | // enable mail commands |
| | | this.enable_command('list', 'checkmail', 'compose', 'add-contact', 'search', 'reset-search', true); |
| | |
| | | case 'print': |
| | | var uid; |
| | | if (uid = this.get_single_uid()) |
| | | { |
| | | { |
| | | ref.printwin = window.open(this.env.comm_path+'&_action=print&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox)+(this.env.safemode ? '&_safe=1' : '')); |
| | | if (this.printwin) |
| | | { |
| | | setTimeout(function(){ ref.printwin.focus(); }, 20); |
| | | if (this.env.action != 'show') |
| | | this.toggle_read_status('read', [uid]); |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case 'viewsource': |
| | |
| | | // onmouseup handler for folder list item |
| | | this.folder_mouse_up = function(id) |
| | | { |
| | | // Hide message command buttons until a message is selected |
| | | this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', false); |
| | | |
| | | if (this.drag_active) |
| | | { |
| | | this.unfocus_folder(id); |
| | | this.command('moveto', id); |
| | | } |
| | | |
| | | // Hide message command buttons until a message is selected |
| | | this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', false); |
| | | return false; |
| | | }; |
| | | |
| | | this.click_on_list = function(e) |
| | |
| | | { |
| | | // check input fields |
| | | var input_to = rcube_find_object('_to'); |
| | | var input_cc = rcube_find_object('_cc'); |
| | | var input_bcc = rcube_find_object('_bcc'); |
| | | var input_subject = rcube_find_object('_subject'); |
| | | var input_message = rcube_find_object('_message'); |
| | | |
| | | // check for empty recipient |
| | | if (input_to && !rcube_check_email(input_to.value.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true)) |
| | | var recipients = input_to.value ? input_to.value : (input_cc.value ? input_cc.value : input_bcc.value); |
| | | if (!rcube_check_email(recipients.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true)) |
| | | { |
| | | alert(this.get_label('norecipientwarning')); |
| | | input_to.focus(); |
| | |
| | | this.set_env('folder', folder); |
| | | else |
| | | this.set_env('folder', null); |
| | | |
| | | if (this.gui_objects.createfolderhint) |
| | | this.gui_objects.createfolderhint.innerHTML = this.env.folder ? this.get_label('addsubfolderhint') : ''; |
| | | }; |
| | | |
| | | |
| | |
| | | // tell server to create and subscribe a new mailbox |
| | | this.create_folder = function(name) |
| | | { |
| | | if (this.edit_folder) |
| | | this.reset_folder_rename(); |
| | | if (this.edit_folder) |
| | | this.reset_folder_rename(); |
| | | |
| | | var form; |
| | | if ((form = this.gui_objects.editform) && form.elements['_folder_name']) |
| | | name = form.elements['_folder_name'].value; |
| | | if (this.env.folder) |
| | | if (this.env.folder && name != '') |
| | | name = this.env.folder+this.env.delimiter+name; |
| | | |
| | | if (name) |
| | |
| | | |
| | | cell.id = 'rcmHead'+col; |
| | | } |
| | | |
| | | if (col == 'subject' && this.message_list) |
| | | this.message_list.subject_col = n+1; |
| | | } |
| | | |
| | | }; |
| | | |
| | | // create a table row in the message list |