Skip to content

Commit

Permalink
Item1019: minor changes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/JQueryCompatibilityModePlugin@2428 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
EugenMayer authored and EugenMayer committed Feb 9, 2009
1 parent c296207 commit eec4be0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Expand Up @@ -33,7 +33,7 @@ $Foswiki::cfg{Plugins}{JQueryCompatibilityModePlugin}{DialogDefaultSettingsInclu

# ---++JQuery Plugins
# **BOOLEAN**
# Plugin: should be the ajax-upload-plugin be included?
# Plugin: should the belowed defined plugins be loaded
$Foswiki::cfg{Plugins}{JQueryCompatibilityModePlugin}{IncludePlugins} = 0;

# **STRING**
Expand Down
Expand Up @@ -130,7 +130,7 @@ window.onFetchComplete= function (xmlHttp, statusmsg, selector, responseHandler
if(responseHandler["other"] == undefined) {
// but if the "other" handler is also undefined, use a dummy
// which displays an error
handler = "resposneHandlerNotDefined";
handler = "responseHandlerNotDefined";
}
else {
// ok other is set, so use it
Expand All @@ -141,11 +141,18 @@ window.onFetchComplete= function (xmlHttp, statusmsg, selector, responseHandler
handler = responseHandler[status];
}


var data = xmlHttp.responseText;
var action = xmlHttp.getResponseHeader("X-FoswikiAction");
var uri = xmlHttp.getResponseHeader("X-FoswikiURI");
// call the corresponding handler
window[handler]( selector, data, action, uri,xmlHttp, status, statusmsg);
if(typeof window[handler] == 'function') {
window[handler]( selector, data, action, uri,xmlHttp, status, statusmsg);
}
else {
alert("The dialog-handler '"+handler+"' is not defined, method missing");
}

}
window.showDialog = function (selector) {
$j(selector).show();
Expand Down Expand Up @@ -294,8 +301,7 @@ window.showOops = function (dialogselector) {
alert("An error occurred during your operation");
}


window.resposneHandlerNotDefined = function ( selector, data, action, uri,xmlHttp, status) {
window.responseHandlerNotDefined = function ( selector, data, action, uri,xmlHttp, status) {
alert("No handler defined for status:"+status);
}
})(jQuery);

0 comments on commit eec4be0

Please sign in to comment.