Verified Commit 9c904ae4 authored by Alex ORLUC's avatar Alex ORLUC

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

parent 95e4bed4
......@@ -4,6 +4,6 @@
<i class="fa fa-folder"></i>&nbsp;{{lang.folders}}
</mat-panel-title>
</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>
</mat-expansion-panel>
<div class="panelHeader">
<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>
</a>
</div>
......
<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>
<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>
......@@ -25,7 +25,7 @@
</mat-list-item>
</mat-list>
</mat-expansion-panel>
</ng-container>
</ng-container>-->
</mat-nav-list>
<mat-nav-list>
<h3 mat-subheader>{{lang.shortcut}}</h3>
......@@ -57,12 +57,12 @@
</ng-container>
</div>
</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">
<mat-icon color="warn" mat-list-icon class="fa fa-sign-out-alt"></mat-icon>
<p mat-line>
{{lang.logout}}
</p>
</a>
</mat-nav-list>
</mat-nav-list>-->
<mat-divider></mat-divider>
\ No newline at end of file
<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-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"
[matAutocomplete]="auto" (click)="$event.stopPropagation()" (focus)="resetAutocomplete()" [required]="required">
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selectOpt($event)">
......
......@@ -24,4 +24,13 @@
width: 20px;
display: flex;
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 {
entity : 'fa-sitemap'
}
@Input('size') size: string;
@Input('singleMode') singleMode: boolean;
@Input('required') required: boolean;
@Input('datas') options: any;
......@@ -46,6 +47,7 @@ export class PluginAutocomplete implements OnInit {
ngOnInit() {
this.optGroupLabel = this.optGroupLabel === undefined ? this.lang.availableValues : this.optGroupLabel;
this.placeholder = this.placeholder === undefined ? this.lang.chooseValue : this.placeholder;
this.size = this.size === undefined ? 'default' : 'small';
if (this.routeDatas !== undefined) {
this.initAutocompleteRoute();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment