Commit dc825be361f7928676844af711921b8d61c5c76d
1 parent
5b549e23
Exists in
master
and in
1 other branch
fixed tslint warnings
Showing
6 changed files
with
17 additions
and
17 deletions
Show diff stats
src/app/environment/environment-home.component.ts
... | ... | @@ -18,18 +18,18 @@ import {NotificationService} from "../shared/services/notification.service"; |
18 | 18 | }) |
19 | 19 | @Inject(EnvironmentService, "$log", "$sce") |
20 | 20 | export class EnvironmentHomeComponent { |
21 | - | |
21 | + | |
22 | 22 | environment: noosfero.Environment; |
23 | - | |
23 | + | |
24 | 24 | constructor(private environmentService: EnvironmentService, private $sce: ng.ISCEService) { |
25 | 25 | environmentService.getByIdentifier("default").then((result: noosfero.Environment) => { |
26 | 26 | this.environment = result; |
27 | 27 | }); |
28 | 28 | } |
29 | - | |
29 | + | |
30 | 30 | getEnvironmentDescription() { |
31 | - if(this.environment && this.environment.settings && this.environment.settings.description){ | |
32 | - return this.$sce.trustAsHtml(this.environment.settings.description); | |
31 | + if (this.environment && this.environment.settings && this.environment.settings.description) { | |
32 | + return this.$sce.trustAsHtml(this.environment.settings.description); | |
33 | 33 | } |
34 | 34 | else { |
35 | 35 | return ""; | ... | ... |
src/app/environment/environment.component.spec.ts
... | ... | @@ -28,7 +28,7 @@ describe("Components", () => { |
28 | 28 | environmentServiceMock.getByIdentifier('default').and.returnValue(environmentResponse.promise); |
29 | 29 | environmentServiceMock.getBoxes = jasmine.createSpy("getBoxes").and.returnValue(getBoxesResponse.promise); |
30 | 30 | }); |
31 | - | |
31 | + | |
32 | 32 | it("get the default environment", done => { |
33 | 33 | let component: EnvironmentComponent = new EnvironmentComponent(environmentServiceMock, $state, notificationMock); |
34 | 34 | $rootScope.$apply(); | ... | ... |
src/app/environment/environment.component.ts
src/app/layout/services/body-state-classes.service.spec.ts
... | ... | @@ -113,7 +113,7 @@ describe("BodyStateClasses Service", () => { |
113 | 113 | $rootScope = <any>helpers.mocks.scopeWithEvents(); |
114 | 114 | bodyElJq.addClass = (className: string) => { |
115 | 115 | bodyEl.className = className; |
116 | - } | |
116 | + }; | |
117 | 117 | bodyElJq.removeClass = jasmine.createSpy("removeClass"); |
118 | 118 | |
119 | 119 | let service = getService(); | ... | ... |
src/app/main/main.component.ts
... | ... | @@ -8,7 +8,7 @@ import {BoxesComponent} from "../layout/boxes/boxes.component"; |
8 | 8 | import {BlockComponent} from "../layout/blocks/block.component"; |
9 | 9 | import {EnvironmentComponent} from "../environment/environment.component"; |
10 | 10 | import {EnvironmentHomeComponent} from "../environment/environment-home.component"; |
11 | -import {PeopleBlockComponent} from "../layout/blocks/people-block/people-block.component" | |
11 | +import {PeopleBlockComponent} from "../layout/blocks/people-block/people-block.component"; | |
12 | 12 | import {LinkListBlockComponent} from "./../layout/blocks/link-list/link-list.component"; |
13 | 13 | import {RecentDocumentsBlockComponent} from "../layout/blocks/recent-documents/recent-documents.component"; |
14 | 14 | import {ProfileImageBlockComponent} from "../layout/blocks/profile-image-block/profile-image-block.component"; | ... | ... |
src/lib/ng-noosfero-api/http/environment.service.ts
... | ... | @@ -7,15 +7,15 @@ export class EnvironmentService { |
7 | 7 | private _currentEnvironmentPromise: ng.IDeferred<noosfero.Environment>; |
8 | 8 | |
9 | 9 | constructor(private restangular: restangular.IService, private $q: ng.IQService) { |
10 | - | |
10 | + | |
11 | 11 | } |
12 | 12 | |
13 | - getEnvironmentPeople(params: any) : ng.IPromise<noosfero.Person[]> { | |
13 | + getEnvironmentPeople(params: any): ng.IPromise<noosfero.Person[]> { | |
14 | 14 | let p = this.restangular.one('people').get(params); |
15 | 15 | let deferred = this.$q.defer<noosfero.Person[]>(); |
16 | 16 | p.then(this.getHandleSuccessFunctionKeyArray<noosfero.Person[]>("people", deferred)); |
17 | 17 | p.catch(this.getHandleErrorFunction<noosfero.Person[]>(deferred)); |
18 | - return deferred.promise; | |
18 | + return deferred.promise; | |
19 | 19 | } |
20 | 20 | |
21 | 21 | getByIdentifier(identifier: string): ng.IPromise<noosfero.Environment> { |
... | ... | @@ -25,7 +25,7 @@ export class EnvironmentService { |
25 | 25 | p.catch(this.getHandleErrorFunction<noosfero.Environment>(deferred)); |
26 | 26 | return deferred.promise; |
27 | 27 | } |
28 | - | |
28 | + | |
29 | 29 | getBoxes(id: number) { |
30 | 30 | let p = this.restangular.one('environments', id).customGET("boxes"); |
31 | 31 | let deferred = this.$q.defer<noosfero.Box[]>(); |
... | ... | @@ -33,7 +33,7 @@ export class EnvironmentService { |
33 | 33 | p.catch(this.getHandleErrorFunction<noosfero.Box[]>(deferred)); |
34 | 34 | return deferred.promise; |
35 | 35 | } |
36 | - | |
36 | + | |
37 | 37 | /** TODO - Please, use the base class RestangularService |
38 | 38 | * (description) |
39 | 39 | * |
... | ... | @@ -66,12 +66,12 @@ export class EnvironmentService { |
66 | 66 | * @param {restangular.IResponse} response (description) |
67 | 67 | */ |
68 | 68 | let successFunction = (response: restangular.IResponse): void => { |
69 | - let data = this.restangular.stripRestangular(response.data) | |
69 | + let data = this.restangular.stripRestangular(response.data); | |
70 | 70 | deferred.resolve(data); |
71 | 71 | }; |
72 | 72 | return successFunction; |
73 | 73 | } |
74 | - | |
74 | + | |
75 | 75 | /** |
76 | 76 | * TODO - use restangular service as base class, and this will not be necessary here anymore |
77 | 77 | */ |
... | ... | @@ -88,5 +88,5 @@ export class EnvironmentService { |
88 | 88 | deferred.resolve(data); |
89 | 89 | }; |
90 | 90 | return successFunction; |
91 | - } | |
91 | + } | |
92 | 92 | } | ... | ... |