提交 4af0146f 编写于 作者: P Phil Hughes 提交者: Douwe Maan

Assigns to variable rather than using VueJS method

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册