Sha256: 1ae3333bb7a9c700f0a48747bcb3749da636231343b9ca077bfe3c9cbaf9a89c

Contents?: true

Size: 1.06 KB

Versions: 11

Compression:

Stored size: 1.06 KB

Contents

// ==========================================================================
// Project:   Greenhouse.targetsController
// Copyright: ©2010 Mike Ball
// ==========================================================================
/*globals Greenhouse */

/**

  The full set of targets available in the application.  This is populated
  automatically when you call loadTargets().


  This Class comes from SproutCore's test runner


  @extends SC.ArrayController
*/

Greenhouse.targetsController = SC.ArrayController.create(
/** @scope Greenhouse.targetsController.prototype */ {

  /**
    Call this method whenever you want to reload the targets from the server.
  */
  reload: function() {
    var targets = Greenhouse.store.find(Greenhouse.TARGETS_QUERY);

    this.set('content', targets);
  },

  /**
    Generates the Array of Apps in this project
  */
  applications: function() {
    var apps = [];

    this.forEach(function(target) {
      if (target.get('sortKind') === "app") apps.pushObject(target);
    }, this);

    return apps;
  }.property('[]').cacheable()
}) ;

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.11.0.rc3 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.11.0.rc2 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.11.0.rc1 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.10.3.1 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.10.2 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.10.1 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.10.0 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.10.0.rc.3 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/apps/greenhouse/controllers/targets.js