Commit 1539dc9e717966376ea4dad9b68a771d618805cc

Authored by Rafael Diego
2 parents 57ffd959 50c95ea1

Merge branch 'correcoes'

src/app/components/category-list/category-list.directive.js
... ... @@ -28,13 +28,12 @@
28 28  
29 29 CategoryListController.prototype.init = function() {
30 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 39 // Default values
... ...
src/app/components/category-list/category-list.html
... ... @@ -16,7 +16,7 @@
16 16 <span class="category-list--icon icon" aria-hidden="true" ng-class="'icon-tema-' + category.slug + '-small'"></span>
17 17 <span class="category-list--label">{{::category.name}}</span>
18 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 20 <div ng-if="category.archived" class="category-list--icon-archived">
21 21 <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
22 22 </div>
... ...
src/app/components/proposal-box/proposal-box.directive.js
... ... @@ -9,7 +9,7 @@
9 9 function proposalBox() {
10 10  
11 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 13 $log.debug('ProposalBoxController');
14 14  
15 15 var vm = this;
... ... @@ -23,6 +23,7 @@
23 23 vm.VOTE_OPTIONS = VOTE_OPTIONS;
24 24 vm.AuthService = AuthService;
25 25 vm.$log = $log;
  26 + vm.$location = $location;
26 27  
27 28 vm.init();
28 29 vm.addListeners();
... ... @@ -40,8 +41,7 @@
40 41 vm.showCaptchaForm = null;
41 42 vm.voteProposalRedirectURI = null;
42 43 vm.proposalsImg = null;
43   -
44   -
  44 +
45 45 var slug = vm.topic.slug;
46 46 var proposal_id = vm.proposal.id;
47 47 vm.voteProposalRedirectURI = 'state=programa&task=vote-proposal&slug=' + slug + '&proposal_id=' + proposal_id;
... ... @@ -250,6 +250,7 @@
250 250 proposal: '=',
251 251 showVote: '=',
252 252 topic: '=',
  253 + location: '=',
253 254 },
254 255 controller: ProposalBoxController,
255 256 controllerAs: 'vm',
... ...
src/app/components/proposal-box/proposal-box.html
... ... @@ -196,8 +196,8 @@
196 196 </div>
197 197 </div>
198 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 201 <div class="dropdown">
202 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 203 <social-share class="dropdown-menu dropdown-menu-right"></social-share>
... ...
src/app/components/proposal-grid/proposal-grid.html
... ... @@ -7,6 +7,7 @@
7 7 category="proposal.parent.categories[0]"
8 8 show-vote="false"
9 9 class="col-xs-12 col-sm-6"
  10 + location="vm.$location.path()"
10 11 ></proposal-box>
11 12 <div ng-if="$odd" class="clearfix"></div>
12 13 </div>
... ...
src/app/pages/propostas/propostas.controller.js
... ... @@ -172,6 +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 vm.loadingProposals = false;
176 177 }, function (error) {
177 178 vm.error = error;
... ...
src/app/pages/respostas/respostas.controller.js
... ... @@ -200,7 +200,8 @@
200 200  
201 201 vm.total_proposals = parseInt(data._obj.headers('total'));
202 202 vm.filtredProposals = data.articles;
203   -
  203 + console.log("vm.filtredProposals",vm.filtredProposals);
  204 +
204 205 vm.loadingProposals = false;
205 206 }, function (error) {
206 207 vm.error = error;
... ...