trEl.appendChild(E('div', {
'class': 'th cbi-section-table-cell',
- 'data-type': opt.__name__
+ 'data-widget': opt.__name__
}));
if (opt.width != null)
trEl.appendChild(E('div', {
'class': 'th cbi-section-table-cell',
- 'data-type': opt.__name__
+ 'data-widget': opt.__name__
}, opt.description));
if (opt.width != null)
'data-title': (title != '') ? title : null,
'data-description': (descr != '') ? descr : null,
'data-name': opt.option,
- 'data-type': opt.typename || opt.__name__
+ 'data-widget': opt.typename || opt.__name__
}, (value != null) ? value : E('em', _('none')));
},
'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__
+ 'data-widget': this.typename || (this.template ? this.template.replace(/^.+\//, '') : null) || this.__name__
}, E('div', {
'id': 'cbi-%s-%s-%s'.format(config_name, section_id, this.option),
'data-index': option_index,
'data-depends': depend_list,
'data-field': this.cbid(section_id),
'data-name': this.option,
- 'data-type': this.typename || (this.template ? this.template.replace(/^.+\//, '') : null) || this.__name__
+ 'data-widget': this.typename || (this.template ? this.template.replace(/^.+\//, '') : null) || this.__name__
});
if (this.last_child)
-%>
<div class="td cbi-value-field<% if self.error and self.error[section] then %> cbi-value-error<% end %><% if self.password then %> nowrap<% end %>"<%=
attr("data-name", self.option) ..
- ifattr(ftype and #ftype > 0, "data-type", ftype) ..
+ ifattr(ftype and #ftype > 0, "data-widget", ftype) ..
ifattr(title and #title > 0, "data-title", title, true) ..
ifattr(descr and #descr > 0, "data-description", descr, true)
%>>
for i, k in ipairs(self.children) do
if not k.optional then
%><div class="th cbi-section-table-cell"<%=
- width(k) .. attr('data-type', k.typename) %>><%
+ width(k) .. attr('data-widget', k.typename) %>><%
if k.titleref then
%><a title="<%=self.titledesc or translate('Go to relevant configuration page')%>" class="cbi-title-ref" href="<%=k.titleref%>"><%
for i, k in ipairs(self.children) do
if not k.optional then
%><div class="th cbi-section-table-cell"<%=
- width(k) .. attr("data-type", k.typename) %>><%
+ width(k) .. attr("data-widget", k.typename) %>><%
write(k.description)
word-wrap: normal;
}
- .td[data-type="button"],
- .td[data-type="fvalue"] {
+ .td[data-widget="button"],
+ .td[data-widget="fvalue"] {
flex: 1 1 17%;
text-align: left;
}
flex-basis: 100%;
}
- .td.cbi-value-field[data-type="dvalue"] {
+ .td.cbi-value-field[data-widget="dvalue"] {
flex-basis: 50%;
}
- .td.cbi-value-field[data-type="button"],
- .td.cbi-value-field[data-type="fvalue"] {
+ .td.cbi-value-field[data-widget="button"],
+ .td.cbi-value-field[data-widget="fvalue"] {
flex-basis: 25%;
text-align: left;
}
flex-basis: 50% !important;
}
- [data-page="admin-status-processes"] .td[data-type="button"] {
+ [data-page="admin-status-processes"] .td[data-widget="button"] {
flex-basis: 33% !important;
}
flex-basis: 25% !important;
}
- [data-page="admin-system-fstab"] .td[data-type="button"]::before,
- [data-page="admin-system-startup"] .td[data-type="button"]::before,
- [data-page="admin-status-processes"] .td[data-type="button"]::before {
+ [data-page="admin-system-fstab"] .td[data-widget="button"]::before,
+ [data-page="admin-system-startup"] .td[data-widget="button"]::before,
+ [data-page="admin-status-processes"] .td[data-widget="button"]::before {
display: none;
}
}
margin-left: 3px;
}
-.th[data-type="button"], .td[data-type="button"],
-.th[data-type="fvalue"], .td[data-type="fvalue"] {
+.th[data-widget="button"], .td[data-widget="button"],
+.th[data-widget="fvalue"], .td[data-widget="fvalue"] {
flex: 1 1 2em;
text-align: center;
}
word-wrap: normal;
}
- .td[data-type="button"],
- .td[data-type="fvalue"] {
+ .td[data-widget="button"],
+ .td[data-widget="fvalue"] {
flex: 1 1 12.5%;
text-align: left;
}
flex-basis: 100%;
}
- .td.cbi-value-field[data-type="dvalue"] {
+ .td.cbi-value-field[data-widget="dvalue"] {
flex-basis: 50%;
}
- .td.cbi-value-field[data-type="button"],
- .td.cbi-value-field[data-type="fvalue"] {
+ .td.cbi-value-field[data-widget="button"],
+ .td.cbi-value-field[data-widget="fvalue"] {
flex-basis: 25%;
text-align: left;
}
margin-top: .5em;
}
- #cbi-firewall-rule .td[data-type="fvalue"],
- #cbi-firewall-redirect .td[data-type="fvalue"] {
+ #cbi-firewall-rule .td[data-widget="fvalue"],
+ #cbi-firewall-redirect .td[data-widget="fvalue"] {
display: none;
}
}