mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Don't trigger detail view in tree mode when first loaded (LeftAndMain.Content.js), limit to actual user clicks
This commit is contained in:
parent
a1b8698389
commit
a3bd21b48e
@ -43,8 +43,13 @@
|
||||
var self = this;
|
||||
|
||||
// Listen to tree selection events
|
||||
$('.cms-tree').bind('select_node.jstree', function(e, data) {
|
||||
var node = data.rslt.obj, loadedNodeID = self.find(':input[name=ID]').val()
|
||||
this.find('.cms-tree').bind('select_node.jstree', function(e, data) {
|
||||
var node = data.rslt.obj, loadedNodeID = self.find(':input[name=ID]').val(), origEvent = data.args[2];
|
||||
|
||||
// Don't trigger unless coming from a click event.
|
||||
// Avoids problems with automated section switches from tree to detail view
|
||||
// when JSTree auto-selects elements on first load.
|
||||
if(!origEvent) return false;
|
||||
|
||||
// Don't allow checking disabled nodes
|
||||
if($(node).hasClass('disabled')) return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user