| | |
| | | lock = true; |
| | | this.set_busy(true, 'movingmessage'); |
| | | } |
| | | else |
| | | else if (!this.env.flag_for_deletion) |
| | | this.show_contentframe(false); |
| | | |
| | | // Hide message command buttons until a message is selected |
| | | this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', false); |
| | | |
| | | this._with_selected_messages('moveto', lock, add_url); |
| | | this._with_selected_messages('moveto', lock, add_url, (this.env.flag_for_deletion ? false : true)); |
| | | }; |
| | | |
| | | // delete selected messages from the current mailbox |
| | |
| | | return; |
| | | |
| | | this.show_contentframe(false); |
| | | this._with_selected_messages('delete', false, '&_from='+(this.env.action ? this.env.action : '')); |
| | | this._with_selected_messages('delete', false, '&_from='+(this.env.action ? this.env.action : ''), true); |
| | | }; |
| | | |
| | | // Send a specifc request with UIDs of all selected messages |
| | | // @private |
| | | this._with_selected_messages = function(action, lock, add_url) |
| | | this._with_selected_messages = function(action, lock, add_url, remove) |
| | | { |
| | | var a_uids = new Array(); |
| | | |
| | |
| | | else |
| | | { |
| | | var selection = this.message_list.get_selection(); |
| | | var rows = this.message_list.rows; |
| | | var id; |
| | | for (var n=0; n<selection.length; n++) |
| | | { |
| | | id = selection[n]; |
| | | a_uids[a_uids.length] = id; |
| | | |
| | | this.message_list.remove_row(id, (n == selection.length-1)); |
| | | if (remove) |
| | | this.message_list.remove_row(id, (n == selection.length-1)); |
| | | else |
| | | { |
| | | rows[id].deleted = true; |
| | | |
| | | if (rows[id].classname.indexOf('deleted')<0) |
| | | { |
| | | rows[id].classname += ' deleted'; |
| | | this.set_classname(rows[id].obj, 'deleted', true); |
| | | } |
| | | |
| | | if (rows[id].icon && this.env.deletedicon) |
| | | rows[id].icon.src = this.env.deletedicon; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | 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'); |
| | | |
| | | var editor, input_message; |
| | | var str = ''; |
| | | |
| | | if (input_to && input_to.value) |
| | | str += input_to.value+':'; |
| | | if (input_cc && input_cc.value) |
| | |
| | | str += input_bcc.value+':'; |
| | | if (input_subject && input_subject.value) |
| | | str += input_subject.value+':'; |
| | | if (input_message && input_message.value) |
| | | |
| | | if (editor = tinyMCE.get('compose-body')) |
| | | str += editor.getContent(); |
| | | else |
| | | { |
| | | input_message = rcube_find_object('_message'); |
| | | str += input_message.value; |
| | | } |
| | | |
| | | if (save) |
| | | this.cmp_hash = str; |