Commit f8ef25b1db580d3218339fbeb4f81c249215bc53
Exists in
master
and in
10 other branches
Merge branch 'fix-22' into 'master'
Fix issue #22 Resolve o problema da Issue #22 - "Alguns programas não exibem etiqueta de tema (categoria)" See merge request !7
Showing
2 changed files
with
11 additions
and
9 deletions
Show diff stats
js/handlebars-helpers.js
| ... | ... | @@ -13,20 +13,22 @@ Handlebars.registerHelper('list_proposal', function(proposals, options) { |
| 13 | 13 | for(var i=0, j=proposals.length; i<j; i++) { |
| 14 | 14 | element = "<li class='proposal-item'><div class='item'>"; |
| 15 | 15 | category = "<ul class='category'>"; |
| 16 | - | |
| 17 | - for(var x=0, y=proposals[i].categories.length; x<y; x++) { | |
| 18 | - if((options.hash['category'] != null) && (options.hash['category'] != proposals[i].categories[x].slug)){ | |
| 16 | + | |
| 17 | + var proposal = proposals[i]; | |
| 18 | + | |
| 19 | + for(var x=0, y=proposal.categories.length; x<y; x++) { | |
| 20 | + if((options.hash['category'] != null) && (options.hash['category'] != proposal.categories[x].slug)){ | |
| 19 | 21 | element = ''; |
| 20 | 22 | continue; |
| 21 | 23 | } |
| 22 | - category = category + '<li class="category-'+proposals[i].categories[x].slug+'">' + proposals[i].categories[x].name + '</li>'; | |
| 24 | + category = category + '<li class="category-'+proposal.categories[x].slug+'">' + proposal.categories[x].name + '</li>'; | |
| 23 | 25 | } |
| 24 | 26 | if(element == ''){ |
| 25 | 27 | continue; |
| 26 | 28 | } |
| 27 | 29 | category = category + '</ul>'; |
| 28 | - element = element + options.fn(proposals[i]); | |
| 29 | - element = element + (proposals[i].abstract ? proposals[i].abstract : ''); | |
| 30 | + element = element + options.fn(proposal); | |
| 31 | + element = element + (proposal.abstract ? proposal.abstract : ''); | |
| 30 | 32 | |
| 31 | 33 | element = element + category; |
| 32 | 34 | ret = ret + element + '</div></li>'; | ... | ... |
js/main.js
| ... | ... | @@ -61,7 +61,7 @@ $.getJSON(noosferoAPI) |
| 61 | 61 | $('#proposal-group').show(); |
| 62 | 62 | $('#nav-proposal-group a').addClass('active'); |
| 63 | 63 | $('#nav-proposal-categories a').removeClass('active'); |
| 64 | - $(".proposal-item").dotdotdot(); | |
| 64 | + $(".proposal-item p").dotdotdot(); | |
| 65 | 65 | event.preventDefault(); |
| 66 | 66 | }); |
| 67 | 67 | $( '.proposal-item a' ).click(function(event){ |
| ... | ... | @@ -78,9 +78,9 @@ $.getJSON(noosferoAPI) |
| 78 | 78 | $('.proposal-category-items').hide(); |
| 79 | 79 | $('.proposal-detail').hide(); |
| 80 | 80 | $('#' + item).show(); |
| 81 | - $(".proposal-item").dotdotdot(); | |
| 81 | + $(".proposal-item p").dotdotdot(); | |
| 82 | 82 | $('.proposal-category .arrow-box').hide(); |
| 83 | - $(this).parent('.proposal-category').data('category') | |
| 83 | + $(this).parent('.proposal-category').data('category'); | |
| 84 | 84 | $('#proposal-category-'+$(this).parent('.proposal-category').data('category')).find('.arrow-box').show(); |
| 85 | 85 | } |
| 86 | 86 | event.preventDefault(); | ... | ... |