diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-10-07 15:41:15 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-10-07 15:41:15 +0000 |
commit | 8ecff0a9cc9edb3156f8d10880aa2091bdb42c64 (patch) | |
tree | 1b75aec5d1866e0b99998f642beb92d4269a4c7a /libs/cbi/luasrc/view | |
parent | 86e1aebb593eb712e45536b730302495948ebdad (diff) |
* luci/libs/cbi: add css classes to input fields - needed for IE compat
Diffstat (limited to 'libs/cbi/luasrc/view')
-rw-r--r-- | libs/cbi/luasrc/view/cbi/button.htm | 2 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/dynlist.htm | 6 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/fvalue.htm | 2 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/lvalue.htm | 4 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/mvalue.htm | 4 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/tvalue.htm | 2 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/upload.htm | 4 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/value.htm | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/libs/cbi/luasrc/view/cbi/button.htm b/libs/cbi/luasrc/view/cbi/button.htm index c2a0d437e8..c6606622d6 100644 --- a/libs/cbi/luasrc/view/cbi/button.htm +++ b/libs/cbi/luasrc/view/cbi/button.htm @@ -14,7 +14,7 @@ $Id$ -%> <%+cbi/valueheader%> <% if self:cfgvalue(section) ~= false then %> - <input<% if self.inputstyle then %> class="cbi-input-<%=self.inputstyle%>"<% end %> type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.title)%> /> + <input class="cbi-input-<% self.inputstyle or "button" %>" type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.title)%> /> <% else %> - <% end %> diff --git a/libs/cbi/luasrc/view/cbi/dynlist.htm b/libs/cbi/luasrc/view/cbi/dynlist.htm index 606831421f..a23a4ebcdf 100644 --- a/libs/cbi/luasrc/view/cbi/dynlist.htm +++ b/libs/cbi/luasrc/view/cbi/dynlist.htm @@ -18,11 +18,11 @@ $Id$ for i=1, #vals + 1 do local val = vals[i] %> - <input value="<%=val%>" onchange="cbi_d_update(this.id)" type="text"<%= attr("id", cbid .. "." .. i) .. attr("name", cbid) .. ifattr(self.size, "size")%> /> + <input class="cbi-input-text" value="<%=val%>" onchange="cbi_d_update(this.id)" type="text"<%= attr("id", cbid .. "." .. i) .. attr("name", cbid) .. ifattr(self.size, "size")%> /> <% if i <= #vals then %> - <input type="image" value="<%:cbi_del%>" name="cbi.rle.<%=section .. "." .. self.option .. "." .. i%>" alt="<%:cbi_del%>" title="<%:cbi_del%>" src="<%=resource%>/cbi/remove.gif" /> + <input class="cbi-input-image" type="image" value="<%:cbi_del%>" name="cbi.rle.<%=section .. "." .. self.option .. "." .. i%>" alt="<%:cbi_del%>" title="<%:cbi_del%>" src="<%=resource%>/cbi/remove.gif" /> <% else %> - <input type="image" value="<%:cbi_add%>" name="cbi.ale.<%=section .. "." .. self.option%>" alt="<%:cbi_add%>" title="<%:cbi_add%>" src="<%=resource%>/cbi/add.gif" /> + <input class="cbi-input-image" type="image" value="<%:cbi_add%>" name="cbi.ale.<%=section .. "." .. self.option%>" alt="<%:cbi_add%>" title="<%:cbi_add%>" src="<%=resource%>/cbi/add.gif" /> <% end %> <% if #self.keylist > 0 then -%> <script type="text/javascript"> diff --git a/libs/cbi/luasrc/view/cbi/fvalue.htm b/libs/cbi/luasrc/view/cbi/fvalue.htm index 4c977e2871..b46817c6f7 100644 --- a/libs/cbi/luasrc/view/cbi/fvalue.htm +++ b/libs/cbi/luasrc/view/cbi/fvalue.htm @@ -13,5 +13,5 @@ $Id$ -%> <%+cbi/valueheader%> - <input onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="checkbox"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self:cfgvalue(section) == self.enabled, "checked", "checked") %> value="1" /> + <input class="cbi-input-checkbox" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="checkbox"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self:cfgvalue(section) == self.enabled, "checked", "checked") %> value="1" /> <%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/lvalue.htm b/libs/cbi/luasrc/view/cbi/lvalue.htm index 6d658c22d1..c6b54128f7 100644 --- a/libs/cbi/luasrc/view/cbi/lvalue.htm +++ b/libs/cbi/luasrc/view/cbi/lvalue.htm @@ -14,7 +14,7 @@ $Id$ -%> <%+cbi/valueheader%> <% if self.widget == "select" then %> - <select onchange="cbi_d_update(this.id)"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self.size, "size") %>> + <select class="cbi-input-select" onchange="cbi_d_update(this.id)"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self.size, "size") %>> <% for i, key in pairs(self.keylist) do -%> <option id="cbi-<%=self.config.."-"..section.."-"..self.option.."-"..key%>"<%= attr("value", key) .. ifattr(self:cfgvalue(section) == key, "selected", "selected") %>><%=striptags(self.vallist[i])%></option> <%- end %> @@ -24,7 +24,7 @@ $Id$ for i, key in pairs(self.keylist) do c = c + 1 %> - <input onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="radio"<%= attr("id", cbid..c) .. attr("name", cbid) .. attr("value", key) .. ifattr(self:cfgvalue(section) == key, "checked", "checked") %> /> + <input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="radio"<%= attr("id", cbid..c) .. attr("name", cbid) .. attr("value", key) .. ifattr(self:cfgvalue(section) == key, "checked", "checked") %> /> <label<%= attr("for", cbid..c) %>><%=self.vallist[i]%></label><br /> <% if c == self.size then c = 0 %><br /> <% end end %> diff --git a/libs/cbi/luasrc/view/cbi/mvalue.htm b/libs/cbi/luasrc/view/cbi/mvalue.htm index 414089fb2e..3812a3f7ef 100644 --- a/libs/cbi/luasrc/view/cbi/mvalue.htm +++ b/libs/cbi/luasrc/view/cbi/mvalue.htm @@ -17,7 +17,7 @@ local v = self:valuelist(section) or {} %> <%+cbi/valueheader%> <% if self.widget == "select" then %> - <select multiple="multiple"<%= attr("name", cbid) .. ifattr(self.size, "size") %>> + <select class="cbi-input-select" multiple="multiple"<%= attr("name", cbid) .. ifattr(self.size, "size") %>> <% for i, key in pairs(self.keylist) do -%> <option<%= attr("value", key) .. ifattr(luci.util.contains(v, key), "selected", "selected") %>><%=striptags(self.vallist[i])%></option> <%- end %> @@ -27,7 +27,7 @@ local v = self:valuelist(section) or {} for i, key in pairs(self.keylist) do c = c + 1 %> - <input type="checkbox"<%= attr("id", cbid..c) .. attr("name", cbid) .. attr("value", key) .. ifattr(luci.util.contains(v, key), "checked", "checked") %> /> + <input class="cbi-input-checkbox" type="checkbox"<%= attr("id", cbid..c) .. attr("name", cbid) .. attr("value", key) .. ifattr(luci.util.contains(v, key), "checked", "checked") %> /> <label<%= attr("for", cbid..c) %>><%=self.vallist[i]%></label><br /> <% if c == self.size then c = 0 %><br /> <% end end %> diff --git a/libs/cbi/luasrc/view/cbi/tvalue.htm b/libs/cbi/luasrc/view/cbi/tvalue.htm index 4d92545ae0..36782d82dc 100644 --- a/libs/cbi/luasrc/view/cbi/tvalue.htm +++ b/libs/cbi/luasrc/view/cbi/tvalue.htm @@ -13,7 +13,7 @@ $Id$ -%> <%+cbi/valueheader%> - <textarea<% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") %>> + <textarea class="cbi-input-textarea" <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") %>> <%-=luci.util.pcdata(self:cfgvalue(section))-%> </textarea> <%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/upload.htm b/libs/cbi/luasrc/view/cbi/upload.htm index 7e0ab1b506..2c293cbdd0 100644 --- a/libs/cbi/luasrc/view/cbi/upload.htm +++ b/libs/cbi/luasrc/view/cbi/upload.htm @@ -21,8 +21,8 @@ $Id$ <% if v then %> <%:cbi_upload Uploaded File%> (<%=t.byte_format(luci.fs.stat(v).size or 0)%>) <input type="hidden"<%= attr("value", v) .. attr("name", cbid) .. attr("id", cbid) %> /> - <input type="image" value="<%:cbi_replace%>" name="cbi.rlf.<%=section .. "." .. self.option%>" alt="<%:cbi_replace%>" title="<%:cbi_replace%>" src="<%=resource%>/cbi/reload.gif" /> + <input class="cbi-input-image" type="image" value="<%:cbi_replace%>" name="cbi.rlf.<%=section .. "." .. self.option%>" alt="<%:cbi_replace%>" title="<%:cbi_replace%>" src="<%=resource%>/cbi/reload.gif" /> <% else %> - <input type="file"<%= attr("name", cbid) .. attr("id", cbid) %> /> + <input class="cbi-input-file" type="file"<%= attr("name", cbid) .. attr("id", cbid) %> /> <% end %> <%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/value.htm b/libs/cbi/luasrc/view/cbi/value.htm index 9ffefc423f..e6a7ab6d9f 100644 --- a/libs/cbi/luasrc/view/cbi/value.htm +++ b/libs/cbi/luasrc/view/cbi/value.htm @@ -13,7 +13,7 @@ $Id$ -%> <%+cbi/valueheader%> - <input type="<%=self.password and 'password" class="cbi-input-key' or "text"%>" onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self:cfgvalue(section)) .. ifattr(self.size, "size")%> /> + <input type="<%=self.password and 'password" class="cbi-input-password' or 'text" class="cbi-input-text' %>" onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self:cfgvalue(section)) .. ifattr(self.size, "size")%> /> <% if #self.keylist > 0 then -%> <script type="text/javascript"> cbi_combobox_init('<%=cbid%>', { |