-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pdf-viewer): #MAG-190 added responsive for pdf + added filename
- Loading branch information
1 parent
b65bc95
commit 3eb896a
Showing
4 changed files
with
61 additions
and
33 deletions.
There are no files selected for viewing
48 changes: 33 additions & 15 deletions
48
src/main/resources/public/sass/global/components/directives/_pdf-viewer.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,41 @@ | ||
.pdf-viewer{ | ||
&-pagination-area{ | ||
&-pagination { | ||
display: flex; | ||
&-header { | ||
display: flex; | ||
margin-bottom: 6px; | ||
|
||
&-pagination-area{ | ||
|
||
flex: auto; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
&-numPage { | ||
font-size: 14px; | ||
} | ||
&-pagination { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
&-input { | ||
font-size: 14px; | ||
margin: 0; | ||
flex: 1; | ||
width: 3em; | ||
&-numPage { | ||
font-size: 14px; | ||
} | ||
|
||
&-input { | ||
font-size: 14px; | ||
margin: 0; | ||
flex: 1; | ||
width: 3em; | ||
} | ||
} | ||
} | ||
&-file-controls{ | ||
&-file-controls{ | ||
padding: 0 1em; | ||
} | ||
} | ||
|
||
&-title { | ||
color: $magneto-light-grey; | ||
} | ||
} | ||
|
||
.render { | ||
max-width: 100%; | ||
border: 1px solid $magneto-light-grey; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 14 additions & 7 deletions
21
src/main/resources/public/ts/directives/pdf-viewer/pdf-viewer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
<div class="pdf-viewer" id="pdf-viewer" > | ||
<div class="pdf-viewer-pagination-area pagination__area flex-row align-center justify-center"> | ||
<div class="pdf-viewer-pagination-area-file-control-left file-controls left" ng-click="vm.previousPage()"><i class="left"></i></div> | ||
<div class="pdf-viewer-pagination-area-pagination"> | ||
<input class="pdf-viewer-pagination-area-pagination-input" type="text" ng-model="vm.pageIndex" ng-change="vm.openPage()"/> | ||
<span class="pdf-viewer-pagination-area-pagination-numPage">/ [[vm.numPages]]</span> | ||
<div class="pdf-viewer-header"> | ||
<div class="pdf-viewer-header-title"> | ||
[[vm.title]] | ||
</div> | ||
<div class="pdf-viewer-header-pagination-area pagination__area flex-row align-center justify-center"> | ||
<div class="pdf-viewer-header-pagination-area-file-control-left file-controls left" ng-click="vm.previousPage()"><i class="left"></i></div> | ||
<div class="pdf-viewer-header-pagination-area-pagination"> | ||
<input class="pdf-viewer-header-pagination-area-pagination-input" type="text" ng-model="vm.pageIndex" ng-change="vm.openPage()"/> | ||
<span class="pdf-viewer-header-pagination-area-pagination-numPage">/ [[vm.numPages]]</span> | ||
</div> | ||
<div class="pdf-viewer-header-pagination-area-file-controls right" ng-click="vm.nextPage()"><i class="right"></i></div> | ||
</div> | ||
<div class="pdf-viewer-pagination-area-file-controls right" ng-click="vm.nextPage()"><i class="right"></i></div> | ||
</div> | ||
|
||
|
||
<p ng-if="vm.loading" class="pdf-viewer-loading-area top-spacing-four flex-row align-start justify-center centered-text"> | ||
<i18n>magneto.loading</i18n> <i class="loading"></i></p> | ||
</div> | ||
</div> |