Sha256: 0e10e0fb57c94778ee77291583dad2bee9e2f08b1c504dc3c3c52ace76a654b0

Contents?: true

Size: 1.08 KB

Versions: 42

Compression:

Stored size: 1.08 KB

Contents

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

/** @class

  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 relaod 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

42 entries across 42 versions & 2 rubygems

Version Path
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.1 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.rc.1-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.beta.3-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.beta.3-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.beta.3 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.beta.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.beta.2-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.beta.2 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js
sproutcore-1.6.0.beta.1 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js