Skip to content
Snippets Groups Projects
Commit 6c192f46 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13271 TIME 0:10 no auto search in init

parent 41593cb3
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ declare var $: any; ...@@ -37,6 +37,7 @@ declare var $: any;
export class AdvSearchComponent implements OnInit, OnDestroy { export class AdvSearchComponent implements OnInit, OnDestroy {
loading: boolean = false; loading: boolean = false;
initSearch: boolean = false;
docUrl: string = ''; docUrl: string = '';
public innerHtml: SafeHtml; public innerHtml: SafeHtml;
searchUrl: string = '../rest/search'; searchUrl: string = '../rest/search';
...@@ -129,6 +130,7 @@ export class AdvSearchComponent implements OnInit, OnDestroy { ...@@ -129,6 +130,7 @@ export class AdvSearchComponent implements OnInit, OnDestroy {
params => { params => {
if (!this.functions.empty(params.value)) { if (!this.functions.empty(params.value)) {
this.searchTerm = params.value; this.searchTerm = params.value;
this.initSearch = true;
this.criteria = { this.criteria = {
meta : { meta : {
values : this.searchTerm values : this.searchTerm
...@@ -149,8 +151,10 @@ export class AdvSearchComponent implements OnInit, OnDestroy { ...@@ -149,8 +151,10 @@ export class AdvSearchComponent implements OnInit, OnDestroy {
this.headerService.injectInSideBarLeft(this.adminMenuTemplate, this.viewContainerRef, 'adminMenu'); this.headerService.injectInSideBarLeft(this.adminMenuTemplate, this.viewContainerRef, 'adminMenu');
this.headerService.setHeader(this.translate.instant('lang.searchMails'), '', ''); this.headerService.setHeader(this.translate.instant('lang.searchMails'), '', '');
this.initResultList();
if (this.initSearch) {
this.initResultList();
}
/*this.route.params.subscribe(params => { /*this.route.params.subscribe(params => {
this.folderInfoOpened = false; this.folderInfoOpened = false;
this.dragInit = true; this.dragInit = true;
...@@ -202,7 +206,12 @@ export class AdvSearchComponent implements OnInit, OnDestroy { ...@@ -202,7 +206,12 @@ export class AdvSearchComponent implements OnInit, OnDestroy {
launchSearch(criteria: any) { launchSearch(criteria: any) {
this.criteria = criteria; this.criteria = criteria;
this.refreshDao(); if (!this.initSearch) {
this.initResultList();
this.initSearch = true;
} else {
this.refreshDao();
}
} }
initResultList() { initResultList() {
......
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