Skip to content
Browse files

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

…(SSF-109)
  • Loading branch information...
1 parent 21a185d commit 4bd526fbeeb9a00f38c7d1d3d55d1e217a09fb20 @normann normann committed with chillu
Showing with 7 additions and 1 deletion.
  1. +6 −1 admin/javascript/LeftAndMain.Content.js
  2. +1 −0 admin/javascript/LeftAndMain.Tree.js
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();

0 comments on commit 4bd526f

Please sign in to comment.
Something went wrong with that request. Please try again.