| | |
| | | { |
| | | id = selection[n]; |
| | | a_uids[a_uids.length] = id; |
| | | this.message_list.remove_row(id); |
| | | this.message_list.remove_row(id, (n == selection.length-1)); |
| | | } |
| | | |
| | | this.message_list.select_next(); |
| | | } |
| | | |
| | | // also send search request to get the right messages |
| | |
| | | { |
| | | id = selection[n]; |
| | | a_cids[a_cids.length] = id; |
| | | this.contact_list.remove_row(id); |
| | | this.contact_list.remove_row(id, (n == selection.length-1)); |
| | | } |
| | | |
| | | // hide content frame if we delete the currently displayed contact |
| | |
| | | var p = this; |
| | | this.subscription_list = new rcube_list_widget(this.gui_objects.subscriptionlist, {multiselect:false, draggable:true, keyboard:false}); |
| | | this.subscription_list.addEventListener('select', function(o){ p.subscription_select(o); }); |
| | | this.subscription_list.addEventListener('mouseover', function(o){ p.subscription_select_parent(o); }); |
| | | this.subscription_list.addEventListener('mouseout', function(o){ p.subscription_unselect_parent(o); }); |
| | | this.subscription_list.addEventListener('dragstart', function(o){ p.drag_active = true; }); |
| | | this.subscription_list.addEventListener('dragend', function(o){ p.subscription_move_folder(o); }); |
| | | this.subscription_list.init(); |
| | |
| | | var reg = RegExp('['+RegExp.escape(this.env.delimiter)+']?[^'+RegExp.escape(this.env.delimiter)+']+$'); |
| | | if (this.drag_active && this.check_droptarget(id) && |
| | | (id != this.env.folder.replace(reg, '')) && |
| | | (!id.match(new RegExp('^'+RegExp.escape(this.env.folder+this.env.delimiter)))) && |
| | | (row = document.getElementById(this.get_folder_row_id(id)))) |
| | | if (find_in_array(this.env.defaultfolders, id)>=0) |
| | | { |
| | |
| | | } |
| | | |
| | | if (oldname && newname) |
| | | { |
| | | this.http_post('rename-folder', '_folder_oldname='+urlencode(oldname)+'&_folder_newname='+urlencode(newname)); |
| | | for (var row in this.env.subscriptionrows) |
| | | if (this.env.subscriptionrows[row][0].match(new RegExp('^'+RegExp.escape(oldname+this.env.delimiter)))) |
| | | { |
| | | var subnewname = this.env.subscriptionrows[row][0].replace(new RegExp('^'+RegExp.escape(oldname+this.env.delimiter)), newname+this.env.delimiter); |
| | | this.http_post('rename-folder', '_folder_oldname='+urlencode(this.env.subscriptionrows[row][0])+ |
| | | '&_folder_newname='+urlencode(subnewname)); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | |
| | | // delete a specific mailbox with all its messages |
| | | this.delete_folder = function(folder) |
| | | { |
| | | if (this.edit_folder) |
| | | this.reset_folder_rename(); |
| | | if (this.edit_folder) |
| | | this.reset_folder_rename(); |
| | | |
| | | if (folder) |
| | | { |
| | | this.http_post('delete-folder', '_mboxes='+urlencode(folder)); |
| | | for (var row in this.env.subscriptionrows) |
| | | if (this.env.subscriptionrows[row][0].match(new RegExp('^'+RegExp.escape(folder+this.env.delimiter)))) |
| | | this.http_post('delete-folder', '_mboxes='+urlencode(this.env.subscriptionrows[row][0])); |
| | | } |
| | | }; |
| | | |
| | | |