Merge "Remove unused FooterNoticeWidget"

This commit is contained in:
jenkins-bot 2024-05-16 20:52:15 +00:00 committed by Gerrit Code Review
commit fa61b08243
2 changed files with 0 additions and 118 deletions

View file

@ -1,39 +0,0 @@
@import 'mediawiki.skin.variables.less';
@import '../echo.variables.less';
@import '../echo.mixins.less';
.mw-echo-ui-footerNoticeWidget {
padding: 0.5em;
border-bottom: @border-width-base @border-style-base @border-color-subtle;
white-space: normal;
line-height: 16px;
&-row {
display: table-row;
}
&-dismiss,
&-info,
&-label {
display: table-cell;
}
&-label {
width: 100%;
}
&-icon {
padding-right: 0.5em;
}
&-dismiss,
&-info {
.mw-echo-ui-mixin-hover-opacity();
vertical-align: top;
.oo-ui-iconElement-icon {
width: 1.3em !important;
height: 1.3em !important;
}
}
}

View file

@ -1,79 +0,0 @@
( function () {
/**
* Footer notice widget.
*
* @class
* @extends OO.ui.Widget
*
* @constructor
* @param {Object} [config] Configuration object
* @cfg {string} [iconUrl] The source URL of the feedback icon
* @cfg {string} [message] The message to display, in HTML or jQuery object.
* The message should already be formatted properly.
*/
mw.echo.ui.FooterNoticeWidget = function MwEchoUiFooterNoticeWidget( config ) {
config = config || {};
// Parent constructor
mw.echo.ui.FooterNoticeWidget.super.call( this, config );
var $row = $( '<div>' ).addClass( 'mw-echo-ui-footerNoticeWidget-row' );
if ( config.iconUrl ) {
var $icon = $( '<div>' )
.addClass( 'mw-echo-ui-footerNoticeWidget-icon' )
.append( $( '<img>' ).attr( { src: config.iconUrl, width: 30, height: 30 } ) );
$row.append( $icon );
}
var label = new OO.ui.LabelWidget( {
label: $( '<span>' ).append( $.parseHTML( config.message ) ).contents(),
classes: [ 'mw-echo-ui-footerNoticeWidget-label' ]
} );
var dismissButton = new OO.ui.ButtonWidget( {
icon: 'close',
framed: false,
classes: [ 'mw-echo-ui-footerNoticeWidget-dismiss' ]
} );
// Events
dismissButton.connect( this, { click: 'onDismissButtonClick' } );
this.$element
.addClass( 'mw-echo-ui-footerNoticeWidget' )
.append(
$row
.append(
label.$element,
dismissButton.$element
)
);
};
/* Initialization */
OO.inheritClass( mw.echo.ui.FooterNoticeWidget, OO.ui.Widget );
/* Events */
/**
* The notice was dismissed.
*
* @event mw.echo.ui.FooterNoticeWidget#dismiss
*/
/* Methods */
/**
* Respond to dismiss button click.
*
* @fires mw.echo.ui.FooterNoticeWidget#dismiss
*/
mw.echo.ui.FooterNoticeWidget.prototype.onDismissButtonClick = function () {
this.toggle( false );
this.emit( 'dismiss' );
};
}() );