continue iconeditor

This commit is contained in:
BlubbFish 2019-04-10 20:15:32 +02:00
parent c81b02546f
commit c1786b4e82
2 changed files with 40 additions and 2 deletions

View File

@ -74,3 +74,28 @@
#content #nameeditor #nametable tbody input.name {
width: 55px;
}
#iconeditor {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.8);
}
#iconeditor .innerbox {
margin: 100px;
background-color: white;
border: 5px solid black;
border-radius: 20px;
padding: 15px;
}
#iconeditor .innerbox .preview {
float: left;
}
#iconeditor .innerbox .controls {
margin-left: 220px;
}
#iconeditor .innerbox .save {
clear: both;
}

View File

@ -98,10 +98,23 @@ var NamesEditor = {
alert("Save Row: id: " + id + " name: " + name);
},
IconEditor: function (el) {
var url = "";
var url = "../icons/marker/Marker.svg?marker-bg=hidden";
if (el.children.length == 2) {
}
alert("icon editor");
var ie = document.createElement("div");
ie.id = "iconeditor";
ie.innerHTML = "<div class='innerbox'>" +
"<div class='preview'><object id='markerprev' data='" + url + "' type='image/svg+xml' style='height:200px; width:200px;'></object></div>" +
"<div class='controls'>" +
"Typ: <select onchange='NamesEditor.ChangeLinkPreview(\"icon\",this.value);'><option>---</option><option value='person'>Person</option></select><br>"+
"</div>" +
"<div class='save'><button onclick='document.getElementById(\"iconeditor\").remove()'>Schließen</botton></div>"+
"</div>";
document.getElementsByTagName("body")[0].appendChild(ie);
},
ChangeLinkPreview: function (key, val) {
var cur = document.getElementById("markerprev").data;
alert(cur+" "+key+" "+val);
}
};