From 1a7ccd0f0aacb33be3d8d3456bdedd8f08b7cc96 Mon Sep 17 00:00:00 2001 From: Phil Hughes <me@iamphill.com> Date: Wed, 20 Apr 2016 11:47:35 +0100 Subject: [PATCH] Removed animation from labels filter --- app/assets/javascripts/issues.js.coffee | 30 +++++---------------- app/views/shared/_labels_row.html.haml | 2 +- app/views/shared/issuable/_filter.html.haml | 2 +- 3 files changed, 9 insertions(+), 25 deletions(-) diff --git a/app/assets/javascripts/issues.js.coffee b/app/assets/javascripts/issues.js.coffee index f26b4f723eb..8719d22a5bb 100644 --- a/app/assets/javascripts/issues.js.coffee +++ b/app/assets/javascripts/issues.js.coffee @@ -29,11 +29,9 @@ toggleLabelFilters: ()-> $filteredLabels = $('.filtered-labels') if $filteredLabels.find('.label-row').length > 0 - #$filteredLabels.show() - $filteredLabels.slideDown().css({'overflow':'visible'}) + $filteredLabels.removeClass('hidden') else - #$filteredLabels.hide() - $filteredLabels.slideUp().css({'overflow':'visible'}) + $filteredLabels.addClass('hidden') reload: -> Issues.initChecks() @@ -96,25 +94,11 @@ Issues.reload() Issues.updateStateFilters() $filteredLabels = $('.filtered-labels') - $filteredLabelsSpans = $filteredLabels.find('.label-row') - gl.animate.animateEach( - $filteredLabelsSpans, 'fadeOutDown', 20, - cssStart: - opacity: 1 - cssEnd: - opacity: 0 - ).then( -> - if typeof Issue.labelRow is 'function' - $filteredLabels.html(Issue.labelRow(data)) - Issues.toggleLabelFilters() - $spans = $filteredLabels.find('.label-row') - $spans.css('opacity', 0) - return gl.animate.animateEach $spans, 'fadeInUp', 20, - cssStart: - opacity: 0 - cssEnd: - opacity: 1 - ) + + if typeof Issue.labelRow is 'function' + $filteredLabels.html(Issue.labelRow(data)) + + Issues.toggleLabelFilters() dataType: "json" diff --git a/app/views/shared/_labels_row.html.haml b/app/views/shared/_labels_row.html.haml index 09dc6d97d10..dc89e36419c 100644 --- a/app/views/shared/_labels_row.html.haml +++ b/app/views/shared/_labels_row.html.haml @@ -1,3 +1,3 @@ - labels.each do |label| %span.label-row - = link_to_label(label, tooltip: false) \ No newline at end of file + = link_to_label(label, tooltip: false) diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index c14391ada0f..9dba3f522db 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -46,7 +46,7 @@ .filter-item.inline = button_tag "Update issues", class: "btn update_selected_issues btn-save" - .gray-content-block.second-block.filtered-labels + .gray-content-block.second-block.filtered-labels{ class: ("hidden" if !@labels) } - if @labels = render "shared/labels_row", labels: @labels -- GitLab