Project

General

Profile

« Previous | Next » 

Revision 48790

Variables and functions in components of landing pages are set correctly to private or public (those which are used in templates are public) | Project landing: links to advanced search in tabs fixed | Landing Pages: responsive tabs: some spaces added for button in small view - sizes changed for views

View differences:

organization.component.ts
26 26
})
27 27

  
28 28
export class OrganizationComponent {
29
    public organizationInfo: OrganizationInfo;
30
    public organizationId: string;
29 31

  
30
    organizationInfo: OrganizationInfo;
31
    //private metrics: string;
32
    private organizationId: string;
33
    private projectsNum: number = 0;
34
    private fundersSet: Set<string>;
35
    private emptyFundersSet: boolean = true;
32
    // Message variables
36 33
    public warningMessage = "";
37 34
    public errorMessage = "";
38 35
    public showLoading: boolean = true;
39 36

  
37
    // CSV variables
40 38
    public downloadURLAPI: string;
41 39
    public csvProjectParamsHead: string;
42 40
    public csvPublicationParamsHead: string;
43 41
    public csvParamsTail: string;
44 42

  
45
    sub: any;
46
    piwiksub: any;
47

  
43
    // Active tab variable for responsiveness
48 44
    public activeTab: string = "Publications";
49
    public reloadDataproviders: boolean = true;
50
    public projectsClicked: boolean = false;
51 45

  
46
    // Variables for publications, projects, dataproviders tabs
52 47
    public fetchPublications: FetchPublications;
53 48
    public linkToSearchPublications: string = "";
54 49
    public fetchProjects: FetchProjects;
55 50
    public fetchDataproviders : FetchDataproviders;
56 51
    public linkToSearchDataproviders:string = "";
52
    //public projectFunders:string[] = [];
53

  
54
    // Variables for projects query (query results only if projects tab is clicked)
55
    public projectsClicked: boolean = false;
57 56
    @ViewChild (SearchingProjectsTabComponent) searchingProjectsTabComponent : SearchingProjectsTabComponent ;
58
    public projectFunders:string[] = [];
59 57

  
60
    public routerHelper:RouterHelper = new RouterHelper();
61

  
62 58
    @ViewChild (ModalLoading) loading : ModalLoading ;
59
    // Alert box when CSV: Project Publications for a funder is requested
63 60
    @ViewChild('AlertModalApplyAll') alertApplyAll;
61
    // Alert box when something is wrong with CSV requests
64 62
    @ViewChild('AlertModalCsvError') alertCsvError;
65 63

  
66
    public funder: string;
67
    public funderId: string;
68
    public count: number;
69

  
64
    public routerHelper:RouterHelper = new RouterHelper();
70 65
    public errorCodes:ErrorCodes = new ErrorCodes();
71 66

  
67
    //private projectsNum: number = 0;
68
    //private fundersSet: Set<string>;
69
    //private emptyFundersSet: boolean = true;
70

  
71
    // Request results for content providers only the one time (first time tab is clicked)
72
    private reloadDataproviders: boolean = true;
73

  
74
    // Helper variables to specify funder in downloadPublicationsFile function
75
    private funder: string;
76
    private funderId: string;
77
    private funderCountPublications: number;
78
    sub: any;
79
    piwiksub: any;
80

  
72 81
    constructor (private element: ElementRef,
73 82
                 private _organizationService: OrganizationService,
74 83
                 private _piwikService:PiwikService,
......
120 129
    ngOnDestroy() {
121 130
      this.sub.unsubscribe();
122 131
      if(this.piwiksub){
123
  this.piwiksub.unsubscribe();
124
}
132
        this.piwiksub.unsubscribe();
133
      }
125 134
    }
126 135

  
127 136
    private getOrganizationInfo ()  {
......
186 195
       );
187 196
    }
188 197
*/
198
/*
189 199
    private handleClick(funder: string) {
190 200
         if(this.emptyFundersSet) {
191 201
             this.fundersSet.clear();
......
207 217
             console.info(funder+" funder added");
208 218
         }
209 219
     }
210

  
220
*/
211 221
     //private getProjectsData(key: string): any {
212 222
         //return this.projectsData;
213 223
     //}
......
234 244
       }
235 245
     }
236 246

  
237
     private searchDataprovidersInit() {
247
     public searchDataprovidersInit() {
238 248
         if(this.reloadDataproviders && this.fetchDataproviders.searchUtils.totalResults > 0) {
239 249
             this.searchDataproviders();
240 250
         }
241 251
     }
242 252

  
243
     downloadFile(url:string){
253
     public downloadFile(url:string){
244 254
       console.log("Downloading file: "+ url);
245 255

  
246 256
       this.openLoading();
......
262 272
           () => console.log('Completed file download.'));
263 273
     }
264 274

  
265
     downloadPublicationsFile(funder: string, funderId:string, count:number){
275
     private downloadPublicationsFile(funder: string, funderId:string, count:number){
266 276
       console.log("Downloading publications file");
267 277

  
268 278
       this.openLoading();
......
382 392
      //           error => console.log("Error getting number of publications for project."));
383 393
        // }//);
384 394
    }
385
    updateDescription(description:string){
395

  
396
    private updateDescription(description:string){
386 397
      this._meta.updateMeta("description", description);
387 398
      this._meta.updateProperty("og:description", description);
388 399
    }
389
    updateTitle(title:string){
400
    private updateTitle(title:string){
390 401
      var _prefix ="OpenAIRE | ";
391 402
      var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
392 403
      this._meta.setTitle(_title );
393 404
      this._meta.updateProperty("og:title",_title);
394 405
    }
395
    updateUrl(url:string){
406
    private updateUrl(url:string){
396 407
      this._meta.updateProperty("og:url", url);
397 408
    }
398 409

  
399
    public openLoading(){
410
    private openLoading(){
400 411
      if(this.loading){
401 412
        this.loading.open();
402 413
      }
403 414
    }
404
    public closeLoading(){
415
    private closeLoading(){
405 416
      if(this.loading){
406 417
        this.loading.close();
407 418
      }
408 419
    }
409
    public setMessageLoading(message: string){
420
    private setMessageLoading(message: string){
410 421
      if(this.loading){
411 422
        this.loading.message = message;
412 423
      }
413 424
    }
414 425

  
415
    confirmOpenApplyAll(funder: string, funderId:string, count:number){
426
    public confirmOpenApplyAll(funder: string, funderId:string, funderCountPublications:number){
416 427
      this.alertApplyAll.cancelButton = true;
417 428
      this.alertApplyAll.okButton = true;
418 429
      this.alertApplyAll.alertTitle = "CSV FILE";
......
423 434

  
424 435
      this.funder = funder;
425 436
      this.funderId = funderId;
426
      this.count = count;
437
      this.funderCountPublications = funderCountPublications;
427 438
    }
428
    confirmCloseApplyAll(data){
429
         this.downloadPublicationsFile(this.funder, this.funderId, this.count);
439
    public confirmCloseApplyAll(data){
440
         this.downloadPublicationsFile(this.funder, this.funderId, this.funderCountPublications);
430 441
    }
431 442

  
432
    confirmOpenCsvError(){
443
    public confirmOpenCsvError(){
433 444
      this.alertCsvError.cancelButton = false;
434 445
      this.alertCsvError.okButton = true;
435 446
      this.alertCsvError.alertTitle = "ERROR DOWNLOADING CSV FILE";

Also available in: Unified diff