* CBI: Minor changes

This commit is contained in:
Steven Barth 2008-05-14 09:09:03 +00:00
parent bac04441f1
commit 178da94019
6 changed files with 20 additions and 1 deletions

View file

@ -52,7 +52,7 @@ compiler_enable_bytecode = false
viewns = {
translate = function(...) return require("ffluci.i18n").translate(...) end,
config = function(...) return require("ffluci.model.uci").get(...) or "" end,
controller = ffluci.http.env.SCRIPT_NAME,
controller = ffluci.http.env.SCRIPT_NAME or "",
media = ffluci.config.main.mediaurlbase,
write = io.write,
include = function(name) Template(name):render(getfenv(2)) end,

View file

@ -0,0 +1,6 @@
<% if self.tag_invalid[section] then %><div class="cbi-error"><%:cbi_invalid Fehler: Ungültige Eingabe%></div><% end %>
</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 %>

View file

@ -0,0 +1 @@
<div class="cbi-value-field" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">

View file

@ -165,6 +165,18 @@ h3 {
display: inline;
}
.table {
display: table;
}
.table-cell {
display: table-cell;
}
.table-row {
display: table-row;
}
.code {
background: #f7f7f7;
border: 1px solid #d7d7d7;