Commit bc331d73eaaf97594e62021cf7128edcb495710f
1 parent
7d4ede45
Exists in
master
and in
2 other branches
4 Fixes: (1) Warn if login contains capital letters (2) Bugfix regarding topics …
…(3) Show scrollbars on smaller screens (4) Increase title length on proposal list
Showing
5 changed files
with
18 additions
and
6 deletions
Show diff stats
ConfJuvApp/builds/confjuv-dev.apk
No preview for this file type
ConfJuvApp/builds/confjuvapp-live.apk
No preview for this file type
ConfJuvApp/builds/confjuvapp-web.zip
No preview for this file type
ConfJuvApp/www/html/_proposal_list.html
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | on-swipe-left="" on-swipe-right="" on-partial-swipe="cardPartialSwipe(amt)"> |
13 | 13 | <div class="card animate-show" ng-show="proposal.topic.selected"> |
14 | 14 | <h3> |
15 | - {{proposal.title | limitTo:20}} | |
15 | + {{proposal.title | limitTo:100}} | |
16 | 16 | <br /> |
17 | 17 | <small>Autor: {{proposal.author.name}}</small> |
18 | 18 | </h3> | ... | ... |
ConfJuvApp/www/js/controllers.js
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | angular.module('confjuvapp.controllers', []) |
4 | 4 | .controller('ProposalCtrl', function($scope, $ionicModal, $http, $ionicPopup, filterFilter) { |
5 | 5 | |
6 | - $scope.largeScreen = (window.innerWidth >= 768); | |
6 | + $scope.largeScreen = (window.innerWidth >= 600); | |
7 | 7 | |
8 | 8 | $scope.loading = false; |
9 | 9 | |
... | ... | @@ -138,6 +138,10 @@ angular.module('confjuvapp.controllers', []) |
138 | 138 | $ionicPopup.alert({ title: 'Registrar', template: 'Você deve concordar com os termos de uso e regimento da Conferência' }); |
139 | 139 | return; |
140 | 140 | } |
141 | + else if (/[A-Z]/.test(data.login)) { | |
142 | + $ionicPopup.alert({ title: 'Registrar', template: 'O seu login não deve ter letras maiúsculas' }); | |
143 | + return; | |
144 | + } | |
141 | 145 | |
142 | 146 | $scope.loading = true; |
143 | 147 | |
... | ... | @@ -293,9 +297,18 @@ angular.module('confjuvapp.controllers', []) |
293 | 297 | $scope.loading = false; |
294 | 298 | var topics = resp.data.articles; |
295 | 299 | for (var i = 0; i < topics.length; i++) { |
296 | - var topic = topics[i]; | |
297 | - topic.selected = true; | |
298 | - $scope.topics.push(topic); | |
300 | + var topic_id = topics[i].id; | |
301 | + var topic = null; | |
302 | + for (var j = 0; j < $scope.topics.length; j++) { | |
303 | + if (topic_id == $scope.topics[j].id) { | |
304 | + topic = $scope.topics[j]; | |
305 | + } | |
306 | + } | |
307 | + if (topic == null) { | |
308 | + topic = topics[i]; | |
309 | + topic.selected = true; | |
310 | + $scope.topics.push(topic); | |
311 | + } | |
299 | 312 | $scope.proposalsByTopic[topic.id] = []; |
300 | 313 | $scope.loadProposals(token, topic); |
301 | 314 | } |
... | ... | @@ -349,7 +362,6 @@ angular.module('confjuvapp.controllers', []) |
349 | 362 | } |
350 | 363 | if ($scope.proposalList.length == 0){ |
351 | 364 | $scope.forceReload = true; |
352 | - $scope.topics = []; | |
353 | 365 | } |
354 | 366 | for (var i = 0; i < $scope.proposalList.length; i++) { |
355 | 367 | var card = $scope.proposalList[i]; | ... | ... |