Sha256: 65fed621aec20ce10f58212c481a06794cfdc27cf19ee3330e4c399016a73227

Contents?: true

Size: 1.43 KB

Versions: 9

Compression:

Stored size: 1.43 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
//            Portions ©2008-2009 Apple, Inc. All rights reserved.
// License:   Licened 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

9 entries across 9 versions & 1 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090720093355 frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutit-sproutcore-1.0.0.20090720202429 frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutit-sproutcore-1.0.0.20090721125122 frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutit-sproutcore-1.0.126 frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutit-sproutcore-1.0.20090721145251 frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutit-sproutcore-1.0.20090721145280 frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutit-sproutcore-1.0.20090721145281 frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutit-sproutcore-1.0.20090721145282 frameworks/sproutcore/apps/tests/states/ready_empty.js
sproutit-sproutcore-1.0.203 frameworks/sproutcore/apps/tests/states/ready_empty.js