silverstripe-reports/javascript/ReportAdmin.Tree.js

25 lines
469 B
JavaScript
Raw Normal View History

2013-01-17 01:22:13 +01:00
/**
* File: ReportAdmin.Tree.js
*/
(function($) {
$.entwine('ss.tree', function($){
/**
* Class: .cms-tree
*
* Tree panel.
*/
$('.cms-tree').entwine({
onmatch: function() {
// make sure current ID of loaded form is actually selected in tree
var id = $('.cms-edit-form :input[name=ID]').val();
if (id) this[0].setCurrentByIdx(id);
this._super();
},
onunmatch: function() {
this._super();
}
});
});
}(jQuery));