diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-12-20 03:00:17 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-12-20 03:00:17 +0000 |
commit | 48838ea0f76ff9909a3430784b5c40e5d49b4d4a (patch) | |
tree | 3e384f9a4a44b9a82b9ca449788ec10076bcd9e5 /libs/web/htdocs/luci-static/resources | |
parent | 161218a576672ad01dd29796da780fa211b28c9c (diff) |
libs/web: fix placeholder attribute for DynList
Diffstat (limited to 'libs/web/htdocs/luci-static/resources')
-rw-r--r-- | libs/web/htdocs/luci-static/resources/cbi.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js index 7e387e77a..b21adbbba 100644 --- 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'; |