Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Don't follow <a> tag's href if click on page-icon or drag-icon …

…(SSF-109)
  • Loading branch information...
commit 4bd526fbeeb9a00f38c7d1d3d55d1e217a09fb20 1 parent 21a185d
@normann normann authored chillu committed
View
7 admin/javascript/LeftAndMain.Content.js
@@ -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;
View
1  admin/javascript/LeftAndMain.Tree.js
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.