From 8e75eca579c5361562fd6fe70093ec163b13d0ff Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 28 Aug 2014 09:48:27 +0000 Subject: [PATCH] fixing temp. fix: - doubleclick does not deselect selection in other hierarchy level (eg. previous selected sub-entry in infolog) --> use _senders - if there was a confirmation _senders array contains strings with id instead of action-objects - empty placeholder from sub-level is selectable --> ignore its empty id --- etemplate/js/et2_extension_nextmatch_actions.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch_actions.js b/etemplate/js/et2_extension_nextmatch_actions.js index e50f95f0b3..36a6ceacfe 100644 --- a/etemplate/js/et2_extension_nextmatch_actions.js +++ b/etemplate/js/et2_extension_nextmatch_actions.js @@ -45,11 +45,10 @@ function nm_action(_action, _senders, _target, _ids) _action.data.nextmatch = nm; } } - // temp. fix for _ids containing (wrong) selections from different hierarchy levels - _ids.ids = []; - for(var i = 0; i < _senders.length; i++) + // default action when doubleclicked contains (previous selected) ids of other hierarchy levels + if (_action.default) { - if (_senders[i].id) _ids.ids.push(_senders[i].id); + _ids.ids = [_senders[0].id]; } // Translate the internal uids back to server uids @@ -57,6 +56,12 @@ function nm_action(_action, _senders, _target, _ids) for (var i = 0; i < idsArr.length; i++) { idsArr[i] = idsArr[i].split("::").pop(); + // empty placeholder gets reported --> ignore it + if (!idsArr[i]) + { + delete idsArr[i]; + i--; + } } // Calculate the ids parameters