history tabs wrong behavior

stable
Xavier Julián 2016-04-08 14:05:27 +02:00
parent 95d147d9b7
commit aa1b6315c7
3 changed files with 19 additions and 19 deletions

View File

@ -421,7 +421,7 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c
# Events
$el.on "click", ".add-comment button.button-green", debounce 2000, (event) ->
$el.on "click", ".add-comment .button-green", debounce 2000, (event) ->
event.preventDefault()
target = angular.element(event.currentTarget)
@ -467,10 +467,10 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c
$el.on "focus", ".add-comment textarea", (event) ->
$(this).addClass('active')
$el.on "click", ".history-tabs li a", (event) ->
$el.on "click", ".history-tabs li", (event) ->
target = angular.element(event.currentTarget)
$el.find(".history-tabs li a").removeClass("active")
$el.find(".history-tabs li").removeClass("active")
target.addClass("active")
$el.find(".history section").addClass("hidden")

View File

@ -4,15 +4,20 @@ section.history
<% if (commentsVisible || historyVisible) { %>
ul.history-tabs
<% if (commentsVisible) { %>
li
a(href="#", class="active", data-section-class="history-comments")
li(
class="active"
data-section-class="history-comments"
)
a(href="")
svg.icon.icon-writer
use(xlink:href="#icon-writer")
span.tab-title(translate="COMMENTS.TITLE")
<% } %>
<% if (historyVisible) { %>
li
a(href="#", data-section-class="history-activity")
li(
data-section-class="history-activity"
)
a(href="")
svg.icon.icon-timeline
use(xlink:href="#icon-timeline")
span.tab-title(translate="ACTIVITY.TITLE")

View File

@ -45,21 +45,10 @@
margin-bottom: 0;
li {
@extend %large;
display: inline-block;
&:first-child {
border-right: 1px solid $whitish;
}
&:last-child {
border-right: 0;
}
}
a {
background: $white;
color: $gray-light;
border-right: 1px solid $whitish;
display: inline-block;
padding: .5rem 2rem;
position: relative;
transition: color .2s ease-in;
&.active {
color: $primary;
top: 1px;
@ -69,6 +58,12 @@
transition: color .2s ease-in;
}
}
a {
color: $gray-light;
display: block;
padding: .5rem 2rem;
transition: color .2s ease-in;
}
.icon {
fill: currentColor;
height: .75rem;