Project

General

Profile

« Previous | Next » 

Revision 58030

[Library|Trunk]

Advanced Search pages:
remove EventEmitter queryChange
Clean up goTo function
add documentation
remove unused functions/valiables

View differences:

advancedSearchPage.component.ts
59 59
  public errorCodes: ErrorCodes = new ErrorCodes();
60 60

  
61 61
  url = null;
62
  @Output() queryChange = new EventEmitter();
63 62

  
64 63
  constructor(private route: ActivatedRoute,
65 64
              private location: Location,
......
193 192
    }
194 193
  }
195 194

  
195
  /**
196
   * Create Page URL parameters based on the selected fields of the advanced form
197
   * @param includePage
198
   */
196 199
  private createUrlParameters(includePage: boolean) {
197 200
    var params = "";
198 201
    this.parameterNames.splice(0, this.parameterNames.length);
......
248 251
    return '?' + params;
249 252
  }
250 253

  
254
  /**
255
   * Create Search API query based on the selected fields of the advanced form
256
   */
251 257
  public createQueryParameters() {
252 258
    var params = "";
253 259
    var countParams = 0;
......
282 288

  
283 289
  }
284 290

  
285
  clearFilters() {
286
  }
287

  
288 291
  goTo(page: number = 1) {
289 292
    this.searchUtils.page = page;
290
    var urlParameters = this.createUrlParameters(true);
291
    var queryParameters = this.createQueryParameters();
292
    //this.location.go(location.pathname,urlParameters);
293
    this.createUrlParameters(true);
293 294
    this.router.navigate([this.searchUtils.baseUrl], {queryParams: this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues)});
294

  
295
    this.queryChange.emit({
296
      value: queryParameters
297
    });
298 295
    /* Code For Piwik*/
299 296
    if (typeof localStorage !== 'undefined') {
300 297
      //console.log("In PreviousRouteRecorder : "+this.router.url );

Also available in: Unified diff