Update webui (#301)

* update

* update

* fix

* implement opt groups

* spaces

[skip ci]

* page wrapper adjust

[skip ci]

* implement optgroups for remote, adjust effect schemas

* lost id

[skip ci]
This commit is contained in:
brindosch
2016-11-30 17:32:12 +01:00
committed by redPanther
parent 81dea1583d
commit 3e5ca4601d
25 changed files with 892 additions and 4736 deletions

View File

@@ -119,3 +119,27 @@ function createJsonEditor(container,schema,setconfig)
return editor;
}
function createSelGroup(group){
var el = document.createElement('optgroup');
el.setAttribute('label', group);
return el
}
function createSelOpt(opt){
var el = document.createElement('option');
el.setAttribute('value', opt);
el.innerHTML = opt;
return el
}
function createSel(array, group){
if (array.length != "0"){
var el = createSelGroup(group);
for(var i=0; i<array.length; i++){
var opt = createSelOpt(array[i])
el.appendChild(opt);
}
return el;
}
}