* CBI update
This commit is contained in:
parent
03ad2398aa
commit
38d279e4ea
1 changed files with 19 additions and 3 deletions
|
@ -26,14 +26,30 @@ limitations under the License.
|
||||||
]]--
|
]]--
|
||||||
module("ffluci.cbi", package.seeall)
|
module("ffluci.cbi", package.seeall)
|
||||||
require("ffluci.util")
|
require("ffluci.util")
|
||||||
|
local class = ffluci.util.class
|
||||||
|
|
||||||
|
|
||||||
-- Node pseudo abstract class
|
-- Node pseudo abstract class
|
||||||
Node = ffluci.util.class()
|
Node = class()
|
||||||
function Node.render(self)
|
|
||||||
|
function Node.__init__(self, title, description)
|
||||||
|
self.children = {}
|
||||||
|
self.title = title
|
||||||
|
self.description = description
|
||||||
end
|
end
|
||||||
|
|
||||||
function Node.append(self, obj)
|
function Node.append(self, obj)
|
||||||
|
table.insert(self.children, obj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
Map = ffluci.util.class(Node)
|
-- CBI Map
|
||||||
|
Map = class(Node)
|
||||||
|
|
||||||
|
function Map.__init__(self, ...)
|
||||||
|
Node.__init__(self, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Map.render(self, template)
|
||||||
|
-- ToDo
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue