mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Some GUI improvments:
* Better layout for the editor used to compose messages, * Attachments form cleanup see #54 & #38
This commit is contained in:
@@ -556,9 +556,11 @@ class EmailSignature(object):
|
||||
:param user: User object
|
||||
"""
|
||||
def __init__(self, user):
|
||||
self._sig = ""
|
||||
dformat = parameters.get_user(user, "EDITOR")
|
||||
content = parameters.get_user(user, "SIGNATURE")
|
||||
getattr(self, "_format_sig_%s" % dformat)(content)
|
||||
if len(content):
|
||||
getattr(self, "_format_sig_%s" % dformat)(content)
|
||||
|
||||
def _format_sig_plain(self, content):
|
||||
self._sig = """
|
||||
|
||||
@@ -33,4 +33,8 @@ img {
|
||||
|
||||
div.row label {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#id_attachment {
|
||||
width: 290px;
|
||||
}
|
||||
@@ -89,8 +89,6 @@ ul.visible {
|
||||
|
||||
/* Compose mail page */
|
||||
#compose-container {
|
||||
/*margin: 0 auto;*/
|
||||
/*width: 100%;*/
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
right: 10px;
|
||||
@@ -102,9 +100,10 @@ ul.visible {
|
||||
position: relative;
|
||||
border: 1px solid #cccccc;
|
||||
background-color: #eee;
|
||||
margin-bottom: 5px;
|
||||
margin: 10px 0 5px 0;
|
||||
padding: 5px 0;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#attachments img {
|
||||
@@ -125,7 +124,6 @@ ul.visible {
|
||||
|
||||
div.row {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
@@ -136,9 +134,8 @@ div.row label {
|
||||
}
|
||||
|
||||
div.input_container {
|
||||
position: absolute;
|
||||
left: 130px;
|
||||
right: 0;
|
||||
position: static;
|
||||
margin-left: 130px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
@@ -147,26 +144,31 @@ textarea {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
word-wrap: break-word;
|
||||
resize: none;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
textarea:hover {
|
||||
background-color: #ffffcc;
|
||||
}
|
||||
|
||||
#body_container {
|
||||
position: absolute;
|
||||
top: 205px;
|
||||
left: 0;
|
||||
right: 0px;
|
||||
bottom: 15px;
|
||||
}
|
||||
|
||||
#id_body {
|
||||
background: white;
|
||||
/*width: 98%;*/
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 10px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#mailheader input {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
height: 20px;
|
||||
clear: both;
|
||||
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
#mailheader {
|
||||
|
||||
@@ -83,7 +83,7 @@ function compose_loader(event) {
|
||||
}
|
||||
|
||||
function resize_window_callback(event) {
|
||||
setDivHeight("id_body", $("mailheader").getSize().y, 0);
|
||||
CKEDITOR.instances["id_body"].resize("100%", $("body_container").getSize().y);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -125,7 +125,6 @@ function compose_callback(resp) {
|
||||
wm_updatelisting(resp);
|
||||
|
||||
window.addEvent("resize", resize_window_callback);
|
||||
window.fireEvent("resize");
|
||||
|
||||
var editormode = resp.editor;
|
||||
var editorid = "id_body";
|
||||
@@ -136,8 +135,10 @@ function compose_callback(resp) {
|
||||
CKEDITOR.remove(instance);
|
||||
}
|
||||
CKEDITOR.replace(editorid, {
|
||||
customConfig: static_url("js/editor_config.js"),
|
||||
height: $(editorid).getSize().y
|
||||
customConfig: static_url("js/editor_config.js")
|
||||
});
|
||||
CKEDITOR.on("instanceReady", function(evt) {
|
||||
resize_window_callback();
|
||||
});
|
||||
}
|
||||
if (resp.id) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
<div id="body_container">
|
||||
{% if body %}
|
||||
<textarea id="id_body" name="id_body" class="editor">{% if bodyheader %}{{ bodyheader }}{% endif %}
|
||||
{{ body }}
|
||||
@@ -22,6 +23,7 @@
|
||||
{% else %}
|
||||
<textarea id="id_body" name="id_body" class="editor"></textarea>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
+27
-1
@@ -136,4 +136,30 @@ td.even {
|
||||
|
||||
.spacer {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* clearfix related
|
||||
*/
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
html[xmlns] .clearfix {
|
||||
display: block;
|
||||
}
|
||||
|
||||
* html .clearfix {
|
||||
height: 1%;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user