From 6072a987c9c8a0f5430e29385d26cc791edf1c0f Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 12 Feb 2018 13:57:53 +0000 Subject: [PATCH] [ADF-1418] Viewer enhancements (#2930) * move navigation buttons to the header * restrict file name to 35 characters * remove wrong condition in template --- lib/core/i18n/en.json | 5 ++- .../viewer/components/viewer.component.html | 40 ++++++++++--------- .../viewer/components/viewer.component.scss | 26 +++--------- 3 files changed, 32 insertions(+), 39 deletions(-) diff --git a/lib/core/i18n/en.json b/lib/core/i18n/en.json index 2381443e74..469bfe6506 100644 --- a/lib/core/i18n/en.json +++ b/lib/core/i18n/en.json @@ -188,7 +188,10 @@ "SHARE": "Share", "MORE_ACTIONS": "More actions", "INFO": "Info", - "FULLSCREEN": "Activate full-screen mode" + "FULLSCREEN": "Activate full-screen mode", + "CLOSE": "Close", + "NEXT_FILE": "Next File", + "PREV_FILE": "Previous File" }, "ARIA": { "PREVIOUS_PAGE": "Previous page", diff --git a/lib/core/viewer/components/viewer.component.html b/lib/core/viewer/components/viewer.component.html index 661025eac8..1dbddb6841 100644 --- a/lib/core/viewer/components/viewer.component.html +++ b/lib/core/viewer/components/viewer.component.html @@ -13,13 +13,32 @@ class="adf-viewer-close-button" data-automation-id="toolbar-back" mat-icon-button - matTooltip="{{ 'ADF_VIEWER.ACTIONS.BACK' | translate }}" + matTooltip="{{ 'ADF_VIEWER.ACTIONS.CLOSE' | translate }}" (click)="onBackButtonClick()"> - arrow_back + close + + + +
+ {{ displayName }} - + +
- - -
@@ -162,13 +173,6 @@
- - -
diff --git a/lib/core/viewer/components/viewer.component.scss b/lib/core/viewer/components/viewer.component.scss index d7a91c7f56..8b8b22ceed 100644 --- a/lib/core/viewer/components/viewer.component.scss +++ b/lib/core/viewer/components/viewer.component.scss @@ -11,30 +11,10 @@ .adf-viewer { - .navigate-before { - display: flex; - align-items: center; - justify-content: center; - order: 1; - padding-left: 2px; - padding-right: 4px; - background-color: mat-color($background, background); - } - &-main { width: 0; } - .navigate-next { - display: flex; - align-items: center; - justify-content: center; - order: 3; - padding-left: 4px; - padding-right: 2px; - background-color: mat-color($background, background); - } - &__mimeicon { vertical-align: middle; height: 18px; @@ -55,6 +35,12 @@ font-weight: normal; font-style: normal; font-stretch: normal; + + max-width: 35ch; + text-overflow: ellipsis; + overflow: hidden; + display: inline-block; + vertical-align: middle; } &-container {