Don't allow to change hook's state while it's saving

This commit is contained in:
Piotr Sarnacki 2012-11-28 20:11:01 +01:00
parent 9cb451d68b
commit 875295c1a1
2 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ require 'travis/model'
).property()
toggle: ->
return if @get('isSaving')
transaction = @get('store').transaction()
transaction.add this

View File

@ -19,6 +19,7 @@
{{#each hook in hooks}}
<li {{bindAttr class="hook.active:active"}}>
<a {{bindAttr href="hook.urlGithub"}} rel="nofollow">{{hook.slug}}</a>
{{#if hook.isSaving}}<span class="loading"></span>{{/if}}
<p class="description">{{hook.description}}</p>
<div class="controls">