mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2054] Created a new widget to handle uploading file from Share (#2810)
* [ADF-2054] start creating custom upload widget for share integration * [ADF-2054] changed content node selector service to allow different opening approach * [ADF-2054] addedd support for multi resource files * [ADF-2054] fixed base case for upload when only local files are selected * [ADF-2054] start adding and fixing tests for new share attach button widget * [ADF-2054] changed test to perfrom a correct check * [ADF-2054] removed fdescribe * [ADF-2054] added test for share-widget component * [ADF-2054] added peer reviews changes * [ADF-2054] created a module folder for content widgets * [ADF-2054] fixed wrong import * [ADF-2054] fixed rebase errors * [ADF-2054] restored some files changed by rebase * [ADF-2054] added link to content services to fix packaging issue * [ADF-2054] renamed widget
This commit is contained in:
@@ -21,6 +21,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import { SitePaging, SiteEntry } from 'alfresco-js-api';
|
||||
|
||||
@Injectable()
|
||||
export class SitesService {
|
||||
@@ -28,7 +29,7 @@ export class SitesService {
|
||||
constructor(
|
||||
private apiService: AlfrescoApiService) { }
|
||||
|
||||
getSites(opts: any = {}): any {
|
||||
getSites(opts: any = {}): Observable<SitePaging> {
|
||||
const defaultOptions = {
|
||||
skipCount: 0,
|
||||
include: ['properties']
|
||||
@@ -38,23 +39,23 @@ export class SitesService {
|
||||
.catch(this.handleError);
|
||||
}
|
||||
|
||||
getSite(siteId: string, opts?: any): any {
|
||||
getSite(siteId: string, opts?: any): Observable<SiteEntry> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().core.sitesApi.getSite(siteId, opts))
|
||||
.catch(this.handleError);
|
||||
}
|
||||
|
||||
deleteSite(siteId: string, permanentFlag: boolean = true): any {
|
||||
deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any> {
|
||||
let options: any = {};
|
||||
options.permanent = permanentFlag;
|
||||
return Observable.fromPromise(this.apiService.getInstance().core.sitesApi.deleteSite(siteId, options)
|
||||
.catch(this.handleError));
|
||||
}
|
||||
|
||||
getSiteContent(siteId: string): Observable<any> {
|
||||
getSiteContent(siteId: string): Observable<SiteEntry> {
|
||||
return this.getSite(siteId, { relations: ['containers'] });
|
||||
}
|
||||
|
||||
getSiteMembers(siteId: string): Observable<any> {
|
||||
getSiteMembers(siteId: string): Observable<SiteEntry> {
|
||||
return this.getSite(siteId, { relations: ['members'] });
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user