Sha256: 7fc3f74106c6974830683a7ee339b3817aaae88741420e72840d8b8eed7115d7

Contents?: true

Size: 972 Bytes

Versions: 35

Compression:

Stored size: 972 Bytes

Contents

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

/** @class

  (Document Your Controller Here)

  @extends SC.ObjectController
*/

Greenhouse.fileController = SC.ObjectController.create(
/** @scope Greenhouse.fileController.prototype */ {

  contentBinding: 'Greenhouse.filesController.selection',
  contentBindingDefault: SC.Binding.single(),
  

  _content_statusDidChange: function(){
    var c = this.get('content');
    if(c && c.get('isPage') ) {
      this.invokeOnce(function(){
        Greenhouse.sendAction('fileSelectedIsAPage');
        Greenhouse.sendAction('cancel');
      });
    }
    else if (c && !c.get('isPage')){
      this.invokeOnce(function(){
        Greenhouse.sendAction('fileSelectedIsNotAPage');
      });
    }
  }.observes('*content.body')  
}) ;

Version data entries

35 entries across 35 versions & 2 rubygems

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