From 0a5f7371f3e1c6c169b3817388b546d3cad96ce7 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 27 Apr 2016 10:07:10 +0200 Subject: [PATCH] fix history tab change --- app/coffee/modules/common/history.coffee | 4 ++-- app/partials/common/history/history-base.jade | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/coffee/modules/common/history.coffee b/app/coffee/modules/common/history.coffee index f426a66a..c8017ed2 100644 --- a/app/coffee/modules/common/history.coffee +++ b/app/coffee/modules/common/history.coffee @@ -467,11 +467,11 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c $el.on "focus", ".add-comment textarea", (event) -> $(this).addClass('active') - $el.on "click", ".history-tabs li", (event) -> + $el.on "click", ".history-tabs a", (event) -> target = angular.element(event.currentTarget) $el.find(".history-tabs li").removeClass("active") - target.addClass("active") + target.parent().addClass("active") $el.find(".history section").addClass("hidden") $el.find(".history section.#{target.data('section-class')}").removeClass("hidden") diff --git a/app/partials/common/history/history-base.jade b/app/partials/common/history/history-base.jade index b085dd69..1fddd9c4 100644 --- a/app/partials/common/history/history-base.jade +++ b/app/partials/common/history/history-base.jade @@ -4,10 +4,9 @@ section.history <% if (commentsVisible || historyVisible) { %> ul.history-tabs <% if (commentsVisible) { %> - li + li.active a( href="", - class="active", data-section-class="history-comments" ) tg-svg(svg-icon="icon-writer")