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
|
Travis.TravisSwitchComponent = Ember.Component.extend
|
||||||
tagName: 'a'
|
tagName: 'a'
|
||||||
classNames: ['travis-switch']
|
classNames: ['travis-switch']
|
||||||
classNameBindings: ['_active:active']
|
classNameBindings: ['active']
|
||||||
|
|
||||||
# TODO: how to handle overriding properties to
|
activeBinding: 'target.active'
|
||||||
# avoid naming it _action?
|
|
||||||
_active: (->
|
|
||||||
@get('target.active') || @get('active')
|
|
||||||
).property('target.active', 'active')
|
|
||||||
|
|
||||||
click: ->
|
click: ->
|
||||||
if target = @get('target')
|
@sendAction('action', @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)
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{#if _active}}
|
{{#if active}}
|
||||||
ON
|
ON
|
||||||
{{else}}
|
{{else}}
|
||||||
OFF
|
OFF
|
||||||
|
|
Loading…
Reference in New Issue
Block a user