mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
migration document list step 2
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||
|
||||
<!-- Additional Alfresco libraries -->
|
||||
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
||||
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
|
||||
|
||||
<script src="systemjs.config.js"></script>
|
||||
<script>
|
||||
|
@@ -69,7 +69,7 @@
|
||||
|
||||
"alfresco-js-api": "^0.1.0",
|
||||
"ng2-alfresco-core": "^0.1.36",
|
||||
"ng2-alfresco-search": "^0.1.21"
|
||||
"ng2-alfresco-search": "file:../"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "2.0.0",
|
||||
|
@@ -16,7 +16,7 @@ module.exports = function (config) {
|
||||
{pattern: 'node_modules/@angular/**/*.map', included: false, watched: false},
|
||||
|
||||
{pattern: 'node_modules/material-design-lite/material.min.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/alfresco-js-api/bundle.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/alfresco-js-api/dist/alfresco-js-api.js', included: true, watched: false},
|
||||
|
||||
{pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false},
|
||||
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, served: true, watched: false},
|
||||
@@ -74,7 +74,7 @@ module.exports = function (config) {
|
||||
|
||||
// Coverage reporter generates the coverage
|
||||
reporters: ['mocha', 'coverage', 'coveralls', 'kjhtml'],
|
||||
|
||||
|
||||
// Source files that you wanna generate coverage for.
|
||||
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
||||
preprocessors: {
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {Observable} from 'rxjs/Rx';
|
||||
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService
|
||||
} from 'ng2-alfresco-core';
|
||||
import {AlfrescoSearchService} from './../../src/services/alfresco-search.service';
|
||||
@@ -28,10 +27,9 @@ export class AlfrescoServiceMock extends AlfrescoSearchService {
|
||||
_folderToReturn: any = {};
|
||||
|
||||
constructor(
|
||||
settings: AlfrescoSettingsService = null,
|
||||
authService: AlfrescoAuthenticationService = null
|
||||
) {
|
||||
super(settings, authService);
|
||||
super(authService);
|
||||
}
|
||||
|
||||
getFolder(folder: string) {
|
||||
|
@@ -26,6 +26,6 @@ describe('AlfrescoSearchService', () => {
|
||||
let service: AlfrescoSearchService;
|
||||
|
||||
beforeEach(() => {
|
||||
service = new AlfrescoSearchService(null, null);
|
||||
service = new AlfrescoSearchService(null);
|
||||
});
|
||||
});
|
||||
|
@@ -19,7 +19,6 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
@@ -31,23 +30,17 @@ declare let AlfrescoApi: any;
|
||||
@Injectable()
|
||||
export class AlfrescoSearchService {
|
||||
|
||||
constructor(private settings: AlfrescoSettingsService,
|
||||
private authService: AlfrescoAuthenticationService) {
|
||||
}
|
||||
|
||||
private getAlfrescoClient() {
|
||||
return AlfrescoApi.getClientWithTicket(this.settings.getApiBaseUrl(), this.authService.getToken());
|
||||
constructor(private authService: AlfrescoAuthenticationService) {
|
||||
}
|
||||
|
||||
private getSearchNodesPromise(term: string) {
|
||||
let apiInstance = new AlfrescoApi.Core.SearchApi(this.getAlfrescoClient());
|
||||
let nodeId = '-root-';
|
||||
let opts = {
|
||||
include: ['path'],
|
||||
rootNodeId: nodeId,
|
||||
nodeType: 'cm:content'
|
||||
};
|
||||
return apiInstance.liveSearchNodes(term, opts);
|
||||
return this.authService.alfrescoApi.search.liveSearchNodes(term, opts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -20,8 +20,6 @@ import {
|
||||
AlfrescoContentService
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
declare let AlfrescoApi: any;
|
||||
|
||||
@Injectable()
|
||||
export class AlfrescoThumbnailService {
|
||||
|
||||
|
Reference in New Issue
Block a user