summaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-14 09:09:03 +0000
committerSteven Barth <steven@midlink.org>2008-05-14 09:09:03 +0000
commit178da94019721cd9386f415a8f002ae714057e88 (patch)
tree8eeae7edffc1f6544872de4d6652bb55c11bcbbc /core
parentbac04441f11f29b53d6c24ed9a32244cd95dce25 (diff)
* CBI: Minor changes
Diffstat (limited to 'core')
-rw-r--r--core/src/template.lua2
-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.htm6
-rw-r--r--core/src/view/cbi/tiny_valueheader.htm1
5 files changed, 8 insertions, 1 deletions
diff --git a/core/src/template.lua b/core/src/template.lua
index 7ac47cbbef..134e0a6a01 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 6151a3a66a..6151a3a66a 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 062efa2ddd..062efa2ddd 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 0000000000..e65ebb6c03
--- /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 0000000000..b9b26bd6a2
--- /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%>">