diff --git a/src/frontend/app/indexation/indexing-form/indexing-form.component.scss b/src/frontend/app/indexation/indexing-form/indexing-form.component.scss index 209cc413878bfd8548c53d1bc3fe0d33fc1af49c..71b5477295c32a77056b739f397cc8ef029432d2 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.scss +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.scss @@ -146,7 +146,7 @@ ::ng-deep.mat-form-field-flex { background: white; height: 40px; - border-radius: 15px; + border-radius: 10px; border: solid 1px $primary; } diff --git a/src/frontend/app/viewer/document-viewer.component.html b/src/frontend/app/viewer/document-viewer.component.html index 435b7a7769526e098d79fecb0e6308baa1f4dbb4..7dbbf2052f8d70ea0227549a4cb531167257d99a 100644 --- a/src/frontend/app/viewer/document-viewer.component.html +++ b/src/frontend/app/viewer/document-viewer.component.html @@ -27,11 +27,12 @@ <i class="fa fa-file-upload upload-icon"></i><br /> {{lang.dragAndDrop}}<br />{{lang.or}} <div style="display: flex;"> - <div style="margin-right:20px;align-items: center;justify-content: center;text-align: center;display: flex;"> + <div + style="margin-right:20px;align-items: center;justify-content: center;text-align: center;display: flex;"> <plugin-select-search #templateList *ngIf="listTemplates.length > 0" [label]="lang.chooseModel" [placeholderLabel]="lang.chooseModel" [datas]="listTemplates" [class]="'input-form-filled'" - [formControlSelect]="templateListForm" - (afterSelected)="editTemplate($event)" style="width: 240px;text-align: left;font-weight:normal;font-size: 13px;"> + [formControlSelect]="templateListForm" (afterSelected)="editTemplate($event)" + style="width: 240px;text-align: left;font-weight:normal;font-size: 13px;"> </plugin-select-search> </div> <button mat-button (click)="docToUpload.click()" class="button-form-primary-alt" @@ -39,31 +40,39 @@ </div> </div> <input type="file" #docToUpload name="files[]" (change)="uploadTrigger($event)" style="display:none;"> - <div style="display: block;width:100%;" appUploadFileDragDrop (onFileDropped)="dndUploadFile($event)" [disabled]="!editMode"> + <div style="display: block;width:100%;" appUploadFileDragDrop (onFileDropped)="dndUploadFile($event)" + [disabled]="!editMode"> <div *ngIf="!loading && file.content !== null" class="viewer-tools"> - <button *ngIf="infoPanel !== null" mat-icon-button (click)="infoPanel.toggle()" - [matTooltip]="lang.informations"> - <mat-icon class="fa fa-info-circle"></mat-icon> - </button> - <button *ngIf="editMode" mat-icon-button (click)="docToUpload.click()" - [matTooltip]="lang.uploadAnOtherFile"> - <mat-icon class="fa fa-file-upload"></mat-icon> - </button> <button mat-icon-button (click)="downloadOriginalFile()" [matTooltip]="lang.downloadOriginalFile"> <mat-icon class="fa fa-download"></mat-icon> </button> - <button *ngIf="file.contentView !== undefined" mat-icon-button (click)="openPdfInTab()" matTooltip="Ouvrir dans un nouvel onglet"> - <mat-icon class="fas fa-external-link-alt"></mat-icon> - </button> - <button *ngIf="editMode" mat-icon-button (click)="cleanFile()" [matTooltip]="lang.removeFile"> - <mat-icon class="fa fa-trash" color="warn"></mat-icon> - </button> <button *ngIf="editMode && mode === 'attachment' && resId !== null" mat-icon-button (click)="editAttachment()" [matTooltip]="lang.editDocument"> <mat-icon class="fa fa-edit"></mat-icon> </button> + <button mat-icon-button [matMenuTriggerFor]="menuOptions"> + <mat-icon class="fas fa-chevron-down"></mat-icon> + </button> + <mat-menu #menuOptions="matMenu" [class]="'optionsListMenu'"> + <button mat-menu-item *ngIf="file.contentView !== undefined" (click)="openPdfInTab()"> + <mat-icon color="primary" class="fas fa-external-link-alt"></mat-icon> + <span>Ouvrir dans un nouvel onglet</span> + </button> + <button mat-menu-item *ngIf="editMode" (click)="docToUpload.click()"> + <mat-icon color="primary" class="fa fa-file-upload"></mat-icon> + <span>{{lang.uploadAnOtherFile}}</span> + </button> + <button mat-menu-item *ngIf="editMode" (click)="cleanFile()"> + <mat-icon class="fa fa-trash" color="warn"></mat-icon> + <span>{{lang.removeFile}}</span> + </button> + </mat-menu> + </div> + <div> + <pdf-viewer *ngIf="file.src!==null" [src]="file.src" [render-text]="true" [autoresize]="true" + [original-size]="false" [show-all]="true" (error)="onError($event)" style="width:100%;"> + </pdf-viewer> </div> - <pdf-viewer *ngIf="file.src!==null" [src]="file.src" [render-text]="true" [autoresize]="true" - [original-size]="false" [show-all]="true" (error)="onError($event)" style="width:100%;"></pdf-viewer> + </div> <div *ngIf="file.content !== null && noConvertedFound" class="no-doc-container" appUploadFileDragDrop (onFileDropped)="dndUploadFile($event)" [disabled]="!editMode"> diff --git a/src/frontend/app/viewer/document-viewer.component.scss b/src/frontend/app/viewer/document-viewer.component.scss index e99c960e30e8483b706f67b09ca57271eb996c18..e7f880b9785ee695c694114ae21d133a571bd7db 100644 --- a/src/frontend/app/viewer/document-viewer.component.scss +++ b/src/frontend/app/viewer/document-viewer.component.scss @@ -29,38 +29,47 @@ .viewer-tools { position: fixed; - margin-top: 20px; + margin-top: 5px; z-index: 1; background: $primary; - margin-left: 20px; + margin-left: 5px; border-radius: 10px; - opacity: 0.5; + //opacity: 0.5; + color: white; + display: flex; + align-items: left; transition: all 0.5s; - .mat-icon-button { - height: 50px; - width: 50px; - .mat-icon { - color: white; - font-size: 20px; - transition: all 0.2s; - } + .mat-button { + font-size: 10px; } } -.viewer-tools:hover { - opacity: 1; - transition: all 0.5s; +::ng-deep.optionsListMenu { + min-height: auto; + .mat-menu-content { + font-size: 13px; + padding-top: 0; + padding-bottom: 0; + } - .mat-icon-button:hover { - .mat-icon { - font-size: 30px; - transition: all 0.2s; - } + .mat-icon { + height: auto; } } +.viewer-tools:hover { + .mat-icon-button:hover { + .mat-icon { + transition: all 0.5s; + border-radius: 5px; + background: rgba(255, 255, 255, 0.2); + } + } + +} + .no-doc-container { width: 100%; height: 100%; @@ -131,6 +140,7 @@ } @-webkit-keyframes bounce { + from, 20%, 53%, @@ -164,6 +174,7 @@ } @keyframes bounce { + from, 20%, 53%, @@ -203,4 +214,4 @@ -webkit-transform-origin: center bottom; transform-origin: center bottom; animation-iteration-count: infinite; -} +} \ No newline at end of file