summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-acl/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-11-27 20:54:18 +0100
committerJo-Philipp Wich <jo@mein.io>2020-11-27 21:36:40 +0100
commit03c77dafe3cfb922b995adfe9c0f8a75c98a18af (patch)
tree27bb29481b28cd8caed7d582510fd59c8cdf0e39 /applications/luci-app-acl/htdocs
parentc850608dcf58e1872692ca48af7985e528651e80 (diff)
treewide: transition div tables to actual table markup
Modern browsers allow decomposing table markup equally well as nested div constructs, therefor migrate our <div> table markup to actual <table> tags but keep the old table/tr/th/td CSS classes for now to allow for a smooth theme transition. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-acl/htdocs')
-rw-r--r--applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js b/applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js
index 52ce13c766..618facd6e6 100644
--- a/applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js
+++ b/applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js
@@ -73,16 +73,16 @@ var cbiACLSelect = form.Value.extend({
var readMatches = globListToRegExp(section_id, 'read'),
writeMatches = globListToRegExp(section_id, 'write');
- var table = E('div', { 'class': 'table' }, [
- E('div', { 'class': 'tr' }, [
- E('div', { 'class': 'th' }, [ _('ACL group') ]),
- E('div', { 'class': 'th' }, [ _('Description') ]),
- E('div', { 'class': 'th' }, [ _('Access level') ])
+ var table = E('table', { 'class': 'table' }, [
+ E('tr', { 'class': 'tr' }, [
+ E('th', { 'class': 'th' }, [ _('ACL group') ]),
+ E('th', { 'class': 'th' }, [ _('Description') ]),
+ E('th', { 'class': 'th' }, [ _('Access level') ])
]),
- E('div', { 'class': 'tr' }, [
- E('div', { 'class': 'td' }, [ '' ]),
- E('div', { 'class': 'td' }, [ '' ]),
- E('div', { 'class': 'td' }, [
+ E('tr', { 'class': 'tr' }, [
+ E('td', { 'class': 'td' }, [ '' ]),
+ E('td', { 'class': 'td' }, [ '' ]),
+ E('td', { 'class': 'td' }, [
_('Set all: ', 'Set all permissions in the table below to one of the given values'),
E('a', { 'href': '#', 'click': function() {
table.querySelectorAll('select').forEach(function(select) { select.value = select.options[0].value });
@@ -102,10 +102,10 @@ var cbiACLSelect = form.Value.extend({
isReadable = (readMatches[0].test(aclGroupName) && !readMatches[1].test(aclGroupName)) || null,
isWritable = (writeMatches[0].test(aclGroupName) && !writeMatches[1].test(aclGroupName)) || null;
- table.appendChild(E('div', { 'class': 'tr' }, [
- E('div', { 'class': 'td' }, [ aclGroupName ]),
- E('div', { 'class': 'td' }, [ aclList[aclGroupName].description || '-' ]),
- E('div', { 'class': 'td' }, [
+ table.appendChild(E('tr', { 'class': 'tr' }, [
+ E('td', { 'class': 'td' }, [ aclGroupName ]),
+ E('td', { 'class': 'td' }, [ aclList[aclGroupName].description || '-' ]),
+ E('td', { 'class': 'td' }, [
E('select', { 'data-acl-group': aclGroupName }, [
isRequired ? E([]) : E('option', { 'value': '' }, [ _('denied', 'No permissions granted') ]),
E('option', { 'value': 'read', 'selected': isReadable }, [ _('readonly', 'Only read permissions granted') ]),