luci-base: ui.js: fix rendering of rich dropdown placeholders
Placeholders may be HTML elements instead of plain strings, so do not use innerHTML to assign them but rely on L.dom.content() instead. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
2f79aa1c35
commit
4a0f8b5541
1 changed files with 4 additions and 4 deletions
|
@ -477,8 +477,8 @@ var UIDropdown = UIElement.extend({
|
|||
else
|
||||
sb.removeAttribute('empty');
|
||||
|
||||
more.innerHTML = (ndisplay == this.options.display_items)
|
||||
? (this.options.select_placeholder || this.options.placeholder) : '···';
|
||||
L.dom.content(more, (ndisplay == this.options.display_items)
|
||||
? (this.options.select_placeholder || this.options.placeholder) : '···');
|
||||
|
||||
|
||||
sb.addEventListener('click', this.handleClick.bind(this));
|
||||
|
@ -715,8 +715,8 @@ var UIDropdown = UIElement.extend({
|
|||
else
|
||||
sb.removeAttribute('empty');
|
||||
|
||||
more.innerHTML = (ndisplay === this.options.display_items)
|
||||
? (this.options.select_placeholder || this.options.placeholder) : '···';
|
||||
L.dom.content(more, (ndisplay === this.options.display_items)
|
||||
? (this.options.select_placeholder || this.options.placeholder) : '···');
|
||||
}
|
||||
else {
|
||||
var sel = li.parentNode.querySelector('[selected]');
|
||||
|
|
Loading…
Reference in a new issue