Merge "Hygiene: update JSDoc boxed and JQuery types"
This commit is contained in:
commit
d5ae991522
|
@ -62,7 +62,7 @@
|
|||
* @ignore
|
||||
* @param {number} section number
|
||||
* @param {string} container CSS selector of the container
|
||||
* @return {jQuery.Object} newly created edit page button
|
||||
* @return {JQuery.Object} newly created edit page button
|
||||
*/
|
||||
function addEditButton( section, container ) {
|
||||
$( container ).find( 'a' ).remove();
|
||||
|
@ -91,7 +91,7 @@
|
|||
* Make an element render a CTA when clicked
|
||||
* @method
|
||||
* @ignore
|
||||
* @param {jQuery.Object} $el Element which will render a drawer on click
|
||||
* @param {JQuery.Object} $el Element which will render a drawer on click
|
||||
* @param {number} section number representing the section
|
||||
*/
|
||||
function makeCta( $el, section ) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @class MainMenu
|
||||
* @extends View
|
||||
* @constructor
|
||||
* @param {Object} options Configuration options
|
||||
* @param {object} options Configuration options
|
||||
* @module skins.minerva.mainMenu/MainMenu
|
||||
*/
|
||||
function MainMenu( options ) {
|
||||
|
@ -24,7 +24,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* @cfg {Object} defaults Default options hash.
|
||||
* @cfg {object} defaults Default options hash.
|
||||
* @cfg {string} defaults.activator selector for element that when clicked can open or close the menu
|
||||
*/
|
||||
defaults: {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
closeOnContentTap: true,
|
||||
template: template.get( 'skins.minerva.newusers', 'PointerOverlay.hogan' ),
|
||||
/**
|
||||
* @cfg {Object} defaults Default options hash.
|
||||
* @cfg {object} defaults Default options hash.
|
||||
* @cfg {string} defaults.isCompact whether the pointer overlay should be compact
|
||||
* @cfg {number} defaults.timeout in milliseconds. If not zero the pointer overlay will
|
||||
* hide after this duration of time.
|
||||
|
@ -82,7 +82,7 @@
|
|||
/**
|
||||
* Position the overlay under a specified element
|
||||
* @private
|
||||
* @param {jQuery.Object} $pa An element that should be pointed at by the overlay
|
||||
* @param {JQuery.Object} $pa An element that should be pointed at by the overlay
|
||||
*/
|
||||
_position: function ( $pa ) {
|
||||
var left,
|
||||
|
@ -99,7 +99,7 @@
|
|||
/**
|
||||
* Position overlay and add pointer arrow that points at specified element
|
||||
* @method
|
||||
* @param {jQuery.Object} $pa An element that should be pointed at by the overlay
|
||||
* @param {JQuery.Object} $pa An element that should be pointed at by the overlay
|
||||
*/
|
||||
addPointerArrow: function ( $pa ) {
|
||||
var left,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @extends View
|
||||
*
|
||||
* @constructor
|
||||
* @param {Object} options Configuration options
|
||||
* @param {object} options Configuration options
|
||||
* @module skins.minerva.notifications/NotificationBadge
|
||||
*/
|
||||
function NotificationBadge( options ) {
|
||||
|
@ -41,11 +41,11 @@
|
|||
|
||||
OO.mfExtend( NotificationBadge, View, {
|
||||
/**
|
||||
* @cfg {Object} defaults Default options hash.
|
||||
* @cfg {String} defaults.notificationIconClass e.g. mw-ui-icon for icon
|
||||
* @cfg {String} defaults.loadingIconHtml for spinner
|
||||
* @cfg {Boolean} defaults.hasUnseenNotifications whether the user has unseen notifications
|
||||
* @cfg {Number} defaults.notificationCountRaw number of unread notifications
|
||||
* @cfg {object} defaults Default options hash.
|
||||
* @cfg {string} defaults.notificationIconClass e.g. mw-ui-icon for icon
|
||||
* @cfg {string} defaults.loadingIconHtml for spinner
|
||||
* @cfg {boolean} defaults.hasUnseenNotifications whether the user has unseen notifications
|
||||
* @cfg {number} defaults.notificationCountRaw number of unread notifications
|
||||
*/
|
||||
defaults: {
|
||||
notificationIconClass: notificationIcon.getClassName(),
|
||||
|
@ -60,7 +60,7 @@
|
|||
* @method
|
||||
* @private
|
||||
* @param {string} moduleName Name of a module to fetch
|
||||
* @return {jQuery.Deferred}
|
||||
* @return {JQuery.Deferred}
|
||||
*/
|
||||
_loadModuleScript: function ( moduleName ) {
|
||||
var self = this;
|
||||
|
@ -76,7 +76,7 @@
|
|||
* @method
|
||||
* @private
|
||||
* @uses NotificationsOverlay
|
||||
* @return {jQuery.Deferred} with an instance of NotificationsOverlay
|
||||
* @return {JQuery.Deferred} with an instance of NotificationsOverlay
|
||||
*/
|
||||
_loadNotificationOverlay: function () {
|
||||
var self = this;
|
||||
|
@ -116,7 +116,7 @@
|
|||
template: mw.template.get( 'skins.minerva.notifications.badge', 'badge.hogan' ),
|
||||
/**
|
||||
* Click handler for clicking on the badge
|
||||
* @return {Boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
onClickBadge: function () {
|
||||
this.options.router.navigate( '#/notifications' );
|
||||
|
@ -126,14 +126,14 @@
|
|||
},
|
||||
/**
|
||||
* Return the URL for the full non-overlay notification view
|
||||
* @return {String} url
|
||||
* @return {string} url
|
||||
*/
|
||||
getNotificationURL: function () {
|
||||
return this.options.url;
|
||||
},
|
||||
/**
|
||||
* Update the notification count
|
||||
* @param {Number} count
|
||||
* @param {number} count
|
||||
*/
|
||||
setCount: function ( count ) {
|
||||
if ( count > 100 ) {
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
/**
|
||||
* Helper function to retreive the Android version
|
||||
* @ignore
|
||||
* @param {String} userAgent User Agent
|
||||
* @return {Integer}
|
||||
* @param {string} userAgent User Agent
|
||||
* @return {number} An integer.
|
||||
*/
|
||||
function getAndroidVersion( userAgent ) {
|
||||
var match = userAgent.toLowerCase().match( /android\s(\d\.]*)/ );
|
||||
|
@ -19,8 +19,8 @@
|
|||
/**
|
||||
* Helper function to retrieve the Chrome/Chromium version
|
||||
* @ignore
|
||||
* @param {String} userAgent User Agent
|
||||
* @return {Integer}
|
||||
* @param {string} userAgent User Agent
|
||||
* @return {number} An integer.
|
||||
*/
|
||||
function getChromeVersion( userAgent ) {
|
||||
var match = userAgent.toLowerCase().match( /chrom(e|ium)\/(\d+)\./ );
|
||||
|
@ -33,7 +33,7 @@
|
|||
* @extends Icon
|
||||
*
|
||||
* @param {Skin} skin
|
||||
* @param {Number[]} [supportedNamespaces]
|
||||
* @param {number[]} [supportedNamespaces]
|
||||
* @param {Window} [windowObj] window object
|
||||
* @constructor
|
||||
* @module skins.minerva.scripts/DownloadIcon
|
||||
|
@ -54,7 +54,7 @@
|
|||
/**
|
||||
* Checks whether DownloadIcon is available for given user agent
|
||||
* @param {string} userAgent User agent
|
||||
* @return {Boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
isAvailable: function ( userAgent ) {
|
||||
var androidVersion = getAndroidVersion( userAgent ),
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
/**
|
||||
* Extract a summary message from a cleanup template generated element that is
|
||||
* friendly for mobile display.
|
||||
* @param {Object} $box element to extract the message from
|
||||
* @param {object} $box element to extract the message from
|
||||
* @ignore
|
||||
* @typedef {object} IssueSummary
|
||||
* @prop {string} icon HTML string.
|
||||
|
@ -52,7 +52,7 @@
|
|||
* @ignore
|
||||
*
|
||||
* @param {string} labelText The text value of the element
|
||||
* @return {jQuery}
|
||||
* @return {JQuery}
|
||||
*/
|
||||
function createLinkElement( labelText ) {
|
||||
return $( '<a class="cleanup mw-mf-cleanup"></a>' )
|
||||
|
@ -61,7 +61,7 @@
|
|||
|
||||
/**
|
||||
* Render a banner in a containing element.
|
||||
* @param {jQuery.Object} $container to render the page issues banner inside.
|
||||
* @param {JQuery.Object} $container to render the page issues banner inside.
|
||||
* @param {string} labelText what the label of the page issues banner should say
|
||||
* @param {string} headingText the heading of the overlay that is created when the page issues banner is clicked
|
||||
* @param {boolean} inline - if true the first ambox in the section will become the entry point for the issues overlay
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
/**
|
||||
* Event handler for clicking on an image thumbnail
|
||||
* @param {jQuery.Event} ev
|
||||
* @param {JQuery.Event} ev
|
||||
* @ignore
|
||||
*/
|
||||
function onClickImage( ev ) {
|
||||
|
@ -23,7 +23,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {jQuery.Element} thumbnail
|
||||
* @param {JQuery.Element} thumbnail
|
||||
* @ignore
|
||||
*/
|
||||
function routeThumbnail( thumbnail ) {
|
||||
|
@ -97,7 +97,7 @@
|
|||
* @ignore
|
||||
* @uses ImageOverlay
|
||||
* @param {string} title Url of image
|
||||
* @return {jQuery.Deferred}
|
||||
* @return {JQuery.Deferred}
|
||||
*/
|
||||
function loadImageOverlay( title ) {
|
||||
if ( mw.loader.getState( 'mmv.bootstrap' ) === 'ready' ) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
/**
|
||||
* Close navigation if skin is tapped
|
||||
* @param {jQuery.Event} ev
|
||||
* @param {JQuery.Event} ev
|
||||
* @private
|
||||
*/
|
||||
function onSkinClick( ev ) {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
/**
|
||||
* Event handler to show reference when a reference link is clicked
|
||||
* @ignore
|
||||
* @param {jQuery.Event} ev Click event of the reference element
|
||||
* @param {JQuery.Event} ev Click event of the reference element
|
||||
* @param {ReferencesDrawer} drawer to show the reference in
|
||||
* @param {Page} page
|
||||
*/
|
||||
|
@ -83,7 +83,7 @@
|
|||
* Delegates to `showReference` once the references drawer is ready.
|
||||
*
|
||||
* @ignore
|
||||
* @param {jQuery.Event} ev Click event of the reference element
|
||||
* @param {JQuery.Event} ev Click event of the reference element
|
||||
*/
|
||||
function onClickReference( ev ) {
|
||||
if ( !drawer ) {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
M.define( 'skins.minerva.scripts/utils', {
|
||||
/**
|
||||
* Extract an icon for use with the issue.
|
||||
* @param {jQuery.Object} $box element to extract the icon from
|
||||
* @param {JQuery.Object} $box element to extract the icon from
|
||||
* @return {Icon} representing the icon
|
||||
*/
|
||||
getIconFromAmbox: getIconFromAmbox
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Initialises toggling code.
|
||||
*
|
||||
* @method
|
||||
* @param {jQuery.Object} $container to enable toggling on
|
||||
* @param {JQuery.Object} $container to enable toggling on
|
||||
* @param {string} prefix a prefix to use for the id.
|
||||
* @param {Page} page The current page
|
||||
* @ignore
|
||||
|
|
Loading…
Reference in New Issue