Sha256: 536575e738278d0bb7c3a58eea844f55126e7c7a6e2c27e7499c3eab9c17985a
Contents?: true
Size: 953 Bytes
Versions: 33
Compression:
Stored size: 953 Bytes
Contents
pageflow.stageProvider = { initialize: function() { var finishedStates = [this.readyState]; var stages = _.result(this, 'stages') || []; this.stages = new Backbone.Collection(_.chain(stages).slice().reverse().map(function (options) { var name = options.name; options.file = this; options.finishedStates = finishedStates; var fileStage = new pageflow.FileStage({name: name}, options); finishedStates = finishedStates.concat(fileStage.nonFinishedStates); return fileStage; }, this).reverse().value()); this.unfinishedStages = new pageflow.SubsetCollection({ parent: this.stages, watchAttribute: 'finished', filter: function(stage) { return !stage.get('finished'); } }); }, currentStage: function() { return this.stages.find(function(stage) { return stage.get('active') || stage.get('action_required') || stage.get('failed'); }); } };
Version data entries
33 entries across 33 versions & 1 rubygems