[Library|Trunk]
Search all bug- freezing form: missing events to update disableForms. update search pages Piwik Service: add check about piwik ID git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60132 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
a130f208a8
commit
0df3f39609
|
@ -463,8 +463,10 @@ export class SearchAllComponent {
|
|||
}
|
||||
|
||||
activeEntityUpdate($event) {
|
||||
this.disableForms = $event.disableForms;
|
||||
let updated = true
|
||||
if($event.searchUtils.status!=this.errorCodes.LOADING) {
|
||||
this.disableForms = $event.disableForms;
|
||||
}
|
||||
let updated = true;
|
||||
if (this.activeEntity == "result") {
|
||||
if($event.searchUtils.status!=this.errorCodes.LOADING) {
|
||||
this.fetchPublications.searchUtils.totalResults = $event.searchUtils.totalResults;
|
||||
|
|
|
@ -181,7 +181,6 @@ export class SearchDataProvidersComponent {
|
|||
let totalResults = data[0];
|
||||
let filters = data[2];
|
||||
this.filtersReturned(refine, filters, totalResults, page);
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils})
|
||||
},
|
||||
err => {
|
||||
this.handleError("Error getting organizations: ", err);
|
||||
|
@ -223,6 +222,8 @@ export class SearchDataProvidersComponent {
|
|||
}
|
||||
|
||||
this.disableRefineForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils})
|
||||
|
||||
}
|
||||
|
||||
public getResults(parameters:string, page: number, size: number, refine: boolean, refineFieldsFilterQuery = null){
|
||||
|
@ -260,7 +261,6 @@ export class SearchDataProvidersComponent {
|
|||
this.filtersReturned(refine, this.filters, totalResults, page);
|
||||
}
|
||||
this.resultsReturned(refine, results, totalResults, page);
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils});
|
||||
},
|
||||
err => {
|
||||
//console.log(err);
|
||||
|
@ -323,6 +323,8 @@ export class SearchDataProvidersComponent {
|
|||
}
|
||||
|
||||
this.disableForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils});
|
||||
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
|
|
|
@ -167,7 +167,6 @@ export class SearchOrganizationsComponent {
|
|||
let totalResults = data[0];
|
||||
let filters = data[2];
|
||||
this.filtersReturned(refine, filters, totalResults, page);
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils})
|
||||
},
|
||||
err => {
|
||||
this.handleError("Error getting organizations: ", err);
|
||||
|
@ -209,6 +208,8 @@ export class SearchOrganizationsComponent {
|
|||
}
|
||||
|
||||
this.disableRefineForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils})
|
||||
|
||||
}
|
||||
|
||||
public getResults(parameters:string, page: number, size: number, refine: boolean, refineFieldsFilterQuery = null){
|
||||
|
@ -241,7 +242,6 @@ export class SearchOrganizationsComponent {
|
|||
let totalResults = data[0];
|
||||
let results = data[1];
|
||||
this.resultsReturned(refine, results, totalResults, page);
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils});
|
||||
},
|
||||
err => {
|
||||
//console.log(err);
|
||||
|
@ -305,6 +305,8 @@ export class SearchOrganizationsComponent {
|
|||
}
|
||||
|
||||
this.disableForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils})
|
||||
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
|
|
|
@ -165,7 +165,7 @@ export class SearchProjectsComponent {
|
|||
let totalResults = data[0];
|
||||
let filters = data[2];
|
||||
this.filtersReturned(refine, filters, totalResults, page);
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils})
|
||||
|
||||
},
|
||||
err => {
|
||||
this.handleError("Error getting projects: ", err);
|
||||
|
@ -209,6 +209,7 @@ export class SearchProjectsComponent {
|
|||
}
|
||||
|
||||
this.disableRefineForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils})
|
||||
}
|
||||
|
||||
public getResults(parameters:string, page: number, size: number, refine: boolean, refineFieldsFilterQuery = null){
|
||||
|
@ -242,7 +243,6 @@ export class SearchProjectsComponent {
|
|||
let totalResults = data[0];
|
||||
let results = data[1];
|
||||
this.resultsReturned(refine, results, totalResults, page);
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils});
|
||||
},
|
||||
err => {
|
||||
//console.log(err);
|
||||
|
@ -306,6 +306,7 @@ export class SearchProjectsComponent {
|
|||
}
|
||||
|
||||
this.disableForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils})
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
|
|
|
@ -345,8 +345,6 @@ export class SearchResearchResultsComponent {
|
|||
// }
|
||||
// this.disableForms = false;
|
||||
this.resultsReturned(refine, results, totalResults, page);
|
||||
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils});
|
||||
},
|
||||
err => {
|
||||
this.handleError("Error getting " + this.getEntityName(this.resultType, true, true), err);
|
||||
|
@ -409,6 +407,7 @@ export class SearchResearchResultsComponent {
|
|||
}
|
||||
|
||||
this.disableForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils});
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Http, Response, Headers, RequestOptions, URLSearchParams} from '@angular/http';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {Observable} from 'rxjs';
|
||||
|
||||
|
||||
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
import {StringUtils} from '../string-utils.class';
|
||||
import {EnvProperties} from '../properties/env-properties';
|
||||
|
@ -13,15 +7,15 @@ import {EnvProperties} from '../properties/env-properties';
|
|||
|
||||
@Injectable()
|
||||
export class PiwikService {
|
||||
private piwikbaseUrl:string = "";
|
||||
constructor(private http: HttpClient, private location: Location ) {}
|
||||
constructor(private http: HttpClient ) {}
|
||||
|
||||
trackView (properties:EnvProperties, title, siteId = null):any {
|
||||
|
||||
var ua = this.getUserAgent();
|
||||
var referrer = this.getReferrer();
|
||||
if(typeof location !== 'undefined'){
|
||||
var url = properties.piwikBaseUrl+((siteId!=null)?siteId:properties.piwikSiteId)+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&action_name="+StringUtils.URIEncode(title)+
|
||||
let ua = this.getUserAgent();
|
||||
let referrer = this.getReferrer();
|
||||
let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId);
|
||||
if(typeof location !== 'undefined' && piwikId){
|
||||
var url = properties.piwikBaseUrl+piwikId+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&action_name="+StringUtils.URIEncode(title)+
|
||||
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+
|
||||
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
|
||||
//console.log("Piwik - View: " + url);
|
||||
|
|
Loading…
Reference in New Issue