Commit c29fb5f1b630ccceb26364a77d772714db5060e6
Exists in
master
and in
5 other branches
Merge branch 'master' of gitlab.com:participa/proposal-app
Showing
1 changed file
with
10 additions
and
7 deletions
Show diff stats
js/main.js
... | ... | @@ -239,13 +239,13 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
239 | 239 | }, |
240 | 240 | // inicio Eduardo |
241 | 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 | 250 | display_category_tab: function(){ |
251 | 251 | // $('#proposal-group').hide(); |
... | ... | @@ -276,6 +276,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
276 | 276 | $('#proposal-categories').hide(); |
277 | 277 | $('#proposal-group').hide(); |
278 | 278 | $('.proposal-category-items').hide(); /* Hide Category Items */ |
279 | + $('.content').removeClass('background'); /* Remove class background*/ | |
279 | 280 | $('nav').hide(); |
280 | 281 | $('#content').hide(); |
281 | 282 | $('#article-container').hide(); |
... | ... | @@ -318,6 +319,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
318 | 319 | this.loadRandomProposal(topic_id); |
319 | 320 | }, |
320 | 321 | display_proposal_detail: function(proposal_id){ |
322 | + $('.content').removeClass('background'); /* Remove class background */ | |
321 | 323 | $('#proposal-categories').hide(); |
322 | 324 | $('#proposal-group').hide(); |
323 | 325 | $('nav').hide(); |
... | ... | @@ -354,6 +356,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
354 | 356 | $('#nav-proposal-categories a').addClass('active'); |
355 | 357 | $('#nav-proposal-group a').removeClass('active'); |
356 | 358 | $('#proposal-group').hide(); /* Hide section "Programas" */ |
359 | + $('.content').addClass('background'); /* Add class background */ | |
357 | 360 | $('.proposal-category-items').hide(); |
358 | 361 | $('.proposal-detail').hide(); |
359 | 362 | $item.toggle( 'blind', 200, function () { | ... | ... |