diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/stage/Stage.ui.xml b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/stage/Stage.ui.xml
index 84c5941b80c..42c59b717ab 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/stage/Stage.ui.xml
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/stage/Stage.ui.xml
@@ -2,21 +2,18 @@
-
-
-
+
+
+
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/Dialog.gss b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/Dialog.gss
index ee93e6bcfe0..b2fc68c17e9 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/Dialog.gss
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/Dialog.gss
@@ -2,11 +2,11 @@
left: 50% !important;
top: 50% !important;
position: absolute !important;
- background-color: #f2f2f2;
+ background-color: #ffffff;
padding: 1em;
border: 1px solid #ccc;
border-radius: 3px;
- width: 25%;
+ width: 30em;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
@@ -15,8 +15,7 @@
}
.buttonAdjustments {
- margin-left: .5em;
- margin-top: .5em;
+ margin: .5em .25em 0;
min-width: 11em;
}
@@ -39,6 +38,7 @@
.buttonPanel {
text-align: center;
+ font-size: 0;
}
.backgroundPanel {
@@ -48,6 +48,7 @@
top: 0;
left: 0;
background-color: rgba(0, 0, 0, .33333333);
+ z-index: 9999;
}
.title {
@@ -57,20 +58,13 @@
margin-bottom: .75em;
}
-@media ( max-width: 400px) {
+@media (max-width: 425px) {
.dialog {
- width: 90%;
+ width: calc(100% - 1em);
+ }
+
+ .buttonAdjustments {
+ min-width: 100%;
+ margin: .5em 0 0;
}
}
-
-@media ( min-width: 400px) {
- .dialog {
- width: 50%;
- }
-}
-
-@media ( min-width: 600px) {
- .dialog {
- width: 40%;
- }
-}
\ No newline at end of file
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/TwoOptionsDialogPanel.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/TwoOptionsDialogPanel.java
index d51ad792077..5be26a9b6ce 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/TwoOptionsDialogPanel.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/TwoOptionsDialogPanel.java
@@ -36,29 +36,24 @@ public class TwoOptionsDialogPanel extends Composite {
DivElement titleField;
private final DialogCallback callback;
-
private final PopupPanel parent;
- public TwoOptionsDialogPanel() {
- this("", "", null, null);
- }
-
- public TwoOptionsDialogPanel(String message, String title, DialogCallback callback, PopupPanel parent) {
+ TwoOptionsDialogPanel(String message, String title, DialogCallback callback, PopupPanel parent) {
initWidget(uiBinder.createAndBindUi(this));
this.callback = callback;
this.parent = parent;
- messageField.setInnerText(message);
- titleField.setInnerText(title);
+ this.messageField.setInnerText(message);
+ this.titleField.setInnerText(title);
}
/** Sets the labels of the {@link #firstButton} and {@link #secondButton}. */
- public void setButtonLabels(String firstButtonText, String secondButtonText) {
+ void setButtonLabels(String firstButtonText, String secondButtonText) {
firstButton.setText(firstButtonText);
secondButton.setText(secondButtonText);
}
/** Changes the color of the {@link #firstButton} to red. */
- public void setFirstButtonDestructive() {
+ void setFirstButtonDestructive() {
firstButton.addStyleName(DialogResources.INSTANCE.css().destructiveButton());
}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/whatsnew/WhatsNewDialogFactory.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/whatsnew/WhatsNewDialogFactory.java
index 80fbbd000bf..b572bc2eecc 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/whatsnew/WhatsNewDialogFactory.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/dialog/whatsnew/WhatsNewDialogFactory.java
@@ -24,6 +24,8 @@ public final class WhatsNewDialogFactory {
private static final long THRESHOLD_WHATS_NEW = 10;
private static final Logger LOG = Logger.getLogger(WhatsNewDialogFactory.class.getName());
+ private static boolean isUserNotified = false;
+
private WhatsNewDialogFactory() {
}
@@ -38,10 +40,10 @@ public final class WhatsNewDialogFactory {
/** Shows a What's New Dialog. */
private static void showWhatsNewDialog(PlaceController placeController, DialogCallback dialogCallback) {
-
- PopupPanel dialog = DialogFactory.createDialog(StringMessages.INSTANCE.whatsNewDialogMessage(),
+ final PopupPanel dialog = DialogFactory.createDialog(StringMessages.INSTANCE.whatsNewDialogMessage(),
StringMessages.INSTANCE.whatsNewDialogTitle(), false, StringMessages.INSTANCE.showChangelog(),
StringMessages.INSTANCE.cancel(), dialogCallback);
+ isUserNotified = true;
dialog.show();
}
@@ -51,6 +53,9 @@ public final class WhatsNewDialogFactory {
*/
private static void showWhatsNewDialogIfNecessaryAndUpdatePreference(UserService userService,
PlaceController placeController) {
+ if (isUserNotified) {
+ return;
+ }
final long charactersInWhatsChangedDocument = WhatsNewResources.INSTANCE.getSailingAnalyticsNotesHtml()
.getText().length();
userService.getPreference(WhatsNewSettings.PREF_NAME, new AsyncCallback() {
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/tagging/TaggingPanel.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/tagging/TaggingPanel.java
index 48d929ca9b5..2177c6ef597 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/tagging/TaggingPanel.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/tagging/TaggingPanel.java
@@ -7,6 +7,7 @@ import java.util.Map;
import java.util.Set;
import com.google.gwt.core.shared.GWT;
+import com.google.gwt.dom.client.BrowserEvents;
import com.google.gwt.user.cellview.client.CellList;
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -16,6 +17,8 @@ import com.google.gwt.user.client.ui.HeaderPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.view.client.CellPreviewEvent;
+import com.google.gwt.view.client.CellPreviewEvent.Handler;
import com.google.gwt.view.client.NoSelectionModel;
import com.google.gwt.view.client.SingleSelectionModel;
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
@@ -115,8 +118,8 @@ public class TaggingPanel extends ComponentWithoutSettings
* 3) another user adds/deletes/changes any tag between the latest received tag and the current timer position
* consecutively, the timer would jump to this new tag as the selection would change automatically as the latest tag
* changed. This selection change would also trigger the timer to jump to the latest tag, which is not intended in
- * this case. Therefor any received changes on any tags will set this boolen to true which will ignore the time jump
- * at the selection change event and prevent this wrong behaviour.
+ * this case. Therefor any received changes on any tags will set this boolean to true which will ignore the time jump
+ * at the selection change event and prevent this wrong behavior.
*
* @see #raceTimesInfosReceived(Map, long, Date, long)
*/
@@ -180,26 +183,31 @@ public class TaggingPanel extends ComponentWithoutSettings
tagCellList.setEmptyListWidget(new Label(stringMessages.tagNoTagsFound()));
tagCellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
tagCellList.setSelectionModel(tagSelectionModel);
- tagSelectionModel.addSelectionChangeHandler(event -> {
- // set time slider to corresponding position
- TagDTO selectedTag = tagSelectionModel.getSelectedObject();
- if (selectedTag != null) {
- /**
- * Do not set time of timer when {@link #preventTimeJumpAtSelectionChangeForOnce} is set to
- * true. In this case set {@link #preventTimeJumpAtSelectionChangeForOnce} to
- * false as selection change is ignored once.
- *
- * @see #preventTimeJumpAtSelectionChangeForOnce
- */
- if (preventTimeJumpAtSelectionChangeForOnce) {
- preventTimeJumpAtSelectionChangeForOnce = false;
- } else {
- // remove time change listener when manual selecting tag cells as this could end in an infinite loop
- // of timer change -> automatic selection change -> timer change -> ...
- timer.removeTimeListener(this);
- timer.setTime(selectedTag.getRaceTimepoint().asMillis());
- // adding time change listener again
- timer.addTimeListener(this);
+ tagCellList.addCellPreviewHandler(new Handler() {
+ @Override
+ public void onCellPreview(CellPreviewEvent event) {
+ if (BrowserEvents.CLICK.equals(event.getNativeEvent().getType())) {
+ // set time slider to corresponding position
+ TagDTO selectedTag = event.getValue();
+ if (selectedTag != null) {
+ /**
+ * Do not set time of timer when {@link #preventTimeJumpAtSelectionChangeForOnce} is set to
+ * true. In this case set {@link #preventTimeJumpAtSelectionChangeForOnce} to
+ * false as selection change is ignored once.
+ *
+ * @see #preventTimeJumpAtSelectionChangeForOnce
+ */
+ if (preventTimeJumpAtSelectionChangeForOnce) {
+ preventTimeJumpAtSelectionChangeForOnce = false;
+ } else {
+ // remove time change listener when manually selecting tag cells as this could end in an infinite loop
+ // of timer change -> automatic selection change -> timer change -> ...
+ timer.removeTimeListener(TaggingPanel.this);
+ timer.setTime(selectedTag.getRaceTimepoint().asMillis());
+ // adding time change listener again
+ timer.addTimeListener(TaggingPanel.this);
+ }
+ }
}
}
});
@@ -209,7 +217,6 @@ public class TaggingPanel extends ComponentWithoutSettings
createTagsButton.addClickHandler(event -> {
setCurrentState(State.CREATE_TAG);
});
-
taggingPanel.setContentWidget(contentPanel);
updateContent();
}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/tagging/tagging-panel.gss b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/tagging/tagging-panel.gss
index 173c73f3acb..e31a469b16e 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/tagging/tagging-panel.gss
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/tagging/tagging-panel.gss
@@ -87,6 +87,7 @@
padding: 5px 5px 0;
border: 1px solid lightgrey;
border-radius: 3px;
+ cursor: pointer;
}
.tagCellHeading {