From f926605ea73166a041f90ab02b64ce58d2ebf3fd Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 8 Apr 2015 22:41:44 +0000 Subject: [PATCH] Remove all actions before setting to prevent conflicts between old and new actions with the same id --- etemplate/js/et2_extension_nextmatch.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 9f86a5e2a2..628fb3796c 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -1688,8 +1688,13 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin set_actions: function(actions) { if(actions != this.options.actions && this.controller != null && this.controller._actionManager) { + for(var i = this.controller._actionManager.children.length - 1; i >= 0; i--) + { + this.controller._actionManager.children[i].remove(); + } this.options.actions = actions; this.options.settings.action_links = this.controller._actionLinks = this._get_action_links(actions); + this.controller._initActions(actions); } },