From 12ab21e6a495676dce606f9b988a7d91997f0b75 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 1 Sep 2014 18:44:13 +0000 Subject: [PATCH] - Propagate clearSelection() to children - Fix missed change in previous commit --- etemplate/js/et2_dataview_controller_selection.js | 11 ++++++++++- etemplate/js/et2_extension_nextmatch_actions.js | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_dataview_controller_selection.js b/etemplate/js/et2_dataview_controller_selection.js index 334f0903ac..8669e5f41c 100644 --- a/etemplate/js/et2_dataview_controller_selection.js +++ b/etemplate/js/et2_dataview_controller_selection.js @@ -181,6 +181,10 @@ var et2_dataview_selectionManager = Class.extend( { this.setSelected(key, false); } + for(var i = 0; i < this._children.length; i++) + { + this._children[i].resetSelection(); + } }, setSelected: function (_uid, _selected) { @@ -453,7 +457,12 @@ var et2_dataview_selectionManager = Class.extend( // If not "_ctrl" is set, reset the selection if (!_ctrl) { - this.resetSelection(); + var top = this; + while(top._parent !== null) + { + top = top._parent; + } + top.resetSelection(); this._actionObjectManager.setAllSelected(false); // needed for hirachical stuff } diff --git a/etemplate/js/et2_extension_nextmatch_actions.js b/etemplate/js/et2_extension_nextmatch_actions.js index cd2cd676ee..b4509a050e 100644 --- a/etemplate/js/et2_extension_nextmatch_actions.js +++ b/etemplate/js/et2_extension_nextmatch_actions.js @@ -355,12 +355,12 @@ function nm_open_popup(_action, _selected) if(_selected.length && typeof _selected[0] == 'object') { _action.data.nextmatch = _selected[0]._context._widget; - nm_popup_ids = _ids + nm_popup_ids = _selected } else { egw().debug("warn", 'Not proper format for IDs, should be array of egwActionObject',_ids); - nm_popup_ids = _ids; + nm_popup_ids = _selected; } var dialog = jQuery('.action_popup-content',popup);