add color icon support for DropDownWrapper
This commit is contained in:
parent
9c79cfd2ed
commit
70e1c08915
@ -99,6 +99,15 @@ function DropDownWrapper(parentElement)
|
|||||||
var a = document.createElement("a");
|
var a = document.createElement("a");
|
||||||
a.href = "#";
|
a.href = "#";
|
||||||
|
|
||||||
|
var spanIcon = document.createElement("span");
|
||||||
|
spanIcon.className = "uwt-icon";
|
||||||
|
if (this.SelectElement.options[i].hasAttribute("data-color"))
|
||||||
|
{
|
||||||
|
spanIcon.className = "uwt-icon uwt-color-tile";
|
||||||
|
spanIcon.style.backgroundColor = this.SelectElement.options[i].getAttribute("data-color");
|
||||||
|
}
|
||||||
|
a.appendChild(spanIcon);
|
||||||
|
|
||||||
var spanTitle = document.createElement("span");
|
var spanTitle = document.createElement("span");
|
||||||
spanTitle.className = "uwt-title";
|
spanTitle.className = "uwt-title";
|
||||||
spanTitle.innerHTML = this.SelectElement.options[i].label;
|
spanTitle.innerHTML = this.SelectElement.options[i].label;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user