Sha256: 28146b4322da7893ea3f40a937d51ef1514eff102be4b4f8f9fd3843a0976bac

Contents?: true

Size: 1.44 KB

Versions: 11

Compression:

Stored size: 1.44 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors.
//            Portions ©2008-2010 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================
/*globals TestRunner */

sc_require('states/ready');

/**
  State when targets are loaded, but no target is selected.
*/
TestRunner.READY_EMPTY = SC.Responder.create({

  nextResponder: TestRunner.READY,
  
  /**
    Show laoding targets view.
  */
  didBecomeFirstResponder: function() {
    TestRunner.set('currentScene', 'testsNone');

    // if a route is pending, then try to select the target.  If no target
    // could be found, then set the final route to here.
    TestRunner.updateRoute(null, null, NO);
     
    if (TestRunner.get('routePending')) {
      var target = TestRunner.computeRouteTarget();
      if (target) TestRunner.sendAction('selectTarget', this, target);
      else TestRunner.updateRoute(null, null, YES) ;
    } 
    
  },
  
  willLoseFirstResponder: function() {
    TestRunner.set('currentScene', null);
  },
  
  /**
    While in the empty state, save the target/test and then. 
  */
  route: function(sender, params) {
    TestRunner.set('routeTarget', params.target);
    TestRunner.set('routeTest', params.test);
  }
  
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sproutcore-1.4.4-java lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.4 lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.3.1 lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.3-java lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.3 lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.2-java lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.2 lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.1-java lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.1 lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.0-java lib/frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutcore-1.4.0 lib/frameworks/sproutcore/apps/tests/states/ready_empty.js