Commit e3ce8b11e075d6c549428fad43dc19c675506643
1 parent
dea8cde2
Exists in
master
and in
2 other branches
Tags improvements: edit tag, delete tag, disclaimer about commas separation, aut…
…o-refresh tags when new ones are added/removed and implementing tag badges
Showing
7 changed files
with
16 additions
and
9 deletions
Show diff stats
.gitignore
ConfJuvApp/scss/_login.scss
ConfJuvApp/www/html/_create_tag.html
1 | 1 | <div class="modal" id="create-tag"> |
2 | 2 | <ion-content> |
3 | - <form ng-submit="createTag(data)"> | |
3 | + <form ng-submit="createTag(data)" ng-init="data.tag = proposal.tag_list.join(',')"> | |
4 | 4 | <h1 class="title"> |
5 | 5 | <span>Adicionar Tag</span> |
6 | 6 | <a class="back icon-left ion-reply" ng-click="closeTagModal()">Voltar</a> |
7 | 7 | </h1> |
8 | 8 | |
9 | 9 | <label class="item item-input"><textarea placeholder="Lista de Tags" ng-model="data.tag"></textarea></label> |
10 | + <p><small>Separe as tags por vírgulas, sem espaços entre elas. Exemplo: tag1,tag2,tag3</small></p> | |
10 | 11 | |
11 | 12 | <p class="text-center"> |
12 | 13 | <button class="button" type="submit">Enviar</button> | ... | ... |
ConfJuvApp/www/html/_proposal.html
... | ... | @@ -13,7 +13,10 @@ |
13 | 13 | <button class="button comment" ng-click="openCommentForm()"> |
14 | 14 | <i class="icon ion-chatbox-working"></i> Comentar |
15 | 15 | </button> |
16 | - <img ng-src="https://img.shields.io/badge/tag-{{proposal.topic.title}} {{proposal.tag_list.join(' ').replace('-', '--')}}-ff9800.svg" alt="" /> | |
16 | + | |
17 | + <img ng-src="https://img.shields.io/badge/tema-{{proposal.topic.title}}-ff9800.svg" alt="" /> | |
18 | + <img ng-repeat="tag in proposal.tag_list" ng-src="https://img.shields.io/badge/tag-{{tag}}-4db6ac.svg" alt="" /> | |
19 | + | |
17 | 20 | <p>{{proposal.body | htmlToPlainText}}</p> |
18 | 21 | |
19 | 22 | <h2>Comentários</h2> | ... | ... |
ConfJuvApp/www/html/_proposal_list.html
... | ... | @@ -11,7 +11,8 @@ |
11 | 11 | {{proposal.body | htmlToPlainText | limitTo:280}}... |
12 | 12 | </div> |
13 | 13 | <div class="card-footer"> |
14 | - <img ng-src="https://img.shields.io/badge/tag-{{proposal.topic.title}} {{proposal.tag_list.join(' ').replace('-', '--')}}-ff9800.svg" alt="" /> | |
14 | + <img ng-src="https://img.shields.io/badge/tema-{{proposal.topic.title}}-ff9800.svg" alt="" /> | |
15 | + <img ng-repeat="tag in proposal.tag_list" ng-src="https://img.shields.io/badge/tag-{{tag}}-4db6ac.svg" alt="" /> | |
15 | 16 | <a ng-click="openProposal(proposal)" class="icon-left ion-android-open"> Acessar</a> |
16 | 17 | </div> |
17 | 18 | <br style="clear: both;" /> | ... | ... |
ConfJuvApp/www/html/_signup_person_fields.html
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | <ul class="list" ng-if="'transgenero' == field"> |
17 | 17 | <li class="item item-checkbox"> |
18 | 18 | <label class="checkbox"> |
19 | - <input type="checkbox" ng-model="data.transgenero"> | |
19 | + <input type="checkbox" ng-model="data.transgenero" class="ckbox"> | |
20 | 20 | </label> |
21 | 21 | Sou transgênero |
22 | 22 | </li> | ... | ... |
ConfJuvApp/www/js/controllers.js
... | ... | @@ -694,7 +694,7 @@ angular.module('confjuvapp.controllers', []) |
694 | 694 | $scope.createTag = function(data) { |
695 | 695 | if (!data || !data.tag) { |
696 | 696 | $scope.closeTagModal(); |
697 | - var popup = $ionicPopup.alert({ title: 'Tag', template: 'Sua list de tags não pode ficar em branco!' }); | |
697 | + var popup = $ionicPopup.alert({ title: 'Tag', template: 'Sua lista de tags não pode ficar em branco!' }); | |
698 | 698 | popup.then(function() { |
699 | 699 | $scope.openTagForm(); |
700 | 700 | }); |
... | ... | @@ -718,10 +718,7 @@ angular.module('confjuvapp.controllers', []) |
718 | 718 | .then(function(resp) { |
719 | 719 | $scope.closeTagModal(); |
720 | 720 | var popup = $ionicPopup.alert({ title: 'Tag', template: 'Tag adicionada com sucesso!' }); |
721 | - if (!$scope.proposal.tags) { | |
722 | - $scope.proposal.tags = []; | |
723 | - } | |
724 | -// $scope.proposal.tags.unshift({ body: params.body, author: { name: $scope.user.name }}); | |
721 | + $scope.proposal.tag_list = data.tag.split(','); | |
725 | 722 | popup.then(function() { |
726 | 723 | $scope.loading = false; |
727 | 724 | }); | ... | ... |