summaryrefslogtreecommitdiff
path: root/plugins/managesieve/managesieve.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-02-14 18:19:13 +0100
committerAleksander Machniak <alec@alec.pl>2014-02-14 18:19:13 +0100
commit022f510365c2656737842c92b77c496e7d2f1044 (patch)
tree2807bb4af4f180ab315bf85e285ae9c6112944ee /plugins/managesieve/managesieve.js
parent9a0900e4a100fe93517573be1a1286992b6a2620 (diff)
Fix issue in displaying filter form when managesieve_kolab_master=true
and sieve variables extension is supported by the server (#1489599)
Diffstat (limited to 'plugins/managesieve/managesieve.js')
-rw-r--r--plugins/managesieve/managesieve.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js
index 53696ecf0..8e344ad54 100644
--- a/plugins/managesieve/managesieve.js
+++ b/plugins/managesieve/managesieve.js
@@ -226,7 +226,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
// Delete filter row
case 'del':
- var i = 0, list = this.filters_list;
+ var id = o.id, list = this.filters_list;
list.remove_row(this.managesieve_rowid(o.id));
list.clear_selection();
@@ -241,8 +241,14 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
return;
}
- // modify ID and remove all attached events
- $(this).attr('id', 'rcmrow'+(i++)).unbind();
+ var rowid = this.id.substr(6);
+
+ // remove all attached events
+ $(this).unbind();
+
+ // update row id
+ if (rowid > id)
+ $(this).attr('id', 'rcmrow' + (rowid-1));
});
list.init();