projects
/
project
/
luci2
/
ui.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
016be0d
)
luci2: implement LuCI2.cbi.ButtonValue widget
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 31 Jan 2014 21:44:49 +0000
(21:44 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 31 Jan 2014 21:44:49 +0000
(21:44 +0000)
luci2/htdocs/luci2/luci2.js
patch
|
blob
|
history
diff --git
a/luci2/htdocs/luci2/luci2.js
b/luci2/htdocs/luci2/luci2.js
index fe73a951483f696ee7e5f2d40aa45ab124eebbdc..fc3c3fc7eef8a955f67be77b2593743ad8aa10ab 100644
(file)
--- a/
luci2/htdocs/luci2/luci2.js
+++ b/
luci2/htdocs/luci2/luci2.js
@@
-5915,6
+5915,21
@@
function LuCI2()
}
});
+ this.cbi.ButtonValue = this.cbi.AbstractValue.extend({
+ widget: function(sid)
+ {
+ this.options.optional = true;
+
+ var btn = $('<button />')
+ .addClass('btn btn-default')
+ .attr('id', this.id(sid))
+ .attr('type', 'button')
+ .text(this.label('text'));
+
+ return this.validator(sid, btn);
+ }
+ });
+
this.cbi.NetworkList = this.cbi.AbstractValue.extend({
load: function(sid)
{