/*!
- * OOUI v0.31.3
+ * OOUI v0.31.6
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 2011–2019 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2019-04-04T19:10:48Z
+ * Date: 2019-05-08T10:08:36Z
*/
( function ( OO ) {
*
* @private
* @param {jQuery.Event} e Mouse down event
- * @return {undefined/boolean} False to prevent default if event is handled
+ * @return {undefined|boolean} False to prevent default if event is handled
*/
OO.ui.Toolbar.prototype.onPointerDown = function ( e ) {
var $closestWidgetToEvent = $( e.target ).closest( '.oo-ui-widget' ),
}
};
+/**
+ * @inheritdoc OO.ui.mixin.IconElement
+ */
+OO.ui.Tool.prototype.setIcon = function ( icon ) {
+ // Mixin method
+ OO.ui.mixin.IconElement.prototype.setIcon.call( this, icon );
+
+ this.$element.toggleClass( 'oo-ui-tool-with-icon', !!this.icon );
+
+ return this;
+};
+
/**
* Destroy tool.
*
*
* @protected
* @param {jQuery.Event} e Mouse down or key down event
- * @return {undefined/boolean} False to prevent default if event is handled
+ * @return {undefined|boolean} False to prevent default if event is handled
*/
OO.ui.ToolGroup.prototype.onMouseKeyDown = function ( e ) {
if (
*
* @protected
* @param {jQuery.Event} e Mouse up or key up event
- * @return {undefined/boolean} False to prevent default if event is handled
+ * @return {undefined|boolean} False to prevent default if event is handled
*/
OO.ui.PopupToolGroup.prototype.onHandleMouseKeyUp = function ( e ) {
if (
*
* @protected
* @param {jQuery.Event} e Mouse down or key down event
- * @return {undefined/boolean} False to prevent default if event is handled
+ * @return {undefined|boolean} False to prevent default if event is handled
*/
OO.ui.PopupToolGroup.prototype.onHandleMouseKeyDown = function ( e ) {
var $focusable;