GUI improvements
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.2.57</version>
|
<version>1.2.58</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>
|
||||||
|
|||||||
@@ -348,4 +348,28 @@ svg.preview rect{
|
|||||||
|
|
||||||
svg.Block text{
|
svg.Block text{
|
||||||
fill: black;
|
fill: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.window > .tabs > legend {
|
||||||
|
float:left;
|
||||||
|
background: lightgray;
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-radius: 5px 5px 0 0;
|
||||||
|
margin: 0 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.window legend.front{
|
||||||
|
background: white;
|
||||||
|
border-bottom-color: white;
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.window fieldset {
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
float: none;
|
||||||
|
clear:both;
|
||||||
|
border-radius: 0 5px 5px 5px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -31,6 +31,29 @@ function addTile(x,y){
|
|||||||
return request({realm:'plan',action:mode,tile:selected.id,x:x,y:y});
|
return request({realm:'plan',action:mode,tile:selected.id,x:x,y:y});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function arrangeTabs(){
|
||||||
|
var id = 0;
|
||||||
|
var tabs = $('<div/>',{'class':'tabs'});
|
||||||
|
tabs.insertAfter($('.swapbtn'));
|
||||||
|
$('.window > fieldset > legend').each(function(){
|
||||||
|
var fs = this.parentNode;
|
||||||
|
if (!fs.id) fs.id = 'fieldset-'+id;
|
||||||
|
$(this).appendTo(tabs).click(fs.id,clickLegend);
|
||||||
|
if (id > 0) {
|
||||||
|
$(fs).hide();
|
||||||
|
} else $(this).addClass('front');
|
||||||
|
id++;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function clickLegend(ev){
|
||||||
|
var fieldsetId = ev.data;
|
||||||
|
$('.window > .tabs > legend').removeClass('front');
|
||||||
|
$(ev.target).addClass('front');
|
||||||
|
$('.window > fieldset').hide();
|
||||||
|
$('#'+fieldsetId).show();
|
||||||
|
}
|
||||||
|
|
||||||
function clickTile(x,y){
|
function clickTile(x,y){
|
||||||
var id = x+"-"+y;
|
var id = x+"-"+y;
|
||||||
var tiles = $('#'+id);
|
var tiles = $('#'+id);
|
||||||
@@ -177,6 +200,7 @@ function request(data){
|
|||||||
$(BODY).append($(resp));
|
$(BODY).append($(resp));
|
||||||
if (isWindow) {
|
if (isWindow) {
|
||||||
tileWindow();
|
tileWindow();
|
||||||
|
arrangeTabs();
|
||||||
var win = $('.window');
|
var win = $('.window');
|
||||||
if (win.attr('id')==winId) win.scrollTop(scroll);
|
if (win.attr('id')==winId) win.scrollTop(scroll);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ Direction : Richtung
|
|||||||
Direction\: heading {} : Richtung: nach {}
|
Direction\: heading {} : Richtung: nach {}
|
||||||
disabled : deaktiviert
|
disabled : deaktiviert
|
||||||
disable {} : {} deaktivieren
|
disable {} : {} deaktivieren
|
||||||
Disabled routes using this tile : Deaktivierte Routen, die diesen Abschnitt verwenden
|
disabled routes : deaktivierte Fahrstraßen
|
||||||
Display "{}" on {}. : „{}“ auf {} anzeigen.
|
Display "{}" on {}. : „{}“ auf {} anzeigen.
|
||||||
Drop : Verwerfen
|
Drop : Verwerfen
|
||||||
Dropped destination of {}. : Ziel von {} verworfen.
|
Dropped destination of {}. : Ziel von {} verworfen.
|
||||||
@@ -130,6 +130,7 @@ Length unit : Längeneinheit
|
|||||||
Locked by {} : Durch {} besetzt
|
Locked by {} : Durch {} besetzt
|
||||||
Locomotive manager : Lok-Verwaltung
|
Locomotive manager : Lok-Verwaltung
|
||||||
Locomotives\: : Lokomotiven:
|
Locomotives\: : Lokomotiven:
|
||||||
|
Locomotives and cars : Lokomotiven und Waggons
|
||||||
Manage cars : Waggons verwalten
|
Manage cars : Waggons verwalten
|
||||||
Manage locos : Lokomotiven verwalten
|
Manage locos : Lokomotiven verwalten
|
||||||
Manage trains : Züge verwalten
|
Manage trains : Züge verwalten
|
||||||
@@ -183,6 +184,7 @@ Reversed {}. : {} umgedreht.
|
|||||||
RIGHT : rechts
|
RIGHT : rechts
|
||||||
Right port\: : Port für rechts
|
Right port\: : Port für rechts
|
||||||
Route properties : Routen-Eigenschaften
|
Route properties : Routen-Eigenschaften
|
||||||
|
Routes : Fahrstraßen
|
||||||
Routes using this tile : Fahrstraßen, die diesen Abschnitt verwenden
|
Routes using this tile : Fahrstraßen, die diesen Abschnitt verwenden
|
||||||
Route will only be available, if all conditions are fulfilled. : Route ist nur verfügbar, wenn alle Bedingungen erfüllt sind.
|
Route will only be available, if all conditions are fulfilled. : Route ist nur verfügbar, wenn alle Bedingungen erfüllt sind.
|
||||||
Save : speichern
|
Save : speichern
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ public abstract class BaseClass implements Constants{
|
|||||||
postForm.forEach(fieldset -> fieldset.addTo(win));
|
postForm.forEach(fieldset -> fieldset.addTo(win));
|
||||||
|
|
||||||
Fieldset customFields = new Fieldset(t("custom fields"));
|
Fieldset customFields = new Fieldset(t("custom fields"));
|
||||||
|
customFields.attr("id", "custom");
|
||||||
|
|
||||||
Form customForm = new Form(CUSTOM_FIELDS);
|
Form customForm = new Form(CUSTOM_FIELDS);
|
||||||
new Input(ACTION, ACTION_UPDATE).hideIn(customForm);
|
new Input(ACTION, ACTION_UPDATE).hideIn(customForm);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class Route extends BaseClass {
|
|||||||
private Train train;
|
private Train train;
|
||||||
private boolean aborted = false;
|
private boolean aborted = false;
|
||||||
private String brakeId;
|
private String brakeId;
|
||||||
private static final int ENDSPEED = 5;
|
private static final int ENDSPEED = 10;
|
||||||
|
|
||||||
public BrakeProcessor(Route route, Train train) {
|
public BrakeProcessor(Route route, Train train) {
|
||||||
this.train = train;
|
this.train = train;
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Tag carList() {
|
private Tag carList() {
|
||||||
Tag locoProp = new Tag("li").content(t("Locomotives and cars:"));
|
Tag locoProp = new Tag("li").content(t("Locomotives and cars")+":");
|
||||||
Tag carList = new Tag("ul").clazz("carlist");
|
Tag carList = new Tag("ul").clazz("carlist");
|
||||||
|
|
||||||
for (Car car : this.cars) {
|
for (Car car : this.cars) {
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ public abstract class Tile extends BaseClass implements Comparable<Tile>{
|
|||||||
|
|
||||||
|
|
||||||
if (!routes.isEmpty()) {
|
if (!routes.isEmpty()) {
|
||||||
fieldset = new Fieldset(t("Routes using this tile"));
|
fieldset = new Fieldset(t("Routes"));
|
||||||
Tag routeList = new Tag("ol");
|
Tag routeList = new Tag("ol");
|
||||||
boolean empty = true;
|
boolean empty = true;
|
||||||
for (Route route : routes) {
|
for (Route route : routes) {
|
||||||
@@ -301,11 +301,11 @@ public abstract class Tile extends BaseClass implements Comparable<Tile>{
|
|||||||
empty = false;
|
empty = false;
|
||||||
}
|
}
|
||||||
if (!empty) {
|
if (!empty) {
|
||||||
|
new Tag("h4").content(t("Routes using this tile")).addTo(fieldset);
|
||||||
routeList.addTo(fieldset);
|
routeList.addTo(fieldset);
|
||||||
postForm.add(fieldset);
|
postForm.add(fieldset);
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset = new Fieldset(t("Disabled routes using this tile"));
|
|
||||||
routeList = new Tag("ol");
|
routeList = new Tag("ol");
|
||||||
empty = true;
|
empty = true;
|
||||||
for (Route route : routes) {
|
for (Route route : routes) {
|
||||||
@@ -317,8 +317,8 @@ public abstract class Tile extends BaseClass implements Comparable<Tile>{
|
|||||||
empty = false;
|
empty = false;
|
||||||
}
|
}
|
||||||
if (!empty) {
|
if (!empty) {
|
||||||
|
new Tag("h4").content(t("disabled routes")).addTo(fieldset);
|
||||||
routeList.addTo(fieldset);
|
routeList.addTo(fieldset);
|
||||||
postForm.add(fieldset);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user