mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Ticket #41 but this is not enough...
This commit is contained in:
@@ -68,6 +68,15 @@ tr.table-tr-selected {
|
||||
}
|
||||
});
|
||||
}
|
||||
$$("a[name=selectmsgs]").addEvent("click", function(evt) {
|
||||
evt.stop();
|
||||
var type = evt.target.get("href");
|
||||
$$("td[name=type]").each(function(item) {
|
||||
if (item.get("html").trim() == type) {
|
||||
item.getParent().addClass("table-tr-selected");
|
||||
}
|
||||
});
|
||||
});
|
||||
$$("a[name=release]").addEvent("click", function(event) {
|
||||
if (!checkTableSelection("{% trans "Release this selection?" %}")) {
|
||||
event.stop();
|
||||
|
||||
@@ -63,6 +63,23 @@ def quar_menu(selection, perms):
|
||||
"url" : "",
|
||||
"img" : "/static/pics/remove.png",
|
||||
"label" : _("Delete")},
|
||||
{"name" : "select",
|
||||
"url" : "",
|
||||
"img" : "/static/pics/domains.png",
|
||||
"label" : _("Select all"),
|
||||
"class" : "menubardropdown",
|
||||
"menu" : [
|
||||
{"name" : "selectmsgs",
|
||||
"url" : "S",
|
||||
"label" : _("Spam")},
|
||||
{"name" : "selectmsgs",
|
||||
"url" : "H",
|
||||
"label" : _("Bad header")},
|
||||
{"name" : "selectmsgs",
|
||||
"url" : "M",
|
||||
"label" : _("Bad MIME")}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
menu = render_to_string('main/menu.html',
|
||||
|
||||
@@ -112,7 +112,6 @@ class IMAPheader(object):
|
||||
def parse_subject(value, **kwargs):
|
||||
res = ""
|
||||
dcd = decode_header(re.sub("[\\r\\n]+", "", value))
|
||||
print dcd
|
||||
for part in dcd:
|
||||
if res != "":
|
||||
res += " "
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Table(object):
|
||||
for row in rows:
|
||||
nrow = {"id" : row[self.idkey], "cols" : []}
|
||||
for c in self.columns:
|
||||
newcol = {}
|
||||
newcol = {"name" : c.name}
|
||||
try:
|
||||
newcol["width"] = getattr(c, "width")
|
||||
except AttributeError:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% for row in table.rows %}
|
||||
<tr id="{{ row.id }}" class="{% cycle 'odd' 'even' %}">
|
||||
{% for cell in row.cols %}
|
||||
<td width="{{ cell.width }}" align="{{ cell.align }}" class="{{ cell.class }}">
|
||||
<td name="{{ cell.name }}" width="{{ cell.width }}" align="{{ cell.align }}" class="{{ cell.class }}">
|
||||
{% if cell.safe %}{{ cell.value|safe }}{% else %}{{ cell.value }}{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user