* luci/libs/cbi: add css classes to input fields - needed for IE compat
This commit is contained in:
parent
86e1aebb59
commit
8ecff0a9cc
8 changed files with 13 additions and 13 deletions
|
@ -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 %>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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%>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -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%>
|
||||
|
|
|
@ -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%>
|
||||
|
|
|
@ -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%>', {
|
||||
|
|
Loading…
Reference in a new issue