Created
July 22, 2011 17:40
-
-
Save tritchey/1099938 to your computer and use it in GitHub Desktop.
filtering
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
ScaleUI.taskTagController = SC.ArrayController.create( | |
/** @scope ScaleUI.taskTagController.prototype */ { | |
queuedTasks: function() { | |
var content = this.get('content'); | |
if(!SC.none(content)) { | |
return content.filterProperty('state', TaskState.QUEUED); | |
} | |
}.property('@each.state').cacheable(), | |
runningTasks: function() { | |
var content = this.get('content'); | |
if(!SC.none(content)) { | |
return content.filterProperty('state', TaskState.RUNNING); | |
} | |
}.property('@each.state').cacheable(), | |
completeTasks: function() { | |
var content = this.get('content'); | |
if(!SC.none(content)) { | |
return content.filterProperty('state', TaskState.COMPLETE); | |
} | |
}.property('@each.state').cacheable(), | |
errorTasks: function() { | |
var content = this.get('content'); | |
if(!SC.none(content)) { | |
return content.filterProperty('state', TaskState.ERROR); | |
} | |
}.property('@each.state').cacheable() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment