Sha256: 7c94a347ab49b019ac19b95c27515ade3f76470f5cad5f876838732c1037a705

Contents?: true

Size: 1.08 KB

Versions: 12

Compression:

Stored size: 1.08 KB

Contents

// ==========================================================================
// SC.CheckboxView
// ==========================================================================

require('views/button/button');

/** @class

  Disclosure triangle button.

  @extends SC.ButtonView
  @author    Charles Jolley 
  @version 1.0
*/
SC.DisclosureView = SC.ButtonView.extend(
/** @scope SC.DisclosureView.prototype */ {

  emptyElement: '<a href="javascript:;" class="sc-disclosure-view sc-button-view button disclosure"><img src="%@" class="button" /><span class="label"></span></a>'.fmt(static_url('blank')),
  
  buttonBehavior: SC.TOGGLE_BEHAVIOR,

  /**
    This is the value that will be set when the disclosure triangle is toggled
    open.
  */
  toggleOnValue: YES,
  
  /**
    The value that will be set when the disclosure triangle is toggled closed.
  */
  toggleOffValue: NO,

  valueBindingDefault: SC.Binding.Bool,
  
  init: function() {
    arguments.callee.base.apply(this,arguments) ;
    if (this.get('value') == this.get('toggleOnValue')) {
      this.set('isSelected', true) ;
    }
  }
  
}) ;

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sproutcore-0.9.10 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.11 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.12 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.13 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.2 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.3 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.5 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.4 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.9 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.6 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.7 frameworks/sproutcore/views/button/disclosure.js
sproutcore-0.9.8 frameworks/sproutcore/views/button/disclosure.js