diff options
author | Steven Barth <steven@midlink.org> | 2008-05-14 09:09:03 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-14 09:09:03 +0000 |
commit | 178da94019721cd9386f415a8f002ae714057e88 (patch) | |
tree | 8eeae7edffc1f6544872de4d6652bb55c11bcbbc /core | |
parent | bac04441f11f29b53d6c24ed9a32244cd95dce25 (diff) |
* CBI: Minor changes
Diffstat (limited to 'core')
-rw-r--r-- | core/src/template.lua | 2 | ||||
-rw-r--r-- | core/src/view/cbi/full_valuefooter.htm (renamed from core/src/view/cbi/valuefooter.htm) | 0 | ||||
-rw-r--r-- | core/src/view/cbi/full_valueheader.htm (renamed from core/src/view/cbi/valueheader.htm) | 0 | ||||
-rw-r--r-- | core/src/view/cbi/tiny_valuefooter.htm | 6 | ||||
-rw-r--r-- | core/src/view/cbi/tiny_valueheader.htm | 1 |
5 files changed, 8 insertions, 1 deletions
diff --git a/core/src/template.lua b/core/src/template.lua index 7ac47cbbe..134e0a6a0 100644 --- a/core/src/template.lua +++ b/core/src/template.lua @@ -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, diff --git a/core/src/view/cbi/valuefooter.htm b/core/src/view/cbi/full_valuefooter.htm index 6151a3a66..6151a3a66 100644 --- a/core/src/view/cbi/valuefooter.htm +++ b/core/src/view/cbi/full_valuefooter.htm diff --git a/core/src/view/cbi/valueheader.htm b/core/src/view/cbi/full_valueheader.htm index 062efa2dd..062efa2dd 100644 --- a/core/src/view/cbi/valueheader.htm +++ b/core/src/view/cbi/full_valueheader.htm diff --git a/core/src/view/cbi/tiny_valuefooter.htm b/core/src/view/cbi/tiny_valuefooter.htm new file mode 100644 index 000000000..e65ebb6c0 --- /dev/null +++ b/core/src/view/cbi/tiny_valuefooter.htm @@ -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 %>
\ No newline at end of file diff --git a/core/src/view/cbi/tiny_valueheader.htm b/core/src/view/cbi/tiny_valueheader.htm new file mode 100644 index 000000000..b9b26bd6a --- /dev/null +++ b/core/src/view/cbi/tiny_valueheader.htm @@ -0,0 +1 @@ + <div class="cbi-value-field" id="cbi-<%=self.config.."-"..section.."-"..self.option%>"> |