From 8d08b9ca495c6411b436d42157b6416a9f25faf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=B6ckel?= Date: Tue, 27 Mar 2012 15:22:57 +0000 Subject: [PATCH] fixed problem with selection manager indexMap not being updated --- etemplate/js/et2_dataview_controller.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_dataview_controller.js b/etemplate/js/et2_dataview_controller.js index 97adf29fad..bbb8b8fd3c 100644 --- a/etemplate/js/et2_dataview_controller.js +++ b/etemplate/js/et2_dataview_controller.js @@ -454,7 +454,7 @@ var et2_dataview_controller = Class.extend({ // If we have an object manager, create a new action object for this // row and a new row AOI - if (this.self._linkCallback && this.self._actionObjectManager) + if (this.self._linkCallback) { // Call the link callback var links = this.self._linkCallback.call( @@ -472,7 +472,7 @@ var et2_dataview_controller = Class.extend({ this.self._actionObjectManager.addObject(this.entry.uid, aoi); ao.updateActionLinks(links); - // Hook the action object into the selection manager + // Hook the row into the selection manager this.self._selectionMgr.hook(ao, aoi, this.entry.uid); } @@ -485,6 +485,9 @@ var et2_dataview_controller = Class.extend({ * */ _destroyCallback: function (_row) { + // Remove the action object that corresponds to that row + this.entry.ao.remove(); + // There is no further row connected to the entry this.entry.row = null; @@ -622,6 +625,7 @@ var et2_dataview_controller = Class.extend({ // Make the new index map the current index map this._indexMap = newMap; + this._selectionMgr.setIndexMap(newMap); } },