mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-01 12:03:55 +01:00
First working version of the new 'message filters' plugin. Currently, only the raw edition mode is available. I also include my own MANAGESIEVE client implementation.
see #139
This commit is contained in:
+4
-1
@@ -6,7 +6,6 @@ body {
|
||||
}
|
||||
|
||||
div.row {
|
||||
/*position: relative;*/
|
||||
clear: both;
|
||||
padding-top: 10px;
|
||||
padding-left: 20px;
|
||||
@@ -134,3 +133,7 @@ td.even {
|
||||
background: #eee;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
clear: both;
|
||||
}
|
||||
+12
-1
@@ -13,6 +13,10 @@ var error_callbacks = {
|
||||
}
|
||||
};
|
||||
|
||||
var success_callbacks = {
|
||||
|
||||
};
|
||||
|
||||
var extra_data_callbacks = {
|
||||
|
||||
};
|
||||
@@ -29,6 +33,10 @@ function register_error_callback(name, callback) {
|
||||
return register_callback(error_callbacks, name, callback);
|
||||
}
|
||||
|
||||
function register_success_callback(name, callback) {
|
||||
return register_callback(success_callbacks, name, callback);
|
||||
}
|
||||
|
||||
function register_extra_data_callback(name, callback) {
|
||||
return register_callback(extra_data_callbacks, name, callback);
|
||||
}
|
||||
@@ -80,7 +88,10 @@ function ajax_submit(event) {
|
||||
} else if ($defined(response.url)) {
|
||||
parent.location.href = response.url;
|
||||
}
|
||||
parent.SqueezeBox.close();
|
||||
if ($defined(success_callbacks[myid])) {
|
||||
success_callbacks[myid](response);
|
||||
}
|
||||
parent.SqueezeBox.close();
|
||||
}
|
||||
},
|
||||
onFailure: function(xhr) {
|
||||
|
||||
+14
-4
@@ -22,13 +22,11 @@ var InfoBox = new Class({
|
||||
"font-size" : "1em",
|
||||
"font-weight" : "bold",
|
||||
"text-align" : "left",
|
||||
"width" : this.options.width + "px",
|
||||
"padding" : "10px",
|
||||
"position" : "absolute",
|
||||
"top" : "0px",
|
||||
"left" : boxleft + "px",
|
||||
"display" : "none"
|
||||
});
|
||||
this.calcsize();
|
||||
this.setProfile("gray");
|
||||
this.spinner = new Element("img", {
|
||||
"src" : "/static/css/spinner.gif"
|
||||
@@ -38,12 +36,24 @@ var InfoBox = new Class({
|
||||
|
||||
this.label = new Element("label").set("html", this.options.message);
|
||||
this.label.setStyles({
|
||||
"margin-left" : "10px"
|
||||
"white-space": "pre-line"
|
||||
/*"margin-left" : "10px"*/
|
||||
});
|
||||
this.label.inject(this.box);
|
||||
this.box.inject($(document.body));
|
||||
},
|
||||
|
||||
calcsize: function(width) {
|
||||
var w = ($defined(width) ? width : this.options.width);
|
||||
var boxleft = $(document.body).getSize().x / 2 - w / 2;
|
||||
|
||||
this.box.setStyles({
|
||||
width: w + "px",
|
||||
left: boxleft + "px",
|
||||
top: "0px"
|
||||
});
|
||||
},
|
||||
|
||||
setMessage: function(text) {
|
||||
this.label.set("html", text);
|
||||
},
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 682 B |
Binary file not shown.
|
After Width: | Height: | Size: 776 B |
Binary file not shown.
|
After Width: | Height: | Size: 911 B |
Reference in New Issue
Block a user