Merge "Fix config documentation"

This commit is contained in:
jenkins-bot 2018-05-30 20:55:33 +00:00 committed by Gerrit Code Review
commit e03f04be89
11 changed files with 16 additions and 9 deletions

View file

@ -20,7 +20,7 @@
* @cfg {string} [sourceURL] The URL for the article base of the remote
* group or wiki
* @cfg {string} [timestamp=0] A timestamp representing the latest item in
* then list.
* the list.
*/
mw.echo.dm.NotificationsList = function MwEchoDmNotificationsList( config ) {
config = config || {};

View file

@ -10,6 +10,7 @@
* @cfg {string} [type] The notification types this button represents;
* 'message', 'alert' or 'all'
* @cfg {string} [href] URL the badge links to
* @cfg {string} [numItems=0] The number of items that are in the button display
* @cfg {string} [convertedNumber] A converted version of the initial count
*/
mw.echo.ui.BadgeLinkWidget = function MwEchoUiBadgeLinkWidget( config ) {
@ -29,7 +30,7 @@
this.count = 0;
this.type = config.type || 'alert';
this.setCount( config.numItems, config.convertedNumber );
this.setCount( config.numItems || 0, config.convertedNumber );
if ( config.href !== undefined && OO.ui.isSafeUrl( config.href ) ) {
this.$element.attr( 'href', config.href );

View file

@ -12,8 +12,6 @@
* @param {mw.echo.dm.BundleNotificationItem} model Notification group model
* @param {Object} [config] Configuration object
* @cfg {boolean} [animateSorting=false] Animate the sorting of items
* @cfg {jQuery} [$overlay] A jQuery element functioning as an overlay
* for popups.
*/
mw.echo.ui.BundleNotificationItemWidget = function MwEchoUiBundleNotificationItemWidget( controller, model, config ) {
config = config || {};

View file

@ -17,8 +17,6 @@
* @param {mw.echo.dm.CrossWikiNotificationItem} model Notification group model
* @param {Object} [config] Configuration object
* @cfg {boolean} [animateSorting=false] Animate the sorting of items
* @cfg {jQuery} [$overlay] A jQuery element functioning as an overlay
* for popups.
*/
mw.echo.ui.CrossWikiNotificationItemWidget = function MwEchoUiCrossWikiNotificationItemWidget( controller, model, config ) {
config = config || {};

View file

@ -8,7 +8,6 @@
* @constructor
* @param {Object} [config] Configuration object
* @cfg {string} [iconUrl] The source URL of the feedback icon
* @cfg {string} [url] The URL for the survey
* @cfg {string} [message] The message to display, in HTML or jQuery object.
* The message should already be formatted properly.
*/

View file

@ -8,8 +8,11 @@
*
* @constructor
* @param {Object} [config] Configuration object
* @cfg {string} [type] Optional action type. Used to note a dynamic action, by setting it to 'dynamic-action'
* @cfg {string} [url] Item URL for links
* @cfg {string} [tooltip] Tooltip for links
* @cfg {string} [description] An optional description for the item
* @cfg {string} [icon] An optional icon for the item
* @cfg {Object} [actionData] Action data
* @cfg {boolean} [prioritized] The item is prioritized outside the
* popup menu.
*/

View file

@ -11,6 +11,8 @@
* @param {mw.echo.dm.ModelManager} manager Model manager
* @param {Object} [config] Configuration object
* @cfg {number} [limit=25] Limit the number of notifications per page
* @cfg {string} [helpLink] Link to help page
* @cfg {string} [prefLink] Link to preferences page
* @cfg {jQuery} [$overlay] An overlay for the popup menus
*/
mw.echo.ui.NotificationsInboxWidget = function MwEchoUiNotificationsInboxWidget( controller, manager, config ) {

View file

@ -11,6 +11,8 @@
* @param {mw.echo.dm.ModelManager} manager Model manager
* @param {Object} [config] Configuration object
* marked as read when they are seen.
* @cfg {string} [timestamp=0] A timestamp representing the latest item in
* the list.
* @cfg {jQuery} [$overlay] A jQuery element functioning as an overlay
* for popups.
*/

View file

@ -10,6 +10,8 @@
* @param {mw.echo.Controller} controller Echo controller
* @param {mw.echo.dm.ModelManager} model Notifications model manager
* @param {Object} [config] Configuration object
* @cfg {jQuery} [$overlay] A jQuery element functioning as an overlay
* for popups.
*/
mw.echo.ui.NotificationsWrapper = function MwEchoUiNotificationsWrapper( controller, model, config ) {
config = config || {};

View file

@ -30,7 +30,7 @@
/**
* Set (or unset) the main link url for this widget
*
* @param {string} url The widget url
* @param {string} [url] The widget url
*/
mw.echo.ui.PlaceholderItemWidget.prototype.setLink = function ( url ) {
var $link;

View file

@ -4,6 +4,8 @@
*
* @param {mw.echo.dm.ModelManager} manager Model manager
* @param {Object} config Configuration object
* @cfg {string} [helpLink] Link to help page
* @cfg {string} [prefLink] Link to preferences page
*/
mw.echo.ui.SpecialHelpMenuWidget = function MwEchoUiSpecialHelpMenuWidget( manager, config ) {
var $menu = $( '<div>' ).addClass( 'mw-echo-ui-specialHelpMenuWidget-menu' );