Commit 05525b55 authored by Phil Hughes's avatar Phil Hughes

Fixed issue with todo button not updating state

This would happen when a todo already exists, the state of the button
wouldn't update after the ajax call
parent 82be673b
......@@ -70,18 +70,18 @@ class @Sidebar
$('.js-issuable-todo-loading').addClass 'hidden'
if data.count is 0
$this.removeAttr 'data-id'
$btnText.text $this.data('todo-text')
$todoPendingCount
.addClass 'hidden'
else
$btnText.text $this.data('mark-text')
$todoPendingCount
.removeClass 'hidden'
if data.todo?
$btnText.text $this.data('mark-text')
$this.attr 'data-id', data.todo.id
else
$this.removeAttr 'data-id'
$btnText.text $this.data('todo-text')
sidebarDropdownLoading: (e) ->
$sidebarCollapsedIcon = $(@).closest('.block').find('.sidebar-collapsed-icon')
......
......@@ -263,7 +263,7 @@
}
}
a:not(.issuable-header-btn) {
a {
&:hover {
color: $md-link-color;
text-decoration: none;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment