summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-22 22:26:36 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-22 22:26:36 +0200
commit158515d5bda661f98e41081dfdb77ce4d9d3afd4 (patch)
treee1b18c79982f5ee75dd8bbbbbdfd0d8c6ec9e321 /modules/luci-base/htdocs
parent5223c7c221cc049cfb00a148c2e1249bda0ca49a (diff)
luci-base: form.js: do not add title attributes for untitled options
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/form.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js
index 93e5f6542c..07cacb324e 100644
--- a/modules/luci-base/htdocs/luci-static/resources/form.js
+++ b/modules/luci-base/htdocs/luci-static/resources/form.js
@@ -1075,6 +1075,8 @@ var CBITableSection = CBITypedSection.extend({
renderHeaderRows: function(max_cols) {
var has_titles = false,
has_descriptions = false,
+ max_cols = isNaN(this.max_cols) ? this.children.length : this.max_cols,
+ has_more = max_cols < this.children.length,
anon_class = (!this.anonymous || this.sectiontitle) ? 'named' : 'anonymous',
trEls = E([]);
@@ -1439,7 +1441,7 @@ var CBIGridSection = CBITableSection.extend({
return E('div', {
'class': 'td cbi-value-field',
- 'data-title': (title != '') ? title : opt.option,
+ 'data-title': (title != '') ? title : null,
'data-description': (descr != '') ? descr : null,
'data-name': opt.option,
'data-type': opt.typename || opt.__name__
@@ -1578,9 +1580,10 @@ var CBIValue = CBIAbstractValue.extend({
optionEl;
if (in_table) {
+ var title = this.stripTags(this.title).trim();
optionEl = E('div', {
'class': 'td cbi-value-field',
- 'data-title': this.stripTags(this.title).trim(),
+ 'data-title': (title != '') ? title : null,
'data-description': this.stripTags(this.description).trim(),
'data-name': this.option,
'data-type': this.typename || (this.template ? this.template.replace(/^.+\//, '') : null) || this.__name__