obj.style.display = "none";
cbi_bind(sel, "change", function() {
- obj.value = sel.options[sel.selectedIndex].value;
-
if (sel.selectedIndex == sel.options.length - 1) {
obj.style.display = "inline";
sel.parentNode.removeChild(sel);
obj.focus();
+ } else {
+ obj.value = sel.options[sel.selectedIndex].value;
}
})
}
<%- if not self.anonymous then -%>
<th> </th>
<%- end -%>
- <%- for i, k in pairs(self.children) do -%>
+ <%- for i, k in pairs(self.children) do if not k.optional then -%>
<th class="cbi-section-table-cell"><%=k.title%></th>
- <%- count = count + 1; end; if self.extedit or self.addremove then -%>
+ <%- count = count + 1; end; end; if self.extedit or self.addremove then -%>
<th class="cbi-section-table-cell"> </th>
<%- count = count + 1; end -%>
</tr>
<%- if not self.anonymous then -%>
<th> </th>
<%- end -%>
- <%- for i, k in pairs(self.children) do -%>
+ <%- for i, k in pairs(self.children) do if not k.optional then -%>
<th class="cbi-section-table-cell"><%=k.description%></th>
- <%- end; if self.extedit or self.addremove then -%>
+ <%- end; end; if self.extedit or self.addremove then -%>
<th class="cbi-section-table-cell"> </th>
<%- end -%>
</tr>
<% if not self.anonymous then -%>
<th><h3><%=k%></h3></th>
<%- end %>
- <%-+cbi/ucisection-%>
+
+
+ <%-
+ for k, node in ipairs(self.children) do
+ if not node.optional then
+ node:render(section, scope or {})
+ end
+ end
+ -%>
+
<%- if self.extedit or self.addremove then -%>
<td class="cbi-section-table-cell">
<%- if self.extedit then -%>