|
|
@ -7809,20 +7809,28 @@ function rcube_webmail() |
|
|
|
|
|
|
|
this.subscribe = function(folder) |
|
|
|
{ |
|
|
|
if (folder) { |
|
|
|
var lock = this.display_message('foldersubscribing', 'loading'); |
|
|
|
this.http_post('subscribe', {_mbox: folder}, lock); |
|
|
|
} |
|
|
|
this.change_subscription_state(folder, true); |
|
|
|
}; |
|
|
|
|
|
|
|
this.unsubscribe = function(folder) |
|
|
|
{ |
|
|
|
this.change_subscription_state(folder, false); |
|
|
|
}; |
|
|
|
|
|
|
|
this.change_subscription_state = function(folder, state) |
|
|
|
{ |
|
|
|
if (folder) { |
|
|
|
var lock = this.display_message('folderunsubscribing', 'loading'); |
|
|
|
this.http_post('unsubscribe', {_mbox: folder}, lock); |
|
|
|
var prefix = state ? '' : 'un', |
|
|
|
lock = this.display_message('folder' + prefix + 'subscribing', 'loading'); |
|
|
|
|
|
|
|
this.http_post(prefix + 'subscribe', {_mbox: folder}, lock); |
|
|
|
|
|
|
|
// in case this was a list of search results, update also the main list
|
|
|
|
$(this.gui_objects.subscriptionlist).find('input[value="' + folder + '"]').prop('checked', state); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// when user select a folder in manager
|
|
|
|
this.show_folder = function(folder, path, force) |
|
|
|
{ |
|
|
|