diff options
Diffstat (limited to 'applications')
26 files changed, 682 insertions, 714 deletions
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm index b4b62db5f..424a72f6f 100644 --- a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm +++ b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm @@ -51,37 +51,37 @@ table.cbi-section-table td, <%- end %> <div class="cbi-section-descr"><%=self.description%></div> <div class="cbi-section-node"> - <table class="cbi-section-table"> - <tr class="cbi-section-table-titles"> + <div class="table cbi-section-table"> + <div class="tr cbi-section-table-titles"> <%- if self.sectionhead then -%> - <th class="cbi-section-table-cell"><%=self.sectionhead%></th> + <div class="th cbi-section-table-cell"><%=self.sectionhead%></div> <%- else -%> - <th> </th> + <div class="th"> </div> <%- end -%> <%- for i, k in pairs(self.children) do -%> - <th class="cbi-section-table-cell"<%=width(k)%>> + <div class="th cbi-section-table-cell"<%=width(k)%>> <%-=k.title-%> - </th> + </div> <%- end -%> - </tr> + </div> <%- local isempty = true for i, k in ipairs(self:cfgsections()) do section = k isempty = false scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } -%> - <tr class="cbi-section-table-row" id="cbi-<%=self.config%>-<%=section%>"> - <th><%=k%></th> + <div class="tr cbi-section-table-row" id="cbi-<%=self.config%>-<%=section%>"> + <div class="th"><%=k%></div> <%- for k, node in ipairs(self.children) do node:render(section, scope or {}) end if not scope.cbid:match("adb_src_cat") then -%> - <td class="cbi-value-field"> </td> + <div class="td cbi-value-field"> </div> <%- end -%> - </tr> + </div> <%- end -%> - </table> + </div> </div> </fieldset> diff --git a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm index 0629c84b3..5f7429dfd 100644 --- a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm +++ b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm @@ -21,24 +21,24 @@ <%- if device_name then -%> <fieldset class="cbi-section"> <legend><%=device_name%><%: Partitions%></legend> - <table class="cbi-section-table" id="partitions"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Partition%></th> - <th class="cbi-section-table-cell"><%:Status%></th> - <th class="cbi-section-table-cell"><%:Firmware/OS (Kernel)%></th> - <th class="cbi-section-table-cell"><%:Action%></th> - </tr> - <tr class="cbi-section-table-row"> - <td> + <div class="table cbi-section-table" id="partitions"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Partition%></div> + <div class="th cbi-section-table-cell"><%:Status%></div> + <div class="th cbi-section-table-cell"><%:Firmware/OS (Kernel)%></div> + <div class="th cbi-section-table-cell"><%:Action%></div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td"> <%=string.format("%X", boot_envvar1_partition_one)%> - </td> - <td> + </div> + <div class="td"> <%- if boot_envvar1_partition_one == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%> - </td> - <td> + </div> + <div class="td"> <%=partition_one_os%> - </td> - <td> + </div> + <div class="td"> <%- if boot_envvar1_partition_one == current_partition then -%> <form method="post" action="<%=url('admin/system/advanced_reboot/reboot')%>"> <input type="hidden" name="token" value="<%=token%>" /> @@ -50,19 +50,19 @@ <input id="altreboot-button" type="submit" class="cbi-button cbi-button-apply" value="<%:Reboot to alternative partition...%>" /> </form> <%- end -%> - </td> - </tr> - <tr class="cbi-section-table-row"> - <td> + </div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td"> <%=string.format("%X", boot_envvar1_partition_two)%> - </td> - <td> + </div> + <div class="td"> <%- if boot_envvar1_partition_two == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%> - </td> - <td> + </div> + <div class="td"> <%=partition_two_os%> - </td> - <td> + </div> + <div class="td"> <%- if boot_envvar1_partition_two == current_partition then -%> <form method="post" action="<%=url('admin/system/advanced_reboot/reboot')%>"> <input type="hidden" name="token" value="<%=token%>" /> @@ -74,9 +74,9 @@ <input id="altreboot-button" type="submit" class="cbi-button cbi-button-apply" value="<%:Reboot to alternative partition...%>" /> </form> <%- end -%> - </td> - </tr> - </table> + </div> + </div> + </div> </fieldset> <%- else -%> <p class="alert-message warning"><%:Warning: This system does not have two partitions!%></p> diff --git a/applications/luci-app-ahcp/luasrc/view/ahcp_status.htm b/applications/luci-app-ahcp/luasrc/view/ahcp_status.htm index 946828953..ab25f862b 100644 --- a/applications/luci-app-ahcp/luasrc/view/ahcp_status.htm +++ b/applications/luci-app-ahcp/luasrc/view/ahcp_status.htm @@ -7,29 +7,21 @@ if (st && tb && tx) { /* clear all rows */ - while( tb.rows.length > 1 ) - tb.deleteRow(1); + while (tb.firstElementChild !== tb.lastElementChild) + tb.removeChild(tb.lastElementChild); - for( var i = 0; i < st.leases.length; i++ ) + for (var i = 0; i < st.leases.length; i++) { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); - - tr.insertCell(-1).innerHTML = st.leases[i].addr; - tr.insertCell(-1).innerHTML = String.format('%t', st.leases[i].age); + tb.appendChild(E('<div class="tr cbi-section-table-row cbi-rowstyle-%d">'.format((i % 2) + 1), [ + E('<div class="td">', st.leases[i].addr), + E('<div class="td">', '%t'.format(st.leases[i].age)) + ])); } - if( tb.rows.length == 1 ) - { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row'; - - var td = tr.insertCell(-1); - td.colSpan = 2; - td.innerHTML = '<em><br /><%:There are no active leases.%></em>'; - } + if (tb.firstElementChild === tb.lastElementChild) + tb.appendChild(E('<div class="tr cbi-section-table-row"><div class="td"><em><br /><%:There are no active leases.%></em></div></div>')); - if( st.uid == '00:00:00:00:00:00:00:00' ) + if (st.uid == '00:00:00:00:00:00:00:00') tx.innerHTML = '<%:The AHCP Service is not running.%>'; else tx.innerHTML = String.format('<%:The AHCP Service is running with ID %s.%>', st.uid); @@ -41,13 +33,13 @@ <fieldset class="cbi-section"> <legend><%:Active AHCP Leases%></legend> <p id="ahcpd_status_text"></p> - <table class="cbi-section-table" id="ahcpd_status_table"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Address%></th> - <th class="cbi-section-table-cell"><%:Age%></th> - </tr> - <tr class="cbi-section-table-row"> - <td colspan="5"><em><br /><%:Collecting data...%></em></td> - </tr> - </table> + <div class="table cbi-section-table" id="ahcpd_status_table"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Address%></div> + <div class="th cbi-section-table-cell"><%:Age%></div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td" colspan="5"><em><br /><%:Collecting data...%></em></div> + </div> + </div> </fieldset> diff --git a/applications/luci-app-asterisk/luasrc/view/asterisk/dialplans.htm b/applications/luci-app-asterisk/luasrc/view/asterisk/dialplans.htm index 9f644ba07..fb40335f9 100644 --- a/applications/luci-app-asterisk/luasrc/view/asterisk/dialplans.htm +++ b/applications/luci-app-asterisk/luasrc/view/asterisk/dialplans.htm @@ -79,23 +79,23 @@ <% for i, plan in pairs(ast.dialplan.plans()) do %> <div class="cbi-section-node"> - <table class="cbi-section-table"> - <tr class="cbi-section-table-titles"> - <th style="text-align: left; padding: 3px" class="cbi-section-table-cell"> + <div class="table cbi-section-table"> + <div class="tr cbi-section-table-titles"> + <div style="text-align: left; padding: 3px" class="th cbi-section-table-cell"> <big>Dialplan <em><%=plan.name%></em></big> - </th> - <td> + </div> + <div class="td"> <a href="<%=url('admin/asterisk/dialplans')%>?delplan=<%=plan.name%>"> <img style="border:none" alt="Remove this dialplan" title="Remove this dialplan" src="/luci-static/resources/cbi/remove.gif" /> </a> - </td> - </tr> + </div> + </div> <!-- dialzones --> <% local zones_used = { }; local row = 0 %> <% for i, zone in ipairs(plan.zones) do zones_used[zone.name] = true %> - <tr class="cbi-section-table-row <%=rowstyle(row)%>"> - <td style="text-align: left; padding: 3px" class="cbi-section-table-cell"> + <div class="tr cbi-section-table-row <%=rowstyle(row)%>"> + <div style="text-align: left; padding: 3px" class="td cbi-section-table-cell"> <strong>└ Dialzone <em><%=zone.name%></em></strong> (<%=zone.description%>) <p style="padding-left: 1em; margin-bottom:0"> Lines: @@ -107,24 +107,24 @@ Matches: <%=format_matches(zone)%> </p> - </td> - <td style="width:5%" class="cbi-value-field"> + </div> + <div style="width:5%" class="td cbi-value-field"> <a href="<%=url('admin/asterisk/dialplans/out', zone.name)%>"> <img style="border:none" alt="Edit dialzone" title="Edit dialzone" src="/luci-static/resources/cbi/edit.gif" /> </a> <a href="<%=url('admin/asterisk/dialplans')%>?delzone.<%=plan.name%>=<%=zone.name%>"> <img style="border:none" alt="Remove from this dialplan" title="Remove from this dialplan" src="/luci-static/resources/cbi/remove.gif" /> </a> - </td> - </tr> + </div> + </div> <% row = row + 1; end %> <!-- /dialzones --> <!-- voicemail --> <% local boxes_used = { } %> <% for ext, box in luci.util.kspairs(plan.voicemailboxes) do boxes_used[box.id] = true %> - <tr class="cbi-section-table-row <%=rowstyle(row)%>"> - <td style="text-align: left; padding: 3px" class="cbi-section-table-cell"> + <div class="tr cbi-section-table-row <%=rowstyle(row)%>"> + <div style="text-align: left; padding: 3px" class="td cbi-section-table-cell"> <strong>└ Voicemailbox <em><%=box.id%></em></strong> (<%=box.name%>) <p style="padding-left: 1em; margin-bottom:0"> Owner: <%=box.name%> | @@ -132,44 +132,44 @@ Pager: <%=#box.page > 0 and box.page or 'n/a'%><br /> Matches: <%=format_matches(ext)%> </p> - </td> - <td style="width:5%" class="cbi-value-field"> + </div> + <div style="width:5%" class="td cbi-value-field"> <a href="<%=url('admin/asterisk/voicemail/mailboxes')%>"> <img style="border:none" alt="Manage mailboxes ..." title="Manage mailboxes ..." src="/luci-static/resources/cbi/edit.gif" /> </a> <a href="<%=url('admin/asterisk/dialplans')%>?delvbox.<%=plan.name%>=<%=ext%>"> <img style="border:none" alt="Remove from this dialplan" title="Remove from this dialplan" src="/luci-static/resources/cbi/remove.gif" /> </a> - </td> - </tr> + </div> + </div> <% row = row + 1; end %> <!-- /voicemail --> <!-- meetme --> <% local rooms_used = { } %> <% for ext, room in luci.util.kspairs(plan.meetmerooms) do rooms_used[room.room] = true %> - <tr class="cbi-section-table-row <%=rowstyle(row)%>"> - <td style="text-align: left; padding: 3px" class="cbi-section-table-cell"> + <div class="tr cbi-section-table-row <%=rowstyle(row)%>"> + <div style="text-align: left; padding: 3px" class="td cbi-section-table-cell"> <strong>└ MeetMe Room <em><%=room.room%></em></strong> <% if room.description and #room.description > 0 then %> (<%=room.description%>)<% end %> <p style="padding-left: 1em; margin-bottom:0"> Matches: <%=format_matches(ext)%> </p> - </td> - <td style="width:5%" class="cbi-value-field"> + </div> + <div style="width:5%" class="td cbi-value-field"> <a href="<%=url('admin/asterisk/meetme/rooms')%>"> <img style="border:none" alt="Manage conferences ..." title="Manage conferences ..." src="/luci-static/resources/cbi/edit.gif" /> </a> <a href="<%=url('admin/asterisk/dialplans')%>?delmeetme.<%=plan.name%>=<%=ext%>"> <img style="border:none" alt="Remove from this dialplan" title="Remove from this dialplan" src="/luci-static/resources/cbi/remove.gif" /> </a> - </td> - </tr> + </div> + </div> <% row = row + 1; end %> <!-- /meetme --> - <tr class="cbi-section-table-row"> - <td style="text-align: left; padding: 3px" class="cbi-section-table-cell" colspan="2"> + <div class="tr cbi-section-table-row"> + <div style="text-align: left; padding: 3px" class="td cbi-section-table-cell" colspan="2"> <hr style="margin-bottom:0.5em; border-width:0 0 1px 0" /> Add Dialzone:<br /> @@ -213,10 +213,10 @@ <br /><br /> <input type="submit" class="cbi-button cbi-button-add" value="Add item »" title="Add item ..."/> - </td> - </tr> + </div> + </div> - </table> + </div> <div class="cbi-section-create cbi-tblsection-create"></div> </div> diff --git a/applications/luci-app-asterisk/luasrc/view/asterisk/dialzones.htm b/applications/luci-app-asterisk/luasrc/view/asterisk/dialzones.htm index ffdbbcf35..e48da608a 100644 --- a/applications/luci-app-asterisk/luasrc/view/asterisk/dialzones.htm +++ b/applications/luci-app-asterisk/luasrc/view/asterisk/dialzones.htm @@ -66,59 +66,59 @@ <!-- tblsection --> <fieldset class="cbi-section" id="cbi-asterisk-sip"> <div class="cbi-section-node"> - <table class="cbi-section-table"> - <tr class="cbi-section-table-titles"> - <th style="text-align: left; padding: 3px" class="cbi-section-table-cell" colspan="6"> + <div class="table cbi-section-table"> + <div class="tr cbi-section-table-titles"> + <div style="text-align: left; padding: 3px" class="th cbi-section-table-cell" colspan="6"> <h3>Dialzone Overview</h3> - </th> - </tr> - - <tr class="cbi-section-table-descr"> - <th style="width: 5%; text-align:right" class="cbi-section-table-cell">Name</th> - <th style="width: 5%; text-align:right" class="cbi-section-table-cell">Prepend</th> - <th style="width: 20%; text-align:left" class="cbi-section-table-cell">- Match</th> - <th style="text-align:left" class="cbi-section-table-cell">Trunk</th> - <th style="width: 35%; text-align:left" class="cbi-section-table-cell">Description</th> - <th style="width: 4%; text-align:left" class="cbi-section-table-cell"></th> - </tr> + </div> + </div> + + <div class="tr cbi-section-table-descr"> + <div style="width: 5%; text-align:right" class="th cbi-section-table-cell">Name</div> + <div style="width: 5%; text-align:right" class="th cbi-section-table-cell">Prepend</div> + <div style="width: 20%; text-align:left" class="th cbi-section-table-cell">- Match</div> + <div style="text-align:left" class="th cbi-section-table-cell">Trunk</div> + <div style="width: 35%; text-align:left" class="th cbi-section-table-cell">Description</div> + <div style="width: 4%; text-align:left" class="th cbi-section-table-cell"></div> + </div> <% for i, rule in pairs(ast.dialzone.zones()) do %> - <tr class="cbi-section-table-row <%=rowstyle(i)%>"> - <td style="text-align:right" class="cbi-value-field"> + <div class="tr cbi-section-table-row <%=rowstyle(i)%>"> + <div style="text-align:right" class="td cbi-value-field"> <%=rule.name%> - </td> - <td style="text-align:right" class="cbi-value-field"> + </div> + <div style="text-align:right" class="td cbi-value-field"> <% for _ in ipairs(rule.matches) do %> <%=rule.addprefix and digit_pattern(rule.addprefix)%> <br /> <% end %> - </td> - <td style="text-align:left" class="cbi-value-field"> + </div> + <div style="text-align:left" class="td cbi-value-field"> <% for _, m in ipairs(rule.matches) do %> <%=rule.localprefix and "%s " % digit_pattern(rule.localprefix)%> <%=digit_pattern(m)%><br /> <% end %> - </td> - <td style="text-align:left" class="cbi-value-field"> + </div> + <div style="text-align:left" class="td cbi-value-field"> <%=ast.tools.hyperlinks( rule.trunks, function(v) return luci.dispatcher.build_url("admin", "asterisk", "trunks", "%s") % v:lower() end )%> - </td> - <td style="text-align:left" class="cbi-value-field"> + </div> + <div style="text-align:left" class="td cbi-value-field"> <%=rule.description or rule.name%> - </td> - <td style="text-align:left" class="cbi-value-field"> + </div> + <div style="text-align:left" class="td cbi-value-field"> <a href="<%=url('admin/asterisk/dialplans/out', rule.name)%>"> <img style="border:none" alt="Edit entry" title="Edit entry" src="/luci-static/resources/cbi/edit.gif" /> </a> <a href="<%=url('admin/asterisk/dialplans/zones')%>?delzone=<%=rule.name%>"> <img style="border:none" alt="Delete entry" title="Delete entry" src="/luci-static/resources/cbi/remove.gif" /> </a> - </td> - </tr> + </div> + </div> <% end %> - </table> + </div> <div class="cbi-section-create cbi-tblsection-create"></div> </div> <br /> @@ -133,26 +133,26 @@ <br /><span style="color:red">Invalid name given!</span><br /> <% end -%> - <table> - <tr> - <td style="padding:3px"> + <div class="table"> + <div class="tr"> + <div class="td" style="padding:3px"> <label for="create1">1) Name</label><br /> <input type="text" class="cbi-section-create-name" id="create1" name="newzone_name" style="width:200px" /> <br /><br /> <label for="create2">2) Number Match</label><br /> <input type="text" class="cbi-section-create-name" id="create2" name="newzone_match" style="width:200px" /> - </td> - <td style="padding:3px"> + </div> + <div class="td" style="padding:3px"> <label for="create3">3) Trunks</label><br /> <select class="cbi-input-select" multiple="multiple" id="create3" name="newzone_uses" size="4" style="width:200px"> <% for i, t in ipairs(find_trunks()) do %> <option value="<%=t[1]%>"><%=t[2]%></option> <% end %> </select> - </td> - </tr> - </table> + </div> + </div> + </div> <br /> <input type="submit" class="cbi-button cbi-button-add" name="newzone" value="Add entry" title="Add entry"/> diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm index b3079f3a4..279b6e06d 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm @@ -20,58 +20,58 @@ -%> <div class="cbi-section-create cbi-tblsection-create"> <br /> - <table class="cbi-section-table" style="width:810px; margin-left:5px"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell" colspan="8"><%:New port forward%>:</th> - </tr> - <tr class="cbi-section-table-descr"> - <th class="cbi-section-table-cell"><%:Name%></th> - <th class="cbi-section-table-cell"><%:Protocol%></th> - <th class="cbi-section-table-cell"><%:External zone%></th> - <th class="cbi-section-table-cell"><%:External port%></th> - <th class="cbi-section-table-cell"><%:Internal zone%></th> - <th class="cbi-section-table-cell"><%:Internal IP address%></th> - <th class="cbi-section-table-cell"><%:Internal port%></th> - <th class="cbi-section-table-cell"></th> - </tr> - <tr class="cbi-section-table-row"> - <td class="cbi-section-table-cell"> + <div class="table cbi-section-table" style="width:810px; margin-left:5px"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell" colspan="8"><%:New port forward%>:</div> + </div> + <div class="tr cbi-section-table-descr"> + <div class="th cbi-section-table-cell"><%:Name%></div> + <div class="th cbi-section-table-cell"><%:Protocol%></div> + <div class="th cbi-section-table-cell"><%:External zone%></div> + <div class="th cbi-section-table-cell"><%:External port%></div> + <div class="th cbi-section-table-cell"><%:Internal zone%></div> + <div class="th cbi-section-table-cell"><%:Internal IP address%></div> + <div class="th cbi-section-table-cell"><%:Internal port%></div> + <div class="th cbi-section-table-cell"></div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td cbi-section-table-cell"> <input type="text" class="cbi-input-text" id="_newfwd.name" name="_newfwd.name" placeholder="<%:New port forward%>" /> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <select class="cbi-input-select" id="_newfwd.proto" name="_newfwd.proto"> <option value="tcp udp">TCP+UDP</option> <option value="tcp">TCP</option> <option value="udp">UDP</option> <option value="other"><%:Other...%></option> </select> - </td> - <td class="cbi-section-table-cell" style="width:55px"> + </div> + <div class="td cbi-section-table-cell" style="width:55px"> <select class="cbi-input-select" id="_newfwd.extzone" name="_newfwd.extzone"> <% for _, z in ipairs(ezl) do -%><option value="<%=z:name()%>"><%=z:name()%></option><%- end %> </select> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <input type="text" class="cbi-input-text" id="_newfwd.extport" name="_newfwd.extport" data-type="portrange" data-optional="true" /> - </td> - <td class="cbi-section-table-cell" style="width:55px"> + </div> + <div class="td cbi-section-table-cell" style="width:55px"> <select class="cbi-input-select" id="_newfwd.intzone" name="_newfwd.intzone"> <% for _, z in ipairs(izl) do -%><option value="<%=z:name()%>"><%=z:name()%></option><%- end %> </select> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <input type="text" class="cbi-input-text" id="_newfwd.intaddr" name="_newfwd.intaddr" data-type="host" data-optional="true"<%= ifattr(#keys > 0, "data-choices", {keys, vals}) %>/> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <input type="text" class="cbi-input-text" id="_newfwd.intport" name="_newfwd.intport" data-type="portrange" data-optional="true" /> - </td> - <td class="cbi-section-table-cell"> + </div> + <div class="td cbi-section-table-cell"> <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" /> - </td> - </tr> - </table> + </div> + </div> + </div> <script type="text/javascript">//<![CDATA[ cbi_bind(document.getElementById('_newfwd.extport'), 'blur', diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm index b06fac3de..c99ecaca3 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm @@ -8,71 +8,71 @@ <div class="cbi-section-create cbi-tblsection-create"> <% if wz then %> <br /> - <table class="cbi-section-table" style="margin-left:5px"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell left" colspan="4"><%:Open ports on router%>:</th> - </tr> - <tr class="cbi-section-table-descr"> - <th class="cbi-section-table-cell"><%:Name%></th> - <th class="cbi-section-table-cell"><%:Protocol%></th> - <th class="cbi-section-table-cell"><%:External port%></th> - <th class="cbi-section-table-cell"></th> - </tr> - <tr class="cbi-section-table-row"> - <td class="cbi-section-table-cell" style="width:130px"> + <div class="table cbi-section-table" style="margin-left:5px"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell left" colspan="4"><%:Open ports on router%>:</div> + </div> + <div class="tr cbi-section-table-descr"> + <div class="th cbi-section-table-cell"><%:Name%></div> + <div class="th cbi-section-table-cell"><%:Protocol%></div> + <div class="th cbi-section-table-cell"><%:External port%></div> + <div class="th cbi-section-table-cell"></div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td cbi-section-table-cell" style="width:130px"> <input type="text" class="cbi-input-text" id="_newopen.name" name="_newopen.name" placeholder="<%:New input rule%>" /> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <select class="cbi-input-select" id="_newopen.proto" name="_newopen.proto"> <option value="tcp udp">TCP+UDP</option> <option value="tcp">TCP</option> <option value="udp">UDP</option> <option value="other"><%:Other...%></option> </select> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <input type="text" class="cbi-input-text" id="_newopen.extport" name="_newopen.extport" /> - </td> - <td class="cbi-section-table-cell left"> + </div> + <div class="td cbi-section-table-cell left"> <input type="submit" class="cbi-button cbi-button-add" name="_newopen.submit" value="<%:Add%>" /> - </td> - </tr> - </table> + </div> + </div> + </div> <% end %> <% if #zones > 1 then %> - <table class="cbi-section-table" style="margin-left:5px"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell left" colspan="6"><br /><%:New forward rule%>:</th> - </tr> - <tr class="cbi-section-table-descr"> - <th class="cbi-section-table-cell"><%:Name%></th> - <th class="cbi-section-table-cell"><%:Source zone%></th> - <th class="cbi-section-table-cell"><%:Destination zone%></th> - <th class="cbi-section-table-cell"></th> - </tr> - <tr class="cbi-section-table-row"> - <td class="cbi-section-table-cell" style="width:130px"> + <div class="table cbi-section-table" style="margin-left:5px"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell left" colspan="6"><br /><%:New forward rule%>:</div> + </div> + <div class="tr cbi-section-table-descr"> + <div class="th cbi-section-table-cell"><%:Name%></div> + <div class="th cbi-section-table-cell"><%:Source zone%></div> + <div class="th cbi-section-table-cell"><%:Destination zone%></div> + <div class="th cbi-section-table-cell"></div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td cbi-section-table-cell" style="width:130px"> <input type="text" class="cbi-input-text" id="_newfwd.name" name="_newfwd.name" placeholder="<%:New forward rule%>" /> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <select class="cbi-input-text" id="_newfwd.src" name="_newfwd.src"> <% local k, v; for k, v in ipairs(fw:get_zones()) do -%> <option<%=ifattr(v:name() == "wan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option> <%- end %> </select> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <select class="cbi-input-text" id="_newfwd.dest" name="_newfwd.dest"> <% local k, v; for k, v in ipairs(fw:get_zones()) do -%> <option<%=ifattr(v:name() == "lan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option> <%- end %> </select> - </td> - <td class="cbi-section-table-cell left"> + </div> + <div class="td cbi-section-table-cell left"> <input type="submit" class="cbi-button cbi-button-link" name="_newfwd.submit" value="<%:Add and edit...%>" /> - </td> - </tr> - </table> + </div> + </div> + </div> <% else %> <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" /> <% end %> diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm index 0a5913fc0..b2775cf69 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm @@ -15,49 +15,49 @@ <div class="cbi-section-create cbi-tblsection-create"> <% if #zones > 1 then %> <br /> - <table class="cbi-section-table" style="width:700px; margin-left:5px"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell left" colspan="6"><%:New source NAT%>:</th> - </tr> - <tr class="cbi-section-table-descr"> - <th class="cbi-section-table-cell"><%:Name%></th> - <th class="cbi-section-table-cell"><%:Source zone%></th> - <th class="cbi-section-table-cell"><%:Destination zone%></th> - <th class="cbi-section-table-cell"><%:To source IP%></th> - <th class="cbi-section-table-cell"><%:To source port%></th> - <th class="cbi-section-table-cell"></th> - </tr> - <tr class="cbi-section-table-row"> - <td class="cbi-section-table-cell"> + <div class="table cbi-section-table" style="width:700px; margin-left:5px"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell left" colspan="6"><%:New source NAT%>:</div> + </div> + <div class="tr cbi-section-table-descr"> + <div class="th cbi-section-table-cell"><%:Name%></div> + <div class="th cbi-section-table-cell"><%:Source zone%></div> + <div class="th cbi-section-table-cell"><%:Destination zone%></div> + <div class="th cbi-section-table-cell"><%:To source IP%></div> + <div class="th cbi-section-table-cell"><%:To source port%></div> + <div class="th cbi-section-table-cell"></div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td cbi-section-table-cell"> <input type="text" class="cbi-input-text" id="_newsnat.name" name="_newsnat.name" placeholder="<%:New SNAT rule%>" /> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <select class="cbi-input-text" id="_newsnat.src" name="_newsnat.src"> <% local k, v; for k, v in ipairs(fw:get_zones()) do -%> <option<%=ifattr(v:name() == "lan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option> <%- end %> </select> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <select class="cbi-input-text" id="_newsnat.dest" name="_newsnat.dest"> <% local k, v; for k, v in ipairs(fw:get_zones()) do -%> <option<%=ifattr(v:name() == "wan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option> <%- end %> </select> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <input type="text" class="cbi-input-text" id="_newsnat.dip" name="_newsnat.dip" placeholder="<%:Do not rewrite%>" data-type="ip4addr" data-optional="true"<%= ifattr(#keys > 0, "data-choices", { keys, vals }) %> /> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <input type="text" class="cbi-input-text" id="_newsnat.dport" name="_newsnat.dport" placeholder="<%:Do not rewrite%>" data-type="portrange" data-optional="true" /> - </td> - <td class="cbi-section-table-cell"> + </div> + <div class="td cbi-section-table-cell"> <input type="submit" class="cbi-button cbi-button-link" name="_newsnat.submit" value="<%:Add and edit...%>" /> - </td> - </tr> - </table> + </div> + </div> + </div> <% else %> <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" /> <% end %> diff --git a/applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm b/applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm index d861ef9fc..2fd7168bd 100644 --- a/applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm +++ b/applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm @@ -5,13 +5,12 @@ XHR.poll(5, '<%=url('admin/telephony/status')%>', null, var tb = document.getElementById('telephony_status_table'); if (st && tb) { - tb.deleteRow(1); - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-1'; - - tr.insertCell(-1).innerHTML = st.status; - tr.insertCell(-1).innerHTML = st.line1; - tr.insertCell(-1).innerHTML = st.line2; + tb.removeChild(tb.firstChild); + tb.appendChild(E('<div class="tr cbi-section-table-row cbi-rowstyle-1">', [ + E('<div class="td">', st.status), + E('<div class="td">', st.line1), + E('<div class="td">', st.line2) + ])); } } ); @@ -19,14 +18,14 @@ XHR.poll(5, '<%=url('admin/telephony/status')%>', null, <fieldset class="cbi-section"> <legend><%:Current Telephony State%></legend> - <table class="cbi-section-table" id="telephony_status_table"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Uplink%></th> - <th class="cbi-section-table-cell"><%:Port1%></th> - <th class="cbi-section-table-cell"><%:Port2%></th> - </tr> - <tr class="cbi-section-table-row"> - <td colspan="5"><em><br /><%:Collecting data...%></em></td> - </tr> - </table> + <div class="table cbi-section-table" id="telephony_status_table"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Uplink%></div> + <div class="th cbi-section-table-cell"><%:Port1%></div> + <div class="th cbi-section-table-cell"><%:Port2%></div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td" colspan="5"><em><br /><%:Collecting data...%></em></div> + </div> + </div> </fieldset> diff --git a/applications/luci-app-noddos/luasrc/view/noddos/clients.htm b/applications/luci-app-noddos/luasrc/view/noddos/clients.htm index f2fb9312a..4caf3e04e 100644 --- a/applications/luci-app-noddos/luasrc/view/noddos/clients.htm +++ b/applications/luci-app-noddos/luasrc/view/noddos/clients.htm @@ -38,70 +38,70 @@ <fieldset class="cbi-section"> <legend><%:Recognized Clients%></legend> <div class="cbi-section-node"> - <table class="cbi-section-table"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Hostname%></th> - <th class="cbi-section-table-cell"><%:IPv4%></th> - <th class="cbi-section-table-cell"><%:MAC%></th> - <th class="cbi-section-table-cell"><%:Manufacturer%></th> - <th class="cbi-section-table-cell"><%:Model%></th> - <th class="cbi-section-table-cell"><%:Class%></th> - </tr> + <div class="table cbi-section-table"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Hostname%></div> + <div class="th cbi-section-table-cell"><%:IPv4%></div> + <div class="th cbi-section-table-cell"><%:MAC%></div> + <div class="th cbi-section-table-cell"><%:Manufacturer%></div> + <div class="th cbi-section-table-cell"><%:Model%></div> + <div class="th cbi-section-table-cell"><%:Class%></div> + </div> <% for i,v in ipairs(devdump) do if v.DeviceProfileUuid ~= "" then %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>"> - <td class="cbi-value-field"><%=v.Hostname%></td> - <td class="cbi-value-field"><%=v.Ipv4Address%></td> - <td class="cbi-value-field"><a href="/cgi-bin/clientdetails?mac=<%=v.MacAddress%>"><%=v.MacAddress%></a></td> - <td class="cbi-value-field"><%=devicevalues[v.DeviceProfileUuid].Manufacturer%></td> - <td class="cbi-value-field"><%=devicevalues[v.DeviceProfileUuid].Model%></td> - <td class="cbi-value-field"><%=devicevalues[v.DeviceProfileUuid].ThingClass%></td> - </tr> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>"> + <div class="td cbi-value-field"><%=v.Hostname%></div> + <div class="td cbi-value-field"><%=v.Ipv4Address%></div> + <div class="td cbi-value-field"><a href="/cgi-bin/clientdetails?mac=<%=v.MacAddress%>"><%=v.MacAddress%></a></div> + <div class="td cbi-value-field"><%=devicevalues[v.DeviceProfileUuid].Manufacturer%></div> + <div class="td cbi-value-field"><%=devicevalues[v.DeviceProfileUuid].Model%></div> + <div class="td cbi-value-field"><%=devicevalues[v.DeviceProfileUuid].ThingClass%></div> + </div> <% style=false end end %> - </table> + </div> </div> </fieldset> <br /> <fieldset class="cbi-section"> <legend><%:Unrecognized Clients%></legend> <div class="cbi-section-node"> - <table class="cbi-section-table"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Hostname%></th> - <th class="cbi-section-table-cell"><%:IPv4%></th> - <th class="cbi-section-table-cell"><%:MAC%></th> - <th class="cbi-section-table-cell"><%:Manufacturer%></th> - <th class="cbi-section-table-cell"><%:Model%></th> - <th class="cbi-section-table-cell"><%:DhcpVendor%></th> - <th class="cbi-section-table-cell"><%:DhcpHostname%></th> - </tr> + <div class="table cbi-section-table"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Hostname%></div> + <div class="th cbi-section-table-cell"><%:IPv4%></div> + <div class="th cbi-section-table-cell"><%:MAC%></div> + <div class="th cbi-section-table-cell"><%:Manufacturer%></div> + <div class="th cbi-section-table-cell"><%:Model%></div> + <div class="th cbi-section-table-cell"><%:DhcpVendor%></div> + <div class="th cbi-section-table-cell"><%:DhcpHostname%></div> + </div> <% for i,v in ipairs(devdump) do if v.DeviceProfileUuid == "" then %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>"> - <td class="cbi-value-field"><%=v.Hostname%></td> - <td class="cbi-value-field"><%=v.Ipv4Address%></td> - <td class="cbi-value-field"><a href="/cgi-bin/clientdetails?mac=<%=v.MacAddress%>"><%=v.MacAddress%></a></td> - <td class="cbi-value-field"><%=v.SsdpManufacturer%></td> - <td class="cbi-value-field"><%=v.SsdpModelName%></td> - <td class="cbi-value-field"><%=v.DhcpVendor1%></td> - <td class="cbi-value-field"><%=v.DhcpHostname%></td> - </tr> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>"> + <div class="td cbi-value-field"><%=v.Hostname%></div> + <div class="td cbi-value-field"><%=v.Ipv4Address%></div> + <div class="td cbi-value-field"><a href="/cgi-bin/clientdetails?mac=<%=v.MacAddress%>"><%=v.MacAddress%></a></div> + <div class="td cbi-value-field"><%=v.SsdpManufacturer%></div> + <div class="td cbi-value-field"><%=v.SsdpModelName%></div> + <div class="td cbi-value-field"><%=v.DhcpVendor1%></div> + <div class="td cbi-value-field"><%=v.DhcpHostname%></div> + </div> <% style=false end end %> - </table> + </div> </div> </fieldset> diff --git a/applications/luci-app-ocserv/luasrc/view/ocserv_status.htm b/applications/luci-app-ocserv/luasrc/view/ocserv_status.htm index 03a9ed70e..66e44e967 100644 --- a/applications/luci-app-ocserv/luasrc/view/ocserv_status.htm +++ b/applications/luci-app-ocserv/luasrc/view/ocserv_status.htm @@ -5,8 +5,8 @@ function(x) { var tb = document.getElementById('ocserv_status_table'); - if (tb && (idx < tb.rows.length)) - tb.rows[0].parentNode.removeChild(tb.rows[idx]); + if (tb && (idx + 1 < tb.childNodes.length)) + tb.removeChild(tb.childNodes[idx + 1]); } ); } @@ -18,38 +18,28 @@ if (st && tb) { /* clear all rows */ - while( tb.rows.length > 1 ) - tb.deleteRow(1); + while (tb.firstElementChild !== tb.lastElementChild) + tb.removeChild(tb.lastElementChild); - for( var i = 0; i < st.length; i++ ) + for (var i = 0; i < st.length; i++) { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); - - tr.insertCell(-1).innerHTML = st[i].user; - tr.insertCell(-1).innerHTML = st[i].group; - tr.insertCell(-1).innerHTML = st[i].vpn_ip; - tr.insertCell(-1).innerHTML = st[i].ip; - tr.insertCell(-1).innerHTML = st[i].device; - tr.insertCell(-1).innerHTML = st[i].time; - tr.insertCell(-1).innerHTML = st[i].cipher; - tr.insertCell(-1).innerHTML = st[i].status; - - tr.insertCell(-1).innerHTML = String.format( - '<input class="cbi-button cbi-input-remove" type="button" value="<%:Disconnect%>" onclick="ocserv_disconnect(%d)" />', - st[i].id - ); + tb.appendChild(E('<div class="tr cbi-section-table-row cbi-rowstyle-%d">'.format((i % 2) + 1), [ + E('<div class="td">', st[i].user), + E('<div class="td">', st[i].group), + E('<div class="td">', st[i].vpn_ip), + E('<div class="td">', st[i].ip), + E('<div class="td">', st[i].device), + E('<div class="td">', st[i].time), + E('<div class="td">', st[i].cipher), + E('<div class="td">', st[i].status), + E('<div class="td">', + E('<input class="cbi-button cbi-input-remove" type="button" value="<%:Disconnect%>" onclick="ocserv_disconnect(%d)" />' + .format(st[i].id))) + ])); } - if( tb.rows.length == 1 ) - { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row'; - - var td = tr.insertCell(-1); - td.colSpan = 5; - td.innerHTML = '<em><br /><%:There are no active users.%></em>'; - } + if (tb.firstElementChild === tb.lastElementChild) + tb.appendChild(E('<div class="tr cbi-section-table-row"><div class="td"><em><br /><%:There are no active users.%></em></div></div>')); } } ); @@ -57,20 +47,21 @@ <fieldset class="cbi-section"> <legend><%:Active OpenConnect Users%></legend> - <table class="cbi-section-table" id="ocserv_status_table"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:User%></th> - <th class="cbi-section-table-cell"><%:Group%></th> - <th class="cbi-section-table-cell"><%:IP Address%></th> - <th class="cbi-section-table-cell"><%:VPN IP Address%></th> - <th class="cbi-section-table-cell"><%:Device%></th> - <th class="cbi-section-table-cell"><%:Time%></th> - <th class="cbi-section-table-cell"><%:Cipher%></th> - <th class="cbi-section-table-cell"><%:Status%></th> - <th class="cbi-section-table-cell"> </th> - </tr> - <tr class="cbi-section-table-row"> - <td colspan="5"><em><br /><%:Collecting data...%></em></td> - </tr> - </table> + <div class="table cbi-section-table" id="ocserv_status_table"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:User%></div> + <div class="th cbi-section-table-cell"><%:Group%></div> + <div class="th cbi-section-table-cell"><%:IP Address%></div> + <div class="th cbi-section-table-cell"><%:VPN IP Address%></div> + <div class="th cbi-section-table-cell"><%:Device%></div> + <div class="th cbi-section-table-cell"><%:Time%></div> + <div class="th cbi-section-table-cell"><%:Cipher%></div> + <div class="th cbi-section-table-cell"><%:Status%></div> + <div class="th cbi-section-table-cell"> </div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td" colspan="5"><em><br /><%:Collecting data...%></em></div> + </div> + </div> </fieldset> + diff --git a/applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm b/applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm index 476150dd2..150ed87da 100644 --- a/applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm +++ b/applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm @@ -132,11 +132,11 @@ end { var service = info[idx]; s += String.format( - '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+'">' + - '<td class="cbi-section-table-titles"><a href="%s">%s</a></td>' + - '<td class="cbi-section-table-titles">%s</td>' + - '<td class="cbi-section-table-titles"><a href="http://%s/cgi-bin-status.html">%s</a></td>' + - '</tr>', + '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+'">' + + '<div class="td cbi-section-table-titles"><a href="%s">%s</a></div>' + + '<div class="td cbi-section-table-titles">%s</div>' + + '<div class="td cbi-section-table-titles"><a href="http://%s/cgi-bin-status.html">%s</a></div>' + + '</div>', service.url, service.descr, service.proto, service.origin_link, service.origin || '?' ); } @@ -153,16 +153,16 @@ end <fieldset class="cbi-section"> <legend><%:Internal services%></legend> - <table class="cbi-section-table"> - <thead> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Url%></th> - <th class="cbi-section-table-cell"><%:Protocol%></th> - <th class="cbi-section-table-cell"><%:Source%></th> - </tr> - </thead> - - <tbody id="olsr_services"> + <div class="table cbi-section-table"> + <div class="thead"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Url%></div> + <div class="th cbi-section-table-cell"><%:Protocol%></div> + <div class="th cbi-section-table-cell"><%:Source%></div> + </div> + </div> + + <div class="tbody" id="olsr_services"> <% for k, line in ipairs(services) do local field = {} @@ -178,15 +178,15 @@ end local url, proto, descr, origin = pcdata(field[1]), pcdata(field[2]), utl.trim(pcdata(field[3])), pcdata(field[4]) %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%>"> - <td class="cbi-section-table-titles"><a href="<%=url%>"><%=descr%></a></td> - <td class="cbi-section-table-titles"><%=proto%></td> - <td class="cbi-section-table-titles"><a href="http://<%=origin_link%>/cgi-bin-status.html"><%=origin%></a></td> - </tr> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%>"> + <div class="td cbi-section-table-titles"><a href="<%=url%>"><%=descr%></a></div> + <div class="td cbi-section-table-titles"><%=proto%></div> + <div class="td cbi-section-table-titles"><a href="http://<%=origin_link%>/cgi-bin-status.html"><%=origin%></a></div> + </div> <% i = ((i % 2) + 1) end %> - </tbody> - </table> + </div> + </div> <br /> <%=last_update%> </fieldset> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm index 5ea7b74e4..2dc4ce173 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm @@ -41,7 +41,7 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, { var hna = info[idx]; var linkgw = '' - s += '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-' + hna.proto + '">' + s += '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-' + hna.proto + '">' if (hna.proto == '6') { linkgw = '<a href="http://[' + hna.gateway + ']/cgi-bin-status.html">' + hna.gateway + '</a>' } else { @@ -61,11 +61,11 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, } s += String.format( - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>', hna.destination + '/' + hna.genmask, linkgw + hostname, validity + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>', hna.destination + '/' + hna.genmask, linkgw + hostname, validity ) - s += '</tr>' + s += '</div>' } hnadiv.innerHTML = s; } @@ -79,21 +79,21 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, <fieldset class="cbi-section"> <legend><%:Overview of currently active OLSR host net announcements%></legend> - <table class="cbi-section-table"> - <thead> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Announced network%></th> - <th class="cbi-section-table-cell"><%:OLSR gateway%></th> - <th class="cbi-section-table-cell"><%:Validity Time%></th> - </tr> + <div class="table cbi-section-table"> + <div class="thead"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Announced network%></div> + <div class="th cbi-section-table-cell"><%:OLSR gateway%></div> + <div class="th cbi-section-table-cell"><%:Validity Time%></div> + </div> - </thead> - <tbody id="olsrd_hna"> + </div> + <div class="tbody" id="olsrd_hna"> <% for k, route in ipairs(hna) do %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=hna[k].proto%>"> - <td class="cbi-section-table-cell"><%=hna[k].destination%>/<%=hna[k].genmask%> </td> - <td class="cbi-section-table-cell"> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=hna[k].proto%>"> + <div class="td cbi-section-table-cell"><%=hna[k].destination%>/<%=hna[k].genmask%> </div> + <div class="td cbi-section-table-cell"> <% if hna[k].proto == '6' then %> <a href="http://[<%=hna[k].gateway%>]/cgi-bin-status.html"><%=hna[k].gateway%></a> <% else %> @@ -102,20 +102,20 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, <% if hna[k].hostname then %> / <a href="http://<%=hna[k].hostname%>/cgi-bin-status.html"><%=hna[k].hostname%></a> <% end %> - </td> + </div> <% if hna[k].validityTime then validity = hna[k].validityTime .. 's' else validity = '-' end %> - <td class="cbi-section-table-cell"><%=validity%></td> - </tr> + <div class="td cbi-section-table-cell"><%=validity%></div> + </div> <% i = ((i % 2) + 1) end %> - </tbody> - </table> + </div> + </div> </fieldset> <%+status-olsr/common_js%> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/interfaces.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/interfaces.htm index 81d0a3dd3..e3ccd0c23 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/interfaces.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/interfaces.htm @@ -18,31 +18,31 @@ local i = 1 <fieldset class="cbi-section"> <legend><%:Overview of interfaces where OLSR is running%></legend> - <table class="cbi-section-table"> - <tr> - <th class="cbi-section-table-cell"><%:Interface%></th> - <th class="cbi-section-table-cell"><%:State%></th> - <th class="cbi-section-table-cell"><%:MTU%></th> - <th class="cbi-section-table-cell"><%:WLAN%></th> - <th class="cbi-section-table-cell"><%:Source address%></th> - <th class="cbi-section-table-cell"><%:Netmask%></th> - <th class="cbi-section-table-cell"><%:Broadcast address%></th> - </tr> + <div class="table cbi-section-table"> + <div class="tr"> + <div class="th cbi-section-table-cell"><%:Interface%></div> + <div class="th cbi-section-table-cell"><%:State%></div> + <div class="th cbi-section-table-cell"><%:MTU%></div> + <div class="th cbi-section-table-cell"><%:WLAN%></div> + <div class="th cbi-section-table-cell"><%:Source address%></div> + <div class="th cbi-section-table-cell"><%:Netmask%></div> + <div class="th cbi-section-table-cell"><%:Broadcast address%></div> + </div> <% for k, iface in ipairs(iface) do %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=iface.proto%>"> - <td class="cbi-section-table-cell"><%=iface.name%></td> - <td class="cbi-section-table-cell"><%=iface.state%></td> - <td class="cbi-section-table-cell"><%=iface.olsrMTU%></td> - <td class="cbi-section-table-cell"><%=iface.wireless and luci.i18n.translate('yes') or luci.i18n.translate('no')%></td> - <td class="cbi-section-table-cell"><%=iface.ipv4Address or iface.ipv6Address%></td> - <td class="cbi-section-table-cell"><%=iface.netmask%></td> - <td class="cbi-section-table-cell"><%=iface.broadcast or iface.multicast%></td> - </tr> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=iface.proto%>"> + <div class="td cbi-section-table-cell"><%=iface.name%></div> + <div class="td cbi-section-table-cell"><%=iface.state%></div> + <div class="td cbi-section-table-cell"><%=iface.olsrMTU%></div> + <div class="td cbi-section-table-cell"><%=iface.wireless and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell"><%=iface.ipv4Address or iface.ipv6Address%></div> + <div class="td cbi-section-table-cell"><%=iface.netmask%></div> + <div class="td cbi-section-table-cell"><%=iface.broadcast or iface.multicast%></div> + </div> <% i = ((i % 2) + 1) end %> - </table> + </div> </fieldset> <%+status-olsr/common_js%> <%+footer%> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm index f658288fc..8c9f63af0 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm @@ -15,11 +15,11 @@ local i = 1 <div id="togglebuttons"></div> <fieldset class="cbi-section"> <legend><%:Overview of known multiple interface announcements%></legend> - <table class="cbi-section-table"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:OLSR node%></th> - <th class="cbi-section-table-cell" ><%:Secondary OLSR interfaces%></th> - </tr> + <div class="table cbi-section-table"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:OLSR node%></div> + <div class="th cbi-section-table-cell" ><%:Secondary OLSR interfaces%></div> + </div> <% for k, mid in ipairs(mids) do local aliases = '' @@ -37,14 +37,14 @@ local i = 1 end %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=mid.proto%>"> - <td class="cbi-section-table-cell"><a href="http://<%=host%>/cgi-bin-status.html"><%=mid.ipAddress%></a></td> - <td class="cbi-section-table-cell"><%=aliases%></td> - </tr> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=mid.proto%>"> + <div class="td cbi-section-table-cell"><a href="http://<%=host%>/cgi-bin-status.html"><%=mid.ipAddress%></a></div> + <div class="td cbi-section-table-cell"><%=aliases%></div> + </div> <% i = ((i % 2) + 1) end %> - </table> + </div> </fieldset> <%+status-olsr/common_js%> <%+footer%> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm index c077c2048..ab0986586 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm @@ -64,36 +64,36 @@ end if (neigh.proto == '6') { s += String.format( - '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + - '<td class="cbi-section-table-titles" style="background-color:%s"><a href="http://[%s]/cgi-bin-status.html">%s</a></td>', + '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + + '<div class="td cbi-section-table-titles" style="background-color:%s"><a href="http://[%s]/cgi-bin-status.html">%s</a></div>', neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip ); } else { s += String.format( - '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + - '<td class="cbi-section-table-titles" style="background-color:%s"><a href="http://%s/cgi-bin-status.html">%s</a></td>', + '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + + '<div class="td cbi-section-table-titles" style="background-color:%s"><a href="http://%s/cgi-bin-status.html">%s</a></div>', neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip ); } if (neigh.hn) { s += String.format( - '<td class="cbi-section-table-titles" style="background-color:%s"><a href="http://%s/cgi-bin-status.html">%s</a></td>', + '<div class="td cbi-section-table-titles" style="background-color:%s"><a href="http://%s/cgi-bin-status.html">%s</a></div>', neigh.dfgcolor, neigh.hn, neigh.hn ); } else { s += String.format( - '<td class="cbi-section-table-titles" style="background-color:%s">?</td>', + '<div class="td cbi-section-table-titles" style="background-color:%s">?</div>', neigh.dfgcolor ); } s += String.format( - '<td class="cbi-section-table-titles" style="background-color:%s">%s</td>' + - '<td class="cbi-section-table-titles" style="background-color:%s">%s</td>' + - '<td class="cbi-section-table-titles" style="background-color:%s">%s</td>' + - '<td class="cbi-section-table-titles" style="background-color:%s">%s</td>' + - '<td class="cbi-section-table-titles" style="background-color:%s">%s</td>' + - '<td class="cbi-section-table-titles" style="background-color:%s" title="Signal: %s Noise: %s">%s</td>' + - '</tr>', + '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-titles" style="background-color:%s" title="Signal: %s Noise: %s">%s</div>' + + '</div>', neigh.dfgcolor, neigh.ifn, neigh.dfgcolor, neigh.lip, neigh.dfgcolor, neigh.lq, neigh.dfgcolor, neigh.nlq, neigh.color, neigh.cost, neigh.snr_color, neigh.signal, neigh.noise, neigh.snr || '?' ); } @@ -112,21 +112,21 @@ end <fieldset class="cbi-section"> <legend><%:Overview of currently established OLSR connections%></legend> - <table class="cbi-section-table"> - <thead> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Neighbour IP%></th> - <th class="cbi-section-table-cell"><%:Hostname%></th> - <th class="cbi-section-table-cell"><%:Interface%></th> - <th class="cbi-section-table-cell"><%:Local interface IP%></th> - <th class="cbi-section-table-cell">LQ</th> - <th class="cbi-section-table-cell">NLQ</th> - <th class="cbi-section-table-cell">ETX</th> - <th class="cbi-section-table-cell">SNR</th> - </tr> - </thead> + <div class="table cbi-section-table"> + <div class="thead"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Neighbour IP%></div> + <div class="th cbi-section-table-cell"><%:Hostname%></div> + <div class="th cbi-section-table-cell"><%:Interface%></div> + <div class="th cbi-section-table-cell"><%:Local interface IP%></div> + <div class="th cbi-section-table-cell">LQ</div> + <div class="th cbi-section-table-cell">NLQ</div> + <div class="th cbi-section-table-cell">ETX</div> + <div class="th cbi-section-table-cell">SNR</div> + </div> + </div> - <tbody id="olsr_neigh_table"> + <div class="tbody" id="olsr_neigh_table"> <% local i = 1 for k, link in ipairs(links) do link.linkCost = tonumber(link.linkCost) or 0 @@ -147,25 +147,25 @@ end end %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=link.proto%>"> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=link.proto%>"> <% if link.proto == "6" then %> - <td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://[<%=link.remoteIP%>]/cgi-bin-status.html"><%=link.remoteIP%></a></td> + <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://[<%=link.remoteIP%>]/cgi-bin-status.html"><%=link.remoteIP%></a></div> <% else %> - <td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://<%=link.remoteIP%>/cgi-bin-status.html"><%=link.remoteIP%></a></td> + <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://<%=link.remoteIP%>/cgi-bin-status.html"><%=link.remoteIP%></a></div> <% end %> - <td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://<%=link.hostname%>/cgi-bin-status.html"><%=link.hostname%></a></td> - <td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=link.interface%></td> - <td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=link.localIP%></td> - <td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.linkQuality)%></td> - <td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.neighborLinkQuality)%></td> - <td class="cbi-section-table-titles" style="background-color:<%=color%>"><%=string.format("%.3f", link.linkCost)%></td> - <td class="cbi-section-table-titles" style="background-color:<%=snr_color%>" title="Signal: <%=link.signal%> Noise: <%=link.noise%>"><%=link.snr%></td> - </tr> + <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://<%=link.hostname%>/cgi-bin-status.html"><%=link.hostname%></a></div> + <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=link.interface%></div> + <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=link.localIP%></div> + <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.linkQuality)%></div> + <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.neighborLinkQuality)%></div> + <div class="td cbi-section-table-titles" style="background-color:<%=color%>"><%=string.format("%.3f", link.linkCost)%></div> + <div class="td cbi-section-table-titles" style="background-color:<%=snr_color%>" title="Signal: <%=link.signal%> Noise: <%=link.noise%>"><%=link.snr%></div> + </div> <% i = ((i % 2) + 1) end %> - </tbody> - </table> + </div> + </div> <br /> <%+status-olsr/legend%> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/overview.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/overview.htm index 61e17b3b2..832a27aed 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/overview.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/overview.htm @@ -160,48 +160,48 @@ XHR.poll(10, '<%=REQUEST_URI%>/json', { }, <fieldset class="cbi-section"> <legend><%:Network%></legend> - <table width="100%" cellspacing="10"> - <tr><td width="33%"><%:Interfaces%></td><td> + <div class="table" width="100%" cellspacing="10"> + <div class="tr"><div class="td" width="33%"><%:Interfaces%></div><div class="td"> <a href="<%=REQUEST_URI%>/interfaces"> <span id="nr_ifaces">-<span> </a> - </td></tr> - <tr><td width="33%"><%:Neighbors%></td><td> + </div></div> + <div class="tr"><div class="td" width="33%"><%:Neighbors%></div><div class="td"> <a href="<%=REQUEST_URI%>/neighbors"> <span id="nr_neigh">-</span> </a> - </td></tr> - <tr><td width="33%"><%:Nodes%></td><td> + </div></div> + <div class="tr"><div class="td" width="33%"><%:Nodes%></div><div class="td"> <a href="<%=REQUEST_URI%>/topology"> <span id="nr_nodes">-</span> </a> - </td></tr> - <tr><td width="33%"><%:HNA%></td><td> + </div></div> + <div class="tr"><div class="td" width="33%"><%:HNA%></div><div class="td"> <a href="<%=REQUEST_URI%>/hna"> <span id="nr_hna">-</span> </a> - </td></tr> - <tr><td width="33%"><%:Links total%></td><td> + </div></div> + <div class="tr"><div class="td" width="33%"><%:Links total%></div><div class="td"> <a href="<%=REQUEST_URI%>/topology"> <span id="nr_topo">-</span> </a> - </td></tr> - <tr><td width="33%"><%:Links per node (average)%></td><td> + </div></div> + <div class="tr"><div class="td" width="33%"><%:Links per node (average)%></div><div class="td"> <span id="meshfactor">-</span> - </td></tr> + </div></div> - </table> + </div> </fieldset> <fieldset class="cbi-section"> <legend>OLSR <%:Configuration%></legend> - <table width="100%" cellspacing="10"> - <tr><td width="33%"><%:Version%></td><td> + <div class="table" width="100%" cellspacing="10"> + <div class="tr"><div class="td" width="33%"><%:Version%></div><div class="td"> <span id="version">-<span> - </td></tr> - <tr><td width="33%"><%:Download Config%></td><td> + </div></div> + <div class="tr"><div class="td" width="33%"><%:Download Config%></div><div class="td"> <% if has_ipv4_conf then %> <a href="<%=REQUEST_URI%>?openwrt_v4">OpenWrt (IPv4)</a>, <% end %> @@ -214,8 +214,8 @@ XHR.poll(10, '<%=REQUEST_URI%>/json', { }, <% if has_ipv6_conf then %> <a href="<%=REQUEST_URI%>?conf_v6">OLSRD (IPv6)</a> <% end %> - </td></tr> - </table> + </div></div> + </div> </fieldset> <%+footer%> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm index 8e46daa02..c75b94fce 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm @@ -50,9 +50,9 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, var route = info[idx]; s += String.format( - '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + - '<td class="cbi-section-table-cell">%s/%s</td>' + - '<td class="cbi-section-table-cell">' + + '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + + '<div class="td cbi-section-table-cell">%s/%s</div>' + + '<div class="td cbi-section-table-cell">' + '<a href="http://%s/cgi-bin-status.html">%s</a>', route.proto, route.dest, route.genmask, route.gw, route.gw ) @@ -72,11 +72,11 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, } s += String.format( - '</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell" style="background-color:%s">%s</td>' + - '</tr>', + '</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell" style="background-color:%s">%s</div>' + + '</div>', route.interface, route.metric, route.color, route.etx || '?' ); } @@ -96,27 +96,27 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, <fieldset class="cbi-section"> <legend><%:Overview of currently known routes to other OLSR nodes%></legend> -<table class="cbi-section-table"> - <thead> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Announced network%></th> - <th class="cbi-section-table-cell"><%:OLSR gateway%></th> - <th class="cbi-section-table-cell"><%:Interface%></th> - <th class="cbi-section-table-cell"><%:Metric%></th> - <th class="cbi-section-table-cell">ETX</th> - </tr> - </thead> +<div class="table cbi-section-table"> + <div class="thead"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Announced network%></div> + <div class="th cbi-section-table-cell"><%:OLSR gateway%></div> + <div class="th cbi-section-table-cell"><%:Interface%></div> + <div class="th cbi-section-table-cell"><%:Metric%></div> + <div class="th cbi-section-table-cell">ETX</div> + </div> + </div> - <tbody id="olsrd_routes"> + <div class="tbody" id="olsrd_routes"> <% for k, route in ipairs(routes) do ETX = tonumber(route.rtpMetricCost)/1024 or '0' color = olsrtools.etx_color(ETX) %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=route.proto%>"> - <td class="cbi-section-table-cell"><%=route.destination%>/<%=route.genmask%></td> - <td class="cbi-section-table-cell"> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=route.proto%>"> + <div class="td cbi-section-table-cell"><%=route.destination%>/<%=route.genmask%></div> + <div class="td cbi-section-table-cell"> <% if route.proto == '6' then %> <a href="http://[<%=route.gateway%>]/cgi-bin-status.html"><%=route.gateway%></a> <% else %> @@ -125,16 +125,16 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, <% if route.hostname then %> / <a href="http://<%=route.Hostname%>/cgi-bin-status.html"><%=route.hostname%></a> <% end %> - </td> - <td class="cbi-section-table-cell"><%=route.networkInterface%></td> - <td class="cbi-section-table-cell"><%=route.metric%></td> - <td class="cbi-section-table-cell" style="background-color:<%=color%>"><%=string.format("%.3f", ETX)%></td> - </tr> + </div> + <div class="td cbi-section-table-cell"><%=route.networkInterface%></div> + <div class="td cbi-section-table-cell"><%=route.metric%></div> + <div class="td cbi-section-table-cell" style="background-color:<%=color%>"><%=string.format("%.3f", ETX)%></div> + </div> <% i = ((i % 2) + 1) end %> - </tbody> -</table> + </div> +</div> <%+status-olsr/legend%> </fieldset> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm index 6aa7a7546..7ca66816a 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm @@ -56,7 +56,7 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, for (var idx = 0; idx < info.length; idx++) { var smartgw = info[idx]; - s += '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-' + smartgw.proto + '">' + s += '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-' + smartgw.proto + '">' if (smartgw.proto == '6') { linkgw = '<a href="http://[' + smartgw.ipAddress + ']/cgi-bin-status.html">' + smartgw.ipAddress + '</a>' } else { @@ -64,18 +64,18 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, } s += String.format( - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>', + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>', linkgw, smartgw.status, smartgw.tcPathCost, smartgw.hopCount, smartgw.uplinkSpeed, smartgw.downlinkSpeed, smartgw.v4, smartgw.v6, smartgw.externalPrefix ) - s += '</tr>' + s += '</div>' } smartgwdiv.innerHTML = s; } @@ -94,23 +94,23 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, <fieldset class="cbi-section"> <legend><%:Overview of smart gateways in this network%></legend> - <table class="cbi-section-table"> - <thead> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Gateway%></th> - <th class="cbi-section-table-cell"><%:Status%></th> - <th class="cbi-section-table-cell"><%:ETX%></th> - <th class="cbi-section-table-cell"><%:Hops%></th> - <th class="cbi-section-table-cell"><%:Uplink%></th> - <th class="cbi-section-table-cell"><%:Downlink%></th> - <th class="cbi-section-table-cell"><%:IPv4%></th> - <th class="cbi-section-table-cell"><%:IPv6%></th> - <th class="cbi-section-table-cell"><%:Prefix%></th> - - </tr> - </thead> - - <tbody id="olsrd_smartgw"> + <div class="table cbi-section-table"> + <div class="thead"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Gateway%></div> + <div class="th cbi-section-table-cell"><%:Status%></div> + <div class="th cbi-section-table-cell"><%:ETX%></div> + <div class="th cbi-section-table-cell"><%:Hops%></div> + <div class="th cbi-section-table-cell"><%:Uplink%></div> + <div class="th cbi-section-table-cell"><%:Downlink%></div> + <div class="th cbi-section-table-cell"><%:IPv4%></div> + <div class="th cbi-section-table-cell"><%:IPv6%></div> + <div class="th cbi-section-table-cell"><%:Prefix%></div> + + </div> + </div> + + <div class="tbody" id="olsrd_smartgw"> <% for k, gw in ipairs(gws) do gw.tcPathCost = tonumber(gw.tcPathCost)/1024 or 0 @@ -119,27 +119,27 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, end %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=proto%>"> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=proto%>"> <% if gw.proto == '6' then %> - <td class="cbi-section-table-cell"><a href="http://[<%=gw.ipAddress%>]/cgi-bin-status.html"><%=gw.ipAddress%></a></td> + <div class="td cbi-section-table-cell"><a href="http://[<%=gw.ipAddress%>]/cgi-bin-status.html"><%=gw.ipAddress%></a></div> <% else %> - <td class="cbi-section-table-cell"><a href="http://<%=gw.ipAddress%>/cgi-bin-status.html"><%=gw.ipAddress%></a></td> + <div class="td cbi-section-table-cell"><a href="http://<%=gw.ipAddress%>/cgi-bin-status.html"><%=gw.ipAddress%></a></div> <% end %> - <td class="cbi-section-table-cell"><%=gw.ipv4Status or gw.ipv6Status or '-' %></td> - <td class="cbi-section-table-cell"><%=string.format("%.3f", gw.tcPathCost)%></td> - <td class="cbi-section-table-cell"><%=gw.hopCount%></td> - <td class="cbi-section-table-cell"><%=gw.uplinkSpeed%></td> - <td class="cbi-section-table-cell"><%=gw.downlinkSpeed%></td> - <td class="cbi-section-table-cell"><%=gw.ipv4 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></td> - <td class="cbi-section-table-cell"><%=gw.ipv6 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></td> - <td class="cbi-section-table-cell"><%=gw.externalPrefix%></td> - </tr> + <div class="td cbi-section-table-cell"><%=gw.ipv4Status or gw.ipv6Status or '-' %></div> + <div class="td cbi-section-table-cell"><%=string.format("%.3f", gw.tcPathCost)%></div> + <div class="td cbi-section-table-cell"><%=gw.hopCount%></div> + <div class="td cbi-section-table-cell"><%=gw.uplinkSpeed%></div> + <div class="td cbi-section-table-cell"><%=gw.downlinkSpeed%></div> + <div class="td cbi-section-table-cell"><%=gw.ipv4 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell"><%=gw.ipv6 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell"><%=gw.externalPrefix%></div> + </div> <% i = ((i % 2) + 1) end %> - </tbody> - </table> + </div> + </div> </fieldset> <% else %> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/topology.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/topology.htm index b3abeaecb..02fdfddac 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/topology.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/topology.htm @@ -17,14 +17,14 @@ local olsrtools = require "luci.tools.olsr" <fieldset class="cbi-section"> <legend><%:Overview of currently known OLSR nodes%></legend> - <table class="cbi-section-table"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:OLSR node%></th> - <th class="cbi-section-table-cell"><%:Last hop%></th> - <th class="cbi-section-table-cell"><%:LQ%></th> - <th class="cbi-section-table-cell"><%:NLQ%></th> - <th class="cbi-section-table-cell"><%:ETX%></th> - </tr> + <div class="table cbi-section-table"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:OLSR node%></div> + <div class="th cbi-section-table-cell"><%:Last hop%></div> + <div class="th cbi-section-table-cell"><%:LQ%></div> + <div class="th cbi-section-table-cell"><%:NLQ%></div> + <div class="th cbi-section-table-cell"><%:ETX%></div> + </div> <% for k, route in ipairs(routes) do local cost = string.format("%.3f", tonumber(route.tcEdgeCost/1024) or 0) @@ -33,28 +33,28 @@ local olsrtools = require "luci.tools.olsr" local nlq = string.format("%.3f", tonumber(route.neighborLinkQuality) or 0) %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=route.proto%>"> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=route.proto%>"> <% if route.proto == "6" then %> - <td class="cbi-section-table-cell"><a href="http://[<%=route.destinationIP%>]/cgi-bin-status.html"><%=route.destinationIP%></a></td> - <td class="cbi-section-table-cell"><a href="http://[<%=route.lastHopIP%>]/cgi-bin-status.html"><%=route.lastHopIP%></a></td> + <div class="td cbi-section-table-cell"><a href="http://[<%=route.destinationIP%>]/cgi-bin-status.html"><%=route.destinationIP%></a></div> + <div class="td cbi-section-table-cell"><a href="http://[<%=route.lastHopIP%>]/cgi-bin-status.html"><%=route.lastHopIP%></a></div> <% else %> - <td class="cbi-section-table-cell"><a href="http://<%=route.destinationIP%>/cgi-bin-status.html"><%=route.destinationIP%></a></td> - <td class="cbi-section-table-cell"><a href="http://<%=route.lastHopIP%>/cgi-bin-status.html"><%=route.lastHopIP%></a></td> + <div class="td cbi-section-table-cell"><a href="http://<%=route.destinationIP%>/cgi-bin-status.html"><%=route.destinationIP%></a></div> + <div class="td cbi-section-table-cell"><a href="http://<%=route.lastHopIP%>/cgi-bin-status.html"><%=route.lastHopIP%></a></div> <%end%> - <td class="cbi-section-table-cell"><%=lq%></td> - <td class="cbi-section-table-cell"><%=nlq%></td> - <td class="cbi-section-table-cell" style="background-color:<%=color%>"><%=cost%></td> - </tr> + <div class="td cbi-section-table-cell"><%=lq%></div> + <div class="td cbi-section-table-cell"><%=nlq%></div> + <div class="td cbi-section-table-cell" style="background-color:<%=color%>"><%=cost%></div> + </div> <% i = ((i % 2) + 1) end %> - </table> + </div> <%+status-olsr/legend%> </fieldset> diff --git a/applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm b/applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm index 219d89b07..80b95564d 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm +++ b/applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm @@ -1,8 +1,8 @@ <div class="cbi-section-create cbi-tblsection-create"> <br /> - <table class="cbi-section-table"> - <tr class="cbi-section-table-row"> - <td class="cbi-section-table-cell" style="width:140px"> + <div class="table cbi-section-table"> + <div class="tr cbi-section-table-row"> + <div class="td cbi-section-table-cell" style="width:140px"> <select class="cbi-input-select" id="_newinst.type" name="_newinst.type"> <option value="_dummy">-- instance type --</option> <option value="ss_local">ss-local</option> @@ -10,15 +10,15 @@ <option value="ss_redir">ss-redir</option> <option value="ss_server">ss-server</option> </select> - </td> - <td class="cbi-section-table-cell" style="width:110px"> + </div> + <div class="td cbi-section-table-cell" style="width:110px"> <input type="text" class="cbi-input-text" id="_newinst.name" name="_newinst.name" placeholder="<%:Name%>"/> - </td> - <td class="cbi-section-table-cell left"> + </div> + <div class="td cbi-section-table-cell left"> <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>" value="<%:Add%>" /> - </td> - </tr> - </table> + </div> + </div> + </div> </div> <script type="text/javascript">//<![CDATA[ XHR.poll(5, '<%=url('admin/services/shadowsocks-libev/status')%>', null, diff --git a/applications/luci-app-splash/luasrc/view/admin_status/splash.htm b/applications/luci-app-splash/luasrc/view/admin_status/splash.htm index 37f67776a..aad330791 100644 --- a/applications/luci-app-splash/luasrc/view/admin_status/splash.htm +++ b/applications/luci-app-splash/luasrc/view/admin_status/splash.htm @@ -145,19 +145,19 @@ end { var s = ''; if (info.length == undefined) { - s += '<tr class="cbi-section-table-row"><td colspan="7" class="cbi-section-table-cell"><br /><em><%:No clients connected%></em><br /></td></tr>' + s += '<div class="tr cbi-section-table-row"><div colspan="7" class="td cbi-section-table-cell"><br /><em><%:No clients connected%></em><br /></div></div>' }; for (var idx = 0; idx < info.length; idx++) { var splash = info[idx]; s += String.format( - '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+'">' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s/%s</td>' + - '<td class="cbi-section-table-cell">', + '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+'">' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s/%s</div>' + + '<div class="td cbi-section-table-cell">', splash.hostname, splash.ip, splash.mac, splash.timeleft, splash.trafficin, splash.trafficout); <% if is_admin then %> @@ -185,7 +185,7 @@ end <% else %> s += String.format('%s', splash.policy); <% end %> - s += '</td></tr>' + s += '</div></div>' } tbody.innerHTML = s; } @@ -200,18 +200,18 @@ end <legend><%:Active Clients%></legend> <div class="cbi-section-node"> <% if is_admin then %><form action="<%=REQUEST_URI%>" method="post"><input type="hidden" name="token" value="<%=token%>" /><% end %> - <table class="cbi-section-table"> - <thead> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Hostname%></th> - <th class="cbi-section-table-cell"><%:IP Address%></th> - <th class="cbi-section-table-cell"><%:MAC Address%></th> - <th class="cbi-section-table-cell"><%:Time remaining%></th> - <th class="cbi-section-table-cell"><%:Traffic in/out%></th> - <th class="cbi-section-table-cell"><%:Policy%></th> - </tr> - </thead> - <tbody id="splash_table"> + <div class="table cbi-section-table"> + <div class="thead"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Hostname%></div> + <div class="th cbi-section-table-cell"><%:IP Address%></div> + <div class="th cbi-section-table-cell"><%:MAC Address%></div> + <div class="th cbi-section-table-cell"><%:Time remaining%></div> + <div class="th cbi-section-table-cell"><%:Traffic in/out%></div> + <div class="th cbi-section-table-cell"><%:Policy%></div> + </div> + </div> + <div class="tbody" id="splash_table"> <%- local count = 0 @@ -227,16 +227,16 @@ end if c.ip then count = count + 1 -%> - <tr class="cbi-section-table-row cbi-rowstyle-<%=2-(count%2)%>"> - <td class="cbi-section-table-cell"><%=c.hostname or "<em>" .. translate("unknown") .. "</em>"%></td> - <td class="cbi-section-table-cell"><%=c.ip or "<em>" .. translate("unknown") .. "</em>"%></td> - <td class="cbi-section-table-cell"><%=showmac(c.mac)%></td> - <td class="cbi-section-table-cell"><%= + <div class="tr cbi-section-table-row cbi-rowstyle-<%=2-(count%2)%>"> + <div class="td cbi-section-table-cell"><%=c.hostname or "<em>" .. translate("unknown") .. "</em>"%></div> + <div class="td cbi-section-table-cell"><%=c.ip or "<em>" .. translate("unknown") .. "</em>"%></div> + <div class="td cbi-section-table-cell"><%=showmac(c.mac)%></div> + <div class="td cbi-section-table-cell"><%= (c.limit >= os.time()) and wat.date_format(c.limit-os.time()) or (c.policy ~= "normal") and "-" or "<em>" .. translate("expired") .. "</em>" - %></td> - <td class="cbi-section-table-cell"><%=wat.byte_format(c.bytes_in)%> / <%=wat.byte_format(c.bytes_out)%></td> - <td class="cbi-section-table-cell"> + %></div> + <div class="td cbi-section-table-cell"><%=wat.byte_format(c.bytes_in)%> / <%=wat.byte_format(c.bytes_out)%></div> + <div class="td cbi-section-table-cell"> <% if is_admin then %> <select name="policy.<%=c.mac:lower()%>" style="width:200px"> <option value="whitelist"<%=c.policy=="whitelist" and ' selected="selected"'%>><%:whitelisted%></option> @@ -250,21 +250,21 @@ end <% else %> <%=c.policy%> <% end %> - </td> - </tr> + </div> + </div> <%- end end if count == 0 then -%> - <tr class="cbi-section-table-row"> - <td colspan="7" class="cbi-section-table-cell"> + <div class="tr cbi-section-table-row"> + <div colspan="7" class="td cbi-section-table-cell"> <br /><em><%:No clients connected%></em><br /> - </td> - </tr> + </div> + </div> <%- end -%> - </tbody> - </table> + </div> + </div> <% if is_admin then %></form><% end %> </div> </fieldset> diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm index 75e52aeb2..bee6fcb36 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm @@ -17,14 +17,14 @@ This is free software, licensed under the Apache License, Version 2.0 </div> <fieldset class="cbi-section"> - <table class="cbi-section-table" style="empty-cells:hide"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell" style="text-align:left"><%:Device%></th> - <th class="cbi-section-table-cell" style="text-align:left"><%:SSID%></th> - <th class="cbi-section-table-cell" style="text-align:left"><%:BSSID%></th> - <th class="cbi-section-table-cell" style="text-align:left"><%:Encryption%></th> - <th class="cbi-section-table-cell" style="text-align:center" colspan="2"><%:Actions%></th> - </tr> + <div class="table cbi-section-table" style="empty-cells:hide"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell" style="text-align:left"><%:Device%></div> + <div class="th cbi-section-table-cell" style="text-align:left"><%:SSID%></div> + <div class="th cbi-section-table-cell" style="text-align:left"><%:BSSID%></div> + <div class="th cbi-section-table-cell" style="text-align:left"><%:Encryption%></div> + <div class="th cbi-section-table-cell" style="text-align:center" colspan="2"><%:Actions%></div> + </div> <% uci:foreach("wireless", "wifi-iface", function(s) local iface = s.network or "" @@ -40,25 +40,25 @@ This is free software, licensed under the Apache License, Version 2.0 style = "text-align:left;color:#0069d6;font-weight:bold" end %> - <tr class="cbi-section-table-row cbi-rowstyle-1" style="<%=style%>"> - <td style="<%=style%>"><%=device%></td> - <td style="<%=style%>"><%=ssid%></td> - <td style="<%=style%>"><%=bssid%></td> - <td style="<%=style%>"><%=encryption%></td> - <td class="cbi-value-field" style="width:80px"> + <div class="tr cbi-section-table-row cbi-rowstyle-1" style="<%=style%>"> + <div class="td" style="<%=style%>"><%=device%></div> + <div class="td" style="<%=style%>"><%=ssid%></div> + <div class="td" style="<%=style%>"><%=bssid%></div> + <div class="td" style="<%=style%>"><%=encryption%></div> + <div class="td cbi-value-field" style="width:80px"> <input class="cbi-button cbi-button-up" type="button" value="" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiorder')%>?cfg=<%=section%>&dir=up'" alt="<%:Move up%>" title="<%:Move up%>"/> <input class="cbi-button cbi-button-down" type="button" value="" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiorder')%>?cfg=<%=section%>&dir=down'" alt="<%:Move down%>" title="<%:Move down%>"/> - </td> - <td class="cbi-value-field" style="width:150px"> + </div> + <div class="td cbi-value-field" style="width:150px"> <input type="button" class="cbi-button cbi-button-edit" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiedit')%>?cfg=<%=section%>'" title="<%:Edit this Uplink%>" value="<%:Edit%>"/> <input type="button" class="cbi-button cbi-button-remove" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifidelete')%>?cfg=<%=section%>'" title="<%:Delete this Uplink%>" value="<%:Delete%>"/> - </td> - </tr> + </div> + </div> <% end end) %> - </table> + </div> </fieldset> <div class="cbi-page-actions right"> <% diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm index a8f63a17e..81182b99b 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm @@ -42,28 +42,28 @@ This is free software, licensed under the Apache License, Version 2.0 <div class="cbi-map"> <h2 name="content"><%:Wireless Scan%></h2> <fieldset class="cbi-section"> - <table class="cbi-section-table" style="empty-cells:hide"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell" style="text-align:left"><%:Uplink SSID%></th> - <th class="cbi-section-table-cell" style="text-align:left"><%:Uplink BSSID%></th> - <th class="cbi-section-table-cell" style="text-align:left"><%:Encryption%></th> - <th class="cbi-section-table-cell" style="text-align:left" colspan="2"><%:Signal strength%></th> - </tr> + <div class="table cbi-section-table" style="empty-cells:hide"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell" style="text-align:left"><%:Uplink SSID%></div> + <div class="th cbi-section-table-cell" style="text-align:left"><%:Uplink BSSID%></div> + <div class="th cbi-section-table-cell" style="text-align:left"><%:Encryption%></div> + <div class="th cbi-section-table-cell" style="text-align:left" colspan="2"><%:Signal strength%></div> + </div> <% for i, net in ipairs(iw.scanlist or { }) do %> - <tr class="cbi-section-table-row cbi-rowstyle-1"> - <td class="cbi-value-field" style="text-align:left"> + <div class="tr cbi-section-table-row cbi-rowstyle-1"> + <div class="td cbi-value-field" style="text-align:left"> <%=net.ssid and utl.pcdata(net.ssid) or "<em>%s</em>" % translate("hidden")%> - </td> - <td class="cbi-value-field" style="text-align:left"> + </div> + <div class="td cbi-value-field" style="text-align:left"> <%=net.bssid and utl.pcdata(net.bssid)%> - </td> - <td class="cbi-value-field" style="text-align:left"> + </div> + <div class="td cbi-value-field" style="text-align:left"> <%=format_wifi_encryption(net.encryption)%> - </td> - <td class="cbi-value-field" style="text-align:left"> + </div> + <div class="td cbi-value-field" style="text-align:left"> <%=percent_wifi_signal(net)%> % - </td> - <td class="cbi-value-field" style="width:100px;text-align:right"> + </div> + <div class="td cbi-value-field" style="width:100px;text-align:right"> <form class="inline" action="<%=luci.dispatcher.build_url('admin/services/travelmate/wifiadd')%>" method="post"> <input type="hidden" name="token" value="<%=token%>"/> <input type="hidden" name="device" value="<%=utl.pcdata(dev)%>"/> @@ -76,10 +76,10 @@ This is free software, licensed under the Apache License, Version 2.0 <% end %> <input class="cbi-button cbi-button-apply" type="submit" value="<%:Add Uplink%>"/> </form> - </td> - </tr> + </div> + </div> <% end %> - </table> + </div> </fieldset> <div class="cbi-page-actions right"> <form class="inline" action="<%=luci.dispatcher.build_url('admin/services/travelmate/wifiscan')%>" method="post"> diff --git a/applications/luci-app-upnp/luasrc/view/upnp_status.htm b/applications/luci-app-upnp/luasrc/view/upnp_status.htm index 89fdb5e21..1e0922579 100644 --- a/applications/luci-app-upnp/luasrc/view/upnp_status.htm +++ b/applications/luci-app-upnp/luasrc/view/upnp_status.htm @@ -4,8 +4,8 @@ function(x) { var tb = document.getElementById('upnp_status_table'); - if (tb && (idx < tb.rows.length)) - tb.rows[0].parentNode.removeChild(tb.rows[idx]); + if (tb && (idx + 1 < tb.childNodes.length)) + tb.removeChild(tb.childNodes[idx + 1]); } ); } @@ -17,35 +17,21 @@ if (st && tb) { /* clear all rows */ - while( tb.rows.length > 1 ) - tb.deleteRow(1); + while (tb.firstElementChild !== tb.lastElementChild) + tb.removeChild(tb.lastElementChild); - for( var i = 0; i < st.length; i++ ) - { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); + for (var i = 0; i < st.length; i++) + tb.appendChild(E('<div class="tr cbi-section-table-row cbi-rowstyle-%d">'.format((i % 2) + 1), [ + E('<div class="td">', st[i].proto), + E('<div class="td">', st[i].extport), + E('<div class="td">', st[i].intaddr), + E('<div class="td">', st[i].intport), + E('<div class="td">', st[i].descr), + E('<input class="cbi-button cbi-input-remove" type="button" value="<%:Delete%>" onclick="upnp_delete_fwd(%d)" />'.format(st[i].num)) + ])); - tr.insertCell(-1).innerHTML = st[i].proto; - tr.insertCell(-1).innerHTML = st[i].extport; - tr.insertCell(-1).innerHTML = st[i].intaddr; - tr.insertCell(-1).innerHTML = st[i].intport; - tr.insertCell(-1).innerHTML = st[i].descr; - - tr.insertCell(-1).innerHTML = String.format( - '<input class="cbi-button cbi-input-remove" type="button" value="<%:Delete%>" onclick="upnp_delete_fwd(%d)" />', - st[i].num - ); - } - - if( tb.rows.length == 1 ) - { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row'; - - var td = tr.insertCell(-1); - td.colSpan = 5; - td.innerHTML = '<em><br /><%:There are no active redirects.%></em>'; - } + if (tb.firstElementChild === tb.lastElementChild) + tb.appendChild(E('<div class="tr cbi-section-table-row"><div class="td"><em><br /><%:There are no active redirects.%></em></div></div>')); } } ); @@ -53,17 +39,17 @@ <fieldset class="cbi-section"> <legend><%:Active UPnP Redirects%></legend> - <table class="cbi-section-table" id="upnp_status_table"> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Protocol%></th> - <th class="cbi-section-table-cell"><%:External Port%></th> - <th class="cbi-section-table-cell"><%:Client Address%></th> - <th class="cbi-section-table-cell"><%:Client Port%></th> - <th class="cbi-section-table-cell"><%:Description%></th> - <th class="cbi-section-table-cell"> </th> - </tr> - <tr class="cbi-section-table-row"> - <td colspan="5"><em><br /><%:Collecting data...%></em></td> - </tr> - </table> + <div class="table cbi-section-table" id="upnp_status_table"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Protocol%></div> + <div class="th cbi-section-table-cell"><%:External Port%></div> + <div class="th cbi-section-table-cell"><%:Client Address%></div> + <div class="th cbi-section-table-cell"><%:Client Port%></div> + <div class="th cbi-section-table-cell"><%:Description%></div> + <div class="th cbi-section-table-cell"> </div> + </div> + <div class="tr cbi-section-table-row"> + <div class="td" colspan="5"><em><br /><%:Collecting data...%></em></div> + </div> + </div> </fieldset> diff --git a/applications/luci-app-wireguard/luasrc/view/wireguard.htm b/applications/luci-app-wireguard/luasrc/view/wireguard.htm index 5af6232ae..64d995529 100644 --- a/applications/luci-app-wireguard/luasrc/view/wireguard.htm +++ b/applications/luci-app-wireguard/luasrc/view/wireguard.htm @@ -164,43 +164,43 @@ for ikey, iface in pairs(data) do -%> <legend><%:Interface%> <%=ikey%></legend> - <table width="100%" cellspacing="10"> - <tr> - <td width="33%" style="vertical-align:top"><%:Configuration%></td> - <td> - <table> - <tr> - <td id="<%=ikey%>_icon" style="width:16px; text-align:center; padding:3px"> + <div class="table" width="100%" cellspacing="10"> + <div class="tr"> + <div class="td" width="33%" style="vertical-align:top"><%:Configuration%></div> + <div class="td"> + <div class="table"> + <div class="tr"> + <div class="td" id="<%=ikey%>_icon" style="width:16px; text-align:center; padding:3px"> - </td> - <td id="<%=ikey%>_info" style="vertical-align:middle; padding: 3px"> + </div> + <div class="td" id="<%=ikey%>_info" style="vertical-align:middle; padding: 3px"> <em><%:Collecting data...%></em> - </td> - </tr></table> - </td> - </tr> + </div> + </div></div> + </div> + </div> <%- for pkey, peer in pairs(iface.peers) do -%> - <tr> - <td width="33%" style="vertical-align:top"><%:Peer%></td> - <td> - <table> - <tr> - <td id="<%=ikey%>_<%=peer.public_key%>_icon" style="width:16px; text-align:center; padding:3px"> + <div class="tr"> + <div class="td" width="33%" style="vertical-align:top"><%:Peer%></div> + <div class="td"> + <div class="table"> + <div class="tr"> + <div class="td" id="<%=ikey%>_<%=peer.public_key%>_icon" style="width:16px; text-align:center; padding:3px"> <img src="<%=resource%>/icons/tunnel_disabled.png" /><br /> <small>?</small> - </td> - <td id="<%=ikey%>_<%=peer.public_key%>_info" style="vertical-align:middle; padding: 3px"> + </div> + <div class="td" id="<%=ikey%>_<%=peer.public_key%>_info" style="vertical-align:middle; padding: 3px"> <em><%:Collecting data...%></em> - </td> - </tr></table> - </td> - </tr> + </div> + </div></div> + </div> + </div> <%- end -%> - </table> + </div> <%- end -%> |