diff --git a/dmp-frontend/src/app/app.component.html b/dmp-frontend/src/app/app.component.html index 10d34c8ea..aaac20ed4 100644 --- a/dmp-frontend/src/app/app.component.html +++ b/dmp-frontend/src/app/app.component.html @@ -58,8 +58,9 @@ --> + diff --git a/dmp-frontend/src/app/app.module.ts b/dmp-frontend/src/app/app.module.ts index 1b9602363..726c68d97 100644 --- a/dmp-frontend/src/app/app.module.ts +++ b/dmp-frontend/src/app/app.module.ts @@ -14,6 +14,7 @@ import { RestBase } from './services/rest-base'; import { DynamicFormComponent } from './form/dynamic-form.component'; import { DynamicFormFieldComponent } from './form/fields/dynamic-form-field.component'; import { ServerService } from './services/server.service'; +import { GlobalVariables } from './services/global-variables.service'; import { TokenService, TokenProvider } from './services/login/token.service'; import { LocalStorageService } from 'ngx-webstorage'; import { dataModelBuilder } from './services/dataModelBuilder.service'; @@ -25,6 +26,7 @@ import { EmptyComponent } from './empty.component'; import { TocComponent } from './form/tableOfContents/toc.component'; import { ConfirmationComponent } from './widgets/confirmation/confirmation.component'; + import { PaginationService } from './services/pagination.service'; import { EestoreService } from './services/eestore.service'; import { GlobalInterceptor } from './services/interceptor'; @@ -120,7 +122,7 @@ import { UserWorkspaceComponent } from './user-workspace/user-workspace.componen useClass: GlobalInterceptor, multi: true, }, - ServerService, dataModelBuilder, AuthGuard, PaginationService, TokenService, LocalStorageService, RestBase, EestoreService,NativeLoginService + ServerService, dataModelBuilder, GlobalVariables, AuthGuard, PaginationService, TokenService, LocalStorageService, RestBase, EestoreService,NativeLoginService ], bootstrap: [AppComponent] }) diff --git a/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts b/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts index 8bae92618..14307165c 100644 --- a/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts +++ b/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts @@ -4,7 +4,7 @@ import {Router} from '@angular/router'; declare const gapi: any; -var $ = require("jquery"); +declare var $ :any; import '../../../assets/custom.js'; declare function simple_notifier(type: string, title: string, message:string): any; @@ -16,14 +16,16 @@ declare function simple_notifier(type: string, title: string, message:string): a }) export class GooggleSignInComponent implements OnInit, AfterViewInit { - //token:any; + fixedRendering : boolean = false; constructor(private element: ElementRef, private tokenService : TokenService, private router : Router) { } ngOnInit() { + } + private clientId:string = '1010962018903-glegmqudqtl1lub0150vacopbu06lgsg.apps.googleusercontent.com'; @@ -69,7 +71,19 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit { ngAfterViewInit() { + + /* + $( window ).on( "load", function(){ + + if($("#googleBtn").length == 0) { + alert("GoogleButton found"); + } + + }); + */ + this.googleInit(); + } diff --git a/dmp-frontend/src/app/services/global-variables.service.ts b/dmp-frontend/src/app/services/global-variables.service.ts new file mode 100644 index 000000000..f607948da --- /dev/null +++ b/dmp-frontend/src/app/services/global-variables.service.ts @@ -0,0 +1,20 @@ +import { Injectable, Inject} from '@angular/core'; +import { Observable } from 'rxjs'; +import {LocalStorageService} from 'ngx-webstorage'; +import 'rxjs/add/operator/map'; +import { DOCUMENT } from '@angular/platform-browser'; + + +@Injectable() +export class GlobalVariables { + + constructor (private storage : LocalStorageService, @Inject(DOCUMENT) private document) { + + } + + + + +} + +