mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-03 12:14:12 +01:00
* Documentation update
* see #38 : reverted work from [49b589f08988] * Style update for permissions
This commit is contained in:
@@ -179,60 +179,7 @@ textarea:hover {
|
||||
}
|
||||
|
||||
#mailheader {
|
||||
width: 70%;
|
||||
padding-bottom: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#attachments {
|
||||
width: 29%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#attachments h3 {
|
||||
float: left;
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#attachments img {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#attachments a:link, a:visited {
|
||||
background: transparent;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#finput_container {
|
||||
display: block;
|
||||
width: 100px;
|
||||
height: 20px;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
#upload_input {
|
||||
font-size: 50px;
|
||||
width: 120px;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity: 0);
|
||||
position: relative;
|
||||
top: -40px;
|
||||
left: -20px;
|
||||
}
|
||||
|
||||
#attachments ul {
|
||||
list-style: none;
|
||||
padding: 5px 5px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#attachments li {
|
||||
margin-bottom: 4px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/* Progress bar */
|
||||
|
||||
@@ -4,16 +4,6 @@
|
||||
<div id="mailheader">
|
||||
{% include "common/genericform.html" %}
|
||||
</div>
|
||||
<div id="attachments">
|
||||
<h3><img src="{{ MEDIA_URL }}pics/attachment.png" /> {% trans "Attachments" %}</h3>
|
||||
<div id="finput_container">
|
||||
<a href="javascript: void(0)"><img src="{{ MEDIA_URL }}pics/add.png" />
|
||||
{% trans "Add" %}</a>
|
||||
<input type="file" id="upload_input" name="upload" />
|
||||
</div>
|
||||
<ul id="files2upload">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
{% if body %}
|
||||
<textarea id="id_body" name="id_body" class="editor">{% if bodyheader %}{{ bodyheader }}{% endif %}
|
||||
|
||||
@@ -130,28 +130,6 @@
|
||||
}
|
||||
$("composemail").send();
|
||||
});
|
||||
|
||||
var files2upload = new Array();
|
||||
|
||||
delete_attachment = function(evt) {
|
||||
var litag = evt.target.getParents("li");
|
||||
var attachment = litag.get("text");
|
||||
|
||||
files2upload.erase(attachment);
|
||||
litag.destroy();
|
||||
};
|
||||
|
||||
$("upload_input").addEvent("change", function(evt) {
|
||||
var atag = new Element("a").set("name", "delete_attachment");
|
||||
var imgtag = new Element("img").set("src", "{{ MEDIA_URL }}pics/remove.png");
|
||||
var litag = new Element("li").set("text", evt.target.value);
|
||||
|
||||
files2upload.include(evt.target.value);
|
||||
imgtag.inject(atag);
|
||||
atag.inject(litag);
|
||||
litag.inject($("files2upload"));
|
||||
atag.addEvent("click", delete_attachment);
|
||||
});
|
||||
};
|
||||
|
||||
loadCompose = function(event) {
|
||||
|
||||
@@ -55,11 +55,11 @@ def __render_common_components(request, folder, lst=None, content=None, menu=Non
|
||||
if page:
|
||||
navbar = EmailListing.render_navbar(page)
|
||||
if lst:
|
||||
listing = lst.fetch(request, page.id_start, page.id_stop)
|
||||
content = lst.fetch(request, page.id_start, page.id_stop)
|
||||
else:
|
||||
navbar = ""
|
||||
if lst:
|
||||
listing = "<div class='info'>%s</div>" \
|
||||
content = "<div class='info'>%s</div>" \
|
||||
% _("This folder contains no messages")
|
||||
|
||||
ret = {
|
||||
@@ -68,7 +68,7 @@ def __render_common_components(request, folder, lst=None, content=None, menu=Non
|
||||
"folders" : mbc.getfolders(request.user)
|
||||
}),
|
||||
"menu" : menu,
|
||||
"listing" : listing,
|
||||
"listing" : content,
|
||||
"navbar" : navbar,
|
||||
"quota" : ImapListing.computequota(mbc)
|
||||
}
|
||||
@@ -149,7 +149,7 @@ def viewmail(request, folder, mail_id=None):
|
||||
mbc = IMAPconnector(user=request.user.username,
|
||||
password=request.session["password"])
|
||||
ctx = getctx("ok", **__render_common_components(request, folder,
|
||||
menu=menu, listing=content))
|
||||
menu=menu, content=content))
|
||||
return HttpResponse(simplejson.dumps(ctx), mimetype="application/json")
|
||||
|
||||
@login_required
|
||||
@@ -276,7 +276,7 @@ def render_compose(request, form, posturl, email=None, insert_signature=False):
|
||||
password=request.session["password"])
|
||||
ctx = getctx("ok", level=2, editor=editor,
|
||||
**__render_common_components(request, request.session["folder"],
|
||||
menu=menu, listing=content))
|
||||
menu=menu, content=content))
|
||||
return HttpResponse(simplejson.dumps(ctx), mimetype="application/json")
|
||||
|
||||
def __html2plaintext(content):
|
||||
|
||||
Reference in New Issue
Block a user