Skip to content
Browse files

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
  • Loading branch information...
1 parent 49ff164 commit 898665e54b9b7f479cea20ada998a2fb5a0ee32f @chillu chillu committed Nov 21, 2009
Showing with 7 additions and 9 deletions.
  1. +7 −9 javascript/LeftAndMain_left.js
View
16 javascript/LeftAndMain_left.js
@@ -55,17 +55,15 @@ TreeAPI.prototype = {
url = this.url(args);
var self = this;
- new Ajax.Request(url, {
- onSuccess: function(response){
- self.innerHTML = response.responseText;
+ jQuery.get(
+ url,
+ function(data, status){
+ self.innerHTML = data;
self.castAsTreeNode(self.firstChild);
- if (options.onSuccess) options.onSuccess(response);
+ if (options.onSuccess) options.onSuccess(data);
},
- onFailure: function(response){
- errorMessage('error loading tree', response);
- if (options.onFailure) options.onFailure(response);
- }
- });
+ 'html'
+ );
},
/**

0 comments on commit 898665e

Please sign in to comment.
Something went wrong with that request. Please try again.