Sha256: affdf135c61ec60e46afa33d84e0eef9d4221b1daf915b2f817fd3e87e84719c

Contents?: true

Size: 1.53 KB

Versions: 30

Compression:

Stored size: 1.53 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================
// ==========================================================================
// Project:   SC.designController
// ==========================================================================
/*globals SC */

/** @class

  (Document Your Controller Here)

  @extends SC.Object
*/
SC.designController = SC.ObjectController.create(
/** @scope SC.designController.prototype */ {

  contentBinding: 'SC.designsController.selection',
  contentBindingDefault: SC.Binding.single(),
  
  viewSelected: function(){
    var c = this.get('content'), pane, designer, pageController;
    if(c){
      pane = c.get('view');
      if(pane.kindOf && pane.kindOf(SC.View)){
        pageController = SC.designsController.getPath('page.designController');
        designer = pane.get('designer');
        //make this designer the rootDesigner
        if(pageController && designer) {
          designer.set('designIsEnabled', NO);
          pageController.makeRootDesigner(designer);
        }
      }
      else if(SC._Greenhouse){
        SC._Greenhouse.designController.set('content', pane.get('designer'));
        SC._Greenhouse.sendAction('floatInspector');
      }
    }
  }
}) ;

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
sproutcore-1.9.2 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.9.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.9.0 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.8.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.8.0 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.rc.1-java lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js
sproutcore-1.6.0.beta.3-x86-mingw32 lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js