diff options
Diffstat (limited to 'pyload/web/app/scripts/collections/ProgressList.js')
-rw-r--r-- | pyload/web/app/scripts/collections/ProgressList.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pyload/web/app/scripts/collections/ProgressList.js b/pyload/web/app/scripts/collections/ProgressList.js index 51849d8de..51132d86d 100644 --- a/pyload/web/app/scripts/collections/ProgressList.js +++ b/pyload/web/app/scripts/collections/ProgressList.js @@ -11,6 +11,14 @@ define(['jquery', 'backbone', 'underscore', 'models/Progress'], function($, Back initialize: function() { + }, + + // returns all progresses, that bit matches the given type + // types have to be or'ed + byType: function(types) { + return this.filter(function(progress) { + return (progress.get('type') & types) !== 0; + }); } }); |