silverstripe-reports/javascript/ReportAdmin.Tree.js
Mateusz Uzdowski b75483e1da BUGFIX: add missing _super calls to all matchers and unmatchers
Otherwise some matchers might not be triggered as expected.
2012-05-18 12:23:30 +12:00

25 lines
464 B
JavaScript

/**
* File: ReportAdmin.Tree.js
*/
(function($) {
$.entwine('ss', 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));