Commit 8a71d83e526b3f5f865fb10bf0eee1e53432eb86
1 parent
0854dc91
Exists in
master
and in
8 other branches
Sync
Showing
4 changed files
with
28 additions
and
87 deletions
Show diff stats
src/app/components/article-service/article.service.js
| ... | ... | @@ -21,6 +21,7 @@ |
| 21 | 21 | getProposals: getProposals, |
| 22 | 22 | getProposalsByTopicId: getProposalsByTopicId, |
| 23 | 23 | getEvents: getEvents, |
| 24 | + subscribeToEvent: subscribeToEvent, | |
| 24 | 25 | searchTopics: searchTopics, |
| 25 | 26 | searchProposals: searchProposals |
| 26 | 27 | }; |
| ... | ... | @@ -93,18 +94,21 @@ |
| 93 | 94 | function getProposals (params, cbSuccess, cbError) { |
| 94 | 95 | // Ex.: /api/v1/articles/103358?fields= |
| 95 | 96 | |
| 96 | - var url = service.apiArticles + API.articleId.home; | |
| 97 | + // var url = service.apiArticles + API.articleId.home; | |
| 97 | 98 | |
| 98 | - var paramsExtended = angular.extend({ | |
| 99 | - // 'fields[]': ['id', 'title', 'slug', 'abstract', 'categories', 'setting', 'children', 'children_count'], | |
| 100 | - 'content_type':'ProposalsDiscussionPlugin::Proposal' | |
| 101 | - }, params); | |
| 99 | + // var paramsExtended = angular.extend({ | |
| 100 | + // // 'fields[]': ['id', 'title', 'slug', 'abstract', 'categories', 'setting', 'children', 'children_count'], | |
| 101 | + // 'content_type':'ProposalsDiscussionPlugin::Proposal' | |
| 102 | + // }, params); | |
| 102 | 103 | |
| 103 | - UtilService.get(url, {params: paramsExtended}).then(function(data){ | |
| 104 | - cbSuccess(data); | |
| 105 | - }).catch(function(error){ | |
| 106 | - cbError(error); | |
| 107 | - }); | |
| 104 | + // UtilService.get(url, {params: paramsExtended}).then(function(data){ | |
| 105 | + // cbSuccess(data); | |
| 106 | + // }).catch(function(error){ | |
| 107 | + // cbError(error); | |
| 108 | + // }); | |
| 109 | + | |
| 110 | + // | |
| 111 | + searchTopics(params, cbSuccess, cbError); | |
| 108 | 112 | } |
| 109 | 113 | |
| 110 | 114 | /** |
| ... | ... | @@ -152,6 +156,19 @@ |
| 152 | 156 | }); |
| 153 | 157 | } |
| 154 | 158 | |
| 159 | + function subscribeToEvent (event_id, params, cbSuccess, cbError) { | |
| 160 | + var url = service.apiArticles + event_id + '/follow'; | |
| 161 | + var paramsExtended = angular.extend({ | |
| 162 | + private_token: API.token | |
| 163 | + }, params); | |
| 164 | + | |
| 165 | + UtilService.post(url, {params: paramsExtended}).then(function(data){ | |
| 166 | + cbSuccess(data.articles); | |
| 167 | + }).catch(function(error){ | |
| 168 | + cbError(error); | |
| 169 | + }); | |
| 170 | + } | |
| 171 | + | |
| 155 | 172 | function searchTopics (params, cbSuccess, cbError) { |
| 156 | 173 | // Ex.: /api/v1/search/article?type=ProposalsDiscussionPlugin::Topic&query=cisternas |
| 157 | 174 | var url = '/api/v1/search/article'; | ... | ... |
src/app/pages/auth/message.html
| ... | ... | @@ -1,63 +0,0 @@ |
| 1 | -<!-- APENAS PARA TESTE DO SHOW MESSAGE E DO MODAL DE TERMOS DE USO --> | |
| 2 | -<section | |
| 3 | - role="main" | |
| 4 | - class="section-gray auth-content"> | |
| 5 | - <div class="container"> | |
| 6 | - <show-message | |
| 7 | - type="'success'" | |
| 8 | - title="'Cadastro efetuado com sucesso :)'" | |
| 9 | - message="'Agora você faz parte do Dialoga Brasil. Você será redirecionado para a página (página) em 10 segundos'"></show-message> | |
| 10 | - </div> | |
| 11 | - | |
| 12 | - <a href="#termosDeUso" data-toggle="modal">Termos de Uso</a> | |
| 13 | - | |
| 14 | - <div class="modal fade" id="termosDeUso" tabindex="-1" role="dialog" aria-labelledby="termosDeUsoLabel"> | |
| 15 | - <div class="modal-dialog" role="document"> | |
| 16 | - <div class="modal-content"> | |
| 17 | - <div class="modal-header modal-termos-uso-header"> | |
| 18 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
| 19 | - <span aria-hidden="true" class="modal-fechar-pequeno">FECHAR</span> | |
| 20 | - <span aria-hidden="true" class="modal-fechar-grande">X</span> | |
| 21 | - </button> | |
| 22 | - </div> | |
| 23 | - <div class="modal-body modal-termos-uso-body"> | |
| 24 | - <div class="modal-termos-uso-body-inner"> | |
| 25 | - <h3>Termos de Uso</h3> | |
| 26 | - <p> | |
| 27 | - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
| 28 | - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
| 29 | - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | |
| 30 | - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | |
| 31 | - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | |
| 32 | - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
| 33 | - </p> | |
| 34 | - <p> | |
| 35 | - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
| 36 | - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
| 37 | - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | |
| 38 | - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | |
| 39 | - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | |
| 40 | - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
| 41 | - </p> | |
| 42 | - <p> | |
| 43 | - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
| 44 | - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
| 45 | - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | |
| 46 | - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | |
| 47 | - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | |
| 48 | - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
| 49 | - </p> | |
| 50 | - <p> | |
| 51 | - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
| 52 | - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
| 53 | - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | |
| 54 | - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | |
| 55 | - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | |
| 56 | - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
| 57 | - </p> | |
| 58 | - </div> | |
| 59 | - </div> | |
| 60 | - </div> | |
| 61 | - </div> | |
| 62 | - </div> | |
| 63 | -</section> |
src/app/pages/propostas/cadastro-proposta.html
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -<!-- APENAS PARA TESTE DO ENVIAR PROPOSTA --> | |
| 2 | -<div class="container"> | |
| 3 | - <div class="row"> | |
| 4 | - <div class="col-sm-12"> | |
| 5 | - </div> | |
| 6 | - </div> | |
| 7 | -</div> | |
| 8 | - | |
| 9 | -<section class="section-gray auth-content ng-scope"> | |
| 10 | - <div class="container"> | |
| 11 | - <cadastro-proposta></cadastro-proposta> | |
| 12 | - </div> | |
| 13 | -</section> |
src/app/pages/propostas/propostas.controller.js
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | |
| 46 | 46 | // load Proposals |
| 47 | 47 | vm.loadingProposals = true; |
| 48 | - vm.DialogaService.getProposalsByTopicId(103644, {}, function(data){ | |
| 48 | + vm.DialogaService.getProposals({}, function(data){ | |
| 49 | 49 | vm.proposals = data.articles; |
| 50 | 50 | vm.filtredProposals = vm.proposals; |
| 51 | 51 | vm.loadingProposals = false; | ... | ... |