define('application/widgets/player/buttons/info', [
'application/widgets/pointerfocusablebutton',
'rofl/widgets/label',
'rofl/lib/l10n'
], function (
Button,
Label,
L10n
) {
'use strict';
var INFO_CLASS = 'icon-info',
INFO_CHEVRON_CLASS = 'icon-chevron-down',
l10n = L10n.getInstance(),
InfoButton;
InfoButton = Button.extend({
/**
* Initialises the widget.
*
* @param {string} id - The id.
*/
init: function init (id) {
init.base.call(this, id);
this.addClass(['control', 'info']);
this._build();
},
/**
* Builds the widget.
*
* @private
*/
_build: function () {
var icon = this._icon = new Label({ text: '', classNames: ['v-align-target', 'icon', INFO_CLASS] }),
helper = new Label({ text: '', classNames: ['v-align-helper'] }),
infoText = new Label({ text: l10n.get('player.buttons.info'), classNames: ['info-text', 'v-align-helper'] }),
infoChevronIcon = new Label({ text: '', classNames: ['v-align-target', 'icon', INFO_CHEVRON_CLASS] });
this.appendChildWidget(helper);
this.appendChildWidget(icon);
this.appendChildWidget(infoText);
this.appendChildWidget(infoChevronIcon);
}
});
return InfoButton;
});