Browse Source

bugfixes

lookup-tables
Stephan Richter 5 years ago
parent
commit
7444579702
  1. 2
      pom.xml
  2. 5
      resources/css/style.css
  3. 1
      src/main/java/de/srsoftware/web4rail/Route.java
  4. 16
      src/main/java/de/srsoftware/web4rail/moving/Train.java

2
pom.xml

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

5
resources/css/style.css

@ -68,7 +68,8 @@ svg.occupied rect:not(.sig_a):not(.sig_b){ @@ -68,7 +68,8 @@ svg.occupied rect:not(.sig_a):not(.sig_b){
}
svg text{
font-size: 50px;
font-size: 38px;
font-family: sans-serif;
}
svg .block{
@ -217,4 +218,4 @@ fieldset{ @@ -217,4 +218,4 @@ fieldset{
ul{
clear: both;
}
}

1
src/main/java/de/srsoftware/web4rail/Route.java

@ -139,6 +139,7 @@ public class Route implements Constants{ @@ -139,6 +139,7 @@ public class Route implements Constants{
public void contact(Contact contact) {
LOG.debug("{} on {} activated {}.",train,this,contact);
Vector<Action> actions = triggers.get(contact.trigger());
if (actions == null) return;
for (Action action : actions) {
try {
action.fire(contact.plan());

16
src/main/java/de/srsoftware/web4rail/moving/Train.java

@ -312,16 +312,16 @@ public class Train implements Constants { @@ -312,16 +312,16 @@ public class Train implements Constants {
new Input(ACTION,ACTION_UPDATE).hideIn(form);
new Input(REALM,REALM_TRAIN).hideIn(form);
new Input(ID,id).hideIn(form);
new Input(NAME,name).addTo(fieldset);
new Checkbox(PUSH_PULL, t("Push-pull train"), pushPull).addTo(fieldset);
new Input(NAME,name).addTo(form);
new Checkbox(PUSH_PULL, t("Push-pull train"), pushPull).addTo(form);
new Button(t("save")).addTo(form).addTo(fieldset);
new Button(t("Turn"), "train("+id+",'"+ACTION_TURN+"')").addTo(fieldset).addTo(window);
Tag propList = new Tag("ul");
Tag propList = new Tag("ul").clazz("proplist");
Tag locoProp = new Tag("li").content(t("Locomotives:"));
Tag locoList = new Tag("ul");
Tag locoList = new Tag("ul").clazz("locolist");
for (Locomotive loco : this.locos) loco.link("li").addTo(locoList);
@ -333,8 +333,12 @@ public class Train implements Constants { @@ -333,8 +333,12 @@ public class Train implements Constants {
for (Locomotive loco : Locomotive.list()) {
if (!this.locos.contains(loco)) select.addOption(loco.id(), loco);
}
select.addTo(addLocoForm);
new Button(t("add")).addTo(addLocoForm).addTo(new Tag("li")).addTo(locoList).addTo(locoProp).addTo(propList);
if (!select.children().isEmpty()) {
select.addTo(addLocoForm);
new Button(t("add")).addTo(addLocoForm);
addLocoForm.addTo(new Tag("li")).addTo(locoList);
}
locoList.addTo(locoProp).addTo(propList);
if (block != null) {
new Tag("li").content(t("Current location: {}",block)).addTo(propList);

Loading…
Cancel
Save