Skip to content

Commit

Permalink
MINOR Moved sitetree state setting javascript to LeftAndMain.Tree.js,…
Browse files Browse the repository at this point in the history
… used in AssetAdmin as well

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92811 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 21, 2009
1 parent 175ceaf commit 6aae0aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
16 changes: 0 additions & 16 deletions javascript/CMSMain.Tree.js
Original file line number Original file line Diff line number Diff line change
@@ -1,19 +1,3 @@
(function($) {
/**
* @class Tree panel.
* @name ss.sitetree
*/
$('#sitetree').concrete('ss', function($){
return/** @lends ss.sitetree */{
onmatch: function() {
// make sure current ID of loaded form is actually selected in tree
var id = $('#Form_EditForm :input[name=ID]').val();
if(id) this[0].setCurrentByIdx(id);
}
};
});
}(jQuery));

if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {}; if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {};
SiteTreeHandlers.parentChanged_url = 'admin/ajaxupdateparent'; SiteTreeHandlers.parentChanged_url = 'admin/ajaxupdateparent';
SiteTreeHandlers.orderChanged_url = 'admin/ajaxupdatesort'; SiteTreeHandlers.orderChanged_url = 'admin/ajaxupdatesort';
Expand Down
15 changes: 15 additions & 0 deletions javascript/LeftAndMain.Tree.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ var _HANDLER_FORMS = {
search : 'search_options' search : 'search_options'
}; };


(function($) {
/**
* @class Tree panel.
* @name ss.sitetree
*/
$('#sitetree').concrete('ss', function($){
return/** @lends ss.sitetree */{
onmatch: function() {
// make sure current ID of loaded form is actually selected in tree
var id = $('#Form_EditForm :input[name=ID]').val();
if(id) this[0].setCurrentByIdx(id);
}
};
});
}(jQuery));


/** /**
* Overload this with a real context menu if necessary * Overload this with a real context menu if necessary
Expand Down

0 comments on commit 6aae0aa

Please sign in to comment.