[Trunk|Library]: LayoutService: remove unnesserary import
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55009 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
55693142a7
commit
8bb75a388d
|
@ -1,6 +1,5 @@
|
||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {Http, Response} from '@angular/http';
|
import {Http, Response} from '@angular/http';
|
||||||
import {DivId} from '../../domain/divId';
|
|
||||||
import {Observable} from 'rxjs/Observable';
|
import {Observable} from 'rxjs/Observable';
|
||||||
import {CustomOptions} from './servicesUtils/customOptions.class';
|
import {CustomOptions} from './servicesUtils/customOptions.class';
|
||||||
|
|
||||||
|
@ -23,19 +22,19 @@ export class LayoutService {
|
||||||
saveLayout(pid: string, url: string, layout: any) {
|
saveLayout(pid: string, url: string, layout: any) {
|
||||||
LayoutService.removeNulls(layout);
|
LayoutService.removeNulls(layout);
|
||||||
return this.http.post(url + 'community/' + pid + '/updateLayout', JSON.stringify(layout), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(url + 'community/' + pid + '/updateLayout', JSON.stringify(layout), CustomOptions.getAuthOptionsWithBody())
|
||||||
.map(res => <DivId> res.json())
|
.map(res => res.json())
|
||||||
.catch(this.handleError);
|
.catch(this.handleError);
|
||||||
}
|
}
|
||||||
|
|
||||||
getLayout(pid: string, url: string) {
|
getLayout(pid: string, url: string) {
|
||||||
return this.http.get(url + 'community/' + pid + '/layout')
|
return this.http.get(url + 'community/' + pid + '/layout')
|
||||||
.map(res => <DivId> res.json())
|
.map(res => res.json())
|
||||||
.catch(this.handleError);
|
.catch(this.handleError);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadDefaultLayout(pid: string, url: string) {
|
loadDefaultLayout(pid: string, url: string) {
|
||||||
return this.http.post(url + 'community/' + pid + '/resetLayout', null, CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(url + 'community/' + pid + '/resetLayout', null, CustomOptions.getAuthOptionsWithBody())
|
||||||
.map(res => <DivId> res.json())
|
.map(res => res.json())
|
||||||
.catch(this.handleError);
|
.catch(this.handleError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue