Commit c29fb5f1b630ccceb26364a77d772714db5060e6

Authored by Leandro Santos
2 parents 5ae2859b fdc623ba

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

Showing 1 changed file with 10 additions and 7 deletions   Show diff stats
@@ -239,13 +239,13 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F @@ -239,13 +239,13 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
239 }, 239 },
240 // inicio Eduardo 240 // inicio Eduardo
241 randomProposalByTheme: function(themeClasses) { 241 randomProposalByTheme: function(themeClasses) {
242 - $('#proposal-group .proposal-list .proposal-item').hide();  
243 - $.each(themeClasses, function(i, themeClass) {  
244 - var proposalsByTheme = $('#proposal-group .proposal-list .proposal-item').find('.' + themeClass);  
245 - var randomizedIndex = Math.floor(Math.random() * proposalsByTheme.length);  
246 - var proposalToShow = $(proposalsByTheme[randomizedIndex]).parents().filter('.proposal-item');  
247 - $(proposalToShow).show();  
248 - }); 242 + $('#proposal-group .proposal-list .proposal-item').hide();
  243 + $.each(themeClasses, function(i, themeClass) {
  244 + var proposalsByTheme = $('#proposal-group .proposal-list .proposal-item').find('.' + themeClass);
  245 + var randomizedIndex = Math.floor(Math.random() * proposalsByTheme.length);
  246 + var proposalToShow = $(proposalsByTheme[randomizedIndex]).parents().filter('.proposal-item');
  247 + $(proposalToShow).show();
  248 + });
249 }, 249 },
250 display_category_tab: function(){ 250 display_category_tab: function(){
251 // $('#proposal-group').hide(); 251 // $('#proposal-group').hide();
@@ -276,6 +276,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F @@ -276,6 +276,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
276 $('#proposal-categories').hide(); 276 $('#proposal-categories').hide();
277 $('#proposal-group').hide(); 277 $('#proposal-group').hide();
278 $('.proposal-category-items').hide(); /* Hide Category Items */ 278 $('.proposal-category-items').hide(); /* Hide Category Items */
  279 + $('.content').removeClass('background'); /* Remove class background*/
279 $('nav').hide(); 280 $('nav').hide();
280 $('#content').hide(); 281 $('#content').hide();
281 $('#article-container').hide(); 282 $('#article-container').hide();
@@ -318,6 +319,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F @@ -318,6 +319,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
318 this.loadRandomProposal(topic_id); 319 this.loadRandomProposal(topic_id);
319 }, 320 },
320 display_proposal_detail: function(proposal_id){ 321 display_proposal_detail: function(proposal_id){
  322 + $('.content').removeClass('background'); /* Remove class background */
321 $('#proposal-categories').hide(); 323 $('#proposal-categories').hide();
322 $('#proposal-group').hide(); 324 $('#proposal-group').hide();
323 $('nav').hide(); 325 $('nav').hide();
@@ -354,6 +356,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F @@ -354,6 +356,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
354 $('#nav-proposal-categories a').addClass('active'); 356 $('#nav-proposal-categories a').addClass('active');
355 $('#nav-proposal-group a').removeClass('active'); 357 $('#nav-proposal-group a').removeClass('active');
356 $('#proposal-group').hide(); /* Hide section "Programas" */ 358 $('#proposal-group').hide(); /* Hide section "Programas" */
  359 + $('.content').addClass('background'); /* Add class background */
357 $('.proposal-category-items').hide(); 360 $('.proposal-category-items').hide();
358 $('.proposal-detail').hide(); 361 $('.proposal-detail').hide();
359 $item.toggle( 'blind', 200, function () { 362 $item.toggle( 'blind', 200, function () {