Remove last traces of documentlist code from alfresco-search

- Fixes build problems

Refs #69
This commit is contained in:
Will Abson
2016-05-19 17:40:40 +01:00
parent f8627a59e9
commit caebc65975

View File

@@ -20,7 +20,6 @@ import { Http, Response } from 'angular2/http';
import { Observable } from 'rxjs/Observable';
import { AlfrescoSettingsService } from 'ng2-alfresco-core/services';
import { NodePaging, MinimalNodeEntity } from './../models/document-library.model';
declare let AlfrescoApi: any;
@@ -87,31 +86,11 @@ export class AlfrescoService {
*/
getLiveSearchResults(term: string) {
return Observable.fromPromise(this.getSearchNodesPromise(term))
.map(res => <NodePaging> res)
.map(res => <any> res)
.do(data => console.log('Search data', data)) // eyeball results in the console
.catch(this.handleError);
}
/**
* Get thumbnail URL for the given document node.
* @param document Node to get URL for.
* @returns {string} URL address.
*/
getDocumentThumbnailUrl(document: MinimalNodeEntity) {
return this.getContentUrl(document) + '/thumbnails/doclib?c=queue&ph=true&lastModified=1&alf_ticket=' + this.getAlfrescoTicket();
}
/**
* Get content URL for the given node.
* @param document Node to get URL for.
* @returns {string} URL address.
*/
getContentUrl(document: MinimalNodeEntity) {
return this._host +
'/alfresco/service/api/node/workspace/SpacesStore/' +
document.entry.id + '/content';
}
private handleError(error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console