mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-25 05:58:42 +01:00
wip: webmail big refactoring and perfomance improvment
Misc. changes.
This commit is contained in:
@@ -220,7 +220,7 @@ div.right {
|
||||
.logo {
|
||||
float: right;
|
||||
/*margin: 5px 0 0 5px;*/
|
||||
height: 90px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.5 KiB |
+32
-7
@@ -9,7 +9,9 @@ var AnchorNavigation = new Class({
|
||||
checkinterval: 300,
|
||||
defloadingtext: gettext("Loading..."),
|
||||
defloadingcolor: "gray",
|
||||
defcallback: null
|
||||
defcallback: null,
|
||||
spin_disabled: false,
|
||||
spin_target: undefined
|
||||
},
|
||||
|
||||
initialize: function(deflocation, options) {
|
||||
@@ -29,6 +31,17 @@ var AnchorNavigation = new Class({
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Disable the spinner.
|
||||
*/
|
||||
disable_spinner: function() {
|
||||
this.options.spin_disabled = true;
|
||||
},
|
||||
|
||||
enable_spinner: function() {
|
||||
this.options.spin_disabled = false;
|
||||
},
|
||||
|
||||
reset_loading_infos: function() {
|
||||
this.loading_message = this.options.defloadingtext;
|
||||
this.loading_color = this.options.defloadingcolor;
|
||||
@@ -200,22 +213,34 @@ var AnchorNavigation = new Class({
|
||||
|
||||
var query = this.serialized.substring(1);
|
||||
|
||||
infobox.show(this.loading_message, {
|
||||
profile: this.loading_color,
|
||||
spinner: true
|
||||
});
|
||||
if (!this.options.spin_disabled) {
|
||||
var target = this.options.spin_target ? this.options.spin_target
|
||||
: document.body;
|
||||
$(target).spin({
|
||||
message: this.loading_message
|
||||
});
|
||||
/*infobox.show(this.loading_message, {
|
||||
profile: this.loading_color,
|
||||
spinner: true
|
||||
});*/
|
||||
}
|
||||
new Request.JSON({
|
||||
url: query,
|
||||
noCache : true,
|
||||
onSuccess: function(resp) {
|
||||
if (!this.options.spin_disabled) {
|
||||
var target = this.options.spin_target ? this.options.spin_target
|
||||
: document.body;
|
||||
$(target).unspin();
|
||||
}
|
||||
if (resp.status == "ko") {
|
||||
infobox.error(resp.respmsg);
|
||||
return;
|
||||
}
|
||||
var callback = ($defined(resp.callback)) ? resp.callback : "default";
|
||||
this.callbacks[callback](resp);
|
||||
infobox.info(gettext("Done"));
|
||||
infobox.hide(1);
|
||||
/*infobox.info(gettext("Done"));
|
||||
infobox.hide(1);*/
|
||||
this.reset_loading_infos();
|
||||
}.bind(this),
|
||||
onFailure: function(xhr) {
|
||||
|
||||
Reference in New Issue
Block a user