Commit 3361ce40c6b94f337c2d0edc39642394f245ece4
Exists in
master
and in
3 other branches
Merge branch 'master' into staging
Showing
3 changed files
with
52 additions
and
17 deletions
Show diff stats
src/app/pages/programas/programa.controller.js
@@ -98,6 +98,17 @@ | @@ -98,6 +98,17 @@ | ||
98 | vm.proposalsTopRated = vm.proposals.slice(0, 3); | 98 | vm.proposalsTopRated = vm.proposals.slice(0, 3); |
99 | vm.loadingTopProposals = false; | 99 | vm.loadingTopProposals = false; |
100 | 100 | ||
101 | + // HACK: get image from body 'proposal' | ||
102 | + // remove tags html | ||
103 | + for (var j = vm.proposalsTopRated.length - 1; j >= 0; j--) { | ||
104 | + var proposalTopRated = vm.proposalsTopRated[j]; | ||
105 | + if (proposalTopRated && proposalTopRated.body && proposalTopRated.body.length > 0) { | ||
106 | + proposalTopRated.body = String(proposalTopRated.body).replace(/<[^>]+>/gm, ''); | ||
107 | + }else{ | ||
108 | + proposalTopRated.body = vm.banner.src; | ||
109 | + } | ||
110 | + } | ||
111 | + | ||
101 | if (vm.article.archived) { | 112 | if (vm.article.archived) { |
102 | 113 | ||
103 | // show 'respostas e compromissos', | 114 | // show 'respostas e compromissos', |
@@ -121,19 +132,6 @@ | @@ -121,19 +132,6 @@ | ||
121 | 132 | ||
122 | // set focus at proposal, ASYNC | 133 | // set focus at proposal, ASYNC |
123 | vm.$rootScope.findElAsyncAndFocus('.sub-section-' + proposal_id); | 134 | vm.$rootScope.findElAsyncAndFocus('.sub-section-' + proposal_id); |
124 | - | ||
125 | - // TODO: load and show proposal response | ||
126 | - } | ||
127 | - } | ||
128 | - | ||
129 | - // HACK: get image from body 'proposal' | ||
130 | - // remove tags html | ||
131 | - for (var j = vm.proposalsTopRated.length - 1; j >= 0; j--) { | ||
132 | - var proposalTopRated = vm.proposalsTopRated[j]; | ||
133 | - if (proposalTopRated && proposalTopRated.body && proposalTopRated.body.length > 0) { | ||
134 | - proposalTopRated.body = String(proposalTopRated.body).replace(/<[^>]+>/gm, ''); | ||
135 | - }else{ | ||
136 | - proposalTopRated.body = vm.banner.src; | ||
137 | } | 135 | } |
138 | } | 136 | } |
139 | 137 |
src/app/pages/programas/programa.html
@@ -242,7 +242,7 @@ | @@ -242,7 +242,7 @@ | ||
242 | <div class="sub-section sub-section-{{::proposal.id}}" ng-class="{'sub-section-even': ( ($index+1) % 2 === 0), 'sub-section-odd': ( ($index+1) % 2 === 1)}"> | 242 | <div class="sub-section sub-section-{{::proposal.id}}" ng-class="{'sub-section-even': ( ($index+1) % 2 === 0), 'sub-section-odd': ( ($index+1) % 2 === 1)}"> |
243 | <div class="container"> | 243 | <div class="container"> |
244 | <div class="row"> | 244 | <div class="row"> |
245 | - <div class="col-sm-4 col-md-3"> | 245 | + <div class="col-xs-6 col-sm-4 col-md-3"> |
246 | <div class="img-mask--container" ng-style="{'background-image':'url( {{::proposal.body}} )'}"> | 246 | <div class="img-mask--container" ng-style="{'background-image':'url( {{::proposal.body}} )'}"> |
247 | <div class="img-mask--background ng-scope"> | 247 | <div class="img-mask--background ng-scope"> |
248 | <div class="icon icon-programa-respondido"> | 248 | <div class="icon icon-programa-respondido"> |
@@ -253,11 +253,24 @@ | @@ -253,11 +253,24 @@ | ||
253 | </div> | 253 | </div> |
254 | </div> | 254 | </div> |
255 | </div> | 255 | </div> |
256 | - <div class="col-sm-8 col-md-9"> | 256 | + <div class="col-xs-6 col-sm-8 col-md-9"> |
257 | <br> | 257 | <br> |
258 | <h3 class="color-theme-fg">{{($index+1)}}ª proposta mais votada:</h3> | 258 | <h3 class="color-theme-fg">{{($index+1)}}ª proposta mais votada:</h3> |
259 | <p>{{::proposal.abstract}}</p> | 259 | <p>{{::proposal.abstract}}</p> |
260 | - <div class="button--themed"> | 260 | + <div class="hidden-xs"> |
261 | + <div class="button--themed" style="margin: 10px 0;"> | ||
262 | + <button class="btn btn-block btn-responsive" ng-click="pagePrograma.toggleResponseVisibility(proposal)"> | ||
263 | + Veja a resposta e o compromisso do governo | ||
264 | + <div class="button-left-icon"> | ||
265 | + <span class="glyphicon glyphicon-chevron-down pull-right color-theme-common-fg" aria-hidden="true"></span> | ||
266 | + </div> | ||
267 | + </button> | ||
268 | + </div> | ||
269 | + <br> | ||
270 | + </div> | ||
271 | + </div> | ||
272 | + <div class="col-xs-12 visible-xs"> | ||
273 | + <div class="button--themed" style="margin: 10px 0;"> | ||
261 | <button class="btn btn-block btn-responsive" ng-click="pagePrograma.toggleResponseVisibility(proposal)"> | 274 | <button class="btn btn-block btn-responsive" ng-click="pagePrograma.toggleResponseVisibility(proposal)"> |
262 | Veja a resposta e o compromisso do governo | 275 | Veja a resposta e o compromisso do governo |
263 | <div class="button-left-icon"> | 276 | <div class="button-left-icon"> |
@@ -265,7 +278,6 @@ | @@ -265,7 +278,6 @@ | ||
265 | </div> | 278 | </div> |
266 | </button> | 279 | </button> |
267 | </div> | 280 | </div> |
268 | - <br> | ||
269 | </div> | 281 | </div> |
270 | </div> | 282 | </div> |
271 | </div> | 283 | </div> |
src/app/pages/programas/programas.scss
@@ -271,6 +271,29 @@ | @@ -271,6 +271,29 @@ | ||
271 | 271 | ||
272 | .gov-response { | 272 | .gov-response { |
273 | background-color: #e1e1e1; | 273 | background-color: #e1e1e1; |
274 | + | ||
275 | + &--link-list .btn{ | ||
276 | + | ||
277 | + @media screen and (max-width: $screen-xs) { | ||
278 | + padding-right: 50px; | ||
279 | + padding-left: 15px; | ||
280 | + } | ||
281 | + | ||
282 | + } | ||
283 | + } | ||
284 | + | ||
285 | + | ||
286 | + .icon-programa-respondido { | ||
287 | + @media screen and (max-width: $screen-xs) { | ||
288 | + transform: scale(0.6); | ||
289 | + margin-left: -10px; | ||
290 | + } | ||
291 | + } | ||
292 | + | ||
293 | + .img-mask--container { | ||
294 | + @media screen and (max-width: $screen-xs) { | ||
295 | + min-width: 145px; | ||
296 | + } | ||
274 | } | 297 | } |
275 | 298 | ||
276 | .button--themed { | 299 | .button--themed { |
@@ -285,6 +308,8 @@ | @@ -285,6 +308,8 @@ | ||
285 | .btn-responsive { | 308 | .btn-responsive { |
286 | white-space: normal !important; | 309 | white-space: normal !important; |
287 | word-wrap: break-word; | 310 | word-wrap: break-word; |
311 | + padding-right: 40px; | ||
312 | + padding-left: 15px; | ||
288 | } | 313 | } |
289 | } | 314 | } |
290 | 315 |