| | |
| | | } |
| | | |
| | | if (this.env.action=='compose') |
| | | { |
| | | this.enable_command('add-attachment', 'send-attachment', 'send', true); |
| | | if (this.env.spellcheck) |
| | | this.enable_command('spellcheck', true); |
| | | } |
| | | |
| | | if (this.env.messagecount) |
| | | this.enable_command('select-all', 'select-none', 'sort', 'expunge', true); |
| | |
| | | }; |
| | | |
| | | // reset last clicked if user clicks on anything other than the message table |
| | | this.reset_click = function() |
| | | { |
| | | this.reset_click = function() { |
| | | this.in_message_list = false; |
| | | }; |
| | | for (var n=0; n<this.selection.length; n++) { |
| | | id = this.selection[n]; |
| | | if (this.list_rows[id].obj) { |
| | | this.set_classname(this.list_rows[id].obj, 'selected', false); |
| | | this.set_classname(this.list_rows[id].obj, 'unfocused', true); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | this.click_on_list = function(e) |
| | | { |
| | | if (!e) |
| | | e = window.event; |
| | | |
| | | for (var n=0; n<this.selection.length; n++) { |
| | | id = this.selection[n]; |
| | | if (this.list_rows[id].obj) { |
| | | this.set_classname(this.list_rows[id].obj, 'selected', true); |
| | | this.set_classname(this.list_rows[id].obj, 'unfocused', false); |
| | | } |
| | | } |
| | | |
| | | this.in_message_list = true; |
| | | e.cancelBubble = true; |
| | |
| | | parent.location.href = url; |
| | | else |
| | | location.href = url; |
| | | break; |
| | | break; |
| | | |
| | | case 'spellcheck': |
| | | if (this.env.spellcheck && this.env.spellcheck.spellCheck) |
| | | this.env.spellcheck.spellCheck(this.env.spellcheck.check_link); |
| | | break; |
| | | |
| | | case 'send': |
| | | if (!this.gui_objects.messageform) |
| | |
| | | if (!this.in_selection(id)) // select row |
| | | { |
| | | this.selection[this.selection.length] = id; |
| | | this.set_classname(this.list_rows[id].obj, 'selected', true); |
| | | this.set_classname(this.list_rows[id].obj, 'selected', true); |
| | | } |
| | | else // unselect row |
| | | { |
| | |
| | | var a_post = this.selection.slice(p+1, this.selection.length); |
| | | this.selection = a_pre.concat(a_post); |
| | | this.set_classname(this.list_rows[id].obj, 'selected', false); |
| | | this.set_classname(this.list_rows[id].obj, 'unfocused', false); |
| | | } |
| | | selected = (this.selection.length==1); |
| | | } |
| | |
| | | this.clear_selection = function() |
| | | { |
| | | for(var n=0; n<this.selection.length; n++) |
| | | if (this.list_rows[this.selection[n]]) |
| | | if (this.list_rows[this.selection[n]]) { |
| | | this.set_classname(this.list_rows[this.selection[n]].obj, 'selected', false); |
| | | |
| | | this.set_classname(this.list_rows[this.selection[n]].obj, 'unfocused', false); |
| | | } |
| | | this.selection = new Array(); |
| | | }; |
| | | |
| | |
| | | return false; |
| | | |
| | | if (a_uids.length==1){ |
| | | if(this.message_rows[uid].classname.indexOf('deleted') < 0 ){ |
| | | if(this.message_rows[a_uids[0]].classname.indexOf('deleted') < 0 ){ |
| | | this.flag_as_deleted(a_uids) |
| | | } else { |
| | | this.flag_as_undeleted(a_uids) |
| | |
| | | highlight.removeAttribute('id'); |
| | | //highlight.removeAttribute('class'); |
| | | this.set_classname(highlight, 'selected', false); |
| | | this.set_classname(highlight, 'unfocused', false); |
| | | } |
| | | |
| | | if (next) |
| | |
| | | var current_li = document.getElementById('rcmbx'+s_current); |
| | | var mbox_li = document.getElementById('rcmbx'+s_mbox); |
| | | |
| | | if (current_li) |
| | | if (current_li) { |
| | | this.set_classname(current_li, 'selected', false); |
| | | this.set_classname(current_li, 'unfocused', false); |
| | | } |
| | | if (mbox_li) |
| | | this.set_classname(mbox_li, 'selected', true); |
| | | } |