Skip to content
Snippets Groups Projects
Verified Commit 9c904ae4 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #11292 TIME 0:15 add automplete size mode small

parent 95e4bed4
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
<i class="fa fa-folder"></i>&nbsp;{{lang.folders}} <i class="fa fa-folder"></i>&nbsp;{{lang.folders}}
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<plugin-autocomplete [labelPlaceholder]="lang.search" [labelList]="lang.search" [routeDatas]="['/rest/folders']" [targetSearchKey]="'label'"></plugin-autocomplete> <plugin-autocomplete [size]="'small'" [labelPlaceholder]="lang.searchFolder" [labelList]="lang.searchFolder" [routeDatas]="['/rest/autocomplete/folders']" [targetSearchKey]="'idToDisplay'"></plugin-autocomplete>
<folder-tree #folderTree [selectedId]="id" (refreshDocList)="refreshDocList()"></folder-tree> <folder-tree #folderTree [selectedId]="id" (refreshDocList)="refreshDocList()"></folder-tree>
</mat-expansion-panel> </mat-expansion-panel>
<div class="panelHeader"> <div class="panelHeader">
<div class="panelHeader-logo"> <div class="panelHeader-logo">
<a href="#" title="{{lang.home}}" *ngIf="!appService.getViewMode()" style="margin-right: 30px;"> <a href="#" title="{{lang.home}}" style="margin-right: 30px;">
<mat-icon class="maarchLogo" svgIcon="maarchLogoFull"></mat-icon> <mat-icon class="maarchLogo" svgIcon="maarchLogoFull"></mat-icon>
</a> </a>
</div> </div>
......
<mat-nav-list style="position:relative;"> <mat-nav-list style="position:relative;">
<ng-container *ngIf="appService.getViewMode()"> <!--<ng-container *ngIf="appService.getViewMode()">
<canvas class="header-bg" style="margin-top:-8px;background-image: url('static.php?filename=login-banner.jpg');background-size:cover;border-bottom: solid 1px white;width: 100%;height: 70px;"></canvas> <canvas class="header-bg" style="margin-top:-8px;background-image: url('static.php?filename=login-banner.jpg');background-size:cover;border-bottom: solid 1px white;width: 100%;height: 70px;"></canvas>
<i title="{{lang.myProfileAccess}}" routerLink="/profile" style="cursor:pointer;z-index:1;color:white;position: absolute;left: 50%;top: 17px;background-image: url('static.php?filename=logo_only.svg');width: 70px;height: 70px;background-size: cover;background-position: top center;border-radius: 50%;border: solid white;background-color:white;transform: translateX(-50%);"></i> <i title="{{lang.myProfileAccess}}" routerLink="/profile" style="cursor:pointer;z-index:1;color:white;position: absolute;left: 50%;top: 17px;background-image: url('static.php?filename=logo_only.svg');width: 70px;height: 70px;background-size: cover;background-position: top center;border-radius: 50%;border: solid white;background-color:white;transform: translateX(-50%);"></i>
<mat-expansion-panel> <mat-expansion-panel>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>
</mat-expansion-panel> </mat-expansion-panel>
</ng-container> </ng-container>-->
</mat-nav-list> </mat-nav-list>
<mat-nav-list> <mat-nav-list>
<h3 mat-subheader>{{lang.shortcut}}</h3> <h3 mat-subheader>{{lang.shortcut}}</h3>
...@@ -57,12 +57,12 @@ ...@@ -57,12 +57,12 @@
</ng-container> </ng-container>
</div> </div>
</mat-nav-list> </mat-nav-list>
<mat-nav-list *ngIf="appService.getViewMode()"> <!--<mat-nav-list *ngIf="appService.getViewMode()">
<a mat-list-item href="index.php?display=true&page=logout&logout=true"> <a mat-list-item href="index.php?display=true&page=logout&logout=true">
<mat-icon color="warn" mat-list-icon class="fa fa-sign-out-alt"></mat-icon> <mat-icon color="warn" mat-list-icon class="fa fa-sign-out-alt"></mat-icon>
<p mat-line> <p mat-line>
{{lang.logout}} {{lang.logout}}
</p> </p>
</a> </a>
</mat-nav-list> </mat-nav-list>-->
<mat-divider></mat-divider> <mat-divider></mat-divider>
\ No newline at end of file
<form> <form>
<mat-form-field [appearance]="singleMode !== undefined ? 'standard' : 'outline'"> <mat-form-field [class.smallInput]="size === 'small'" [appearance]="singleMode !== undefined ? 'standard' : 'outline'">
<mat-label *ngIf="singleMode !== undefined">{{placeholder}}</mat-label> <mat-label *ngIf="singleMode !== undefined">{{placeholder}}</mat-label>
<mat-icon color="primary" class="fa fa-search" matPrefix></mat-icon> <mat-icon *ngIf="size === 'default'" color="primary" class="fa fa-search" matPrefix></mat-icon>
<input type="text" #autoCompleteInput [placeholder]="singleMode !== undefined ? '' : placeholder" aria-label="Number" matInput [formControl]="myControl" <input type="text" #autoCompleteInput [placeholder]="singleMode !== undefined ? '' : placeholder" aria-label="Number" matInput [formControl]="myControl"
[matAutocomplete]="auto" (click)="$event.stopPropagation()" (focus)="resetAutocomplete()" [required]="required"> [matAutocomplete]="auto" (click)="$event.stopPropagation()" (focus)="resetAutocomplete()" [required]="required">
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selectOpt($event)"> <mat-autocomplete #auto="matAutocomplete" (optionSelected)="selectOpt($event)">
......
...@@ -24,4 +24,13 @@ ...@@ -24,4 +24,13 @@
width: 20px; width: 20px;
display: flex; display: flex;
align-items: center; align-items: center;
}
.smallInput {
padding-left: 20px;
padding-right: 20px;
::ng-deep.mat-form-field-infix {
padding : 0px;
padding-bottom: 5px;
}
} }
\ No newline at end of file
...@@ -24,6 +24,7 @@ export class PluginAutocomplete implements OnInit { ...@@ -24,6 +24,7 @@ export class PluginAutocomplete implements OnInit {
entity : 'fa-sitemap' entity : 'fa-sitemap'
} }
@Input('size') size: string;
@Input('singleMode') singleMode: boolean; @Input('singleMode') singleMode: boolean;
@Input('required') required: boolean; @Input('required') required: boolean;
@Input('datas') options: any; @Input('datas') options: any;
...@@ -46,6 +47,7 @@ export class PluginAutocomplete implements OnInit { ...@@ -46,6 +47,7 @@ export class PluginAutocomplete implements OnInit {
ngOnInit() { ngOnInit() {
this.optGroupLabel = this.optGroupLabel === undefined ? this.lang.availableValues : this.optGroupLabel; this.optGroupLabel = this.optGroupLabel === undefined ? this.lang.availableValues : this.optGroupLabel;
this.placeholder = this.placeholder === undefined ? this.lang.chooseValue : this.placeholder; this.placeholder = this.placeholder === undefined ? this.lang.chooseValue : this.placeholder;
this.size = this.size === undefined ? 'default' : 'small';
if (this.routeDatas !== undefined) { if (this.routeDatas !== undefined) {
this.initAutocompleteRoute(); this.initAutocompleteRoute();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment