Commit ffd0b176dadfdc67e91e2a5004ee0c43948955ac

Authored by Leonardo Merlin
2 parents e25c6279 2203e2e6

Merge branch 'master' of https://gitlab.com/participa/proposal-app

Gemfile
1 1 source 'https://rubygems.org'
2   -gem 'sass', '~> 3.4.9'
  2 +gem 'sass', '3.4.13'
... ...
Gemfile.lock
... ... @@ -7,4 +7,4 @@ PLATFORMS
7 7 ruby
8 8  
9 9 DEPENDENCIES
10   - sass (~> 3.4.13)
  10 + sass (= 3.4.13)
... ...
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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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([&#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;], 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 });
... ...
sass/style.sass
... ... @@ -790,6 +790,7 @@ td
790 790 text-align: center
791 791 .abstract-text
792 792 width: 80%
  793 + cursor: pointer
793 794 p
794 795 margin: inherit
795 796 .value
... ...