Browse Source

HUE-36. Allow form controls and the like to work in elements that toggle splitviews

The event needs to be stopped if the clicked element is a link, otherwise the browser will follow it.
Aaron Newton 15 years ago
parent
commit
b8547a5867

+ 2 - 0
desktop/core/static/js/Source/JFrameFilters/CCS.JFrame.SplitView.js

@@ -153,6 +153,7 @@ var getWidget = function(link) {
 CCS.JFrame.addGlobalLinkers({
 CCS.JFrame.addGlobalLinkers({
 
 
 	'[data-splitview-resize]': function(e, link){
 	'[data-splitview-resize]': function(e, link){
+		if ($(e.target).get('tag') == 'a') e.preventDefault();
 		var widget = getWidget(link);
 		var widget = getWidget(link);
 		if (!widget) return;
 		if (!widget) return;
 		var resize = link.get('data', 'splitview-resize', true);
 		var resize = link.get('data', 'splitview-resize', true);
@@ -166,6 +167,7 @@ CCS.JFrame.addGlobalLinkers({
 	},
 	},
 
 
 	'[data-splitview-toggle]': function(e, link){
 	'[data-splitview-toggle]': function(e, link){
+		if ($(e.target).get('tag') == 'a') e.preventDefault();
 		var widget = getWidget(link);
 		var widget = getWidget(link);
 		if (!widget) return;
 		if (!widget) return;
 		var resize = link.get('data', 'splitview-toggle', true);
 		var resize = link.get('data', 'splitview-toggle', true);