UI work
This commit is contained in:
@@ -355,12 +355,13 @@ public class Plan extends BaseClass{
|
||||
* @throws IOException
|
||||
*/
|
||||
public Page html() throws IOException {
|
||||
Page page = new Page().append("<div id=\"plan\">");
|
||||
Page page = new Page().append("<div id=\"plan\"><div id=\"scroll\">");
|
||||
for (Tile tile: tiles.values()) {
|
||||
if (tile == null) continue;
|
||||
page.append("\t\t"+tile.tag(null)+"\n");
|
||||
}
|
||||
return page
|
||||
.append("</div>")
|
||||
.append(menu())
|
||||
.append(messages())
|
||||
.append(heartbeat())
|
||||
|
||||
@@ -89,7 +89,7 @@ public class DelayedAction extends Action {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return t("Wait {} ms, then: ",delay);
|
||||
return t("Wait {} ms, then:",delay);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -207,7 +207,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
Tag li = new Tag("li");
|
||||
car.link("span").addTo(li).content(NBSP);
|
||||
Map<String, Object> params = Map.of(REALM,REALM_TRAIN,ID,id,ACTION,ACTION_DROP,CAR_ID,car.id());
|
||||
new Button("delete",params).addTo(li);
|
||||
new Button(t("delete"),params).addTo(li);
|
||||
li.addTo(locoList);
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
Map<String, Object> props = Map.of(REALM,REALM_LOCO,ID,loco.id(),ACTION,ACTION_TURN);
|
||||
new Button(t("turn within train"),props).addTo(li).addTo(locoList);
|
||||
Map<String, Object> params = Map.of(REALM,REALM_TRAIN,ID,id,ACTION,ACTION_DROP,LOCO_ID,loco.id());
|
||||
new Button("delete",params).addTo(li);
|
||||
new Button(t("delete"),params).addTo(li);
|
||||
}
|
||||
|
||||
Tag addLocoForm = new Form().content(t("add locomotive:")+" ");
|
||||
|
||||
@@ -230,7 +230,9 @@ public abstract class Tile extends BaseClass{
|
||||
new Tag("h4").content(t("Length")).addTo(form);
|
||||
new Input(LENGTH,length).numeric().addTo(new Label(t("Length")+":"+NBSP)).addTo(form);
|
||||
new Tag("h4").content(t("Availability")).addTo(form);
|
||||
new Checkbox(DISABLED, t("disabled"), disabled).addTo(form);
|
||||
Checkbox cb = new Checkbox(DISABLED, t("disabled"), disabled);
|
||||
if (disabled) cb.clazz("disabled");
|
||||
cb.addTo(form);
|
||||
new Button(t("Apply"),form).addTo(form);
|
||||
form.addTo(window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user