Created
May 22, 2015 13:39
-
-
Save olivierchatry/04a77b1e9e10f4b7234a 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
| canPlayOrScrub: false, | |
| canPlayOrScrubObserver: function() { | |
| if (this.get('activities.isFulfilled')) | |
| { | |
| let allGood = this.get('activities').every( | |
| (activity) => { | |
| if (activity.get('action.isSettled')) | |
| return true; | |
| Ember.addObserver(activity, "action.isSettled", this, 'canPlayOrScrubObserver'); | |
| return false; | |
| }); | |
| this.set("canPlayOrScrub", allGood); | |
| } | |
| }.observes('activities.isFulfilled'), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment