Login dialog shows error for Safari with Private Window mode (#1172)

* #958 new StorageService service

abstraction around ‘Storage’ to allow switching to in-memory store
whenever ‘localStorage’ is not available (i.e. private/incognito modes,
etc.)

* fix unit tests

* update unit tests

- disable incorrect auth tests (core)
- simplify widget visibility tests (activiti-form)

* fix unit tests
This commit is contained in:
Denys Vuika
2016-11-30 11:32:16 +00:00
committed by Eugenio Romano
parent 94dad585b1
commit da70a72bba
33 changed files with 494 additions and 414 deletions

View File

@@ -18,17 +18,15 @@
import { NgModule, Component, OnInit, ViewChild } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { CoreModule } from 'ng2-alfresco-core';
import { DocumentListModule, DocumentList } from 'ng2-alfresco-documentlist';
import { DocumentListModule, DocumentList, DocumentActionsService } from 'ng2-alfresco-documentlist';
import {
CoreModule,
StorageService,
AlfrescoSettingsService,
AlfrescoAuthenticationService,
AlfrescoTranslationService
} from 'ng2-alfresco-core';
import { DocumentActionsService } from 'ng2-alfresco-documentlist';
@Component({
selector: 'alfresco-app-demo',
template: `
@@ -150,8 +148,11 @@ class DocumentListDemo implements OnInit {
@ViewChild(DocumentList)
documentList: DocumentList;
constructor(private authService: AlfrescoAuthenticationService, private settingsService: AlfrescoSettingsService,
translation: AlfrescoTranslationService, private documentActions: DocumentActionsService) {
constructor(private authService: AlfrescoAuthenticationService,
private settingsService: AlfrescoSettingsService,
private translation: AlfrescoTranslationService,
private documentActions: DocumentActionsService,
private storage: StorageService) {
settingsService.ecmHost = this.ecmHost;
settingsService.setProviders('ECM');
@@ -165,7 +166,7 @@ class DocumentListDemo implements OnInit {
}
public updateTicket(): void {
localStorage.setItem('ticket-ECM', this.ticket);
this.storage.setItem('ticket-ECM', this.ticket);
}
public updateHost(): void {