mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Remove last traces of documentlist code from alfresco-search
- Fixes build problems Refs #69
This commit is contained in:
@@ -20,7 +20,6 @@ import { Http, Response } from 'angular2/http';
|
|||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
import { AlfrescoSettingsService } from 'ng2-alfresco-core/services';
|
import { AlfrescoSettingsService } from 'ng2-alfresco-core/services';
|
||||||
import { NodePaging, MinimalNodeEntity } from './../models/document-library.model';
|
|
||||||
|
|
||||||
declare let AlfrescoApi: any;
|
declare let AlfrescoApi: any;
|
||||||
|
|
||||||
@@ -87,31 +86,11 @@ export class AlfrescoService {
|
|||||||
*/
|
*/
|
||||||
getLiveSearchResults(term: string) {
|
getLiveSearchResults(term: string) {
|
||||||
return Observable.fromPromise(this.getSearchNodesPromise(term))
|
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
|
.do(data => console.log('Search data', data)) // eyeball results in the console
|
||||||
.catch(this.handleError);
|
.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) {
|
private handleError(error: Response) {
|
||||||
// in a real world app, we may send the error to some remote logging infrastructure
|
// in a real world app, we may send the error to some remote logging infrastructure
|
||||||
// instead of just logging it to the console
|
// instead of just logging it to the console
|
||||||
|
Reference in New Issue
Block a user