Revert "Use switches on settings pane"

This reverts commit 357b176f93.

This commit seems to be where the bug with enabling hooks was
introduced, and reverting this commit seems to fix that bug.

Conflicts:
	assets/scripts/app/controllers.coffee
	assets/scripts/app/templates/repo/settings.hbs
This commit is contained in:
Henrik Hodne 2014-02-12 09:53:17 -06:00
parent 2450f9fe9d
commit e5ae06afeb
2 changed files with 4 additions and 14 deletions

View File

@ -1,19 +1,9 @@
Travis.TravisSwitchComponent = Ember.Component.extend
tagName: 'a'
classNames: ['travis-switch']
classNameBindings: ['_active:active']
classNameBindings: ['active']
# TODO: how to handle overriding properties to
# avoid naming it _action?
_active: (->
@get('target.active') || @get('active')
).property('target.active', 'active')
activeBinding: 'target.active'
click: ->
if target = @get('target')
@set('target.active', !@get('target.active'))
else
@set('active', !@get('active'))
# allow for bindings to propagate
Ember.run.next this, ->
@sendAction('action', target)
@sendAction('action', @get('target'))

View File

@ -1,4 +1,4 @@
{{#if _active}}
{{#if active}}
ON
{{else}}
OFF