From ab47678d768178de568d09b1a8c53470527af1a3 Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Fri, 05 Dec 2014 12:12:32 +0000
Subject: [PATCH] #396 fix - Highlight of current section, changed Packs listing to include necessary codes for licenses

---
 securis/src/main/webapp/js/catalogs.js |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/securis/src/main/webapp/js/catalogs.js b/securis/src/main/webapp/js/catalogs.js
index f0dd291..e1d458f 100644
--- a/securis/src/main/webapp/js/catalogs.js
+++ b/securis/src/main/webapp/js/catalogs.js
@@ -87,11 +87,12 @@
                                  *            number it find it by position
                                  */
 								this.getMetadata = function(index) {
-									if (!_metadata)
-										throw new Error(
-												'There is no catalog metadata info');
-									if (index === undefined)
+									if (!_metadata) {
+										throw new Error('There is no catalog metadata info');
+									}
+									if (index === undefined) {
 										return _current;
+									}
 									if (typeof index === 'string') {
 										for (var i = _metadata.length - 1; i >= 0
 												&& _metadata[i].resource !== index; i--)
@@ -217,13 +218,14 @@
 								}
 								this.loadRefs = function(callback, refsFields) {
 									if (!refsFields || refsFields.length === 0) {
-										if (!_current)
+										if (!_current) {
 											throw new Error('There is no current catalog selected');
+										}
 										refsFields = [];
 										_current.fields.forEach(function(f) {
-											if (f.resource)
-												refsFields.push(f)
-	
+											if (f.resource) {
+												refsFields.push(f);
+											}	
 										});
 									}
 
@@ -248,6 +250,7 @@
 													refs[rf.name].forEach(function(row) {
 																comboData.push({
 																			id : row[pk],
+																			code : row.code,
 																			label : row.label
 																					|| row.name
 																					|| row.code

--
Gitblit v1.3.2