addcom working on train-control unit interactions

This commit is contained in:
Stephan Richter
2020-10-02 00:07:02 +02:00
parent 3547b515c8
commit 0fcc2adf4d
10 changed files with 132 additions and 20 deletions

View File

@@ -6,6 +6,7 @@ const DIV = 'DIV';
const SVG = 'svg';
const PLAN = '#plan';
const POST = 'POST';
const CU = 'cu';
var selected = null;
var mode = null;
@@ -48,6 +49,11 @@ function closeWindows(){
$('.window').remove();
}
function connectCu(){
console.log("connectCU");
return request({realm:CU,action:"connect"});
}
function dropClass(data){
var parts = data.split(" ");
for (var i=1; i<parts.length; i++) $('#'+parts[0]).removeClass(parts[i]);