From 945de82ef9102c18d0225af4171642f7d4ba28f7 Mon Sep 17 00:00:00 2001 From: Mateusz Uzdowski Date: Wed, 16 Dec 2009 23:20:39 +0000 Subject: [PATCH] BUGFIX: #4834 disable the tree multiselect feature also when switching to another tab. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@95705 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/LeftAndMain.BatchActions.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/javascript/LeftAndMain.BatchActions.js b/javascript/LeftAndMain.BatchActions.js index b1afda8a..af9a63e5 100644 --- a/javascript/LeftAndMain.BatchActions.js +++ b/javascript/LeftAndMain.BatchActions.js @@ -37,11 +37,10 @@ // if tab which contains this form is shown, make the tree selectable $('#TreeActions').bind('tabsselect', function(e, ui) { - if($(ui.panel).attr('id') != 'TreeActions-batchactions') return; - - // if the panel is visible (meaning about to be closed), + // if we are selecting another tab, or the panel is visible (meaning about to be closed), // disable tree selection and reset any values. Otherwise enable it. - if($(ui.panel).is(':visible')) { + if($(ui.panel).attr('id') != 'TreeActions-batchactions' || $(ui.panel).is(':visible')) { + // @TODO: this is unneccessarily fired also when switching between two other tabs $(self.getTree()).removeClass('multiselect'); } else { self._multiselectTransform();