Skip to content

Commit

Permalink
fix(ui5-upload-collection): add tooltip to edit button (#2886)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgimkv committed Mar 1, 2021
1 parent 70bbfbb commit 35de38c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/fiori/src/UploadCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const metadata = {

/**
* By default there will be drag and drop overlay shown over the <code>ui5-upload-collection</code> when files
* are dragged. If you don't intend to use drag and drop, set this property to <code>true</code>
* are dragged. If you don't intend to use drag and drop, set this property.
* <br><br>
* <b>Note:</b> It is up to the application developer to add handler for <code>drop</code> event and handle it.
* <code>ui5-upload-collection</code> only shows an overlay.
Expand Down
1 change: 1 addition & 0 deletions packages/fiori/src/UploadCollectionItem.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<ui5-button
id="{{_id}}-editing-button"
design="Transparent"
title="{{_editButtonTooltip}}"
icon="edit"
@click="{{onDetailClick}}"
@keyup="{{_onDetailKeyup}}"
Expand Down
5 changes: 5 additions & 0 deletions packages/fiori/src/UploadCollectionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
UPLOADCOLLECTIONITEM_READY_STATE,
UPLOADCOLLECTIONITEM_RETRY_BUTTON_TEXT,
UPLOADCOLLECTIONITEM_TERMINATE_BUTTON_TEXT,
UPLOADCOLLECTIONITEM_EDIT_BUTTON_TEXT,
} from "./generated/i18n/i18n-defaults.js";

// Template
Expand Down Expand Up @@ -473,6 +474,10 @@ class UploadCollectionItem extends ListItem {
return this.i18nBundle.getText(UPLOADCOLLECTIONITEM_TERMINATE_BUTTON_TEXT);
}

get _editButtonTooltip() {
return this.i18nBundle.getText(UPLOADCOLLECTIONITEM_EDIT_BUTTON_TEXT);
}

get valueStateName() {
if (this.uploadState === UploadState.Error) {
return "Error";
Expand Down
5 changes: 4 additions & 1 deletion packages/fiori/src/i18n/messagebundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ UPLOADCOLLECTIONITEM_UPLOADING_STATE=Uploading
#XBUT: Tooltip text for 'Terminate' button in the UploadCollectionItem
UPLOADCOLLECTIONITEM_TERMINATE_BUTTON_TEXT=Terminate

#XBUT: Tooltip text for 'Retrry' button in the UploadCollectionItem
#XBUT: Tooltip text for 'Retry' button in the UploadCollectionItem
UPLOADCOLLECTIONITEM_RETRY_BUTTON_TEXT=Retry

#XBUT: Tooltip text for 'Edit' button in the UploadCollectionItem
UPLOADCOLLECTIONITEM_EDIT_BUTTON_TEXT=Edit

#XMSG: Message text for no data text in the UploadCollection
UPLOADCOLLECTION_NO_DATA_TEXT=No files found.

Expand Down

0 comments on commit 35de38c

Please sign in to comment.