button-debug.js revision 78ac1ef5c64e9e95a94bbfe859662da6d21b243a
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek GathrightYUI.add('button', function(Y) {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright/**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* A Button Widget
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright*
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @module button
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @since 3.5.0
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright*/
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolovar CLASS_NAMES = Y.ButtonCore.CLASS_NAMES;
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright/**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* Creates a ButtonWidget
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright*
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @class ButtonWidget
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @extends Widget
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @param config {Object} Configuration object
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @constructor
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright*/
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathrightfunction ButtonWidget(config) {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright ButtonWidget.superclass.constructor.apply(this, arguments);
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright}
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright/* ButtonWidget extends Widget */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek GathrightY.extend(ButtonWidget, Y.Widget, {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright BOUNDING_TEMPLATE: Y.ButtonCore.prototype.TEMPLATE,
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright CONTENT_TEMPLATE: null,
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method initializer
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @description Internal init() handler.
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @param config {Object} Config object.
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @private
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright initializer: function(config) {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright this._host = this.get('boundingBox');
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * bindUI implementation
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright *
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @description Hooks up events for the widget
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method bindUI
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright bindUI: function() {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright var button = this;
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright button.after('labelChange', button._afterLabelChange);
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright button.after('disabledChange', button._afterDisabledChange);
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright button.after('selectedChange', button._afterSelectedChange);
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method syncUI
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo * @description
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright syncUI: function() {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright var button = this;
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright button._uiSetLabel(button.get('label'));
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright button._uiSetDisabled(button.get('disabled'));
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright button._uiSetSelected(button.get('selected'));
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method _uiSetSelected
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo * @description
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @private
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright _uiSetSelected: function(value) {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright this.get('contentBox').toggleClass(ButtonWidget.CLASS_NAMES.SELECTED, value).set('aria-pressed', value); // TODO should support aria-checked (if applicable)
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method _afterLabelChange
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo * @description
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @private
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright _afterLabelChange: function(e) {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright this._uiSetLabel(e.newVal);
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method _afterDisabledChange
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo * @description
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @private
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright _afterDisabledChange: function(e) {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright this._uiSetDisabled(e.newVal);
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method _afterSelectedChange
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo * @description
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @private
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright _afterSelectedChange: function(e) {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright this._uiSetSelected(e.newVal);
d35783d338067103badd5ebbb57676c129f5e563Eric Ferraiuolo }
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright}, {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright // Y.Button static properties
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * The identity of the widget.
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright *
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @property NAME
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @type String
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @default 'button'
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @readOnly
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @protected
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @static
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright NAME: 'button',
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * Static property used to define the default attribute configuration of
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * the Widget.
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright *
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @property ATTRS
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @type {Object}
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @protected
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @static
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright ATTRS: {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright label: {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright value: Y.ButtonCore.ATTRS.label.value
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright },
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright disabled: {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright value: false
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright },
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright selected: {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright value: false
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright }
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * TODO
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright *
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @property HTML_PARSER
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @type {Object}
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @protected
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @static
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright HTML_PARSER: {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright label: function(node) {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright this._host = node; // TODO: remove
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright return this._uiGetLabel();
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright },
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright disabled: function(node) {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright return node.getDOMNode().disabled;
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright },
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright selected: function(node) {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright return node.hasClass(ButtonWidget.CLASS_NAMES.SELECTED);
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright }
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * List of class names used in the ButtonGroup's DOM
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright *
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @property CLASS_NAMES
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @type Object
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @static
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright CLASS_NAMES: CLASS_NAMES
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright});
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek GathrightY.mix(ButtonWidget.prototype, Y.ButtonCore.prototype);
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright/**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* Creates a ToggleButton
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright*
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @class ToggleButton
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @extends ButtonWidget
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @param config {Object} Configuration object
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright* @constructor
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright*/
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathrightfunction ToggleButton(config) {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright ButtonWidget.superclass.constructor.apply(this, arguments);
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright}
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright// TODO: move to ButtonCore subclass to enable toggle plugin, widget, etc.
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright/* ButtonWidget extends ButtonWidget */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek GathrightY.extend(ToggleButton, ButtonWidget, {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright trigger: 'click',
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * bindUI implementation
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright *
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * Hooks up events for the widget
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method bindUI
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright bindUI: function() {
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright var button = this;
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright ToggleButton.superclass.bindUI.call(button);
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright button.get('contentBox').set('role', 'toggle');
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright button.get('contentBox').on(button.trigger, button.toggle, button);
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright },
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method select
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @description
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @public
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright select: function() {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright this.set('selected', true);
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method unselect
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @description
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @public
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright unselect: function() {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright this.set('selected', false);
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright },
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright /**
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @method toggle
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo * @description
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright * @public
6ba8d3cf563f904d8a71f8408553c2a10431ea7dDerek Gathright */
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright toggle: function() {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright var button = this;
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright button.set('selected', !button.get('selected'));
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright }
78ac1ef5c64e9e95a94bbfe859662da6d21b243aEric Ferraiuolo
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright}, {
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright NAME: 'toggleButton'
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright});
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright// Export
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek GathrightY.Button = ButtonWidget;
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek GathrightY.ToggleButton = ToggleButton;
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
06c1e33a270f80929bf9b9dde81f4061d1949fffDerek Gathright
d35783d338067103badd5ebbb57676c129f5e563Eric Ferraiuolo}, '@VERSION@' ,{requires:['button-core', 'cssbutton', 'widget']});