Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
AUI-1051 Source formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno Rocha authored and eduardolundgren committed Nov 18, 2013
1 parent 298a26a commit 6f35922
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
31 changes: 16 additions & 15 deletions src/aui-button/js/aui-button-core.js
Expand Up @@ -69,10 +69,11 @@ var ButtonExt = function(config) {
ButtonExt.ATTRS = {

/**
* Defines html type attribute of element i.e.
* Define HTML type attribute of element i.e.
* `<input type="button">`.
*
* @attribute domType
* @writeOnce
*/
domType: {
writeOnce: true,
Expand All @@ -82,7 +83,7 @@ ButtonExt.ATTRS = {
},

/**
* String containing css class of icon to use. A list of icons
* String containing CSS class of icon to use. A list of icons
* can be found [here](http://liferay.github.io/alloy-bootstrap/base-css.html#icons).
*
* @attribute icon
Expand All @@ -91,7 +92,7 @@ ButtonExt.ATTRS = {
icon: {},

/**
* Defines markup template for icon, passed in as
* Define markup template for icon, passed in as
* a node e.g. `Y.Node.create('<i></i>')`.
*
* @attribute iconElement
Expand All @@ -105,7 +106,7 @@ ButtonExt.ATTRS = {
},

/**
* String that sets position of icon. Values: `left` and `right`.
* String that sets position of icon.
*
* @attribute iconAlign
* @default 'left'
Expand All @@ -117,7 +118,7 @@ ButtonExt.ATTRS = {
},

/**
* Sets button style to primary.
* Set button style to primary.
*
* @attribute primary
* @default false
Expand All @@ -144,6 +145,7 @@ ButtonExt.HTML_PARSER = {
* Get typed buttons template.
*
* @method getTypedButtonTemplate
* @param template
* @param type
* @static
*/
Expand Down Expand Up @@ -176,7 +178,7 @@ ButtonExt.prototype = {
},

/**
* Updates icon image, icon alignment, and primary button style.
* Update icon image, icon alignment, and primary button style.
*
* @method syncButtonExtUI
*/
Expand All @@ -194,7 +196,6 @@ ButtonExt.prototype = {
* @param event
* @protected
*/

_afterIconChange: function(event) {
var instance = this;

Expand Down Expand Up @@ -307,9 +308,10 @@ var ButtonCore = A.ButtonCore;
ButtonCore.CLASS_NAMES = CLASS_NAMES;

/**
* Sets the button text (either as text or sets the `value` attribute).
* Set the button text (either as text or sets the `value` attribute).
*
* @method _uiSetLabel
* @protected
*/
ButtonCore.prototype._uiSetLabel = (function(original) {
return function(label) {
Expand Down Expand Up @@ -350,7 +352,7 @@ A.Button = A.Base.create(Button.NAME, Button, [ButtonExt, A.WidgetCssClass, A.Wi
CSS_PREFIX: CLASS_NAMES.BUTTON,

/**
* Returns an object literal containing widget constructor data specified in the node.
* Return an object literal containing widget constructor data specified in the node.
*
* @method getWidgetLazyConstructorFromNodeData
* @param node
Expand All @@ -364,7 +366,7 @@ A.Button = A.Base.create(Button.NAME, Button, [ButtonExt, A.WidgetCssClass, A.Wi
},

/**
* Returns a boolean, true if node has widget constructor data.
* Return a boolean, true if node has widget constructor data.
*
* @method hasWidgetLazyConstructorData
* @param node
Expand All @@ -374,8 +376,7 @@ A.Button = A.Base.create(Button.NAME, Button, [ButtonExt, A.WidgetCssClass, A.Wi
},

/**
* Updates node's widget constructor data attribute with
* config.
* Update node's widget constructor data attribute with config.
*
* @method setWidgetLazyConstructorNodeData
* @param node
Expand All @@ -386,7 +387,7 @@ A.Button = A.Base.create(Button.NAME, Button, [ButtonExt, A.WidgetCssClass, A.Wi
},

/**
* Updates icon alignment in button.
* Update icon alignment in button.
*
* @method syncIconUI
* @param buttonElement
Expand Down Expand Up @@ -445,7 +446,7 @@ A.mix(ButtonGroup.prototype, {
CONTENT_TEMPLATE: null,

/**
* Returns `item` or `node` of specified `index`.
* Return `item` or `node` of specified `index`.
*
* @method item
* @param index
Expand Down Expand Up @@ -498,7 +499,7 @@ A.mix(ButtonGroup.prototype, {
},

/**
* Toggles selection by adding or removing the active class name.
* Toggle selection by adding or removing the active class name.
*
* @method toggleSelect
* @param items
Expand Down
23 changes: 12 additions & 11 deletions src/aui-button/js/aui-button-search-cancel.js
Expand Up @@ -33,7 +33,6 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
*
* @property TEMPLATE
* @type String
* @default '<i class="btn-search-cancel icon-remove" />'
* @protected
*/
TEMPLATE: '<div class="' + A.getClassName(_NAME) + '" style="padding: 5px; position: absolute; z-index: {zIndex};">' + '<i class="{iconClass}"></i>' + '</div>',
Expand All @@ -59,8 +58,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
_eventHandles: null,

/**
* Construction logic executed during CharCounter instantiation.
* Lifecycle.
* Construction logic executed during CharCounter instantiation. Lifecycle.
*
* @method initializer
*/
Expand All @@ -73,8 +71,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
},

/**
* Destructor lifecycle implementation for the AutosizeIframe class.
* Lifecycle.
* Destructor lifecycle implementation for the AutosizeIframe class. Lifecycle.
*
* @method destroy
*/
Expand Down Expand Up @@ -106,8 +103,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
* Delegate events on the UI. Lifecycle.
*
* @method getButtonForElement
* @param {Node} element Input or textarea element align the created
* button.
* @param {Node} element Input or textarea element align the created button.
* @return {Node} Button node.
*/
getButtonForElement: function(element) {
Expand All @@ -134,6 +130,8 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
* Fires when the user clicks on the cancel search button.
*
* @method _onButtonClick
* @param event
* @param element
* @protected
*/
_onButtonClick: function(event, element) {
Expand All @@ -146,6 +144,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
* Fires when the user focus or input value on the host element.
*
* @method _onUserInteraction
* @param event
* @protected
*/
_onUserInteraction: function(event) {
Expand All @@ -158,8 +157,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
* Position the cancel search button and aligns it with the passed `element`.
*
* @method _syncButtonUI
* @param {Node} element Input or textarea element align the created
* button.
* @param {Node} element Input or textarea element align the created button.
* @protected
*/
_syncButtonUI: function(element) {
Expand Down Expand Up @@ -197,6 +195,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
* The container of Toggler Delegate instance.
*
* @attribute container
* @writeOnce
*/
container: {
setter: A.one,
Expand All @@ -205,7 +204,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
},

/**
* Gutter values are added to the x and y alignment values of the
* Gutter values are added to the X and Y alignment values of the
* button search cancel. They can be utilized as a padding in case
* the user needs a different alignment.
*
Expand All @@ -218,7 +217,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
},

/**
* Icon css class to be used on the search cancel button.
* Icon CSS class to be used on the search cancel button.
*
* @attribute iconClass
* @default 'icon-remove'
Expand All @@ -235,6 +234,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
*
* @attribute trigger
* @type String
* @writeOnce
*/
trigger: {
validator: Lang.isString,
Expand All @@ -247,6 +247,7 @@ var ButtonSearchCancel = A.Base.create(_NAME, A.Base, [], {
* @attribute zIndex
* @default 2
* @type Number
* @writeOnce
*/
zIndex: {
value: 2,
Expand Down

0 comments on commit 6f35922

Please sign in to comment.