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