Commit 474fe5544cb0df0567a806c66de99eb2501a3512
1 parent
61267f5d
Exists in
master
and in
2 other branches
Ticket #83: Just show "more comments" button if there are 20 comments
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
www/html/_proposal.html
@@ -73,7 +73,7 @@ | @@ -73,7 +73,7 @@ | ||
73 | </div> | 73 | </div> |
74 | 74 | ||
75 | <p style="text-align: center;"> | 75 | <p style="text-align: center;"> |
76 | - <button class="button icon-left ion-plus-circled" ng-click="loadComments()">Mais comentários</button> | 76 | + <button class="button icon-left ion-plus-circled" ng-click="loadComments()" ng-show="proposal.comments.length >= 20">Mais comentários</button> |
77 | </p> | 77 | </p> |
78 | </div> | 78 | </div> |
79 | </ion-content> | 79 | </ion-content> |
www/js/controllers.js
@@ -538,7 +538,7 @@ angular.module('confjuvapp.controllers', []) | @@ -538,7 +538,7 @@ angular.module('confjuvapp.controllers', []) | ||
538 | } | 538 | } |
539 | else { | 539 | else { |
540 | // Initiate the modal | 540 | // Initiate the modal |
541 | - $ionicModal.fromTemplateUrl('html/_proposal.html?17', { | 541 | + $ionicModal.fromTemplateUrl('html/_proposal.html?18', { |
542 | scope: $scope, | 542 | scope: $scope, |
543 | animation: 'slide-in-up' | 543 | animation: 'slide-in-up' |
544 | }).then(function(modal) { | 544 | }).then(function(modal) { |
@@ -942,7 +942,7 @@ angular.module('confjuvapp.controllers', []) | @@ -942,7 +942,7 @@ angular.module('confjuvapp.controllers', []) | ||
942 | if (!$scope.proposal.comments) $scope.proposal.comments = []; | 942 | if (!$scope.proposal.comments) $scope.proposal.comments = []; |
943 | 943 | ||
944 | var last = $scope.proposal.lastCommentId || 0; | 944 | var last = $scope.proposal.lastCommentId || 0; |
945 | - path = 'articles/' + $scope.proposal.id + '/comments?oldest&reference_id=' + last + '&private_token=' + $scope.token; | 945 | + path = 'articles/' + $scope.proposal.id + '/comments?oldest&reference_id=' + last + '&private_token=' + $scope.token + '&t=' + (new Date().getTime()); |
946 | 946 | ||
947 | $http.get(ConfJuvAppUtils.pathTo(path), config) | 947 | $http.get(ConfJuvAppUtils.pathTo(path), config) |
948 | .then(function(resp) { | 948 | .then(function(resp) { |