diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-08-09 11:25:25 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-08-09 11:25:25 +0000 |
commit | b35ab62adac0b69630daad0c71e502acbb81b49d (patch) | |
tree | 1abab32dc644ee810d45d3539c20a47292040435 /libs/web/htdocs | |
parent | 6c66d913367af8e468244762b83e274f5ea93e92 (diff) |
libs/web: support placeholder attribute for comboboxes, fix validation quirks with input->select transition in comboboxes
Diffstat (limited to 'libs/web/htdocs')
-rw-r--r-- | libs/web/htdocs/luci-static/resources/cbi.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js index 655ddbf53..b07215cbc 100644 --- a/libs/web/htdocs/luci-static/resources/cbi.js +++ b/libs/web/htdocs/luci-static/resources/cbi.js @@ -441,7 +441,7 @@ function cbi_combobox(id, values, def, man) { var obj = document.getElementById(id) var sel = document.createElement("select"); sel.id = selid; - sel.className = 'cbi-input-select'; + sel.className = obj.className.replace(/cbi-input-text/, 'cbi-input-select'); if (obj.nextSibling) { obj.parentNode.insertBefore(sel, obj.nextSibling); @@ -504,6 +504,10 @@ function cbi_combobox(id, values, def, man) { //Do nothing } }) + + // Retrigger validation in select + sel.focus(); + sel.blur(); } function cbi_combobox_init(id, values, def, man) { |