mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-14 22:43:57 +00:00
Bug 4147: added dialog title to confirm dialog
This commit is contained in:
1 parent
27fd8857c0
commit
930ddfaaaa
10 files changed
+49
-12
No files matched your search
+2
-1
@@ -97,7 +97,8 @@ public class SailorProfileOverviewImpl extends Composite implements SailorProfil
|
||||
|
||||
removeColumn.setCellStyleNames(DesignedCellTableResources.INSTANCE.cellTableStyle().buttonCell());
|
||||
removeColumn.setFieldUpdater((int index, SailorProfileDTO dto, String value) -> ConfirmDialogFactory
|
||||
.showConfirmDialog(StringMessages.INSTANCE.sailorProfileRemoveMessage(), new DialogCallback<Void>() {
|
||||
.showConfirmDialog(StringMessages.INSTANCE.sailorProfileRemoveMessage(),
|
||||
StringMessages.INSTANCE.confirmDeletion(), new DialogCallback<Void>() {
|
||||
@Override
|
||||
public void ok(Void editedObject) {
|
||||
presenter.removeSailorProfile(dto.getKey());
|
||||
|
||||
+1
-2
@@ -97,8 +97,7 @@ public class SailorProfileOverviewEntry extends Composite {
|
||||
e.getNativeEvent().preventDefault();
|
||||
e.getNativeEvent().stopPropagation();
|
||||
ConfirmDialogFactory.showConfirmDialog(StringMessages.INSTANCE.sailorProfileRemoveMessage(),
|
||||
new DialogCallback<Void>() {
|
||||
|
||||
StringMessages.INSTANCE.confirmDeletion(), new DialogCallback<Void>() {
|
||||
@Override
|
||||
public void ok(Void v) {
|
||||
presenter.removeSailorProfile(uuidRef);
|
||||
|
||||
+3
-2
@@ -12,10 +12,11 @@ public final class ConfirmDialogFactory {
|
||||
* creates a yes/no {@link ConfirmDialogPanel} with {@link #message}, which calls {@link DialogCallback#ok(Object)}
|
||||
* or {@link DialogCallback#cancel()}
|
||||
*/
|
||||
public static void showConfirmDialog(String message, final DialogCallback<Void> callback) {
|
||||
public static void showConfirmDialog(final String message, final String title,
|
||||
final DialogCallback<Void> callback) {
|
||||
DialogResources.INSTANCE.css().ensureInjected();
|
||||
PopupPanel dialog = new PopupPanel();
|
||||
ConfirmDialogPanel confirmDialogPanel = new ConfirmDialogPanel(message, callback, dialog);
|
||||
ConfirmDialogPanel confirmDialogPanel = new ConfirmDialogPanel(message, title, callback, dialog);
|
||||
dialog.setWidget(confirmDialogPanel);
|
||||
confirmDialogPanel.addStyleName(DialogResources.INSTANCE.css().dialog());
|
||||
dialog.addStyleName(DialogResources.INSTANCE.css().backgroundPanel());
|
||||
|
||||
+6
-2
@@ -32,19 +32,23 @@ public class ConfirmDialogPanel extends Composite {
|
||||
@UiField
|
||||
DivElement messageField;
|
||||
|
||||
@UiField
|
||||
DivElement titleField;
|
||||
|
||||
private final DialogCallback<Void> callback;
|
||||
|
||||
private final PopupPanel parent;
|
||||
|
||||
public ConfirmDialogPanel() {
|
||||
this("", null, null);
|
||||
this("", "", null, null);
|
||||
}
|
||||
|
||||
public ConfirmDialogPanel(String message, DialogCallback<Void> callback, PopupPanel parent) {
|
||||
public ConfirmDialogPanel(String message, String title, DialogCallback<Void> callback, PopupPanel parent) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
this.callback = callback;
|
||||
this.parent = parent;
|
||||
messageField.setInnerText(message);
|
||||
titleField.setInnerText(title);
|
||||
}
|
||||
|
||||
@UiHandler("yesButton")
|
||||
|
||||
+1
@@ -3,6 +3,7 @@
|
||||
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.home.shared.partials.dialog.DialogResources" />
|
||||
<g:HTMLPanel>
|
||||
<div class="{res.css.title}" ui:field="titleField" />
|
||||
<div class="{res.css.message}" ui:field="messageField" />
|
||||
<div class="{res.css.buttonPanel}">
|
||||
<g:Button styleName="{res.css.yesButton} {res.css.button}" ui:field="yesButton">Yes</g:Button>
|
||||
|
||||
+28
-3
@@ -5,8 +5,8 @@
|
||||
background-color: #f2f2f2;
|
||||
padding: 1em;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 1em;
|
||||
width: 50%;
|
||||
border-radius: 3px;
|
||||
width: 25%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
@@ -14,8 +14,27 @@
|
||||
box-shadow: 0.1em 0.1em 1em #bbb;
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
.dialog {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 400px) {
|
||||
.dialog {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.dialog {
|
||||
width: 40%;
|
||||
}
|
||||
}
|
||||
|
||||
.message {
|
||||
margin-bottom: .5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.yesButton {
|
||||
@@ -43,7 +62,6 @@
|
||||
}
|
||||
|
||||
.button {
|
||||
font-size: 1.1111em;
|
||||
display: inline;
|
||||
width: 4em;
|
||||
height: 2.5em;
|
||||
@@ -64,4 +82,11 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, .33333333);
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 1.5em;
|
||||
color: #555;
|
||||
font-weight: 600;
|
||||
margin-bottom: .75em;
|
||||
}
|
||||
+2
@@ -26,5 +26,7 @@ public interface DialogResources extends ClientBundle {
|
||||
String buttonPanel();
|
||||
|
||||
String backgroundPanel();
|
||||
|
||||
String title();
|
||||
}
|
||||
}
|
||||
+2
@@ -2192,4 +2192,6 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
|
||||
String noStatisticsFoundForCompetitors();
|
||||
String sailorProfileRemoveMessage();
|
||||
String showInDataMining();
|
||||
|
||||
String confirmDeletion();
|
||||
}
|
||||
+2
-1
@@ -2187,4 +2187,5 @@ noStatisticsFoundForCompetitors=There are no statistics available for the select
|
||||
pleaseSelectCompetitorFirst=Please select a competitor first.
|
||||
sailorProfileRemoveMessage=Are you sure you want to remove this Sailor Profile?
|
||||
moreLoginInformationSectionSailorProfilesDescription=After logging in, you can now find a new area under your user profile, which is called 'Sailor Profiles'. You can add some competitors to such a Sailor Profile and get more insights about these competitors. In a Sailor Profile, you can see all the events your favorite competitors participated in and compare their placements to each others. Additionally, you get an overview about the most important statistics, like the maximum speed or the average distance to the start line with direct links to the Race Map to see the exact point in time, where for example the fastest competitor reached his record. For aggregative statistics like the average distance to startline at racestart, you can click on the arrow and are forwarded to Data Mining where you can drill down on the average values.
|
||||
moreLoginInformationSectionSailorProfilesHeading=Sailor Profiles
|
||||
moreLoginInformationSectionSailorProfilesHeading=Sailor Profiles
|
||||
confirmDeletion=Confirm Deletion
|
||||
+2
-1
@@ -2182,4 +2182,5 @@ noStatisticsFoundForCompetitors=Für die ausgewählten Teams stehen keine Statis
|
||||
pleaseSelectCompetitorFirst=Bitte zunächst ein Team auswählen
|
||||
sailorProfileRemoveMessage=Sicher, dass das Seglerprofil gelöscht werden soll?
|
||||
moreLoginInformationSectionSailorProfilesDescription=Nach dem Login können Sie nun in ihrem Userprofil einen neuen Bereich namens 'Seglerprofile' finden. Dort können Sie ein solches Seglerprofil anlegen, um detailliertere Informationen zum ausgewählten Team zu erhalten. In einem Seglerprofil können Sie alle Events ihrer Lieblingsteams verfolgen und deren Platzierungen direkt miteinander vergleichen. Außerdem erhalten Sie eine Übersicht über die wichtigsten Statistiken, wie die Maximalgeschwindigkeit oder die durchschnittliche Distanz zur Startlinie am Rennstart. Von hier aus gibt es auch direkte Absprungpunkte zu den für die individuelle Statistik relevanten Orten in Sailing Analytics. So können Sie etwa direkt von der Maximalgeschwindigkeit in die Race Map springen, wo dann das Rennen zu dem Zeitpunkt der Maximalgeschwindigkeit startet. Von der durchschnittlichen Distanz zur Startlinie können Sie dagegen gleich ins Data Mining wechseln, wo Sie dann einen Drill Down der Durchschnittswerte sehen.
|
||||
moreLoginInformationSectionSailorProfilesHeading=Seglerprofile
|
||||
moreLoginInformationSectionSailorProfilesHeading=Seglerprofile
|
||||
confirmDeletion=Löschen bestätigen
|
||||
Reference in new issue
Block a user