mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Don't follow <a> tag's href if click on page-icon or drag-icon (SSF-109)
This commit is contained in:
parent
21a185dfa9
commit
4bd526fbee
@ -20,7 +20,12 @@
|
||||
// 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;
|
||||
if(!origEvent) {
|
||||
return false;
|
||||
}else if($(origEvent.target).hasClass('jstree-icon') || $(origEvent.target).hasClass('jstree-pageicon')){
|
||||
// in case the click is not on the node title, ie on pageicon or dragicon,
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't allow checking disabled nodes
|
||||
if($(node).hasClass('disabled')) return false;
|
||||
|
@ -130,6 +130,7 @@
|
||||
}
|
||||
|
||||
if($.inArray(data.func, ['check_node', 'uncheck_node'])) {
|
||||
//Don't allow check and uncheck if parent is disabled
|
||||
var node = $(data.args[0]).parents('li:first');
|
||||
if(node.hasClass('disabled')) {
|
||||
e.stopImmediatePropagation();
|
||||
|
Loading…
x
Reference in New Issue
Block a user