started implementing route properties

This commit is contained in:
Stephan Richter
2020-09-16 12:21:09 +02:00
parent f793d5b078
commit 4ee75d0a53
12 changed files with 83 additions and 28 deletions

View File

@@ -105,7 +105,7 @@ svg circle{
background: yellow;
}
#tile-properties{
.window{
position: fixed;
top: 10px;
bottom: 10px;

View File

@@ -71,6 +71,10 @@ function closeMenu(ev){
return false;
}
function closeWindows(){
$('.window').remove();
}
function enableAdding(ev){
// console.log('enableAdding:',ev);
if (selected != null) $(selected).css('border','');
@@ -125,6 +129,21 @@ function moveTile(x,y){
});
}
function openRoute(id){
closeWindows();
$.ajax({
url : PLAN,
method : POST,
data : {action:'openRoute',id:id},
success: function(resp){
if (resp.startsWith('<')){
$('body').append($(resp));
} else {
addMessage(resp);
}
}
});
}
function runAction(ev){
console.log("runAction: ",ev.target.id);
$.ajax({