button-min.js revision d0f9ee99aee2d631a24062cd95d30c1d6955fc0f
YUI.add("button",function(d){var b=d.ButtonCore.CLASS_NAMES;function a(e){a.superclass.constructor.apply(this,arguments);}d.extend(a,d.Widget,{BOUNDING_TEMPLATE:d.ButtonCore.prototype.TEMPLATE,CONTENT_TEMPLATE:null,initializer:function(e){this._host=this.get("boundingBox");},bindUI:function(){var e=this;e.after("labelChange",e._afterLabelChange);e.after("disabledChange",e._afterDisabledChange);e.after("selectedChange",e._afterSelectedChange);},syncUI:function(){var e=this;e._setLabel(e.get("label"));e._setDisabled(e.get("disabled"));e._setSelected(e.get("selected"));},_setSelected:function(e){this.get("contentBox").toggleClass(a.CLASS_NAMES.SELECTED,e).set("aria-pressed",e);},_afterLabelChange:function(f){this._setLabel(f.newVal);},_afterDisabledChange:function(f){this._setDisabled(f.newVal);},_afterSelectedChange:function(f){this._setSelected(f.newVal);}},{NAME:"button",ATTRS:{label:{value:d.ButtonCore.ATTRS.label.value},disabled:{value:false},selected:{value:false}},HTML_PARSER:{label:function(e){this._host=e;return this._getLabel();},disabled:function(e){return e.getDOMNode().disabled;},selected:function(e){return e.hasClass(a.CLASS_NAMES.SELECTED);}},CLASS_NAMES:b});d.mix(a.prototype,d.ButtonCore.prototype);function c(e){a.superclass.constructor.apply(this,arguments);}d.extend(c,a,{trigger:"click",bindUI:function(){var e=this;c.superclass.bindUI.call(e);e.get("contentBox").set("role","toggle");e.get("contentBox").on(e.trigger,e.toggle,e);},select:function(){this.set("selected",true);},unselect:function(){this.set("selected",false);},toggle:function(){var e=this;e.set("selected",!e.get("selected"));}},{NAME:"toggleButton"});d.Button=a;d.ToggleButton=c;},"@VERSION@",{requires:["button-core","cssbutton","widget"]});