Project

General

Profile

« Previous | Next » 

Revision 59163

[Trunk | Library]:
1. cache-interceptor.service.ts: Added query for refine projects with hidden filters as cachable (to be removed when bug with hidden filters is solved).
2. searchResearchResults.component.ts & searchProjects.component.ts & searchDataProviders.component.ts & searchOrganizations.component.ts:
a. [Bug fix - r59155] Update checks for refine query - Do not call refine query when page, results per page, sortBy change.
b. Set refineStatus to DONE when no refine query.
c. Set new field "searchPage.hideFilters" to false when results return - used only for 1st load (do not show filters, until results return).
3. newSearchPage.component:
a. Show "Filters" label always.
b. Check if there are filters with method "get existingFiltersWithValues()" instead of "filters.length" (cases where filters > 0, but values = 0).
c. Show filters column when "!hideFilters" and there are filters (refine or selected) or when there are results.
d. Add in url parameters for "page" and "resultsPerPageChanged" even when they are set to default value (need to separate navigation via menu with no params).
4. searchFilter.component.html: Add "<ng-template #input_label>" for checkboxes and radio buttons in filters (used also in view all part).

View differences:

newSearchPage.component.html
83 83
<ng-template #filters_column>
84 84
  <div class="uk-width-1-1 uk-margin-top">
85 85
    <div class="uk-grid uk-flex uk-flex-bottom">
86
      <h5 *ngIf="(selectedRangeFilters+selectedFilters + selectedTypesNum  > 0) || (filters.length > 0 && (results.length > 0 || disableForms))"
87
          class="uk-text-bold">
86
<!--      *ngIf="(selectedRangeFilters+selectedFilters + selectedTypesNum  > 0)
87
|| (filters.length > 0 && (results.length > 0 || disableForms))"-->
88
      <h5 class="uk-text-bold">
88 89
        Filters
89 90
      </h5>
90 91
      <a *ngIf="(selectedRangeFilters+selectedFilters + selectedTypesNum)>1" (click)="clearFilters()"
......
97 98
      <ng-container *ngTemplateOutlet="selected_filters_pills; context: {}"></ng-container>
98 99
    </div>
99 100
  </div>
100
  <div *ngIf="searchUtils.refineStatus == errorCodes.LOADING && filters.length === 0"
101
  <div *ngIf="searchUtils.refineStatus == errorCodes.LOADING && existingFiltersWithValues === 0"
101 102
       class="'uk-animation-fade uk-margin-top  uk-width-1-1" role="alert">
102 103
    <span class="loading-gif  uk-align-center" ></span>
103 104
  </div>
104

  
105
  <div *ngIf="searchUtils.refineStatus == errorCodes.DONE && filters.length === 0 && results.length > 0" class="uk-margin-top">
105
  <div *ngIf="searchUtils.refineStatus != errorCodes.LOADING && existingFiltersWithValues === 0 && results.length > 0" class="uk-margin-top">
106 106
    <span class="uk-text-meta">No filters available</span>
107 107
  </div>
108 108
  <ul *ngIf="!showUnknownFilters"
......
260 260

  
261 261
          </div>
262 262
          <div class="uk-grid helper-grid uk-padding-small uk-padding-remove-vertical uk-margin-large-bottom">
263
<!--            && searchUtils.refineStatus == errorCodes.LOADING-->
264
            <div *ngIf="searchUtils.status == errorCodes.LOADING && filters.length == 0;
265
                        else elseGridBlock"
266
                 class="'uk-animation-fade uk-margin-top  uk-width-1-1" role="alert">
267
              <span class="loading-gif  uk-align-center" ></span>
268
            </div>
269
            <div>
270
              <ng-template #elseGridBlock>
271

  
272
                <div *ngIf="showRefine && !properties.isDashboard" class="uk-width-1-4@m search-filters uk-visible@m">
263
<!--            <div *ngIf="searchUtils.status == errorCodes.LOADING && filters.length == 0;-->
264
<!--                        else elseGridBlock"-->
265
<!--                 class="'uk-animation-fade uk-margin-top  uk-width-1-1" role="alert">-->
266
<!--              <span class="loading-gif  uk-align-center" ></span>-->
267
<!--            </div>-->
268
<!--            <div>-->
269
<!--              <ng-template #elseGridBlock>-->
270
                <div *ngIf="showRefine && !properties.isDashboard
271
                            && (results.length > 0
272
                              || (!hideFilters &&
273
                                (existingFiltersWithValues > 0 || (selectedRangeFilters + selectedFilters + selectedTypesNum) > 0)
274
                              )
275
                            )"
276
                     class="uk-width-1-4@m search-filters uk-visible@m">
273 277
                  <ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
274 278
                </div>
275 279
                <div class="uk-width-expand@m uk-with-1-1@s">
......
381 385
                      Last index information
382 386
                    </a>
383 387
                  </div>
384
              </ng-template>
388
<!--              </ng-template>-->
385 389
            <!--            <div class="uk-visible@m uk-margin-top uk-width-1-5">-->
386 390
            <!--              <search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" ></search-download>-->
387 391
            <!--            </div>-->
388 392
            <!-- <helper *ngIf="searchUtils.totalResults > csvLimit" class="uk-margin-top helper-left-right uk-visible@m" position="right"></helper> -->
389
            </div>
393
<!--            </div>-->
390 394

  
391 395
            <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
392 396
                  [texts]="pageContents['bottom']"></helper>
......
420 424
    </div>
421 425
  </div>
422 426
</div>
427
</div>

Also available in: Unified diff