From c8426cfa3cce952dde8cdf2eb058d0c2fae4986d Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 21 Mar 2008 19:30:53 +0000 Subject: * ffluci.cbi: updates * ffluci.template: fixed a bug where different template scopes were not separated correctly * Added ffluci.dispatcher.cbi and ffluci.dispatcher.dynamic --- src/ffluci/view/cbi/lvalue.htm | 20 ++++++++++---------- src/ffluci/view/cbi/map.htm | 15 +++++++++------ src/ffluci/view/cbi/nsection.htm | 10 ++++++---- src/ffluci/view/cbi/tsection.htm | 18 +++++++++--------- src/ffluci/view/cbi/value.htm | 14 +++++++------- 5 files changed, 41 insertions(+), 36 deletions(-) (limited to 'src/ffluci/view/cbi') diff --git a/src/ffluci/view/cbi/lvalue.htm b/src/ffluci/view/cbi/lvalue.htm index eb2eac2fd9..6a99419599 100644 --- a/src/ffluci/view/cbi/lvalue.htm +++ b/src/ffluci/view/cbi/lvalue.htm @@ -1,11 +1,11 @@ -
-
<%=self.title%>
-
-"> +<%for k, v in pairs(self.list) do%> + <% end %> - -
-
<%=self.description%>
-
\ No newline at end of file + + +
<%=self.description%>
+ \ No newline at end of file diff --git a/src/ffluci/view/cbi/map.htm b/src/ffluci/view/cbi/map.htm index e4f493bd09..b724ffccbb 100644 --- a/src/ffluci/view/cbi/map.htm +++ b/src/ffluci/view/cbi/map.htm @@ -1,7 +1,10 @@ -
-
"> -

<%=self.title%>

-
<%=self.description%>
+
+ "> +

<%=self.title%>

+
<%=self.description%>
+
<% for k, node in ipairs(self.children) do node:render() end %> - -
+
+ + +
diff --git a/src/ffluci/view/cbi/nsection.htm b/src/ffluci/view/cbi/nsection.htm index 5badeca562..e002c68b09 100644 --- a/src/ffluci/view/cbi/nsection.htm +++ b/src/ffluci/view/cbi/nsection.htm @@ -1,5 +1,7 @@ -
-

<%=self.title%>

-
<%=self.description%>
+
+

<%=self.title%>

+
<%=self.description%>
+
<% for k, node in ipairs(self.children) do node:render() end %> -
+
+
diff --git a/src/ffluci/view/cbi/tsection.htm b/src/ffluci/view/cbi/tsection.htm index 8c7f0c1151..b613f6271f 100644 --- a/src/ffluci/view/cbi/tsection.htm +++ b/src/ffluci/view/cbi/tsection.htm @@ -2,20 +2,20 @@ local allsections = self.map:read() local sections = {} for k, v in pairs(allsections) do - if v[".type"] == sectiontype then + if v[".type"] == self.sectiontype then sections[k] = v end end %> -
-

<%=self.title%>

-
<%=self.description%>
+
+

<%=self.title%>

+
<%=self.description%>
<% for k, v in pairs(sections) do %> -
-<% for k, node in ipairs(self.children) do +
+<% for i, node in ipairs(self.children) do node.section = k - node:render(k) + node:render() end %> -
+
<% end %> -
+
diff --git a/src/ffluci/view/cbi/value.htm b/src/ffluci/view/cbi/value.htm index cc22c4e564..a898d08c1d 100644 --- a/src/ffluci/view/cbi/value.htm +++ b/src/ffluci/view/cbi/value.htm @@ -1,7 +1,7 @@ -
-
<%=self.title%>
-
-" value="<%=self:ucivalue()%>" /> -
-
<%=self.description%>
-
\ No newline at end of file +
+
<%=self.title%>
+
+ " value="<%=(self:ucivalue() or "")%>" /> +
+
<%=self.description%>
+
\ No newline at end of file -- cgit v1.2.3