Upload confirmation popup - on discard remove the upload status button

Signed-off-by: Asharani <asharani.murugesh@in.bosch.com>
This commit is contained in:
Asharani
2016-05-09 10:42:23 +05:30
parent 68ab2eb30e
commit 887536b2b7
2 changed files with 9 additions and 5 deletions

View File

@@ -544,7 +544,7 @@ public class UploadConfirmationwindow implements Button.ClickListener {
if (event.getComponent().getId().equals(SPUIComponetIdProvider.UPLOAD_ARTIFACT_DETAILS_CLOSE)) { if (event.getComponent().getId().equals(SPUIComponetIdProvider.UPLOAD_ARTIFACT_DETAILS_CLOSE)) {
uploadConfrimationWindow.close(); uploadConfrimationWindow.close();
} else if (event.getComponent().getId().equals(SPUIComponetIdProvider.UPLOAD_DISCARD_DETAILS_BUTTON)) { } else if (event.getComponent().getId().equals(SPUIComponetIdProvider.UPLOAD_DISCARD_DETAILS_BUTTON)) {
uploadLayout.clearFileList(); uploadLayout.removeUploadedFileDetails();
uploadConfrimationWindow.close(); uploadConfrimationWindow.close();
} else if (event.getComponent().getId().equals(SPUIComponetIdProvider.UPLOAD_BUTTON)) { } else if (event.getComponent().getId().equals(SPUIComponetIdProvider.UPLOAD_BUTTON)) {
processArtifactUpload(); processArtifactUpload();

View File

@@ -520,13 +520,17 @@ public class UploadLayout extends VerticalLayout {
if (artifactUploadState.getFileSelected().isEmpty()) { if (artifactUploadState.getFileSelected().isEmpty()) {
uiNotification.displayValidationError(i18n.get("message.error.noFileSelected")); uiNotification.displayValidationError(i18n.get("message.error.noFileSelected"));
} else { } else {
clearFileList(); removeUploadedFileDetails();
uploadInfoWindow.clearWindow();
hideUploadStatusButton();
} }
} }
} }
protected void removeUploadedFileDetails() {
clearFileList();
uploadInfoWindow.clearWindow();
hideUploadStatusButton();
}
/** /**
* Clear details. * Clear details.
*/ */
@@ -707,7 +711,7 @@ public class UploadLayout extends VerticalLayout {
uploadStatusButton.setVisible(true); uploadStatusButton.setVisible(true);
} }
private void hideUploadStatusButton() { protected void hideUploadStatusButton() {
if (uploadStatusButton == null) { if (uploadStatusButton == null) {
return; return;
} }