This commit is contained in:
Stephan Richter
2021-01-08 16:21:26 +01:00
parent 00e5fc9058
commit 4213cc207f
3 changed files with 13 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.srsoftware</groupId>
<artifactId>web4rail</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<name>Web4Rail</name>
<packaging>jar</packaging>
<description>Java Model Railway Control</description>

View File

@@ -148,7 +148,15 @@ function heartbeat(data){
}
function keypress(ev){
if (ev.code === 'Escape') request({realm:"cu",action:"emergency"});
if (ev.code === 'Escape') return request({realm:"cu",action:"emergency"});
if (ev.code === 'Enter') {
elem = ev.target;
while (elem != undefined && elem != null){
if (elem.nodeName == 'FORM') return submitForm(elem.getAttribute('id'));
elem = elem.parentNode;
}
}
return false;
}
function moveTile(x,y){
@@ -257,6 +265,7 @@ function stream(ev){
}
function submitForm(formId){
console.log("submitForm("+formId+")");
return request($('#'+formId).serialize());
}

View File

@@ -314,8 +314,8 @@ public class Route extends BaseClass {
if (isSet(train)) train.link("span",t("Train")+": "+train).addTo(fieldset);
Tag list = new Tag("ul");
Plan.addLink(startBlock, t("Origin: {} to {}",startBlock.name,startDirection), list);
Plan.addLink(endBlock, t("Destination: {} from {}",endBlock.name,endDirection.inverse()), list);
startBlock.link("li",t("Origin: {} to {}",startBlock.name,startDirection)).addTo(list);
endBlock.link("li",t("Destination: {} from {}",endBlock.name,endDirection.inverse())).addTo(list);
list.addTo(fieldset);
if (!signals.isEmpty()) {