* Added result messages about folder operations,

* Better display (I hope) of those messages.

see #55
This commit is contained in:
Antoine Nguyen
2011-03-30 19:15:21 +02:00
parent b997dec8f4
commit 3a29f1345e
6 changed files with 36 additions and 23 deletions
+9 -2
View File
@@ -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
View File
@@ -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);