mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-02 12:13:54 +01:00
Simple hack to catch redirections after an ajax request. It is not a clean and perfect solution but it should address most cases.
fix #181
This commit is contained in:
@@ -46,7 +46,7 @@ var FdMenu = new Class({
|
||||
if (!confirm(gettext("Delete folder?"))) {
|
||||
return;
|
||||
}
|
||||
new Request.JSON({
|
||||
new Request.JSON.mdb({
|
||||
url: evt.target.get("href"),
|
||||
method: "GET",
|
||||
onSuccess: function(resp) {
|
||||
|
||||
@@ -219,13 +219,17 @@ function refreshFolder() {
|
||||
profile : "gray",
|
||||
spinner : true
|
||||
});
|
||||
new Request.JSON({url: query, noCache : true, onSuccess: function(resp) {
|
||||
var callback = ($defined(resp.callback)) ? resp.callback : "default";
|
||||
new Request.JSON.mdb({
|
||||
url: query,
|
||||
noCache : true,
|
||||
onSuccess: function(resp) {
|
||||
var callback = ($defined(resp.callback)) ? resp.callback : "default";
|
||||
|
||||
current_anchor.get_callback(callback)(resp);
|
||||
infobox.info(gettext("Done"));
|
||||
infobox.hide(1);
|
||||
}}).get();
|
||||
current_anchor.get_callback(callback)(resp);
|
||||
infobox.info(gettext("Done"));
|
||||
infobox.hide(1);
|
||||
}
|
||||
}).get();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -240,7 +244,7 @@ function simple_request(url, params) {
|
||||
profile: "gray",
|
||||
spinner: true
|
||||
});
|
||||
new Request.JSON({
|
||||
new Request.JSON.mdb({
|
||||
url : url,
|
||||
onSuccess : function(response) {
|
||||
if (response.status == "ok") {
|
||||
|
||||
Reference in New Issue
Block a user