Commit 4af0146f authored by Phil Hughes's avatar Phil Hughes Committed by Douwe Maan

Assigns to variable rather than using VueJS method

parent 511a0788
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
methods: methods:
updateAll: -> updateAll: ->
ids = CommentsStore.getAllForState(this.allResolved) ids = CommentsStore.getAllForState(this.allResolved)
this.$set('loading', true) this.loading = true
ResolveService ResolveService
.resolveAll(this.endpoint, ids, !this.allResolved) .resolveAll(this.endpoint, ids, !this.allResolved)
.done => .done =>
CommentsStore.updateAll(!this.allResolved) CommentsStore.updateAll(!this.allResolved)
.always => .always =>
this.$set('loading', false) this.loading = false
...@@ -16,16 +16,15 @@ ...@@ -16,16 +16,15 @@
.tooltip('hide') .tooltip('hide')
.tooltip('fixTitle') .tooltip('fixTitle')
resolve: -> resolve: ->
this.$set('loading', true) this.loading = true
ResolveService ResolveService
.resolve(this.endpoint, !this.isResolved) .resolve(this.endpoint, !this.isResolved)
.done => .done =>
this.$set('loading', false)
CommentsStore.update(this.noteId, !this.isResolved) CommentsStore.update(this.noteId, !this.isResolved)
this.$nextTick this.updateTooltip this.$nextTick this.updateTooltip
.always => .always =>
this.$set('loading', false) this.loading = false
compiled: -> compiled: ->
$(this.$els.button).tooltip() $(this.$els.button).tooltip()
destroyed: -> destroyed: ->
......
...@@ -68,12 +68,12 @@ class Projects::NotesController < Projects::ApplicationController ...@@ -68,12 +68,12 @@ class Projects::NotesController < Projects::ApplicationController
def resolve def resolve
sleep 2 sleep 2
render nothing: true, status: 200 head :ok
end end
def resolve_all def resolve_all
sleep 2 sleep 2
render nothing: true, status: 200 head :ok
end end
private private
......
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