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:
parent
2450f9fe9d
commit
e5ae06afeb
|
@ -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'))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{#if _active}}
|
||||
{{#if active}}
|
||||
ON
|
||||
{{else}}
|
||||
OFF
|
||||
|
|
Loading…
Reference in New Issue
Block a user