From fe21f0fd7437dfddd0e08e99d4757cac03389d46 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 13 Mar 2014 18:58:59 +0000 Subject: [PATCH] Enhance nextmatch entryheader to return full value if it's anything more than a simple, single selection so we can handle it server side. --- etemplate/js/et2_extension_nextmatch.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 37b14b520f..1e60b84c0e 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -2706,14 +2706,22 @@ var et2_nextmatch_entryheader = et2_link_entry.extend(et2_INextmatchHeader, }, /** - * Override to always return a string appname:id (or just id), parent returns an object + * Override to always return a string appname:id (or just id) for simple (one real selection) + * cases, parent returns an object. If multiple are selected, or anything other than app and + * id, the original parent value is returned. */ getValue: function() { var value = this._super.apply(this, arguments); if(typeof value == "object" && value != null) { if(!value.app || !value.id) return null; - value = value.app +":"+value.id; + + // If simple value, format it legacy string style, otherwise + // we return full value + if(typeof value.id == 'string') + { + value = value.app +":"+value.id; + } } return value; },