diff options
author | Bryan Sullivan <bryan.sullivan@att.com> | 2017-01-18 09:16:01 -0800 |
---|---|---|
committer | Bryan Sullivan <bryan.sullivan@att.com> | 2017-01-18 09:16:01 -0800 |
commit | 983bdb0c0612586cf0d5b42deaaea6dfe30042e6 (patch) | |
tree | 2c769db066b68162bc57c66c3872a72aa2aed953 /components | |
parent | 85b2f25678ccf7a34569a38924b53b3cae073140 (diff) |
Use col field (column name) if exists in translator.
JIRA: COPPER-2
Change-Id: Ib890c45b3c7708bb035045011ff6296b9137934b
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'components')
-rw-r--r-- | components/congress/test-webapp/www/copper.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/components/congress/test-webapp/www/copper.js b/components/congress/test-webapp/www/copper.js index 8c087aa..28ab57f 100644 --- a/components/congress/test-webapp/www/copper.js +++ b/components/congress/test-webapp/www/copper.js @@ -1,5 +1,5 @@ /*
- Copyright 2015-2016 AT&T Intellectual Property, Inc
+ Copyright 2015-2017 AT&T Intellectual Property, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -133,8 +133,14 @@ function get_datasource_table_rows(dsIndex,tableIndex) { else {
for (j in TRANSLATORS[datasource][i]['field-translators']) {
tbhd = element('th',"",null,null);
- tbhd.innerHTML = TRANSLATORS[datasource][i]['field-translators'][j]['fieldname'];
- tbhd.title = TRANSLATORS[datasource][i]['field-translators'][j]['fieldname'];
+ if ("col" in TRANSLATORS[datasource][i]['field-translators'][j]) {
+ tbhd.innerHTML = TRANSLATORS[datasource][i]['field-translators'][j]['col'];
+ tbhd.title = TRANSLATORS[datasource][i]['field-translators'][j]['col'];
+ }
+ else {
+ tbhd.innerHTML = TRANSLATORS[datasource][i]['field-translators'][j]['fieldname'];
+ tbhd.title = TRANSLATORS[datasource][i]['field-translators'][j]['fieldname'];
+ }
tbhr.appendChild(tbhd);
}
}
|