From c262fb2ad05430c30d12f060209880d128f8d912 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 11 Aug 2015 15:44:42 +0000 Subject: [PATCH] Fix for losing actions if they are re-linked to a new actionObject --- etemplate/js/et2_core_DOMWidget.js | 2 +- etemplate/js/et2_extension_nextmatch.js | 10 ++++++++-- etemplate/js/et2_widget_grid.js | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/etemplate/js/et2_core_DOMWidget.js b/etemplate/js/et2_core_DOMWidget.js index c04235c510..27110feb5d 100644 --- a/etemplate/js/et2_core_DOMWidget.js +++ b/etemplate/js/et2_core_DOMWidget.js @@ -524,7 +524,7 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, // objects widget_object = objectManager.insertObject(false, new egwActionObject( this.id, objectManager, new et2_action_object_impl(this), - objectManager.manager.getActionById(this.id) || objectManager.manager + this._actionManager || objectManager.manager.getActionById(this.id) || objectManager.manager )); } else diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 571926e067..7bac21bb0b 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -310,10 +310,16 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin } // stop invalidation in no visible tabs $j(this.getInstanceManager().DOMContainer.parentNode).on('hide.et2_nextmatch', jQuery.proxy(function(e) { - this.controller._grid.doInvalidate = false; + if(this.controller && this.controller._grid) + { + this.controller._grid.doInvalidate = false; + } },this)); $j(this.getInstanceManager().DOMContainer.parentNode).on('show.et2_nextmatch', jQuery.proxy(function(e) { - this.controller._grid.doInvalidate = true; + if(this.controller && this.controller._grid) + { + this.controller._grid.doInvalidate = true; + } },this)); return true; diff --git a/etemplate/js/et2_widget_grid.js b/etemplate/js/et2_widget_grid.js index cc008aed97..f8bdf28f37 100644 --- a/etemplate/js/et2_widget_grid.js +++ b/etemplate/js/et2_widget_grid.js @@ -933,7 +933,7 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned, et2_IResize // objects widget_object = objectManager.insertObject(false, new egwActionObject( this.id, objectManager, new et2_action_object_impl(this), - objectManager.manager.getActionById(this.id) || objectManager.manager + this._actionManager || objectManager.manager.getActionById(this.id) || objectManager.manager )); }