- Adds mw.special.recentchanges to the index.
- Adds mw.special.upload to the index.
- Register File as valid value type. Relates to the
"File" interface (from HTML5 File APIs; http://dev.w3.org/2006/webapi/FileAPI/#dfn-file)
- Sort directories in jsduck/config.json alphabetically.
Change-Id: I282cbeeec60b9f527879aedd90ba824a833438b7
"mw.Feedback"
]
},
+ {
+ "name": "Special",
+ "classes": [
+ "mw.special*"
+ ]
+ },
{
"name": "Development",
"classes": [
"--warnings": ["-nodoc(class,public)"],
"--builtin-classes": true,
"--warnings-exit-nonzero": true,
- "--external": "HTMLElement,HTMLDocument,Window",
+ "--external": "HTMLElement,HTMLDocument,Window,File",
"--footer": "Documentation for MediaWiki core. Generated on {DATE} by {JSDUCK} {VERSION}.",
"--output": "../../docs/js",
"--": [
"./external.js",
"../../resources/src/mediawiki",
"../../resources/src/mediawiki.action",
- "../../resources/src/mediawiki.page",
"../../resources/src/mediawiki.api",
"../../resources/src/mediawiki.language",
+ "../../resources/src/mediawiki.page",
+ "../../resources/src/mediawiki.special",
"../../resources/src/jquery/jquery.accessKeyLabel.js",
"../../resources/src/jquery/jquery.arrowSteps.js",
"../../resources/src/jquery/jquery.autoEllipsis.js",
-/**
+/*!
* Styling for Special:Block
*/
-/**
+/*!
* JavaScript for Special:Block
*/
( function ( mw, $ ) {
border-top-right-radius: 0.8em;
}
-/** colors also used in mediawiki.special.preferences.css */
+/* Colors also used in mediawiki.special.preferences.css */
#mw-emailaddress-validity.valid {
border: 1px solid #80FF80;
background-color: #C0FFC0;
-/**
+/*!
* JavaScript for Special:ChangeEmail
*/
( function ( mw, $ ) {
/**
* Given an email validity status (true, false, null) update the label CSS class
+ * @ignore
*/
function updateMailValidityLabel( mail ) {
var isValid = mw.util.validateEmail( mail ),
-/**
+/*!
* Styling for Special:Watchlist and Special:RecentChanges
*/
-/**
+/*!
* Styling for Special:Watchlist and Special:RecentChanges when preference 'usenewrc'
* a.k.a. Enhanced Recent Changes is enabled.
*/
-/**
+/*!
* Styling for changes list legend
*/
-/**
+/*!
* Script for changes list legend
*/
-/**** Special:AllMessages ****/
+/* Special:AllMessages */
#mw-allmessagestable .allmessages-customised td.am_default {
background-color: #fcffc4;
}
background-color: #b1ffb1;
}
-/**** Special:Allpages ****/
+/* Special:Allpages */
table.mw-allpages-table-form, table.mw-allpages-table-chunk {
width: 100%;
}
vertical-align: top;
}
-/**** Special:Block ****/
+/* Special:Block */
tr.mw-block-hideuser {
font-weight: bold;
}
-/**** Special:BlockList ****/
+/* Special:BlockList */
table.mw-blocklist span.mw-usertoollinks,
span.mw-blocklist-actions {
white-space: nowrap;
font-size: 90%;
}
-/**** Special:Contributions ****/
+/* Special:Contributions */
.mw-uctop {
font-weight: bold;
}
-/**** Special:EmailUser ****/
+/* Special:EmailUser */
td#mw-emailuser-sender,
td#mw-emailuser-recipient {
font-weight: bold;
}
-/**** Special:ListGroupRights ****/
+/* Special:ListGroupRights */
table.mw-listgrouprights-table tr {
vertical-align: top;
}
text-decoration: line-through;
}
-/**** Special:Prefixindex ****/
+/* Special:Prefixindex */
table.mw-prefixindex-list-table,
table#mw-prefixindex-nav-table {
width: 100%;
}
-/**** Special:Search ****/
+/* Special:Search */
.searchresults {
}
clear: both;
}
-/**** Special:Specialpages ****/
+/* Special:Specialpages */
.mw-specialpagerestricted {
font-weight: bold;
}
vertical-align: top;
}
-/**** Special:Statistics ****/
+/* Special:Statistics */
td.mw-statistics-numbers {
text-align: right;
}
-/**** Special:ProtectedPages ****/
+/* Special:ProtectedPages */
table.mw-protectedpages span.mw-usertoollinks,
span.mw-protectedpages-length,
span.mw-protectedpages-actions {
font-size: 90%;
}
-/**** Special:UserRights ****/
+/* Special:UserRights */
.mw-userrights-disabled {
color: #888;
}
-/**
+/*!
* JavaScript for Special:JavaScriptTest
*/
( function ( mw, $ ) {
-/*
+/*!
* Namespace for mediawiki.special.* modules
*/
+/**
+ * @class mw.special
+ * @singleton
+ */
mediaWiki.special = {};
-/**
+/*!
* JavaScript for Special:MovePage
*/
jQuery( function ( $ ) {
-/** Reuses colors from mediawiki.special.changeemail.css */
+/* Reuses colors from mediawiki.special.changeemail.css */
.mw-email-not-authenticated .mw-input,
.mw-email-none .mw-input{
border: 1px solid #FF8080;
background-color: #FFC0C0;
color: black;
}
-/** Authenticated email field has its own class too. Unstyled by default */
+/* Authenticated email field has its own class too. Unstyled by default */
/*
.mw-email-authenticated .mw-input { }
*/
-/**
+/*
* Hide, but keep accessible for screen-readers.
* Like .mw-jump, #jump-to-nav from skins/common/shared.css
*/
-/**
+/*!
* JavaScript for Special:Preferences
*/
jQuery( function ( $ ) {
/**
* It uses document.getElementById for security reasons (HTML injections in $()).
*
+ * @ignore
* @param String name: the name of a tab without the prefix ("mw-prefsection-")
* @param String mode: [optional] A hash will be set according to the current
- * open section. Set mode 'noHash' to surpress this.
+ * open section. Set mode 'noHash' to surpress this.
*/
function switchPrefTab( name, mode ) {
var $tab, scrollTop;
} );
}
- /**
- * Timezone functions.
- * Guesses Timezone from browser and updates fields onchange
- */
+ // Timezone functions.
+ // Guesses Timezone from browser and updates fields onchange.
$tzSelect = $( '#mw-input-wptimecorrection' );
$tzTextbox = $( '#mw-input-wptimecorrection-other' );
-/**
+/*!
* JavaScript for Special:RecentChanges
*/
( function ( mw, $ ) {
var rc, $checkboxes, $select;
+ /**
+ * @class mw.special.recentchanges
+ * @singleton
+ */
rc = {
/**
* Handler to disable/enable the namespace selector checkboxes when the
$checkboxes.prop( 'disabled', isAllNS );
},
+ /** */
init: function () {
$select = $( '#namespace' );
$checkboxes = $( '#nsassociated, #nsinvert' );
-/**
+/*
* Fixes sister projects box moving down the extract
* of the first result (bug #16886).
* It only happens when the window is small and
-/**
+/*!
* JavaScript for Special:Search
*/
( function ( mw, $ ) {
-/**
+/*!
* JavaScript for Special:Undelete
*/
jQuery( function ( $ ) {
/**
* JavaScript for Special:Upload
+ *
* Note that additional code still lives in skins/common/upload.js
+ *
+ * @private
+ * @class mw.special.upload
+ * @singleton
*/
( function ( mw, $ ) {
- /**
- * Add a preview to the upload form
- */
+ // Add a preview to the upload form
$( function () {
/**
* Is the FileAPI available with sufficient functionality?
* Check if this is a recognizable image type...
* Also excludes files over 10M to avoid going insane on memory usage.
*
- * @todo is there a way we can ask the browser what's supported in <img>s?
- * @todo put SVG back after working around Firefox 7 bug <https://bugzilla.wikimedia.org/show_bug.cgi?id=31643>
+ * TODO: Is there a way we can ask the browser what's supported in `<img>`s?
+ *
+ * TODO: Put SVG back after working around Firefox 7 bug <https://bugzilla.wikimedia.org/show_bug.cgi?id=31643>
*
* @param {File} file
* @return boolean
* in browsers supporting HTML5 FileAPI.
*
* As of this writing, known good:
+ *
* - Firefox 3.6+
* - Chrome 7.something
*
- * @todo check file size limits and warn of likely failures
+ * TODO: Check file size limits and warn of likely failures
*
* @param {File} file
*/
* to do preprocessing on the binary data first.
*
* @param {File} file
- * @param {function} callback
- * @param {function} callbackBinary
+ * @param {Function} callback
+ * @param {Function} callbackBinary
*/
function fetchPreview( file, callback, callbackBinary ) {
var reader = new FileReader();
/**
* Format a file size attractively.
- * @todo match numeric formatting
+ *
+ * TODO: Match numeric formatting
*
* @param {number} s
- * @return string
+ * @return {string}
*/
function prettySize( s ) {
var sizeMsgs = ['size-bytes', 'size-kilobytes', 'size-megabytes', 'size-gigabytes'];
return true;
}
- /**
- * Initialization
- */
+ /* Initialization */
if ( hasFileAPI() ) {
// Update thumbnail when the file selection control is updated.
$( '#wpUploadFile' ).change( function () {
}
} );
- /**
- * Disable all upload source fields except the selected one
- */
+ // Disable all upload source fields except the selected one
$( function () {
var i, $row,
$rows = $( '.mw-htmlform-field-UploadSourceField' );
+ /**
+ * @param {jQuery} $currentRow
+ * @return {Function} Handler
+ * @return {jQuery.Event} return.e
+ */
function createHandler( $currentRow ) {
- /**
- * @param {jQuery.Event}
- */
return function () {
$( '.mw-upload-source-error' ).remove();
if ( this.checked ) {
margin-bottom: 10px;
}
-/**** shuffled CAPTCHA ****/
+/* shuffled CAPTCHA */
#wpCaptchaWord {
margin-top: 6px;
}
-/**
+/*!
* JavaScript for login and signup forms.
*/
( function ( mw, $ ) {
-/**
+/*!
* JavaScript for signup form.
*/
( function ( mw, $ ) {
-/**
- * Adds additional styling to the extension title/version list
-**/
+/*!
+ * Styling for Special:Version
+ */
.mw-version-ext-name {
font-weight: bold;
}