mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user