summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-freifunk-widgets/luasrc/model
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2012-09-19 06:27:51 +0000
committerManuel Munz <freifunk@somakoma.de>2012-09-19 06:27:51 +0000
commit386fa7a674f077d54d48955cb1bbd969c632c8a8 (patch)
tree66ee87b7c6b51f666aefc124fae20eaa93356709 /applications/luci-freifunk-widgets/luasrc/model
parentbe8760679a69857e59544cceb2b2ffba9e8cdc41 (diff)
applications/freifunk-widgets: remove order variable, fix html in rss view, fix search view
Diffstat (limited to 'applications/luci-freifunk-widgets/luasrc/model')
-rw-r--r--applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/heightwidth.lua16
-rw-r--r--applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/html.lua13
-rw-r--r--applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/iframe.lua13
-rw-r--r--applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/rssfeed.lua13
-rw-r--r--applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/search.lua13
-rw-r--r--applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widget.lua7
-rw-r--r--applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widgets_overview.lua15
7 files changed, 73 insertions, 17 deletions
diff --git a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/heightwidth.lua b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/heightwidth.lua
index b584b61ab..b572187bd 100644
--- a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/heightwidth.lua
+++ b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/heightwidth.lua
@@ -1,10 +1,26 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
local map, section = ...
local width = wdg:option(Value, "width", translate("Width"))
width.rmempty = true
+--[[
local height = wdg:option(Value, "height", translate("Height"))
height.rmempty = true
+height.optional = true
+]]--
local pr = wdg:option(Value, "paddingright", translate("Padding right"))
pr.rmempty = true
diff --git a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/html.lua b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/html.lua
index 0fb464f3e..367e8a269 100644
--- a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/html.lua
+++ b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/html.lua
@@ -1,3 +1,16 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
local map, section = ...
local utl = require "luci.util"
local fs = require "nixio.fs"
diff --git a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/iframe.lua b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/iframe.lua
index 5f1a89471..b9cbcaee5 100644
--- a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/iframe.lua
+++ b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/iframe.lua
@@ -1,3 +1,16 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
local map, section = ...
local utl = require "luci.util"
diff --git a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/rssfeed.lua b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/rssfeed.lua
index 778b872bc..5df5a346f 100644
--- a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/rssfeed.lua
+++ b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/rssfeed.lua
@@ -1,3 +1,16 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
local map, section = ...
local utl = require "luci.util"
diff --git a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/search.lua b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/search.lua
index 4d861c5a0..735dc7cdf 100644
--- a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/search.lua
+++ b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/search.lua
@@ -1,3 +1,16 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
local map, section = ...
local utl = require "luci.util"
diff --git a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widget.lua b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widget.lua
index 368e560f4..5adfc8f85 100644
--- a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widget.lua
+++ b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widget.lua
@@ -36,12 +36,6 @@ en.rmempty = false
local title = wdg:option(Value, "title", translate("Title"))
title.rmempty = true
-local order = wdg:option(Value, "order", translate("Order"))
-order.default = "100"
-order.placeholder = "100"
-order.datatype = "integer"
-
-
local form = loadfile(
utl.libpath() .. "/model/cbi/freifunk/widgets/%s.lua" % widget
)
@@ -49,5 +43,6 @@ local form = loadfile(
if form then
setfenv(form, getfenv(1))(m, wdg)
end
+
return m
diff --git a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widgets_overview.lua b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widgets_overview.lua
index e0faef2ff..50771d7e0 100644
--- a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widgets_overview.lua
+++ b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widgets_overview.lua
@@ -44,25 +44,19 @@ for k, v in ipairs(fs.dir('/usr/lib/lua/luci/view/freifunk/widgets/')) do
end
local title = wdg:option(Value, "title", translate("Title"))
---title.rmempty = true
-
-
-local order = wdg:option(Value, "order", translate("Order"))
-order.default = "100"
-order.placeholder = "100"
-order.datatype = "integer"
+title.rmempty = true
local width = wdg:option(Value, "width", translate("Width"))
---width.rmempty = true
+width.rmempty = true
local height = wdg:option(Value, "height", translate("Height"))
---height.rmempty = true
+height.rmempty = true
local pr = wdg:option(Value, "paddingright", translate("Padding right"))
pr.rmempty = true
function m.on_commit(self)
- -- clean custom text files for elements which may have been deleted
+ -- clean custom text files whose config has been deleted
local dir = "/usr/share/customtext/"
local active = {}
uci:foreach("freifunk-widgets", "widget", function(s)
@@ -79,4 +73,3 @@ function m.on_commit(self)
end
return m
-