backported bugfixes from state-machine branch
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.srsoftware</groupId>
|
<groupId>de.srsoftware</groupId>
|
||||||
<artifactId>web4rail</artifactId>
|
<artifactId>web4rail</artifactId>
|
||||||
<version>1.3.49</version>
|
<version>1.3.50</version>
|
||||||
<name>Web4Rail</name>
|
<name>Web4Rail</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description>Java Model Railway Control</description>
|
<description>Java Model Railway Control</description>
|
||||||
|
|||||||
@@ -177,9 +177,10 @@ function heartbeat(data){
|
|||||||
|
|
||||||
function keypress(ev){
|
function keypress(ev){
|
||||||
if (ev.code === 'Escape') return request({realm:"cu",action:"emergency"});
|
if (ev.code === 'Escape') return request({realm:"cu",action:"emergency"});
|
||||||
if (ev.code === 'Enter') {
|
if (ev.code === 'Enter') {
|
||||||
elem = ev.target;
|
elem = ev.target;
|
||||||
while (elem != undefined && elem != null){
|
while (elem != undefined && elem != null){
|
||||||
|
if (elem.nodeName == 'TEXTAREA') return false;
|
||||||
if (elem.nodeName == 'FORM') return submitForm(elem.getAttribute('id'));
|
if (elem.nodeName == 'FORM') return submitForm(elem.getAttribute('id'));
|
||||||
elem = elem.parentNode;
|
elem = elem.parentNode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.io.IOException;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import de.srsoftware.tools.Tag;
|
import de.srsoftware.tools.Tag;
|
||||||
import de.srsoftware.web4rail.Route;
|
import de.srsoftware.web4rail.moving.Train;
|
||||||
|
|
||||||
public class BlockContact extends Contact {
|
public class BlockContact extends Contact {
|
||||||
|
|
||||||
@@ -36,6 +36,12 @@ public class BlockContact extends Contact {
|
|||||||
public Tag tag(Map<String, Object> replacements) throws IOException {
|
public Tag tag(Map<String, Object> replacements) throws IOException {
|
||||||
return ((Block)parent()).tag(replacements);
|
return ((Block)parent()).tag(replacements);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Train train() {
|
||||||
|
train = ((Block)parent()).train();
|
||||||
|
return train;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
Reference in New Issue
Block a user