mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 15:36:58 +00:00
Remove unused FooterNoticeWidget
Unused since 1eef6eeee3
. After 6 years
we can probably say we're not going to need them again ;)
Change-Id: I9bab88cf56a5ecbcf8e1557f1635dd42e29deefb
This commit is contained in:
parent
37cac555b8
commit
9699c06f1a
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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' );
|
||||
};
|
||||
}() );
|
Loading…
Reference in a new issue