summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/view/cbi/lvalue.htm
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-03-27 23:14:01 +0000
committerSteven Barth <steven@midlink.org>2008-03-27 23:14:01 +0000
commit077db659bbcb7cee6bbc4c4dbaed9776261190a0 (patch)
tree0128ec76baf8112f2dd6538e0c5a9448cdf7d91a /src/ffluci/view/cbi/lvalue.htm
parent3f1064b91949741af53eb1d198e228f768abaea8 (diff)
* Major CBI improvements
Diffstat (limited to 'src/ffluci/view/cbi/lvalue.htm')
-rw-r--r--src/ffluci/view/cbi/lvalue.htm13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ffluci/view/cbi/lvalue.htm b/src/ffluci/view/cbi/lvalue.htm
index f2a5ff975..943a18886 100644
--- a/src/ffluci/view/cbi/lvalue.htm
+++ b/src/ffluci/view/cbi/lvalue.htm
@@ -1,9 +1,8 @@
- <div class="cbi-value">
+ <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
<div class="cbi-value-title left"><%=self.title%></div>
- <div class="cbi-value-description right"><%=self.description%></div>
<div class="cbi-value-field">
<% if self.widget == "select" then %>
- <select name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self.size then %> size="<%=self.size%>"<% end %>>
+ <select onchange="cbi_d_update(this.id)" id="cbid.<%=self.config.."."..section.."."..self.option%>" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self.size then %> size="<%=self.size%>"<% end %>>
<%for i, key in pairs(self.keylist) do%>
<option<% if self:cfgvalue(section) == key then %> selected="selected"<% end %> value="<%=key%>"><%=self.vallist[i]%></option>
<% end %>
@@ -16,6 +15,10 @@
<% if c == self.size then c = 0 %><br />
<% end end %>
<% end %>
+ <div class="cbi-value-description inline"><%=self.description%></div>
</div>
- <div class="clear"></div>
- </div> \ No newline at end of file
+ </div>
+ <% if #self.deps > 0 then %><script type="text/javascript">
+ <% for j, d in ipairs(self.deps) do %>cbi_d_add("cbi-<%=self.config.."-"..section.."-"..self.option%>", "cbid.<%=self.config.."."..section.."."..d.field%>", "<%=d.value%>");
+ <% end %>
+ </script><% end %> \ No newline at end of file