Project

General

Profile

« Previous | Next » 

Revision 54614

1. Add map url in 'Search Content Providers', 'Search Registries', 'Search Repositories' (Compatible), 'Search Journals' pages.
2. Add tooltips in csv button, table/list view buttons, map button.
3. compatibleDataProvidersTable.component & entityRegistriesTable.component: Add 'Country' filtering in 'Search Registries' and 'Search Repositories' (Compatible) pages.
4. searchHelperClasses.class: Add 'valueIsExact' field in class 'Filter' - so far filter values should be equal to entry of the corresponding column, 'country' needs to be contained.
5. searchPageTableView.component.ts: Bug fix in filtering - when entry's value is too big, do not ignore cut values in filtering.

View differences:

searchPageTableView.component.ts
59 59
  @Input() enableSearchView: boolean = true;
60 60
  @Input() searchFormClass: string = "searchForm";
61 61
  @Input() formPlaceholderText = "Type Keywords...";
62
  @Input() mapUrl: string = "";
63
  @Input() mapTooltipType: string ="content providers";
62 64
  @ViewChild (ModalLoading) loading : ModalLoading ;
63 65
  private searchFieldsHelper:SearchFields = new SearchFields();
64 66
  private queryParameters: Map<string, string>  = new Map<string,string>();
......
125 127
    ngAfterViewInit(): void {
126 128
      try{
127 129
       $.fn['dataTable'].ext.search.push((settings, data, dataIndex) => {
128

  
129
          if (this.filterData(data, this.searchUtils.keyword, this.filters)) {
130
//console.info(dataIndex+": "+data);
131
//console.info(this.results);
132
          //if (this.filterData(this.results[dataIndex], this.searchUtils.keyword, this.filters)) {
133
          if(this.filterAll(this.results[dataIndex], this.searchUtils.keyword.toLowerCase(),this.filters)) {
130 134
            // console.info("filter true (keyword:"+this.searchUtils.keyword+")");
131 135

  
132 136
            return true;
......
358 362
        var result = results.filter(row=>this.filterAll(row, this.searchUtils.keyword.toLowerCase(),this.filters));
359 363

  
360 364
        let oldTotal = this.searchUtils.totalResults;
365
        //console.info(result);
361 366
        this.searchUtils.totalResults = result.length;
362 367

  
363 368
        var errorCodes:ErrorCodes = new ErrorCodes();
364 369
        this.searchUtils.status = errorCodes.DONE;
365 370
        if(this.searchUtils.totalResults == 0 ){
366
          this.searchUtils.status = errorCodes.NONE;
371
          //this.searchUtils.status = errorCodes.NONE;
367 372
        }
368 373

  
369 374
        // if(oldTotal != this.searchUtils.totalResults) {
......
450 455
                field = "compatibility";
451 456
              } else if(filter.title == "Funder") {
452 457
                field = "funder";
458
              } else if(filter.title == "Country") {
459
                field = "countries";
453 460
              }
461
              //console.info(row);
462
console.info("|"+row[field]+"|"+"   "+"|"+value.name+"|");
463
              //if(row[field] == value.name) {
464
              if(row[field] &&
465
                ((filter.valueIsExact && (row[field].trim() == value.name.trim()))
466
                || (!filter.valueIsExact && (row[field].includes(value.name))))){
454 467

  
455
              if(row[field] == value.name) {
456 468
                returnValue = true;
457 469
                if(filter.filterOperator == "or") {
458 470
                  break;
......
518 530
                }
519 531
              }
520 532

  
521
              if(row[field].trim() == value.name.trim()) {
533
              //if(row[field].trim() == value.name.trim()) {
534
              if((filter.valueIsExact && (row[field].trim() == value.name.trim()))
535
                || (!filter.valueIsExact && (row[field].includes(value.name)))){
522 536
                returnValue = true;
523 537
                if(filter.filterOperator == "or") {
524 538
                  break;

Also available in: Unified diff