mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-11 05:12:43 +00:00
Merge branch 'bug4104' of ssh://trac@sapsailing.com/home/trac/git into bug4104
This commit is contained in:
commit
58ec125945
11 files changed
+66
-27
No files matched your search
+1
@@ -2105,6 +2105,7 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
|
||||
String tagNoTagsFound();
|
||||
String tagAddTag();
|
||||
String tagEditTag();
|
||||
String tagDeleteTag();
|
||||
String tagAddTags();
|
||||
String tagSavedSuccessfully();
|
||||
String tagNotSaved();
|
||||
|
||||
+1
@@ -2100,6 +2100,7 @@ tagCreated=(created by {0} at {1})
|
||||
tagNoTagsFound=No tags found!
|
||||
tagAddTag=Add Tag
|
||||
tagEditTag=Edit Tag
|
||||
tagDeleteTag=Delete Tag
|
||||
tagAddTags=Add Tags
|
||||
tagSavedSuccessfully=Saved tag successfully
|
||||
tagNotSaved=Could not save new tag!
|
||||
|
||||
+5
-4
@@ -2094,17 +2094,18 @@ tagPanel=Tags
|
||||
tagCreated=(erstellt von {0} am {1})
|
||||
tagNoTagsFound=Keine Tags gefunden!
|
||||
tagAddTag=Tag hinzufügen
|
||||
tagEditTag= Tag bearbeiten
|
||||
tagEditTag=Tag bearbeiten
|
||||
tagDeleteTag=Tag löschen
|
||||
tagAddTags=Tags hinzufügen
|
||||
tagSavedSuccessfully=Tag erfolgreich gespeichert
|
||||
tagNotSaved=Tag konnte nicht gespeichert werden!
|
||||
tagNotSavedReason=Tag konnte nicht gespeichert werden! Grund: {0}
|
||||
tagAlreadyExists=Tag existiert bereits
|
||||
tagNotLoaded=Tags konnten nicht geladen werden!
|
||||
tagNotLoggedIn=Bitte loggen Sie sich ein um einem Rennen Tags hinzuzufügen!
|
||||
tagNotLoggedIn=Bitte logge dich ein, um einem Rennen Tags hinzufügen zu können!
|
||||
tagNotRemoved=Tag konnte nicht entfernt werden!
|
||||
tagRemovedSuccessfully=Tag erfolgreich entfernt
|
||||
tagFilterExplanation=Der Filter filtert alle Tags, welche die nachfolgenden Kriterien erfüllen. Groß- und Kleinschreibung werden beachtet!
|
||||
tagFilterExplanation=Der Filter zeigt alle Tags an, welche die nachfolgenden Kriterien erfüllen. Groß- und Kleinschreibung werden beachtet!
|
||||
tagSelectedTags=Ausgewählte Tags
|
||||
tagsFilter=Tag Filter
|
||||
tagSearchTags=Suchen
|
||||
@@ -2123,7 +2124,7 @@ tagPreview=Tag Vorschau:
|
||||
tagVisibleForPublicCheckBox=Für alle sichtbar
|
||||
tagVisibility=Sichtbarkeit
|
||||
tagConfirmDeletionHeading=Tag löschen
|
||||
tagConfirmDeletion=Dies wird den Tag "{0}" endgütltig löschen. Willst du wirklich fortfahren?
|
||||
tagConfirmDeletion=Dies wird den Tag "{0}" endgültig löschen. Willst du wirklich fortfahren?
|
||||
tagButtonConfirmDeletionHeading=Tag-Button löschen
|
||||
tagButtonConfirmDeletion=Dies wird den Tag-Button "{0}" endgütltig löschen. Willst du wirklich fortfahren?
|
||||
tagDiscardChangesHeading=Änderungen verwerfen
|
||||
|
||||
+1
-6
@@ -848,13 +848,8 @@ public class TouchSplitLayoutPanel extends DockLayoutPanel {
|
||||
}
|
||||
splitter.setAssociatedWidgetSize(0, /* defer */false);
|
||||
|
||||
// need to ensure visibility of dragger and style of toggle button
|
||||
// need to ensure visibility of dragger, do NOT use setVisible() as south/north splitter should be shown always
|
||||
splitter.setDraggerVisible(!hidden);
|
||||
splitter.setVisible(!hidden);
|
||||
splitter.getToggleButton().addStyleDependentName("Closed");
|
||||
splitter.getToggleButton().addStyleDependentName("Closed-"+associatedComponentToWidget.getDependentCssClassName());
|
||||
splitter.getToggleButton().removeStyleDependentName("Open");
|
||||
splitter.getToggleButton().removeStyleDependentName("Open-"+associatedComponentToWidget.getDependentCssClassName());
|
||||
} else {
|
||||
widget.setVisible(true);
|
||||
if (associatedComponentToWidget != null) {
|
||||
|
||||
+25
-9
@@ -321,15 +321,31 @@ public class TagButtonDialog extends DialogBox {
|
||||
cancelButton.setStyleName(style.tagDialogButton());
|
||||
cancelButton.addStyleName("gwt-Button");
|
||||
cancelButton.addClickHandler(event -> {
|
||||
|
||||
inputPanel.clearAllValues();
|
||||
tagPreviewPanel.renderPreview(inputPanel);
|
||||
tagButtonTable.setVisible(true);
|
||||
saveButton.setVisible(false);
|
||||
cancelButton.setVisible(false);
|
||||
closeButton.setVisible(true);
|
||||
addTagButtonButton.setVisible(true);
|
||||
center();
|
||||
// ask user for confirmation to discard changes if values of input fields changed
|
||||
if (!inputPanel.compareFieldsToTagButton(selectedTagButton)) {
|
||||
new ConfirmationDialog(stringMessages, stringMessages.tagDiscardChangesHeading(),
|
||||
stringMessages.tagDiscardChanges(), confirmed -> {
|
||||
if (confirmed) {
|
||||
inputPanel.clearAllValues();
|
||||
tagPreviewPanel.renderPreview(inputPanel);
|
||||
tagButtonTable.setVisible(true);
|
||||
saveButton.setVisible(false);
|
||||
cancelButton.setVisible(false);
|
||||
closeButton.setVisible(true);
|
||||
addTagButtonButton.setVisible(true);
|
||||
center();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
inputPanel.clearAllValues();
|
||||
tagPreviewPanel.renderPreview(inputPanel);
|
||||
tagButtonTable.setVisible(true);
|
||||
saveButton.setVisible(false);
|
||||
cancelButton.setVisible(false);
|
||||
closeButton.setVisible(true);
|
||||
addTagButtonButton.setVisible(true);
|
||||
center();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+11
-5
@@ -116,12 +116,14 @@ public class TagCell extends AbstractCell<TagDTO> {
|
||||
/**
|
||||
* Renders button with given content.
|
||||
*
|
||||
* @param title
|
||||
* will be shown as tooltip of button
|
||||
* @param content
|
||||
* content of button
|
||||
* @return {@link SafeHtml HTML template}
|
||||
*/
|
||||
@Template("<button class='{0}'>{1}</button>")
|
||||
SafeHtml button(String classButton, SafeHtml content);
|
||||
@Template("<button class='{0}' title='{1}'>{2}</button>")
|
||||
SafeHtml button(String classButton, String title, SafeHtml content);
|
||||
}
|
||||
|
||||
private final TagCellTemplate tagCellTemplate = GWT.create(TagCellTemplate.class);
|
||||
@@ -193,9 +195,9 @@ public class TagCell extends AbstractCell<TagDTO> {
|
||||
if (userService.getCurrentUser() != null) {
|
||||
// create buttons with icons
|
||||
SafeHtml deleteButton = tagCellTemplate.button(style.tagActionButton() + " " + style.tagDeleteButton(),
|
||||
tagCellTemplate.icon(resources.deleteIcon().getSafeUri()));
|
||||
stringMessages.tagDeleteTag(), tagCellTemplate.icon(resources.deleteIcon().getSafeUri()));
|
||||
SafeHtml editButton = tagCellTemplate.button(style.tagActionButton() + " " + style.tagEditButton(),
|
||||
tagCellTemplate.icon(resources.editIcon().getSafeUri()));
|
||||
stringMessages.tagEditTag(), tagCellTemplate.icon(resources.editIcon().getSafeUri()));
|
||||
if (tag.getUsername().equals(userService.getCurrentUser().getName())) {
|
||||
headingButtons = tagCellTemplate.headerButtonsDeletableAndModifyable(style.tagCellHeadingButtons(),
|
||||
editButton, deleteButton);
|
||||
@@ -206,7 +208,11 @@ public class TagCell extends AbstractCell<TagDTO> {
|
||||
}
|
||||
}
|
||||
|
||||
SafeHtml cell = tagCellTemplate.cell(style.tagCell(), style.tagCellHeading(), style.tagCellCreated(), icon,
|
||||
String cellStyle = style.tagCell();
|
||||
if (tag.equals(taggingPanel.getSelectedTag())) {
|
||||
cellStyle = style.tagCell() + " " + style.tagCellActive();
|
||||
}
|
||||
SafeHtml cell = tagCellTemplate.cell(cellStyle, style.tagCellHeading(), style.tagCellCreated(), icon,
|
||||
headingButtons, safeTag, safeCreated, content);
|
||||
htmlBuilder.append(cell);
|
||||
}
|
||||
|
||||
+15
-1
@@ -75,7 +75,7 @@ public class TagInputPanel extends FlowPanel {
|
||||
* Returns whether values of given <code>tag</code> are different from input fields.
|
||||
*
|
||||
* @param tag
|
||||
* tag to compare to input fields
|
||||
* {@link TagDTO} to compare to input fields
|
||||
* @return <code>true</code> if title, comment, imageURL and visibility are equal to input fields, otherwise
|
||||
* <code>false</code>
|
||||
*/
|
||||
@@ -84,6 +84,20 @@ public class TagInputPanel extends FlowPanel {
|
||||
&& getImageURL().equals(tag.getImageURL()) && isVisibleForPublic() == tag.isVisibleForPublic();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether values of given <code>tagButton</code> are different from input fields.
|
||||
*
|
||||
* @param tagButton
|
||||
* {@link TagButton} to compare to input fields
|
||||
* @return <code>true</code> if title, comment, imageURL and visibility are equal to input fields, otherwise
|
||||
* <code>false</code>
|
||||
*/
|
||||
protected boolean compareFieldsToTagButton(TagButton tagButton) {
|
||||
return getTag().equals(tagButton.getTag()) && getComment().equals(tagButton.getComment())
|
||||
&& getImageURL().equals(tagButton.getImageURL())
|
||||
&& isVisibleForPublic() == tagButton.isVisibleForPublic();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether input fields are equal to default values.
|
||||
*
|
||||
|
||||
+1
@@ -56,6 +56,7 @@ public interface TagPanelResources extends ClientBundle {
|
||||
|
||||
// tag cells
|
||||
String tagCell();
|
||||
String tagCellActive();
|
||||
String tagCellHeading();
|
||||
String tagCellHeadingButtons();
|
||||
String tagActionButton();
|
||||
|
||||
+1
-1
@@ -674,7 +674,7 @@ public class TaggingPanel extends ComponentWithoutSettings
|
||||
// Setting footerPanel.setVisible(false) is not sufficient as panel would still be
|
||||
// rendered as 20px high white space instead of being hidden.
|
||||
// Fix: remove panel completely from footer.
|
||||
if (userService.getCurrentUser() != null) {
|
||||
if (!currentState.equals(State.VIEW) || (currentState.equals(State.VIEW) && !getTagButtons().isEmpty())) {
|
||||
taggingPanel.setFooterWidget(footerPanel);
|
||||
footerPanel.setCurrentState(currentState);
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@
|
||||
|
||||
.cellListSelectedItem,
|
||||
.cellListKeyboardSelectedItem {
|
||||
background-color: #e5f2f9 !important;
|
||||
background-color: #e5f2f9;
|
||||
border-radius: 3px;
|
||||
}
|
||||
+4
@@ -381,6 +381,10 @@
|
||||
cursor: context-menu;
|
||||
}
|
||||
|
||||
.taggingPanelDisabled .tagCell.tagCellActive {
|
||||
background-color: #e5f2f9;
|
||||
}
|
||||
|
||||
.taggingPanelDisabled .tagCellHeadingButtons,
|
||||
.taggingPanelDisabled .tagCellHeadingButtons .tagEditButton,
|
||||
.taggingPanelDisabled .tagCellHeadingButtons .tagEditButton:hover,
|
||||
|
||||
Reference in new issue
Block a user