mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT Using jQuery.get() to ajax-refresh the CMS tree, to allow for concrete-style behaviour and global ajax error handling through jQuery instead of prototypejs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92724 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
49ff1648bd
commit
898665e54b
@ -55,17 +55,15 @@ TreeAPI.prototype = {
|
|||||||
url = this.url(args);
|
url = this.url(args);
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
new Ajax.Request(url, {
|
jQuery.get(
|
||||||
onSuccess: function(response){
|
url,
|
||||||
self.innerHTML = response.responseText;
|
function(data, status){
|
||||||
|
self.innerHTML = data;
|
||||||
self.castAsTreeNode(self.firstChild);
|
self.castAsTreeNode(self.firstChild);
|
||||||
if (options.onSuccess) options.onSuccess(response);
|
if (options.onSuccess) options.onSuccess(data);
|
||||||
},
|
},
|
||||||
onFailure: function(response){
|
'html'
|
||||||
errorMessage('error loading tree', response);
|
);
|
||||||
if (options.onFailure) options.onFailure(response);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user