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,7 +70,7 @@ | ||
| 70 | 70 | ||
| 71 | function getTopics (params, cbSuccess, cbError) { | 71 | function getTopics (params, cbSuccess, cbError) { |
| 72 | // Ex.: /api/v1/articles/103358/children?fields= | 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 | function getTopicById (topicId, params, cbSuccess, cbError) { | 76 | function getTopicById (topicId, params, cbSuccess, cbError) { |
| @@ -79,11 +79,11 @@ | @@ -79,11 +79,11 @@ | ||
| 79 | var url = service.apiArticles + topicId + '/children'; | 79 | var url = service.apiArticles + topicId + '/children'; |
| 80 | var paramsExtended = angular.extend({ | 80 | var paramsExtended = angular.extend({ |
| 81 | 'fields[]': ['id', 'categories'] | 81 | 'fields[]': ['id', 'categories'] |
| 82 | + // 'fields[]': ['id', 'title', 'body', 'slug', 'abstract', 'categories', 'setting', 'children_count', 'hits'] | ||
| 82 | }, params); | 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 | cbSuccess(data); | 87 | cbSuccess(data); |
| 88 | }).catch(function(error){ | 88 | }).catch(function(error){ |
| 89 | cbError(error); | 89 | cbError(error); |
| @@ -189,7 +189,7 @@ | @@ -189,7 +189,7 @@ | ||
| 189 | if(proposal.parent && !proposal.parent.slug){ | 189 | if(proposal.parent && !proposal.parent.slug){ |
| 190 | proposal.parent.slug = Slug.slugify(proposal.parent.title); | 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,15 +23,13 @@ | ||
| 23 | 23 | ||
| 24 | var vm = this; | 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 | ProposalBoxController.prototype.showContent2 = function (topic) { | 30 | ProposalBoxController.prototype.showContent2 = function (topic) { |
| 31 | var vm = this; | 31 | var vm = this; |
| 32 | 32 | ||
| 33 | - console.log('topic', topic); | ||
| 34 | - | ||
| 35 | vm.$state.go('programa-conteudo', { | 33 | vm.$state.go('programa-conteudo', { |
| 36 | slug: topic.slug | 34 | slug: topic.slug |
| 37 | }, { | 35 | }, { |
src/app/components/show-message/show-message.directive.js
| @@ -10,10 +10,8 @@ | @@ -10,10 +10,8 @@ | ||
| 10 | 10 | ||
| 11 | /** @ngInject */ | 11 | /** @ngInject */ |
| 12 | function ShowMessageController($log) { | 12 | function ShowMessageController($log) { |
| 13 | + // var vm = this; | ||
| 13 | $log.debug('ShowMessageController'); | 14 | $log.debug('ShowMessageController'); |
| 14 | - | ||
| 15 | - var vm = this; | ||
| 16 | - | ||
| 17 | } | 15 | } |
| 18 | 16 | ||
| 19 | var directive = { | 17 | var directive = { |
src/app/components/validation-messages/validation-messages.directive.js
| @@ -23,10 +23,10 @@ | @@ -23,10 +23,10 @@ | ||
| 23 | // async values | 23 | // async values |
| 24 | var vm = this; | 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