Created
          May 2, 2014 19:30 
        
      - 
      
 - 
        
Save ahawkins/e5471e9641614c78ac83 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | App.CiruitSwitchComponent = Ember.Component.extend({ | |
| isLocked: true, | |
| lockText: (function() { | |
| return(this.get('isLocked') === true ? 'Unlock' : 'Lock'); | |
| }).property('isLocked') | |
| }); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <script type="text/x-handlebars" data-template-name="components/circuit-switch"> | |
| {{#if isSaving}} | |
| <p>Saving....</p> | |
| {{/if}} | |
| {{input type="checkbox" name="isEnabled" checked=isEnabled disabled=isLocked}} | |
| <a {{action "toggleLock"}} class="btn">Text: {{lockText}}</a> | |
| </script> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment