Fixing the sieve plugin too.

see #435
This commit is contained in:
Antoine Nguyen
2013-09-02 22:10:31 +02:00
parent 95dec87e02
commit becc182267
5 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ class FilterForm(forms.Form):
for fd in folders:
value = fd["path"] if fd.has_key("path") else fd["name"]
if parentmb:
ret += [(value, fd["name"].replace("%s." % parentmb, ""))]
ret += [(value, fd["name"].replace("%s%s" % (parentmb, imapc.hdelimiter), ""))]
else:
ret += [(value, fd["name"])]
if fd.has_key("sub"):
@@ -178,7 +178,7 @@
value = $this.val();
while (true) {
var id = value.indexOf(".", start);
var id = value.indexOf(options.hdelimiter, start);
if (id == -1) {
break;
}
@@ -322,6 +322,7 @@
$.fn.dynaction.defaults = {
defaultaction: "fileinto",
hdelimiter: '.',
templates: []
};
})(jQuery);
@@ -22,7 +22,8 @@ function filterform_cb() {
templates: cond_templates
}).data('dyncondition');
var $da = $("#action_0").dynaction({
templates: action_templates
templates: action_templates,
hdelimiter: '{{ hdelimiter }}'
}).data('dynaction');
$("input[name=match_type]").click(function(e) {
+3
View File
@@ -18,6 +18,8 @@ from templatetags.sfilters_tags import fset_menu
@login_required
@needs_mailbox()
def index(request, tplname="sievefilters/index.html"):
from modoboa.extensions.webmail.imaputils import get_imapconnector
try:
sc = SieveClient(user=request.user.username,
password=request.session["password"])
@@ -39,6 +41,7 @@ def index(request, tplname="sievefilters/index.html"):
"active_script" : active_script,
"default_script" : default_script,
"scripts" : sorted(scripts),
"hdelimiter": get_imapconnector(request).hdelimiter
})
@login_required
-1
View File
@@ -412,7 +412,6 @@ class IMAPconnector(object):
def _listmboxes(self, topmailbox, mailboxes, until_mailbox=None):
pattern = "%s%s%%" % (topmailbox.encode("imap4-utf-7"), self.hdelimiter) \
if len(topmailbox) else "%"
print pattern
resp = self._cmd("LIST", "", pattern, "RETURN", "(CHILDREN)")
newmboxes = []
for mb in resp: