From 6ef00bbf9e8c07fc915e629f6e3b2547d4ce51b1 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 3 Apr 2018 16:24:15 -0600 Subject: [PATCH] Look in action children so placeholder actions can be in sub-levels --- .../etemplate/et2_extension_nextmatch_controller.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.js b/api/js/etemplate/et2_extension_nextmatch_controller.js index 868da91b27..0e607e5d7a 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.js +++ b/api/js/etemplate/et2_extension_nextmatch_controller.js @@ -527,13 +527,17 @@ var et2_nextmatch_controller = (function(){ "use strict"; return et2_dataview_co // Make sure that placeholder actions are defined and existed in client-side, // otherwise do not set them as placeholder. for instance actions with // attribute hideOnMobile do not get sent to client-side. - if (links.length > 0) - { - for (var i=links.length-1; i >= 0; i--) + var action_search = function(current) { + if (typeof this._widget.options.actions[current] !== 'undefined') return true; + // Check children + for(var action in this._widget.options.actions) { - if (typeof this._widget.options.actions[links[i]] == 'undefined') links.splice(i,1); + action = this._widget.options.actions[action]; + if( action.children && action.children[current]) return true; } + return false; } + links = links.filter(action_search, this); } catch (e) { }