From ceb691f3a31284d68ccb7655ae1ec04f9a987a41 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 22 May 2012 19:54:28 +0000 Subject: [PATCH] Always get category information out of cat_id --- etemplate/js/et2_extension_nextmatch_rowProvider.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch_rowProvider.js b/etemplate/js/et2_extension_nextmatch_rowProvider.js index f3ad4b98c1..fc66d1c512 100644 --- a/etemplate/js/et2_extension_nextmatch_rowProvider.js +++ b/etemplate/js/et2_extension_nextmatch_rowProvider.js @@ -440,16 +440,13 @@ var et2_nextmatch_rowProvider = Class.extend({ if(invalid) this._rootWidget.egw().debug("warn", "Invalid class '%s', prefixed with 'cat_'",cats[0]); cats = [cats[2]]; - field = _data["class"].match(/\[(.*?cat.*?)\]/); - // Get category info - if(!this.categories && field) + if(!this.categories) { - if(field.length > 1) - { - var categories = _mgrs["sel_options"].getEntry(field[1]); - if(!categories) categories = _mgrs["sel_options"].getEntry('${row}'+field[0]); - } + var categories = _mgrs["sel_options"].getEntry('cat_id'); + if(!categories) categories = _mgrs["sel_options"].parentMgr.getEntry('cat_id'); + if(!categories) categories = _mgrs["sel_options"].getEntry('${row}'+'[cat_id]'); + // Cache if(categories) this.categories = categories; }