Keyword search in datatable of dataproviders NOT case sensitive | icons added in links for search view / table view of dataproviders
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47621 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
983c2e324d
commit
f960fa8970
|
@ -59,7 +59,10 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</span>
|
||||
</p-->
|
||||
<p *ngIf="tableViewLink" class="uk-text-right">
|
||||
<a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >Show results in table view</a>
|
||||
<a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >
|
||||
<span uk-icon="icon: table"></span>
|
||||
Show results in table view
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<search-result *ngIf="!tableView"
|
||||
|
|
|
@ -69,7 +69,10 @@ import {ContentProvidersDatatablePipe} from '../../utils/pipes/contentProvidersD
|
|||
</td></tr-->
|
||||
<tr *ngIf="searchViewLink"><td colspan="5" class="uk-padding-remove-top uk-padding-remove-right uk-text-right">
|
||||
<p>
|
||||
<a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >Show results in default view</a>
|
||||
<a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >
|
||||
<span uk-icon="icon: search"></span>
|
||||
Show results in search view
|
||||
</a>
|
||||
</p>
|
||||
</td></tr>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ export class ContentProvidersDatatablePipe implements PipeTransform {
|
|||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
searchUtils.status = errorCodes.LOADING;
|
||||
|
||||
var result = array.filter(row=>this.filterAll(row, searchUtils.keyword, filters));
|
||||
var result = array.filter(row=>this.filterAll(row, searchUtils.keyword.toLowerCase(), filters));
|
||||
|
||||
searchUtils.totalResults = result.length;
|
||||
|
||||
|
@ -35,25 +35,25 @@ export class ContentProvidersDatatablePipe implements PipeTransform {
|
|||
let returnValue: boolean = false;
|
||||
|
||||
if(query) {
|
||||
if(row.title.name.indexOf(query) > -1) {
|
||||
if(row.title.name.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
}
|
||||
|
||||
if(row.type.indexOf(query) > -1) {
|
||||
if(row.type.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
}
|
||||
|
||||
if(row.countries.indexOf(query) > -1) {
|
||||
if(row.countries.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
}
|
||||
|
||||
if(row.compatibility.indexOf(query) > -1) {
|
||||
if(row.compatibility.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
}
|
||||
|
||||
if(row.organizations > 0) {
|
||||
for(let organization of row.organizations) {
|
||||
if(row.organization.indexOf(query) > -1) {
|
||||
if(row.organization.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue