summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-07 09:55:53 +0100
committerPhil Hughes <me@iamphill.com>2016-06-14 08:36:07 +0100
commit05525b5531f570e144341faad7428a6099a82710 (patch)
tree902cc8bd29eb3fc821676054662e91a2f49837e0
parent82be673bec39f626cc97bdaa24007684404fc25e (diff)
downloadgitlab-ce-05525b5531f570e144341faad7428a6099a82710.tar.gz
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
-rw-r--r--app/assets/javascripts/right_sidebar.js.coffee8
-rw-r--r--app/assets/stylesheets/pages/issuable.scss2
2 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/right_sidebar.js.coffee b/app/assets/javascripts/right_sidebar.js.coffee
index 3ee943fe78c..def735d3b4a 100644
--- a/app/assets/javascripts/right_sidebar.js.coffee
+++ b/app/assets/javascripts/right_sidebar.js.coffee
@@ -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')
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index acbb7e7f713..f57845ad9c9 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -263,7 +263,7 @@
}
}
- a:not(.issuable-header-btn) {
+ a {
&:hover {
color: $md-link-color;
text-decoration: none;