Commit 28caa687fb54fef531aed71abd662a2710a04768
1 parent
c12e1455
Exists in
master
and in
4 other branches
Fix lint/hint code
Showing
10 changed files
with
25 additions
and
36 deletions
Show diff stats
src/app/components/article-service/article.service.js
| ... | ... | @@ -128,7 +128,6 @@ |
| 128 | 128 | |
| 129 | 129 | function getProposalByIdRanked (proposalId, params, cbSuccess, cbError) { |
| 130 | 130 | var url = service.apiProposals + proposalId + '/ranking?per_page=5&page=1'; |
| 131 | - console.log(url); | |
| 132 | 131 | var paramsExtended = angular.extend({ |
| 133 | 132 | // 'fields[]': ['id', 'title', 'abstract', 'children', 'children_count', 'ranking_position', 'hits', 'votes_for', 'votes_against'], |
| 134 | 133 | // 'per_page':'1', |
| ... | ... | @@ -283,7 +282,6 @@ |
| 283 | 282 | function searchProposals (params, cbSuccess, cbError) { |
| 284 | 283 | // Ex.: /api/v1/search/article?type=ProposalsDiscussionPlugin::Proposal&query=cisternas |
| 285 | 284 | var url = service.apiSearch + 'article'; |
| 286 | - console.log('url',url); | |
| 287 | 285 | var paramsExtended = angular.extend({ |
| 288 | 286 | page: 1, |
| 289 | 287 | per_page: 10, |
| ... | ... | @@ -306,8 +304,6 @@ |
| 306 | 304 | ] |
| 307 | 305 | }, params); |
| 308 | 306 | |
| 309 | - console.log("params",paramsExtended); | |
| 310 | - | |
| 311 | 307 | UtilService.get(url, {params: paramsExtended}).then(function(data){ |
| 312 | 308 | _pipeInjectSlugIntoParentProgram(data); |
| 313 | 309 | cbSuccess(data); | ... | ... |
src/app/components/category-list/category-list.directive.js
| ... | ... | @@ -21,7 +21,6 @@ |
| 21 | 21 | vm.$element = $element; |
| 22 | 22 | vm.$log = $log; |
| 23 | 23 | |
| 24 | - | |
| 25 | 24 | // initialization |
| 26 | 25 | vm.init(); |
| 27 | 26 | } |
| ... | ... | @@ -33,13 +32,13 @@ |
| 33 | 32 | |
| 34 | 33 | vm.showCloseBtn = true; |
| 35 | 34 | |
| 36 | - // Disable button remove of page ranking | |
| 37 | - if(vm.pathUrl=="/ranking"){ | |
| 35 | + // Disable button 'remove' of page ranking | |
| 36 | + if (vm.pathUrl === '/ranking') { | |
| 38 | 37 | vm.showCloseBtn = false; |
| 39 | 38 | } |
| 40 | 39 | |
| 41 | 40 | // Default values |
| 42 | - if(!vm.isCollapsed){ | |
| 41 | + if (!vm.isCollapsed) { | |
| 43 | 42 | vm.isCollapsed = false; |
| 44 | 43 | } |
| 45 | 44 | |
| ... | ... | @@ -48,14 +47,13 @@ |
| 48 | 47 | CategoryListController.prototype._disableUnselect = function() { |
| 49 | 48 | var vm = this; |
| 50 | 49 | |
| 51 | - if(vm.disableUnselect && vm.disableUnselect === 'true'){ | |
| 50 | + if (vm.disableUnselect && vm.disableUnselect === 'true') { | |
| 52 | 51 | return true; |
| 53 | 52 | } |
| 54 | 53 | |
| 55 | 54 | return false; |
| 56 | 55 | }; |
| 57 | 56 | |
| 58 | - | |
| 59 | 57 | CategoryListController.prototype.selectCategory = function(category, $event) { |
| 60 | 58 | var vm = this; |
| 61 | 59 | |
| ... | ... | @@ -65,9 +63,9 @@ |
| 65 | 63 | if (category !== vm.selectedCategory) { |
| 66 | 64 | vm.selectedCategory = category; |
| 67 | 65 | |
| 68 | - }else{ | |
| 66 | + }else { | |
| 69 | 67 | |
| 70 | - if(vm._disableUnselect()){ | |
| 68 | + if (vm._disableUnselect()) { | |
| 71 | 69 | vm.$log.info('Unselect is disabled.'); |
| 72 | 70 | return; |
| 73 | 71 | } |
| ... | ... | @@ -79,11 +77,10 @@ |
| 79 | 77 | vm.$rootScope.$broadcast('change-selectedCategory', vm.selectedCategory); |
| 80 | 78 | }; |
| 81 | 79 | |
| 82 | - | |
| 83 | 80 | CategoryListController.prototype.toogleList = function() { |
| 84 | 81 | var vm = this; |
| 85 | 82 | |
| 86 | - if(!vm._listGroup){ | |
| 83 | + if (!vm._listGroup) { | |
| 87 | 84 | vm._listGroup = vm.$element.find('.list-group'); |
| 88 | 85 | } |
| 89 | 86 | vm._listGroup.slideToggle(); |
| ... | ... | @@ -105,4 +102,4 @@ |
| 105 | 102 | return directive; |
| 106 | 103 | } |
| 107 | 104 | |
| 108 | -})(); | |
| 109 | 105 | \ No newline at end of file |
| 106 | +})(); | ... | ... |
src/app/components/proposal-box/proposal-box.directive.js
src/app/components/proposal-carousel/proposal-carousel.directive.js
| ... | ... | @@ -22,11 +22,11 @@ |
| 22 | 22 | vm.init(); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - ProposalCarouselController.prototype.init = function () { | |
| 25 | + ProposalCarouselController.prototype.init = function() { | |
| 26 | 26 | // initial values |
| 27 | 27 | var vm = this; |
| 28 | 28 | |
| 29 | - if(!vm.proposals){ | |
| 29 | + if (!vm.proposals) { | |
| 30 | 30 | throw { name: 'NotDefined', message: 'The attribute "proposals" is undefined.'}; |
| 31 | 31 | } |
| 32 | 32 | |
| ... | ... | @@ -36,38 +36,38 @@ |
| 36 | 36 | vm.proposalsLength = vm.proposals.length; |
| 37 | 37 | }; |
| 38 | 38 | |
| 39 | - ProposalCarouselController.prototype.swipeLeft = function () { | |
| 39 | + ProposalCarouselController.prototype.swipeLeft = function() { | |
| 40 | 40 | var vm = this; |
| 41 | 41 | |
| 42 | 42 | vm.activeIndex = (vm.activeIndex < vm.proposalsLength - 1) ? ++vm.activeIndex : 0; |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | - ProposalCarouselController.prototype.swipeRight = function () { | |
| 45 | + ProposalCarouselController.prototype.swipeRight = function() { | |
| 46 | 46 | var vm = this; |
| 47 | 47 | |
| 48 | 48 | vm.activeIndex = (vm.activeIndex > 0) ? --vm.activeIndex : vm.proposalsLength - 1; |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | - ProposalCarouselController.prototype.switchProposal = function (index) { | |
| 51 | + ProposalCarouselController.prototype.switchProposal = function(index) { | |
| 52 | 52 | var vm = this; |
| 53 | 53 | |
| 54 | - if(index >= 0 && index < vm.proposalsLength) { | |
| 54 | + if (index >= 0 && index < vm.proposalsLength) { | |
| 55 | 55 | vm.activeIndex = index; |
| 56 | - }else{ | |
| 56 | + }else { | |
| 57 | 57 | vm.$log.warn('[switchProposal] "index" not handled:', index); |
| 58 | 58 | } |
| 59 | 59 | }; |
| 60 | 60 | |
| 61 | - ProposalCarouselController.prototype.showProposalsList = function () { | |
| 61 | + ProposalCarouselController.prototype.showProposalsList = function() { | |
| 62 | 62 | var vm = this; |
| 63 | 63 | |
| 64 | 64 | // notify parents - handled by parents |
| 65 | 65 | vm.$scope.$emit('proposal-carousel:showProposalsList'); |
| 66 | 66 | }; |
| 67 | 67 | |
| 68 | - ProposalCarouselController.prototype.showContent = function (proposal) { | |
| 68 | + ProposalCarouselController.prototype.showContent = function(proposal) { | |
| 69 | 69 | var vm = this; |
| 70 | - console.log("PROPOSAL-CARROUSEL",proposal); | |
| 70 | + | |
| 71 | 71 | vm.$state.go('programa', { |
| 72 | 72 | slug: proposal.parent.slug, |
| 73 | 73 | proposal_id: proposal.proposal_id |
| ... | ... | @@ -89,8 +89,7 @@ |
| 89 | 89 | bindToController: true |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | - | |
| 93 | 92 | return directive; |
| 94 | 93 | } |
| 95 | 94 | |
| 96 | -})(); | |
| 97 | 95 | \ No newline at end of file |
| 96 | +})(); | ... | ... |
src/app/components/proposal-list/proposal-list.directive.js
src/app/pages/auth/auth.controller.js
| ... | ... | @@ -100,7 +100,7 @@ |
| 100 | 100 | vm.$log.debug('response', response); |
| 101 | 101 | |
| 102 | 102 | var logged_in = response.data.logged_in; |
| 103 | - var message = response.data.message; | |
| 103 | + // var message = response.data.message; | |
| 104 | 104 | var private_token = response.data.private_token; |
| 105 | 105 | |
| 106 | 106 | // Garante que o 'user' sempre terá a propriedade 'private_token' | ... | ... |
src/app/pages/programas/programa.controller.js
src/app/pages/propostas/propostas.controller.js
| ... | ... | @@ -172,7 +172,7 @@ |
| 172 | 172 | vm.DialogaService.searchProposals(params, function(data){ |
| 173 | 173 | vm.total_proposals = parseInt(data._obj.headers('total')); |
| 174 | 174 | vm.filtredProposals = data.articles; |
| 175 | - console.log("FiltredProposals",vm.filtredProposals); | |
| 175 | + | |
| 176 | 176 | vm.loadingProposals = false; |
| 177 | 177 | }, function (error) { |
| 178 | 178 | vm.error = error; | ... | ... |
src/app/pages/ranking/ranking.controller.js
src/app/pages/respostas/respostas.controller.js
| ... | ... | @@ -200,8 +200,7 @@ |
| 200 | 200 | |
| 201 | 201 | vm.total_proposals = parseInt(data._obj.headers('total')); |
| 202 | 202 | vm.filtredProposals = data.articles; |
| 203 | - console.log("vm.filtredProposals",vm.filtredProposals); | |
| 204 | - | |
| 203 | + | |
| 205 | 204 | vm.loadingProposals = false; |
| 206 | 205 | }, function (error) { |
| 207 | 206 | vm.error = error; | ... | ... |