mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-25 05:58:42 +01:00
* Added result messages about folder operations,
* Better display (I hope) of those messages. see #55
This commit is contained in:
+9
-2
@@ -54,8 +54,8 @@ function check_anchor() {
|
||||
|
||||
var query = current_anchor.serialized.substring(1);
|
||||
|
||||
infobox.show(gettext("Loading..."), {
|
||||
profile: "gray",
|
||||
infobox.show(current_anchor.loading_message, {
|
||||
profile: current_anchor.loading_color,
|
||||
spinner: true
|
||||
});
|
||||
new Request.JSON({url: query, noCache : true, onSuccess: function(resp) {
|
||||
@@ -63,6 +63,7 @@ function check_anchor() {
|
||||
callbacks[callback](resp);
|
||||
infobox.info(gettext("Done"));
|
||||
infobox.hide(1);
|
||||
current_anchor.reset_loading_infos();
|
||||
}}).get();
|
||||
};
|
||||
|
||||
@@ -84,6 +85,12 @@ function HashWrapper(deflocation) {
|
||||
this.base = '';
|
||||
this.serialized = null;
|
||||
|
||||
this.reset_loading_infos = function() {
|
||||
this.loading_message = gettext("Loading...");
|
||||
this.loading_color = "gray";
|
||||
};
|
||||
this.reset_loading_infos();
|
||||
|
||||
this.reset = function() {
|
||||
this.base = null;
|
||||
this.params.empty();
|
||||
|
||||
+5
-1
@@ -54,7 +54,7 @@ function ajax_submit(event) {
|
||||
|
||||
if (response.status == "ko") {
|
||||
if ($defined(response.norefresh) && response.norefresh == true) {
|
||||
$("error").set("html", response.error);
|
||||
$("error").set("html", response.respmsg);
|
||||
} else {
|
||||
$(document.body).set("html", response.content);
|
||||
$(document.body).addEvent("submit", ajax_submit);
|
||||
@@ -63,6 +63,10 @@ function ajax_submit(event) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($defined(response.respmsg)) {
|
||||
parent.current_anchor.loading_message = response.respmsg;
|
||||
parent.current_anchor.loading_color = "green";
|
||||
}
|
||||
if ($defined(response.ajaxnav)) {
|
||||
if ($defined(response.url)) {
|
||||
parent.current_anchor.baseurl(response.url, 1);
|
||||
|
||||
Reference in New Issue
Block a user