1. pages.component: Reinitialize keyword in search form when changing page type.

2. communities.component & divIds.component & div-help-contents.component & entities.component & page-help-contents.component & pages.component:
	Bug fix: Change search forms to search on 'search' button click or enter. 


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@53984 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2018-11-27 12:28:20 +00:00
parent fbdf078a23
commit 7081b6c914
12 changed files with 58 additions and 13 deletions

View File

@ -6,8 +6,14 @@
{{updateErrorMessage}} {{updateErrorMessage}}
</div> </div>
<form target="BSFormPanel_Admin_1" class="search"> <form target="BSFormPanel_Admin_1" class="search">
<input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Community name..." type="text" class="uk-input uk-width-medium"/> <!-- <input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Community name..." type="text" class="uk-input uk-width-medium"/>
<button class="uk-button" type="submit">Search</button> <button class="uk-button" type="submit">Search</button> -->
<input type="text" class="uk-input uk-width-medium" placeholder="Community name..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
<button (click)="filterBySearch(keyword)" type="submit" class=" uk-button">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</span>Search
</button>
</form> </form>
<!-- <a (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Community </a> --> <!-- <a (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Community </a> -->
</div> </div>

View File

@ -47,6 +47,8 @@ export class CommunitiesComponent implements OnInit {
public formGroup : FormGroup; public formGroup : FormGroup;
private searchText : RegExp = new RegExp(''); private searchText : RegExp = new RegExp('');
public keyword: string = "";
public properties:EnvProperties = null; public properties:EnvProperties = null;
public showLoading: boolean = true; public showLoading: boolean = true;

View File

@ -6,8 +6,14 @@
{{updateErrorMessage}} {{updateErrorMessage}}
</div> </div>
<form target="BSFormPanel_Admin_1" class="search"> <form target="BSFormPanel_Admin_1" class="search">
<input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Class name..." type="text" class="uk-input uk-width-medium"/> <!-- <input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Class name..." type="text" class="uk-input uk-width-medium"/>
<button class="uk-button" type="submit">Search</button> <button class="uk-button" type="submit">Search</button> -->
<input type="text" class="uk-input uk-width-medium" placeholder="Class name..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
<button (click)="filterBySearch(keyword)" type="submit" class=" uk-button">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</span>Search
</button>
</form> </form>
<!-- <a (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Class </a> --> <!-- <a (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Class </a> -->
</div> </div>

View File

@ -46,6 +46,7 @@ export class DivIdsComponent implements OnInit {
public formGroup : FormGroup; public formGroup : FormGroup;
private searchText : RegExp = new RegExp(''); private searchText : RegExp = new RegExp('');
public keyword: string = "";
public pages: Page[] = []; public pages: Page[] = [];
public properties:EnvProperties = null; public properties:EnvProperties = null;

View File

@ -30,8 +30,14 @@
<!-- <a *ngIf="selectedPageId" [queryParams]="{communityId: selectedCommunityPid, pageId: selectedPageId}" routerLink="/classContents/new" class="uk-button uk-button-primary uk-float-right"><i></i> New class help text </a> --> <!-- <a *ngIf="selectedPageId" [queryParams]="{communityId: selectedCommunityPid, pageId: selectedPageId}" routerLink="/classContents/new" class="uk-button uk-button-primary uk-float-right"><i></i> New class help text </a> -->
<div class="uk-grid uk-margin-bottom"> <div class="uk-grid uk-margin-bottom">
<form target="BSFormPanel_Admin_1" class="search"> <form target="BSFormPanel_Admin_1" class="search">
<input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Class Help text..." type="text" class="uk-input uk-width-medium"/> <!-- <input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Class Help text..." type="text" class="uk-input uk-width-medium"/>
<button class="uk-button" type="submit">Search</button> <button class="uk-button" type="submit">Search</button> -->
<input type="text" class="uk-input uk-width-medium" placeholder="Class Help text..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
<button (click)="filterBySearch(keyword)" type="submit" class=" uk-button">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</span>Search
</button>
</form> </form>
<div *ngIf="!selectedPageId" class="filters marginBottom20"> <div *ngIf="!selectedPageId" class="filters marginBottom20">
<div class="links form-group form-inline"> <div class="links form-group form-inline">
@ -67,7 +73,7 @@
<div class="uk-alert uk-alert-primary uk-margin-top-large"> <div class="uk-alert uk-alert-primary uk-margin-top-large">
<span class="uk-margin-small-right uk-icon" uk-icon="info"></span> <span class="uk-margin-small-right uk-icon" uk-icon="info"></span>
Enable or disable help text to show or hide it from the dashboard Enable or disable help text to show or hide it from the dashboard
</div> </div>
<ul uk-tab class="links"> <ul uk-tab class="links">

View File

@ -37,6 +37,7 @@ export class DivHelpContentsComponent implements OnInit {
public checkboxAll : boolean = false; public checkboxAll : boolean = false;
public filters : DivHelpContentFilterOptions = {id : '', active : null, text : new RegExp('')}; public filters : DivHelpContentFilterOptions = {id : '', active : null, text : new RegExp('')};
public keyword: string = "";
public counter = {all : 0, active : 0, inactive : 0}; public counter = {all : 0, active : 0, inactive : 0};

View File

@ -25,8 +25,14 @@
</div> </div>
<!-- <a (click)="showModal()" *ngIf="isPortalAdministrator" class="uk-button uk-button-primary uk-float-right"><i></i> New Entity </a> --> <!-- <a (click)="showModal()" *ngIf="isPortalAdministrator" class="uk-button uk-button-primary uk-float-right"><i></i> New Entity </a> -->
<form target="BSFormPanel_Admin_1" class="search"> <form target="BSFormPanel_Admin_1" class="search">
<input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Entity name..." type="text" class="uk-input uk-width-medium"/> <!-- <input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Entity name..." type="text" class="uk-input uk-width-medium"/>
<button class="uk-button" type="submit">Search</button> <button class="uk-button" type="submit">Search</button> -->
<input type="text" class="uk-input uk-width-medium" placeholder="Entity name..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
<button (click)="filterBySearch(keyword)" type="submit" class=" uk-button">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</span>Search
</button>
</form> </form>
</div> </div>

View File

@ -39,6 +39,7 @@ export class EntitiesComponent implements OnInit {
public formGroup : FormGroup; public formGroup : FormGroup;
private searchText : RegExp = new RegExp(''); private searchText : RegExp = new RegExp('');
public keyword: string = "";
public communities: Community[] = []; public communities: Community[] = [];
public selectedCommunityPid: string; public selectedCommunityPid: string;

View File

@ -28,8 +28,14 @@
</div> </div>
<div class="uk-grid uk-margin-bottom"> <div class="uk-grid uk-margin-bottom">
<form target="BSFormPanel_Admin_1" class="search"> <form target="BSFormPanel_Admin_1" class="search">
<input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Page Help Text..." type="text" class="uk-input uk-width-medium"/> <!-- <input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Page Help Text..." type="text" class="uk-input uk-width-medium"/>
<button class="uk-button" type="submit">Search</button> <button class="uk-button" type="submit">Search</button> -->
<input type="text" class="uk-input uk-width-medium" placeholder="Page name..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
<button (click)="filterBySearch(keyword)" type="submit" class=" uk-button">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</span>Search
</button>
</form> </form>
<div *ngIf="!selectedPageId" class="filters marginBottom20"> <div *ngIf="!selectedPageId" class="filters marginBottom20">
<div class="links form-group form-inline"> <div class="links form-group form-inline">

View File

@ -50,6 +50,7 @@ export class PageHelpContentsComponent implements OnInit {
public checkboxAll : boolean = false; public checkboxAll : boolean = false;
public filters : PageHelpContentFilterOptions = {id : '', active : null, text : new RegExp('')}; public filters : PageHelpContentFilterOptions = {id : '', active : null, text : new RegExp('')};
public keyword: string = "";
public counter = {all : 0, active : 0, inactive : 0}; public counter = {all : 0, active : 0, inactive : 0};

View File

@ -24,8 +24,14 @@
</div> </div>
<!-- <a *ngIf="isPortalAdministrator" (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Page </a> --> <!-- <a *ngIf="isPortalAdministrator" (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Page </a> -->
<form target="BSFormPanel_Admin_1" class="search"> <form target="BSFormPanel_Admin_1" class="search">
<input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Page name..." type="text" class="uk-input uk-width-medium"/> <!-- <input [(ngModel)]="inputstring" (keyup.enter)="filterBySearch(inputstring)" placeholder="Page name..." type="text" name="searchForm" class="uk-input uk-width-medium"/>
<button class="uk-button" type="submit">Search</button> <button class="uk-button" type="submit">Search</button> -->
<input type="text" class="uk-input uk-width-medium" placeholder="Page name..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
<button (click)="filterBySearch(keyword)" type="submit" class=" uk-button">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</span>Search
</button>
</form> </form>
</div> </div>

View File

@ -49,6 +49,7 @@ export class PagesComponent implements OnInit {
public formGroup : FormGroup; public formGroup : FormGroup;
private searchText : RegExp = new RegExp(''); private searchText : RegExp = new RegExp('');
public keyword: string = "";
public communities: Community[] = []; public communities: Community[] = [];
@ -75,6 +76,8 @@ export class PagesComponent implements OnInit {
this.pagesType = params['type']; this.pagesType = params['type'];
} }
this.keyword = "";
this.selectedCommunityPid = params['communityId']; this.selectedCommunityPid = params['communityId'];
this.applyCommunityFilter(this.selectedCommunityPid); this.applyCommunityFilter(this.selectedCommunityPid);
this.isPortalAdministrator = Session.isPortalAdministrator(); this.isPortalAdministrator = Session.isPortalAdministrator();