( function ( mw, $ ) { /** * 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} [url] The URL for the survey */ mw.echo.ui.FooterNoticeWidget = function MwEchoUiFooterNoticeWidget( config ) { var $icon, label, dismissButton, infoPopup, $row = $( '
' ).text( mw.msg( 'echo-popup-footer-feedback-info' ) ), padded: true, width: 450 } } ); infoPopup.$element.hover( function () { infoPopup.getPopup().toggle( true ); }, function () { infoPopup.getPopup().toggle( false ); } ); // Events dismissButton.connect( this, { click: 'onDismissButtonClick' } ); this.$element .addClass( 'mw-echo-ui-footerNoticeWidget' ) .append( $row .append( label.$element, infoPopup.$element, dismissButton.$element ) ); }; /* Initialization */ OO.inheritClass( mw.echo.ui.FooterNoticeWidget, OO.ui.Widget ); /* Events */ /** * The notice was dismissed. * * @event dismiss */ /* Methods */ /** * Respond to dismiss button click. * * @fires dismiss */ mw.echo.ui.FooterNoticeWidget.prototype.onDismissButtonClick = function () { this.toggle( false ); this.emit( 'dismiss' ); }; } )( mediaWiki, jQuery );