diff --git a/app/coffee/modules/common/history.coffee b/app/coffee/modules/common/history.coffee index 90bf4521..7f17687d 100644 --- a/app/coffee/modules/common/history.coffee +++ b/app/coffee/modules/common/history.coffee @@ -416,8 +416,13 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c $(this).addClass('active') $el.on "click", ".history-tabs li a", (event) -> - $el.find(".history-tabs li a").toggleClass("active") - $el.find(".history section").toggleClass("hidden") + target = angular.element(event.currentTarget) + + $el.find(".history-tabs li a").removeClass("active") + target.addClass("active") + + $el.find(".history section").addClass("hidden") + $el.find(".history section.#{target.data('section-class')}").removeClass("hidden") $el.on "click", ".comment-delete", debounce 2000, (event) -> event.preventDefault() diff --git a/app/partials/common/history/history-base.jade b/app/partials/common/history/history-base.jade index ff6b9052..f9450728 100644 --- a/app/partials/common/history/history-base.jade +++ b/app/partials/common/history/history-base.jade @@ -1,11 +1,11 @@ section.history ul.history-tabs li - a(href="#", class="active") + a(href="#", class="active", data-section-class="history-comments") span.icon.icon-comment span.tab-title(translate="COMMENTS.TITLE") li - a(href="#") + a(href="#", data-section-class="history-activity") span.icon.icon-issues span.tab-title(translate="ACTIVITY.TITLE") section.history-comments