Commit 2f7d4504a6913dcff2610abbffb780f1e53d0cd2
1 parent
499deb48
Exists in
master
and in
8 other branches
Lint code
Showing
5 changed files
with
11 additions
and
15 deletions
Show diff stats
src/app/components/article-service/article.service.js
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | |
71 | 71 | function getTopics (params, cbSuccess, cbError) { |
72 | 72 | // Ex.: /api/v1/articles/103358/children?fields= |
73 | - getTopicById(API.articleId.home); | |
73 | + getTopicById(API.articleId.home, params, cbSuccess, cbError); | |
74 | 74 | } |
75 | 75 | |
76 | 76 | function getTopicById (topicId, params, cbSuccess, cbError) { |
... | ... | @@ -79,11 +79,11 @@ |
79 | 79 | var url = service.apiArticles + topicId + '/children'; |
80 | 80 | var paramsExtended = angular.extend({ |
81 | 81 | 'fields[]': ['id', 'categories'] |
82 | + // 'fields[]': ['id', 'title', 'body', 'slug', 'abstract', 'categories', 'setting', 'children_count', 'hits'] | |
82 | 83 | }, params); |
83 | 84 | |
84 | - UtilService.get(url, {params: { | |
85 | - 'fields[]': ['id', 'title', 'body', 'slug', 'abstract', 'categories', 'setting', 'children_count', 'hits'] | |
86 | - }}).then(function(data){ | |
85 | + UtilService.get(url, {params: paramsExtended}) | |
86 | + .then(function(data){ | |
87 | 87 | cbSuccess(data); |
88 | 88 | }).catch(function(error){ |
89 | 89 | cbError(error); |
... | ... | @@ -189,7 +189,7 @@ |
189 | 189 | if(proposal.parent && !proposal.parent.slug){ |
190 | 190 | proposal.parent.slug = Slug.slugify(proposal.parent.title); |
191 | 191 | } |
192 | - }; | |
192 | + } | |
193 | 193 | } |
194 | 194 | } |
195 | 195 | })(); | ... | ... |
src/app/components/proposal-box/proposal-box.directive.js
... | ... | @@ -23,15 +23,13 @@ |
23 | 23 | |
24 | 24 | var vm = this; |
25 | 25 | |
26 | - if (!vm.vote) { vm.vote = false}; | |
26 | + if (!vm.vote) { vm.vote = false; } | |
27 | 27 | |
28 | 28 | }; |
29 | 29 | |
30 | 30 | ProposalBoxController.prototype.showContent2 = function (topic) { |
31 | 31 | var vm = this; |
32 | 32 | |
33 | - console.log('topic', topic); | |
34 | - | |
35 | 33 | vm.$state.go('programa-conteudo', { |
36 | 34 | slug: topic.slug |
37 | 35 | }, { | ... | ... |
src/app/components/show-message/show-message.directive.js
src/app/components/validation-messages/validation-messages.directive.js
... | ... | @@ -23,10 +23,10 @@ |
23 | 23 | // async values |
24 | 24 | var vm = this; |
25 | 25 | |
26 | - if (!vm.required) {vm.required = "Ops, o campo é obrigatório."}; | |
27 | - if (!vm.minlength) {vm.minlength = "O campo deve ser maior."}; | |
28 | - if (!vm.maxlength) {vm.maxlength = "O campo deve ser menor"}; | |
29 | - if (!vm.email) {vm.email = "O endereço de e-mail deve ser válido"}; | |
26 | + if (!vm.required) {vm.required = 'Ops, o campo é obrigatório.';} | |
27 | + if (!vm.minlength) {vm.minlength = 'O campo deve ser maior.';} | |
28 | + if (!vm.maxlength) {vm.maxlength = 'O campo deve ser menor';} | |
29 | + if (!vm.email) {vm.email = 'O endereço de e-mail deve ser válido';} | |
30 | 30 | |
31 | 31 | }; |
32 | 32 | ... | ... |
src/assets/images/icons/sprite.png