This commit is contained in:
Nikolaos Laskaris 2017-11-07 16:03:51 +02:00
parent ca656416a8
commit 707dc13819
4 changed files with 41 additions and 4 deletions

View File

@ -58,8 +58,9 @@
-->
<!--this should be invisible -->
<!--
<app-main-sign-in [ngClass]="'invisible'"></app-main-sign-in>
-->
</div>

View File

@ -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]
})

View File

@ -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();
}

View File

@ -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) {
}
}