Commit 1539dc9e717966376ea4dad9b68a771d618805cc
Exists in
master
and in
4 other branches
Merge branch 'correcoes'
Showing
7 changed files
with
16 additions
and
13 deletions
Show diff stats
src/app/components/category-list/category-list.directive.js
@@ -28,13 +28,12 @@ | @@ -28,13 +28,12 @@ | ||
28 | 28 | ||
29 | CategoryListController.prototype.init = function() { | 29 | CategoryListController.prototype.init = function() { |
30 | var vm = this; | 30 | var vm = this; |
31 | - vm.pathUrl = vm.$location.$$path; | ||
32 | - //var pathUrl = String(window.location.pathname) | ||
33 | - vm.escodeRemover = true; | ||
34 | 31 | ||
35 | - // Disable button remove of page ranking | ||
36 | - if(vm.pathUrl=="/ranking"){ | ||
37 | - vm.escodeRemover = false; | 32 | + vm.showCloseBtn = null; |
33 | + | ||
34 | + // Disable button close of page ranking | ||
35 | + if(vm.$location.path() == "/ranking"){ | ||
36 | + vm.showCloseBtn = false; | ||
38 | } | 37 | } |
39 | 38 | ||
40 | // Default values | 39 | // Default values |
src/app/components/category-list/category-list.html
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | <span class="category-list--icon icon" aria-hidden="true" ng-class="'icon-tema-' + category.slug + '-small'"></span> | 16 | <span class="category-list--icon icon" aria-hidden="true" ng-class="'icon-tema-' + category.slug + '-small'"></span> |
17 | <span class="category-list--label">{{::category.name}}</span> | 17 | <span class="category-list--label">{{::category.name}}</span> |
18 | <span class="category-list--icon--right glyphicon glyphicon-chevron-right hidden-xs" ng-hide="vm.selectedCategory.slug === category.slug"></span> | 18 | <span class="category-list--icon--right glyphicon glyphicon-chevron-right hidden-xs" ng-hide="vm.selectedCategory.slug === category.slug"></span> |
19 | - <span ng-if="vm.escodeRemover" class="category-list--icon--right glyphicon glyphicon-remove hidden-xs" ng-show="vm.selectedCategory.slug === category.slug"></span> | 19 | + <span ng-if="showCloseBtn" class="category-list--icon--right glyphicon glyphicon-remove hidden-xs" ng-show="vm.selectedCategory.slug === category.slug"></span> |
20 | <div ng-if="category.archived" class="category-list--icon-archived"> | 20 | <div ng-if="category.archived" class="category-list--icon-archived"> |
21 | <span class="glyphicon glyphicon-ok" aria-hidden="true"></span> | 21 | <span class="glyphicon glyphicon-ok" aria-hidden="true"></span> |
22 | </div> | 22 | </div> |
src/app/components/proposal-box/proposal-box.directive.js
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | function proposalBox() { | 9 | function proposalBox() { |
10 | 10 | ||
11 | /** @ngInject */ | 11 | /** @ngInject */ |
12 | - function ProposalBoxController($scope, $rootScope, $state, $timeout, $interval, $window, VOTE_STATUS, VOTE_OPTIONS, AuthService, DialogaService, $log) { | 12 | + function ProposalBoxController($scope, $location, $rootScope, $state, $timeout, $interval, $window, VOTE_STATUS, VOTE_OPTIONS, AuthService, DialogaService, $log) { |
13 | $log.debug('ProposalBoxController'); | 13 | $log.debug('ProposalBoxController'); |
14 | 14 | ||
15 | var vm = this; | 15 | var vm = this; |
@@ -23,6 +23,7 @@ | @@ -23,6 +23,7 @@ | ||
23 | vm.VOTE_OPTIONS = VOTE_OPTIONS; | 23 | vm.VOTE_OPTIONS = VOTE_OPTIONS; |
24 | vm.AuthService = AuthService; | 24 | vm.AuthService = AuthService; |
25 | vm.$log = $log; | 25 | vm.$log = $log; |
26 | + vm.$location = $location; | ||
26 | 27 | ||
27 | vm.init(); | 28 | vm.init(); |
28 | vm.addListeners(); | 29 | vm.addListeners(); |
@@ -40,8 +41,7 @@ | @@ -40,8 +41,7 @@ | ||
40 | vm.showCaptchaForm = null; | 41 | vm.showCaptchaForm = null; |
41 | vm.voteProposalRedirectURI = null; | 42 | vm.voteProposalRedirectURI = null; |
42 | vm.proposalsImg = null; | 43 | vm.proposalsImg = null; |
43 | - | ||
44 | - | 44 | + |
45 | var slug = vm.topic.slug; | 45 | var slug = vm.topic.slug; |
46 | var proposal_id = vm.proposal.id; | 46 | var proposal_id = vm.proposal.id; |
47 | vm.voteProposalRedirectURI = 'state=programa&task=vote-proposal&slug=' + slug + '&proposal_id=' + proposal_id; | 47 | vm.voteProposalRedirectURI = 'state=programa&task=vote-proposal&slug=' + slug + '&proposal_id=' + proposal_id; |
@@ -250,6 +250,7 @@ | @@ -250,6 +250,7 @@ | ||
250 | proposal: '=', | 250 | proposal: '=', |
251 | showVote: '=', | 251 | showVote: '=', |
252 | topic: '=', | 252 | topic: '=', |
253 | + location: '=', | ||
253 | }, | 254 | }, |
254 | controller: ProposalBoxController, | 255 | controller: ProposalBoxController, |
255 | controllerAs: 'vm', | 256 | controllerAs: 'vm', |
src/app/components/proposal-box/proposal-box.html
@@ -196,8 +196,8 @@ | @@ -196,8 +196,8 @@ | ||
196 | </div> | 196 | </div> |
197 | </div> | 197 | </div> |
198 | <div class="proposal-box--bottom text-center" ng-class="{archived: vm.archived}"> | 198 | <div class="proposal-box--bottom text-center" ng-class="{archived: vm.archived}"> |
199 | - <div class="proposal-box--share"> | ||
200 | - <span>COMPARTILHE ESTA <b>PROPOSTA</b></span> | 199 | + <div class="proposal-box--share" ng-class="{'text-right': vm.location == '/respostas' }"> |
200 | + <span ng-hide="vm.location == '/respostas'">COMPARTILHE ESTA <b>PROPOSTA</b></span> | ||
201 | <div class="dropdown"> | 201 | <div class="dropdown"> |
202 | <button id="dropdown-share-btn" class="btn btn-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Mostrar ou esconder a lista redes sociais para compartilhamento"><span class="icon icon-social-share-small" aria-hidden="true"></span></button> | 202 | <button id="dropdown-share-btn" class="btn btn-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Mostrar ou esconder a lista redes sociais para compartilhamento"><span class="icon icon-social-share-small" aria-hidden="true"></span></button> |
203 | <social-share class="dropdown-menu dropdown-menu-right"></social-share> | 203 | <social-share class="dropdown-menu dropdown-menu-right"></social-share> |
src/app/components/proposal-grid/proposal-grid.html
@@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
7 | category="proposal.parent.categories[0]" | 7 | category="proposal.parent.categories[0]" |
8 | show-vote="false" | 8 | show-vote="false" |
9 | class="col-xs-12 col-sm-6" | 9 | class="col-xs-12 col-sm-6" |
10 | + location="vm.$location.path()" | ||
10 | ></proposal-box> | 11 | ></proposal-box> |
11 | <div ng-if="$odd" class="clearfix"></div> | 12 | <div ng-if="$odd" class="clearfix"></div> |
12 | </div> | 13 | </div> |
src/app/pages/propostas/propostas.controller.js
@@ -172,6 +172,7 @@ | @@ -172,6 +172,7 @@ | ||
172 | vm.DialogaService.searchProposals(params, function(data){ | 172 | vm.DialogaService.searchProposals(params, function(data){ |
173 | vm.total_proposals = parseInt(data._obj.headers('total')); | 173 | vm.total_proposals = parseInt(data._obj.headers('total')); |
174 | vm.filtredProposals = data.articles; | 174 | vm.filtredProposals = data.articles; |
175 | + console.log("FiltredProposals",vm.filtredProposals); | ||
175 | vm.loadingProposals = false; | 176 | vm.loadingProposals = false; |
176 | }, function (error) { | 177 | }, function (error) { |
177 | vm.error = error; | 178 | vm.error = error; |
src/app/pages/respostas/respostas.controller.js
@@ -200,7 +200,8 @@ | @@ -200,7 +200,8 @@ | ||
200 | 200 | ||
201 | vm.total_proposals = parseInt(data._obj.headers('total')); | 201 | vm.total_proposals = parseInt(data._obj.headers('total')); |
202 | vm.filtredProposals = data.articles; | 202 | vm.filtredProposals = data.articles; |
203 | - | 203 | + console.log("vm.filtredProposals",vm.filtredProposals); |
204 | + | ||
204 | vm.loadingProposals = false; | 205 | vm.loadingProposals = false; |
205 | }, function (error) { | 206 | }, function (error) { |
206 | vm.error = error; | 207 | vm.error = error; |