summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-04-02 17:27:35 +0000
committeralecpl <alec@alec.pl>2008-04-02 17:27:35 +0000
commitc5097c633b41b242a72ddbd1a8a486599520eabf (patch)
tree9b97d101c0b822a14f06b9e1b3f449a3ac160eb3 /program/js
parent164c7d4d26c47fe61c59404a955cfa059b0e67e5 (diff)
#1484681
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js50
1 files changed, 4 insertions, 46 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 9f7b7ee6e..46a79659d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2825,60 +2825,18 @@ function rcube_webmail()
this.subscribe_folder = function(folder)
{
- var form;
- if ((form = this.gui_objects.editform) && form.elements['_unsubscribed'])
- this.change_subscription('_unsubscribed', '_subscribed', 'subscribe');
- else if (folder)
- this.http_post('subscribe', '_mboxes='+urlencode(folder));
+ if (folder)
+ this.http_post('subscribe', '_mbox='+urlencode(folder));
};
this.unsubscribe_folder = function(folder)
{
- var form;
- if ((form = this.gui_objects.editform) && form.elements['_subscribed'])
- this.change_subscription('_subscribed', '_unsubscribed', 'unsubscribe');
- else if (folder)
- this.http_post('unsubscribe', '_mboxes='+urlencode(folder));
+ if (folder)
+ this.http_post('unsubscribe', '_mbox='+urlencode(folder));
};
- this.change_subscription = function(from, to, action)
- {
- var form;
- if (form = this.gui_objects.editform)
- {
- var a_folders = new Array();
- var list_from = form.elements[from];
-
- for (var i=0; list_from && i<list_from.options.length; i++)
- {
- if (list_from.options[i] && list_from.options[i].selected)
- {
- a_folders[a_folders.length] = list_from.options[i].value;
- list_from[i] = null;
- i--;
- }
- }
-
- // yes, we have some folders selected
- if (a_folders.length)
- {
- var list_to = form.elements[to];
- var index;
-
- for (var n=0; n<a_folders.length; n++)
- {
- index = list_to.options.length;
- list_to[index] = new Option(a_folders[n]);
- }
-
- this.http_post(action, '_mboxes='+urlencode(a_folders.join(',')));
- }
- }
-
- };
-
// helper method to find a specific mailbox row ID
this.get_folder_row_id = function(folder)
{