mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Merge
This commit is contained in:
@@ -216,10 +216,16 @@ class IMAPconnector(object):
|
||||
if not len(parts):
|
||||
return False
|
||||
path = "%s%s%s" % (prefix, delimiter, parts[0])
|
||||
sdescr = {"name" : parts[0], "path" : path, "sub" : []}
|
||||
sdescr = None
|
||||
for d in descr:
|
||||
if d["path"] == path:
|
||||
sdescr = d
|
||||
break
|
||||
if sdescr is None:
|
||||
sdescr = {"name" : parts[0], "path" : path, "sub" : []}
|
||||
descr += [sdescr]
|
||||
if self._parse_folder_name(sdescr["sub"], path, delimiter, parts[1:]):
|
||||
sdescr["class"] = "subfolders"
|
||||
descr += [sdescr]
|
||||
return True
|
||||
|
||||
def _listfolders(self, topfolder='INBOX', md_folders=[]):
|
||||
|
||||
@@ -146,8 +146,7 @@ def print_folders(folders, selected=None, withunseen=False, withmenu=False):
|
||||
cssclass = "unseen"
|
||||
result += "<a href='%s' class='%s' name='loadfolder'>%s</a>\n" \
|
||||
% (fd.has_key("path") and fd["path"] or fd["name"], cssclass, label)
|
||||
if fd.has_key("sub"):
|
||||
result += "<ul name='%s' class='hidden'>" % (fd["path"]) \
|
||||
+ print_folders(fd["sub"], selected, withunseen, withmenu) + "</ul>\n"
|
||||
if fd.has_key("sub") and len(fd["sub"]):
|
||||
result += "<ul name='%s' class='hidden'>" % (fd["path"]) + print_folders(fd["sub"], selected) + "</ul>\n"
|
||||
result += "</li>\n"
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user