Remove unused controllers

This commit is contained in:
Piotr Sarnacki 2015-05-08 15:15:19 +02:00
parent 4201b81fe8
commit d2dd744811
2 changed files with 0 additions and 52 deletions

View File

@ -1,25 +0,0 @@
`import Ember from 'ember'`
`import Ajax from 'travis/utils/ajax'`
Controller = Ember.ObjectController.extend
isDeleting: false
needs: ['repo', 'caches']
repo: Ember.computed.alias('controllers.repo.repo')
actions:
delete: ->
return if @get('isDeleting')
if confirm('Are you sure?')
@set('isDeleting', true)
data = { branch: @get('branch') }
deletingDone = => @set('isDeleting', false)
repo = @get('repo')
Ajax.ajax("/repos/#{repo.get('id')}/caches", "DELETE", data: data).then(deletingDone, deletingDone).then =>
model = @get('model')
@get('controllers.caches').removeObject(model)
`export default Controller`

View File

@ -1,27 +0,0 @@
`import Ember from 'ember'`
`import Ajax from 'travis/utils/ajax'`
Controller = Ember.ObjectController.extend
isDeleting: false
needs: ['repo', 'caches']
repo: Ember.computed.alias('controllers.repo.repo')
actions:
delete: ->
return if @get('isDeleting')
if confirm('Are you sure?')
@set('isDeleting', true)
data = { branch: @get('branch'), match: @get('slug') }
deletingDone = => @set('isDeleting', false)
repo = @get('repo')
Ajax.ajax("/repos/#{repo.get('id')}/caches", "DELETE", data: data).then(deletingDone, deletingDone).then =>
model = @get('model')
@get('parent.caches').removeObject(model)
if @get('parent.caches.length') == 0
@get('controllers.caches').removeObject(@get('parent'))
`export default Controller`