projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
161218a
)
libs/web: fix placeholder attribute for DynList
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 20 Dec 2011 03:00:17 +0000
(
03:00
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 20 Dec 2011 03:00:17 +0000
(
03:00
+0000)
libs/web/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/libs/web/htdocs/luci-static/resources/cbi.js
b/libs/web/htdocs/luci-static/resources/cbi.js
index 7e387e77a9e92e7baa16f2fd74960022eead8360..b21adbbbab576a6f37622f9c634a471a2d2a810a 100644
(file)
--- a/
libs/web/htdocs/luci-static/resources/cbi.js
+++ b/
libs/web/htdocs/luci-static/resources/cbi.js
@@
-501,6
+501,7
@@
function cbi_dynlist_init(name, respath, datatype, optional, choices)
var input0 = document.getElementsByName(name)[0];
var prefix = input0.name;
var parent = input0.parentNode;
+ var holder = input0.placeholder;
var values;
@@
-545,6
+546,11
@@
function cbi_dynlist_init(name, respath, datatype, optional, choices)
t.index = i;
t.className = 'cbi-input-text';
+ if (i == 0 && holder)
+ {
+ t.placeholder = holder;
+ }
+
var b = document.createElement('img');
b.src = respath + ((i+1) < values.length ? '/cbi/remove.gif' : '/cbi/add.gif');
b.className = 'cbi-image-button';