mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
aaeebd6ea2
Refer to similar commit on framework (55cabd6fbfe5c2f90f0825ed2a51098dc9a2f5ac)
25 lines
469 B
JavaScript
25 lines
469 B
JavaScript
/**
|
|
* 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));
|