2008-08-07 00:57:20 +00:00
|
|
|
--[[
|
|
|
|
LuCI - Lua Configuration Interface
|
|
|
|
|
|
|
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
]]--
|
2009-11-01 01:37:03 +00:00
|
|
|
|
|
|
|
m = Map("system", translate("Buttons"),
|
|
|
|
translate("This page allows the configuration of custom button actions"))
|
2008-08-07 00:57:20 +00:00
|
|
|
|
|
|
|
s = m:section(TypedSection, "button", "")
|
|
|
|
s.anonymous = true
|
|
|
|
s.addremove = true
|
|
|
|
|
2009-11-01 01:37:03 +00:00
|
|
|
s:option(Value, "button", translate("Name"))
|
|
|
|
|
|
|
|
act = s:option(ListValue, "action",
|
|
|
|
translate("Action"),
|
|
|
|
translate("Specifies the button state to handle"))
|
2008-08-07 00:57:20 +00:00
|
|
|
|
|
|
|
act:value("released")
|
|
|
|
|
2009-11-01 01:37:03 +00:00
|
|
|
s:option(Value, "handler",
|
|
|
|
translate("Handler"),
|
|
|
|
translate("Path to executable which handles the button event"))
|
2008-08-07 00:57:20 +00:00
|
|
|
|
2009-11-01 01:37:03 +00:00
|
|
|
min = s:option(Value, "min", translate("Minimum hold time"))
|
2008-08-07 00:57:20 +00:00
|
|
|
min.rmempty = true
|
|
|
|
|
2009-11-01 01:37:03 +00:00
|
|
|
max = s:option(Value, "max", translate("Maximum hold time"))
|
2008-08-07 00:57:20 +00:00
|
|
|
max.rmempty = true
|