mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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
This commit is contained in:
parent
175ceaf890
commit
6aae0aaf53
@ -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';
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user