Commit f667265a authored by jan.koester's avatar jan.koester
Browse files

fixed move function

parent 19aacf05
Loading
Loading
Loading
Loading
Loading
+8 −7
Changes for data/authdb.js: 8 added lines, 7 removed lines.
Original line number Diff line number Diff line
const selectElement = document.querySelector("#domain_selector");
const urlresult = window.location.toString();

if(selectElement){
    selectElement.addEventListener("change", (event) => {
        var url = urlresult;
        url += "?domain=";
        url += selectElement.value;
        window.location.replace(url);
    });

function moveElement(srcclass, destid){
    const src= document.getElementById(srcclass).childNodes;
    for(const srcnode of src){
        if(srcnode.selected == true){
            document.getElementById(destid).appendChild(srcnode);
            src.removeChild(srcnode);
}

function moveElement(srcid, destid){
    for(;;){
        let src= document.getElementById(srcid).selectedOptions;
        if(!src)
            break;
        document.getElementById(destid).appendChild(src[0]);
    }
}