Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed Y.Button documentation

  • Loading branch information...
commit 32db3cd3a46c3850c354f593f6ea5ebef8b50591 1 parent 1cdc966
@derek derek authored
Showing with 13 additions and 13 deletions.
  1. +13 −13 src/button/js/button.js
View
26 src/button/js/button.js
@@ -10,19 +10,19 @@ var CLASS_NAMES = Y.ButtonCore.CLASS_NAMES,
ARIA_ROLES = Y.ButtonCore.ARIA_ROLES;
/**
-* Creates a ButtonWidget
+* Creates a Button
*
-* @class ButtonWidget
+* @class Button
* @extends Widget
* @param config {Object} Configuration object
* @constructor
*/
-function ButtonWidget(config) {
- ButtonWidget.superclass.constructor.apply(this, arguments);
+function Button(config) {
+ Button.superclass.constructor.apply(this, arguments);
}
-/* ButtonWidget extends Widget */
-Y.extend(ButtonWidget, Y.Widget, {
+/* Button extends Widget */
+Y.extend(Button, Y.Widget, {
BOUNDING_TEMPLATE: Y.ButtonCore.prototype.TEMPLATE,
@@ -137,23 +137,23 @@ Y.extend(ButtonWidget, Y.Widget, {
CLASS_NAMES: CLASS_NAMES
});
-Y.mix(ButtonWidget.prototype, Y.ButtonCore.prototype);
+Y.mix(Button.prototype, Y.ButtonCore.prototype);
/**
* Creates a ToggleButton
*
* @class ToggleButton
-* @extends ButtonWidget
+* @extends Button
* @param config {Object} Configuration object
* @constructor
*/
function ToggleButton(config) {
- ButtonWidget.superclass.constructor.apply(this, arguments);
+ Button.superclass.constructor.apply(this, arguments);
}
// TODO: move to ButtonCore subclass to enable toggle plugin, widget, etc.
-/* ToggleButton extends ButtonWidget */
-Y.extend(ToggleButton, ButtonWidget, {
+/* ToggleButton extends Button */
+Y.extend(ToggleButton, Button, {
trigger: 'click',
selectedAttrName: '',
@@ -223,7 +223,7 @@ Y.extend(ToggleButton, ButtonWidget, {
type = button.get('type'),
ariaState = (type === 'checkbox' ? STATES.CHECKED : STATES.PRESSED);
- cb.toggleClass(ButtonWidget.CLASS_NAMES.SELECTED, value);
+ cb.toggleClass(Button.CLASS_NAMES.SELECTED, value);
cb.set(ariaState, value);
},
@@ -310,5 +310,5 @@ Y.extend(ToggleButton, ButtonWidget, {
});
// Export
-Y.Button = ButtonWidget;
+Y.Button = Button;
Y.ToggleButton = ToggleButton;
Please sign in to comment.
Something went wrong with that request. Please try again.