Commit ffd0b176dadfdc67e91e2a5004ee0c43948955ac
Exists in
master
and in
5 other branches
Merge branch 'master' of https://gitlab.com/participa/proposal-app
Showing
5 changed files
with
20 additions
and
6 deletions
Show diff stats
Gemfile
Gemfile.lock
index.html
| ... | ... | @@ -100,8 +100,8 @@ |
| 100 | 100 | <header class="container"> |
| 101 | 101 | <a id="display-contrast" href="#">Alto Contraste</a> |
| 102 | 102 | <div class="participar"> |
| 103 | - <a href="#" class="button button-inline participe">Participe</a> | |
| 104 | - <a href="#" class="entrar">Entrar</a> | |
| 103 | + <!--<a href="#" class="button button-inline participe">Participe</a>--> | |
| 104 | + <!--<a href="#" class="entrar">Entrar</a>--> | |
| 105 | 105 | <a href="#" class="logout hide">Sair</a> |
| 106 | 106 | </div> |
| 107 | 107 | <h1> |
| ... | ... | @@ -374,7 +374,7 @@ |
| 374 | 374 | <table class="footable"> |
| 375 | 375 | <thead> |
| 376 | 376 | <tr class="header"> |
| 377 | - <th class="position">Posição <a href="#" class="hidden-xs"><span class="fa fa-question"></span></a></th> | |
| 377 | + <th class="position">Posição <a href="#/artigo/108047" class="hidden-xs"><span class="fa fa-question"></span></a></th> | |
| 378 | 378 | <th class="abstract-text" data-toggle="true">Propostas</th> |
| 379 | 379 | <th class="views" data-hide="phone">Exibições</th> |
| 380 | 380 | <th class="votes-for" data-hide="phone"><span class="sr-only">A favor</span><span class="fa fa-check"></span></th> | ... | ... |
js/main.js
| ... | ... | @@ -183,6 +183,9 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 183 | 183 | } |
| 184 | 184 | }); |
| 185 | 185 | } |
| 186 | + $resultsContainer.find('.abstract-text .truncated').click(function() { | |
| 187 | + $(this).toggleClass('truncated'); | |
| 188 | + }); | |
| 186 | 189 | |
| 187 | 190 | // scroll to the end |
| 188 | 191 | $('html, body').animate({ |
| ... | ... | @@ -199,6 +202,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 199 | 202 | var requireLoginContainer = loginButton.closest('.require-login-container'); |
| 200 | 203 | |
| 201 | 204 | if(logged_in) { |
| 205 | + $('.logout').show(); | |
| 202 | 206 | if(token){ |
| 203 | 207 | Main.private_token = token; |
| 204 | 208 | } |
| ... | ... | @@ -219,6 +223,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 219 | 223 | } else { |
| 220 | 224 | requireLoginContainer.find('.require-login').hide(); |
| 221 | 225 | requireLoginContainer.find('.login-container').show(); |
| 226 | + $('.logout').hide(); | |
| 222 | 227 | } |
| 223 | 228 | }, |
| 224 | 229 | guid: function() { |
| ... | ... | @@ -279,6 +284,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 279 | 284 | $('#content').show(); |
| 280 | 285 | $('#article-container').hide(); |
| 281 | 286 | $('nav').show(); |
| 287 | + $('html, body').animate({ scrollTop: $('#proposal-group').offset().top }, 'fast'); | |
| 282 | 288 | }, |
| 283 | 289 | // fim Eduardo |
| 284 | 290 | display_proposal: function(proposal_id){ |
| ... | ... | @@ -481,6 +487,8 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 481 | 487 | }else{ |
| 482 | 488 | if(navOffset){ |
| 483 | 489 | scrollTop = navOffset.top; |
| 490 | + } else { | |
| 491 | + scrollTop = $('#proposal-group').offset().top; | |
| 484 | 492 | } |
| 485 | 493 | } |
| 486 | 494 | } |
| ... | ... | @@ -737,6 +745,8 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 737 | 745 | }); |
| 738 | 746 | }); |
| 739 | 747 | |
| 748 | + | |
| 749 | + | |
| 740 | 750 | }) |
| 741 | 751 | .fail(function( jqxhr, textStatus, error ) { |
| 742 | 752 | var err = textStatus + ', ' + error; |
| ... | ... | @@ -757,6 +767,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 757 | 767 | $.getJSON(url).done(function( /*data*/ ) { |
| 758 | 768 | logged_in = true; |
| 759 | 769 | Main.private_token = $.cookie('_dialoga_session'); |
| 770 | + setTimeout(function(){ $('.logout').show(); }, 2000); | |
| 760 | 771 | }); |
| 761 | 772 | } |
| 762 | 773 | |
| ... | ... | @@ -866,7 +877,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 866 | 877 | e.preventDefault(); |
| 867 | 878 | }); |
| 868 | 879 | |
| 869 | - $(document).on('click', '.logout', function (){ | |
| 880 | + $(document).on('click', '.logout', function (e){ | |
| 870 | 881 | var self = $(this); |
| 871 | 882 | $.removeCookie('*'); |
| 872 | 883 | logged_in = false; |
| ... | ... | @@ -892,5 +903,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 892 | 903 | console.log('The browser not supports the hashchange event!'); |
| 893 | 904 | } |
| 894 | 905 | |
| 906 | + | |
| 907 | + | |
| 895 | 908 | return Main; |
| 896 | 909 | }); | ... | ... |