mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user