fix importing alfreso-js-api compatible with the version 0.3.6 #916

This commit is contained in:
Eugenio Romano 2016-10-29 16:37:10 +01:00
parent 2edabe6a00
commit f8979f06c5
15 changed files with 10 additions and 42 deletions

View File

@ -32,7 +32,6 @@
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="/app/js/xml2json.js"></script>
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="node_modules/pdfjs-dist/build/pdf.worker.js"></script>

View File

@ -18,7 +18,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="node_modules/chart.js/dist/Chart.bundle.min.js"></script>
<script src="systemjs.config.js"></script>

View File

@ -17,9 +17,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- Additional Alfresco libraries -->
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });

View File

@ -18,8 +18,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });

View File

@ -16,18 +16,18 @@
*/
import { Injectable } from '@angular/core';
import { AlfrescoJsApi } from 'alfresco-js-api';
import { AlfrescoApi } from 'alfresco-js-api';
@Injectable()
export class AlfrescoApiService {
private _instance: AlfrescoJsApi;
private _instance: AlfrescoApi;
public getInstance(): AlfrescoJsApi {
public getInstance(): AlfrescoApi {
return this._instance;
}
public setInstance(value: AlfrescoJsApi) {
public setInstance(value: AlfrescoApi) {
this._instance = value;
}

View File

@ -20,7 +20,6 @@ import { AlfrescoSettingsService } from './AlfrescoSettings.service';
import { AlfrescoAuthenticationService } from './AlfrescoAuthentication.service';
import { AlfrescoApiService } from './AlfrescoApi.service';
declare var AlfrescoApi: any;
declare let jasmine: any;
describe('AlfrescoAuthentication', () => {

View File

@ -19,17 +19,15 @@ import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Rx';
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
import { AlfrescoApiService } from './AlfrescoApi.service';
import { AlfrescoJsApi } from 'alfresco-js-api';
declare var AlfrescoApi: AlfrescoJsApi;
import * as alfrescoApi from 'alfresco-js-api';
import { AlfrescoApi } from 'alfresco-js-api';
/**
* The AlfrescoAuthenticationService provide the login service and store the ticket in the localStorage
*/
@Injectable()
export class AlfrescoAuthenticationService {
alfrescoApi: AlfrescoJsApi;
alfrescoApi: AlfrescoApi;
/**
* Constructor
@ -38,7 +36,7 @@ export class AlfrescoAuthenticationService {
*/
constructor(private settingsService: AlfrescoSettingsService,
private apiService: AlfrescoApiService) {
this.alfrescoApi = new AlfrescoApi({
this.alfrescoApi = <AlfrescoApi>new alfrescoApi({
provider: this.settingsService.getProviders(),
ticketEcm: this.getTicketEcm(),
ticketBpm: this.getTicketBpm(),
@ -216,7 +214,7 @@ export class AlfrescoAuthenticationService {
return Observable.throw(error || 'Server error');
}
getAlfrescoApi(): AlfrescoJsApi {
getAlfrescoApi(): any {
return this.alfrescoApi;
}
}

View File

@ -15,7 +15,7 @@
<!-- Polyfill(s) for Safari (pre-10.x) -->
<script src="node_modules/intl/dist/Intl.min.js"></script>
<script src="node_modules/intl/locale-data/jsonp/en.js"></script>
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
@ -23,9 +23,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- Additional Alfresco libraries -->
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });

View File

@ -19,9 +19,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- Additional Alfresco libraries -->
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });

View File

@ -17,9 +17,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- Additional Alfresco libraries -->
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });

View File

@ -19,9 +19,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- Additional Alfresco libraries -->
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(

View File

@ -24,7 +24,6 @@ import {
import { TagService } from '../services/tag.service';
declare let jasmine: any;
declare var AlfrescoApi: any;
describe('Tag service', () => {

View File

@ -20,9 +20,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- Additional Alfresco libraries -->
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });

View File

@ -18,8 +18,6 @@
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });

View File

@ -22,10 +22,6 @@
<script src="node_modules/pdfjs-dist/build/pdf.worker.js"></script>
<script src="node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
<!-- Additional Alfresco libraries -->
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });