luci-app-adblock: partly revert last commit
[oweals/luci.git] / applications / luci-app-adblock / luasrc / view / adblock / blocklist.htm
index aae64075ffc781ec43988971e76b700ed0251ee2..81622e9bc6dc7e7dbd0cbfb986409eb54d29d303 100644 (file)
@@ -22,15 +22,37 @@ end
 -%>
 
 <style type="text/css">
-<!--
+.table.cbi-section-table .th,
+.table.cbi-section-table .td,
 .cbi-section-table-cell,
 .cbi-section-table-row
 {
        text-align:left;
+       vertical-align:top;
        margin-right:auto;
        margin-left:0px;
+       padding-left:2px;
+       line-height:20px;
+       height:20px;
+}
+.table.cbi-section-table .th
+{
+       white-space:nowrap;
+}
+.table.cbi-section-table input
+{
+       width:7em;
+}
+.cbi-input-text
+{
+       text-align:left;
+       padding-left:2px;
+       outline:none;
+       box-shadow:none;
+       background:transparent;
+       height:20px;
+       width:10em;
 }
--->
 </style>
 
 <fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
@@ -39,42 +61,37 @@ end
        <%- end %>
        <div class="cbi-section-descr"><%=self.description%></div>
        <div class="cbi-section-node">
-               <%- local count = 0 -%>
-               <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>&#160;</th>
+                               <div class="th">&#160;</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>
-                       <%- count = count + 1; end; -%>
-                       </tr>
+                               </div>
+                       <%- end -%>
+                       </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
-                                               if not node.optional then
-                                                       node:render(section, scope or {})
-                                               end
+                                               node:render(section, scope or {})
                                        end
+                                       if not scope.cbid:match("adb_src_cat") then
                                -%>
-                       </tr>
-                       <%- end -%>
-                       <%- if isempty then -%>
-                       <tr class="cbi-section-table-row">
-                               <td colspan="<%=count%>"><em><br /><%:This section contains no values yet%></em></td>
-                       </tr>
+                                       <div class="td cbi-value-field">&#160;</div>
+                               <%- end -%>
+                       </div>
                        <%- end -%>
-               </table>
+               </div>
        </div>
 </fieldset>