Sha256: b934074678899310ababf793646feed7caf13191681292267b94ea6cd08e21b1

Contents?: true

Size: 1.77 KB

Versions: 35

Compression:

Stored size: 1.77 KB

Contents

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

//better default state name...
SC.DEFAULT_TREE = 'main';

/** @namespace

  My cool new app.  Describe your application.
  
  @extends SC.Object
*/
Greenhouse = SC.Object.create( SC.StatechartManager,
  /** @scope Greenhouse.prototype */ {

  NAMESPACE: 'Greenhouse',
  VERSION: '0.1.0',
  
  /*
    types fom json
  */
  FILE: 'file',
  DIR: 'dir',
  
  store: SC.Store.create().from('Greenhouse.DataSource'),
  
  //statechart options
  monitorIsActive: YES,
  
  
    
  loadIframeWithPage: function(firstTime){
    var c = Greenhouse.fileController.get('content'), iframe = Greenhouse.get('iframe'), namespace, page;
    var r = c.get('pageRegex'), mainPane;
    namespace = r[1];
    page = r[2];
    
  
    if(namespace && page && iframe){
      if(iframe[namespace] && !iframe[namespace][page]) iframe.eval(c.get('body'));
      
      //just change main view for now...
      namespace = iframe[namespace];
      //setup the designer container
      if(firstTime){
        mainPane = iframe.SC.designPage.get('designMainPane');
        mainPane.append();
      }

      //get the designs...
      namespace[page].set('needsDesigner', YES);
      this.pageController.set('content', namespace[page]);
      
      
      iframe.SC.RunLoop.begin();
      if(!firstTime) iframe.SC.designController.set('content', null);
      iframe.SC.designsController.setDesigns(namespace[page],iframe);
      iframe.SC.designPage.designMainPane.viewList.contentView.set('content', Greenhouse.iframe.SC.designsController.get('content'));
      iframe.SC.RunLoop.end();
    }
  }
});

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
sproutcore-1.6.0.beta.3-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js
sproutcore-1.6.0.beta.3 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js
sproutcore-1.6.0.beta.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js
sproutcore-1.6.0.beta.2-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js
sproutcore-1.6.0.beta.2 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js
sproutcore-1.6.0.beta.1 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js
sproutcore-1.5.0-java lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js
sproutcore-1.5.0 lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js
sproutcore-1.5.0.rc.2 lib/frameworks/sproutcore/apps/greenhouse/core.js
sproutcore-1.5.0.rc.1 lib/frameworks/sproutcore/apps/greenhouse/core.js
spade-0.0.1 sproutcore/apps/greenhouse/core.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/apps/greenhouse/core.js
sproutcore-1.5.0.pre.4.1 lib/frameworks/sproutcore/apps/greenhouse/core.js
sproutcore-1.5.0.pre.4 lib/frameworks/sproutcore/apps/greenhouse/core.js
sproutcore-1.5.0.pre.3 lib/frameworks/sproutcore/apps/greenhouse/core.js