Permalink
Browse files

MINOR Moved sitetree state setting javascript to LeftAndMain.Tree.js,…

… 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...
1 parent 175ceaf commit 6aae0aaf53f875e8bb1c904f23cd6934e3d36855 @chillu chillu committed Nov 21, 2009
Showing with 15 additions and 16 deletions.
  1. +0 −16 javascript/CMSMain.Tree.js
  2. +15 −0 javascript/LeftAndMain.Tree.js
View
16 javascript/CMSMain.Tree.js
@@ -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 = {};
SiteTreeHandlers.parentChanged_url = 'admin/ajaxupdateparent';
SiteTreeHandlers.orderChanged_url = 'admin/ajaxupdatesort';
View
15 javascript/LeftAndMain.Tree.js
@@ -16,6 +16,21 @@ var _HANDLER_FORMS = {
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

0 comments on commit 6aae0aa

Please sign in to comment.