Sha256: b32afa23fd312c4e3a79ca7cf6ded19a8aecc289673b0cd4b0ab8e5c5b6bb734
Contents?: true
Size: 896 Bytes
Versions: 22
Compression:
Stored size: 896 Bytes
Contents
// ======================================================================== // SproutCore // copyright 2006-2008 Sprout Systems, Inc. // ======================================================================== // A menu is not a view exactly, but you can use it to bundle together // buttons and then validate them as a whole. SC.Toolbar = SC.View.extend({ // override with an array of outlet functions. buttons: [], // to to false an all the buttons will be disabled also. isEnabled: true, init: function() { arguments.callee.base.call(this) ; var toolbar = this ; this.buttons = this.buttons.map(function(button) { return button(toolbar) ; // get outlet. }) ; }, isEnabledObserver: function() { var e = this.get('isEnabled') ; this.get('buttons').each(function(button) { button.set('isEnabled',e); }) ; }.observes('isEnabled') }) ;
Version data entries
22 entries across 22 versions & 1 rubygems