API CHANGE Removed ajaxErrorHandler() javascript method from LeftAndMain.js, and changed two known references to custom code

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92736 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 03:16:21 +00:00
parent 3124388b4d
commit 758804eacf
3 changed files with 7 additions and 10 deletions

View File

@ -419,7 +419,7 @@ Behaviour.register({
new Ajax.Request(this.href + (this.href.indexOf("?") == -1 ? "?" : "&") + "ajax=1", { new Ajax.Request(this.href + (this.href.indexOf("?") == -1 ? "?" : "&") + "ajax=1", {
method : 'get', method : 'get',
onSuccess : Ajax.Evaluator, onSuccess : Ajax.Evaluator,
onFailure : ajaxErrorHandler onFailure : function(response) {errorMessage('Server Error', response);}
}); });
Event.stop(event); Event.stop(event);
return false; return false;

View File

@ -49,7 +49,7 @@ CommentTableField.prototype = {
onComplete: function(){ onComplete: function(){
Effect.Fade(row); Effect.Fade(row);
}.bind(this), }.bind(this),
onFailure: ajaxErrorHandler onFailure: function(response) {errorMessage('Server Error', response);}
} }
); );
Event.stop(e); Event.stop(e);

View File

@ -389,18 +389,15 @@ var ss_MainLayout;
// Backwards compatibility // Backwards compatibility
var statusMessage = function(text, type) { var statusMessage = function(text, type) {
jQuery.noticeAdd({text: text, type: type}); jQuery.noticeAdd({text: text, type: type});
} };
var errorMessage = function(text) { var errorMessage = function(text) {
jQuery.noticeAdd({text: text, type: 'error'}); jQuery.noticeAdd({text: text, type: 'error'});
} };
function ajaxErrorHandler(response) {
errorMessage('Server Error', response);
}
returnFalse = function() { returnFalse = function() {
return false; return false;
} };
/** /**
* Find and enable TinyMCE on all htmleditor fields * Find and enable TinyMCE on all htmleditor fields
@ -409,4 +406,4 @@ returnFalse = function() {
function nullConverter(url) { function nullConverter(url) {
return url; return url;
} };