Commit d9af820888a4871c2ca6e88798b648b84777bebc
1 parent
4a22ff51
Exists in
master
and in
8 other branches
Refact: canUnselect -> disableUnselect
Showing
2 changed files
with
7 additions
and
7 deletions
Show diff stats
src/app/components/category-list/category-list.directive.js
... | ... | @@ -32,14 +32,14 @@ |
32 | 32 | } |
33 | 33 | }; |
34 | 34 | |
35 | - CategoryListController.prototype._canUnselect = function() { | |
35 | + CategoryListController.prototype._disableUnselect = function() { | |
36 | 36 | var vm = this; |
37 | 37 | |
38 | - if(vm.canUnselect && vm.canUnselect === 'false'){ | |
39 | - return false; | |
38 | + if(vm.disableUnselect && vm.disableUnselect === 'true'){ | |
39 | + return true; | |
40 | 40 | } |
41 | 41 | |
42 | - return true; | |
42 | + return false; | |
43 | 43 | }; |
44 | 44 | |
45 | 45 | |
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | vm.selectedCategory = category; |
54 | 54 | }else{ |
55 | 55 | |
56 | - if(!vm._canUnselect()){ | |
56 | + if(vm._disableUnselect()){ | |
57 | 57 | vm.$log.info('Unselect is disabled.'); |
58 | 58 | return; |
59 | 59 | } |
... | ... | @@ -82,7 +82,7 @@ |
82 | 82 | scope: { |
83 | 83 | categories: '=', |
84 | 84 | selectedCategory: '=', |
85 | - canUnselect: '@' | |
85 | + disableUnselect: '@' | |
86 | 86 | }, |
87 | 87 | controller: CategoryListController, |
88 | 88 | controllerAs: 'vm', | ... | ... |
src/app/pages/propostas/ranking.html
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | </div> |
39 | 39 | </div> |
40 | 40 | <div ng-if="pagePropostas.themes"> |
41 | - <category-list categories="pagePropostas.themes" selected-category="pagePropostas.selectedTheme" can-unselect="false"></category-list> | |
41 | + <category-list categories="pagePropostas.themes" selected-category="pagePropostas.selectedTheme" disable-unselect="true"></category-list> | |
42 | 42 | </div> |
43 | 43 | <div ng-if="pagePropostas.filtredPrograms" class="topics-select--wrapper"> |
44 | 44 | <topics-select topics="pagePropostas.filtredPrograms" selected-topic="pagePropostas.selectedProgram"></topics-select> | ... | ... |