jenkins-bot has submitted this change and it was merged.
Change subject: More spaces in square brackets
......................................................................
More spaces in square brackets
Per code conventions.
Change-Id: Id19469dde78619db87f0c761907711334bd07f05
---
M resources/controller/uw.controller.Details.js
M resources/controller/uw.controller.Step.js
M resources/handlers/mw.ApiUploadFormDataHandler.js
M resources/handlers/mw.FirefoggHandler.js
M resources/mw.DestinationChecker.js
M resources/mw.FlickrChecker.js
M resources/mw.GroupProgressBar.js
M resources/mw.LanguageUpWiz.js
M resources/mw.UploadWizard.js
M resources/mw.UploadWizardDeed.js
M resources/mw.UploadWizardDetails.js
M resources/mw.UploadWizardLicenseInput.js
M resources/mw.UploadWizardUpload.js
M resources/mw.UploadWizardUploadInterface.js
M resources/mw.units.js
M resources/transports/mw.FirefoggTransport.js
M resources/transports/mw.FormDataTransport.js
M resources/transports/mw.IframeTransport.js
M resources/ui/uw.ui.Details.js
M resources/ui/uw.ui.Thanks.js
M resources/ui/uw.ui.Wizard.js
M resources/uw/model/uw.model.Description.js
M tests/qunit/controller/uw.controller.Step.test.js
M tests/qunit/transports/mw.FormDataTransport.test.js
M tests/qunit/uw.EventFlowLogger.test.js
25 files changed, 163 insertions(+), 163 deletions(-)
Approvals:
MarkTraceur: Looks good to me, approved
Jforrester: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/resources/controller/uw.controller.Details.js
b/resources/controller/uw.controller.Details.js
index 4a28e6e..8f6a845 100644
--- a/resources/controller/uw.controller.Details.js
+++ b/resources/controller/uw.controller.Details.js
@@ -72,7 +72,7 @@
// Show toggler to copy selected metadata if there's
more than one successful upload
if ( successes > 1 ) {
- uploads[0].details.buildAndShowCopyMetadata();
+ uploads[ 0 ].details.buildAndShowCopyMetadata();
}
} );
@@ -121,13 +121,13 @@
title = upload.title.getName() + '.' +
mw.Title.normalizeExtension( upload.title.getExtension() );
// Seen this title before?
- if ( titles[title] ) {
+ if ( titles[ title ] ) {
// Don't submit. Instead, set an error
in details step.
upload.details.setDuplicateTitleError();
return;
} else {
- titles[title] = true;
+ titles[ title ] = true;
}
valid += 1;
diff --git a/resources/controller/uw.controller.Step.js
b/resources/controller/uw.controller.Step.js
index a1c7d65..5a3732c 100644
--- a/resources/controller/uw.controller.Step.js
+++ b/resources/controller/uw.controller.Step.js
@@ -182,7 +182,7 @@
// cases this will be the next upload.
while ( uploadsQueued.length > 0 ) {
ix = uploadsQueued.shift();
- upload = step.uploads[ix];
+ upload = step.uploads[ ix ];
if ( step.canTransition( upload ) ) {
return step.transitionOne( upload
).then( startNextUpload );
diff --git a/resources/handlers/mw.ApiUploadFormDataHandler.js
b/resources/handlers/mw.ApiUploadFormDataHandler.js
index 8c3a886..57fd5cd 100644
--- a/resources/handlers/mw.ApiUploadFormDataHandler.js
+++ b/resources/handlers/mw.ApiUploadFormDataHandler.js
@@ -22,7 +22,7 @@
} );
this.transport = new mw.FormDataTransport(
- this.$form[0].action,
+ this.$form[ 0 ].action,
this.formData
).on( 'update-stage', function ( stage ) {
upload.ui.setStatus( 'mwe-upwiz-' + stage );
diff --git a/resources/handlers/mw.FirefoggHandler.js
b/resources/handlers/mw.FirefoggHandler.js
index cf05650..3fec8f9 100644
--- a/resources/handlers/mw.FirefoggHandler.js
+++ b/resources/handlers/mw.FirefoggHandler.js
@@ -24,10 +24,10 @@
getTransport: function () {
var file, transport,
upload = this.upload,
- $fileInput = upload.ui.$fileInputCtrl[0];
+ $fileInput = upload.ui.$fileInputCtrl[ 0 ];
if ( $fileInput.files && $fileInput.files.length ) {
- file = $fileInput.files[0];
+ file = $fileInput.files[ 0 ];
} else if ( upload.file ) {
file = upload.file;
} else if ( upload.providedFile ) {
diff --git a/resources/mw.DestinationChecker.js
b/resources/mw.DestinationChecker.js
index df89d4f..b9f463c 100644
--- a/resources/mw.DestinationChecker.js
+++ b/resources/mw.DestinationChecker.js
@@ -29,13 +29,13 @@
this.api = options.api;
$.each( [ 'preprocess', 'delay', 'events' ], function ( i,
option ) {
- if ( options[option] ) {
- checker[option] = options[option];
+ if ( options[ option ] ) {
+ checker[ option ] = options[ option ];
}
} );
$.each( this.events, function ( i, eventName ) {
- $( checker.selector )[eventName]( check );
+ $( checker.selector )[ eventName ]( check );
} );
};
@@ -156,7 +156,7 @@
};
}
- checker.cachedBlacklist[title] = result;
+ checker.cachedBlacklist[ title ] = result;
callback( { blacklist:result } );
}
@@ -164,8 +164,8 @@
return;
}
- if ( this.cachedBlacklist[title] !== undefined ) {
- callback( {
blacklist:this.cachedBlacklist[title] } );
+ if ( this.cachedBlacklist[ title ] !== undefined ) {
+ callback( { blacklist:this.cachedBlacklist[
title ] } );
return;
}
@@ -212,8 +212,8 @@
// If no file found: a page with a key of -1
and no imageinfo
// If file found on another repository, such as
when the wiki is using InstantCommons: page with a key of -1, plus imageinfo
// If file found on this repository: page with
some positive numeric key
- if ( data.query.pages[-1] &&
!data.query.pages[-1].imageinfo ) {
- protection =
data.query.pages[-1].protection;
+ if ( data.query.pages[ -1 ] &&
!data.query.pages[ -1 ].imageinfo ) {
+ protection = data.query.pages[ -1
].protection;
if ( protection && protection.length >
0 ) {
$.each( protection, function (
i, val ) {
if ( $.inArray(
val.level, mw.config.get( 'wgUserGroups' ) ) === -1 ) {
@@ -231,7 +231,7 @@
for ( pageId in data.query.pages ) {
// Conflict found, this
filename is NOT unique
if ( data.query.normalized ) {
- ntitle =
data.query.normalized[0].to;
+ ntitle =
data.query.normalized[ 0 ].to;
} else {
ntitle =
data.query.pages[ pageId ].title;
}
@@ -249,7 +249,7 @@
continue;
}
- img = data.query.pages[ pageId
].imageinfo[0];
+ img = data.query.pages[ pageId
].imageinfo[ 0 ];
result = {
isUnique: false,
@@ -262,7 +262,7 @@
}
}
- checker.cachedResult[title] = result;
+ checker.cachedResult[ title ] = result;
callback( { unique:result } );
}
@@ -286,8 +286,8 @@
return;
}
- if ( this.cachedResult[title] !== undefined ) {
- callback( { unique:this.cachedResult[title] } );
+ if ( this.cachedResult[ title ] !== undefined ) {
+ callback( { unique:this.cachedResult[ title ] }
);
return;
}
diff --git a/resources/mw.FlickrChecker.js b/resources/mw.FlickrChecker.js
index 412526b..6babc2b 100644
--- a/resources/mw.FlickrChecker.js
+++ b/resources/mw.FlickrChecker.js
@@ -81,17 +81,17 @@
groupPoolMatches || userGalleryMatches ||
userFavoritesMatches ) {
$( '#mwe-upwiz-upload-add-flickr-container'
).hide();
this.imageUploads = [];
- if ( albumIdMatches && albumIdMatches[1] > 0 ) {
+ if ( albumIdMatches && albumIdMatches[ 1 ] > 0
) {
this.getPhotoset( albumIdMatches );
- } else if ( photoIdMatches && photoIdMatches[1]
> 0 ) {
+ } else if ( photoIdMatches && photoIdMatches[ 1
] > 0 ) {
this.getPhoto( photoIdMatches );
} else if ( userCollectionMatches ) {
this.getCollection(
userCollectionMatches );
- } else if ( userFavoritesMatches &&
userFavoritesMatches[1] ) {
+ } else if ( userFavoritesMatches &&
userFavoritesMatches[ 1 ] ) {
this.getPhotostream( 'favorites',
userPhotostreamMatches );
- } else if ( userGalleryMatches &&
userGalleryMatches[1] ) {
+ } else if ( userGalleryMatches &&
userGalleryMatches[ 1 ] ) {
this.getGallery();
- } else if ( userPhotostreamMatches &&
userPhotostreamMatches[1] ) {
+ } else if ( userPhotostreamMatches &&
userPhotostreamMatches[ 1 ] ) {
this.getPhotostream( 'stream' );
} else if ( groupPoolMatches ) {
this.getGroupPool( groupPoolMatches );
@@ -117,7 +117,7 @@
if ( title === '' ) {
fileName = ownername + ' - ' + id + '.jpg';
- } else if ( mw.FlickrChecker.fileNames[title + '.jpg']
) {
+ } else if ( mw.FlickrChecker.fileNames[ title + '.jpg'
] ) {
fileName = title + ' - ' + id + '.jpg';
} else {
fileName = title + '.jpg';
@@ -133,7 +133,7 @@
* @param {string} fileName
*/
reserveFileName: function ( fileName ) {
- mw.FlickrChecker.fileNames[fileName] = true;
+ mw.FlickrChecker.fileNames[ fileName ] = true;
},
/**
@@ -186,10 +186,10 @@
url: this.url
} ).done( function ( data ) {
var gid = data.group.id;
- if ( groupPoolMatches[1] ) { // URL contains a
user ID
+ if ( groupPoolMatches[ 1 ] ) { // URL contains
a user ID
that.flickrRequest( {
method:
'flickr.urls.lookupUser',
- url:
'http://www.flickr.com/photos/' + groupPoolMatches[1]
+ url:
'http://www.flickr.com/photos/' + groupPoolMatches[ 1 ]
} ).done( function ( data ) {
that.getPhotos( 'photos', {
method:
'flickr.groups.pools.getPhotos',
@@ -262,8 +262,8 @@
extras: 'license, url_sq, owner_name,
original_format, date_taken, geo',
user_id: data.user.id
};
- if ( userCollectionMatches[1] ) {
- req.collection_id =
userCollectionMatches[1];
+ if ( userCollectionMatches[ 1 ] ) {
+ req.collection_id =
userCollectionMatches[ 1 ];
}
that.flickrRequest( req ).done( function ( data
) {
$( '#mwe-upwiz-files' ).append(
that.buildCollectionLinks( true, data.collections ) );
@@ -296,7 +296,7 @@
getPhotoset: function ( albumIdMatches ) {
this.getPhotos( 'photoset', {
method: 'flickr.photosets.getPhotos',
- photoset_id: albumIdMatches[1]
+ photoset_id: albumIdMatches[ 1 ]
} );
},
@@ -389,7 +389,7 @@
index: i
};
// Adding all the Photoset files which
have a valid license with the required info to an array so that they can be
referenced later
- checker.imageUploads[i] = flickrUpload;
+ checker.imageUploads[ i ] =
flickrUpload;
checker.reserveFileName( fileName );
// setting up the thumbnail previews in
the Selection list
@@ -427,8 +427,8 @@
$( '#mwe-upwiz-upload-ctrls' ).show();
$( '.ui-selected' ).each( function (
index, image ) {
image = $( this ).attr( 'id' );
- image = image.split( '-' )[1];
- checker.setUploadDescription(
checker.imageUploads[image] );
+ image = image.split( '-' )[ 1 ];
+ checker.setUploadDescription(
checker.imageUploads[ image ] );
checker.setImageURL( image );
} );
} );
@@ -447,7 +447,7 @@
getPhoto: function ( photoIdMatches ) {
var fileName, photoAuthor, sourceURL,
checker = this,
- photoId = photoIdMatches[1];
+ photoId = photoIdMatches[ 1 ];
this.flickrRequest( {
method: 'flickr.photos.getInfo',
@@ -553,7 +553,7 @@
var blacklist = {};
if ( data.flickrblacklist &&
data.flickrblacklist.list ) {
$.each(
data.flickrblacklist.list, function ( i, username ) {
- blacklist[username] =
true;
+ blacklist[ username ] =
true;
} );
}
return blacklist;
@@ -573,7 +573,7 @@
} ).done( function ( data ) {
if ( typeof data.licenses !== 'undefined' ) {
$.each( data.licenses.license, function
( index, value ) {
-
mw.FlickrChecker.prototype.licenseList[value.id] = value.name;
+
mw.FlickrChecker.prototype.licenseList[ value.id ] = value.name;
} );
}
$( '#mwe-upwiz-flickr-select-list-container'
).trigger( 'licenselistfilled' );
@@ -610,7 +610,7 @@
setImageURL: function ( index ) {
var largestSize,
checker = this,
- upload = this.imageUploads[index],
+ upload = this.imageUploads[ index ],
photoId = upload.photoId;
this.flickrRequest( {
@@ -649,9 +649,9 @@
checkLicense: function ( licenseId ) {
var licenseMessage, license,
// The returned data.photo.license is just an
ID that we use to look up the license name
- licenseName =
mw.FlickrChecker.prototype.licenseList[licenseId],
+ licenseName =
mw.FlickrChecker.prototype.licenseList[ licenseId ],
// Use the license name to retrieve the
template values
- licenseValue =
mw.FlickrChecker.prototype.licenseMaps[licenseName];
+ licenseValue =
mw.FlickrChecker.prototype.licenseMaps[ licenseName ];
// Set the license message to show the user.
if ( licenseValue === 'invalid' ) {
diff --git a/resources/mw.GroupProgressBar.js b/resources/mw.GroupProgressBar.js
index c376fbf..46497e8 100644
--- a/resources/mw.GroupProgressBar.js
+++ b/resources/mw.GroupProgressBar.js
@@ -63,7 +63,7 @@
return;
}
- totalWeight +=
upload[bar.weightProperty];
+ totalWeight += upload[
bar.weightProperty ];
} );
$.each( bar.uploads, function ( i, upload ) {
@@ -76,9 +76,9 @@
if ( $.inArray( upload.state,
bar.errorStates ) !== -1 ) {
errorStateCount++;
}
- if (upload[bar.progressProperty] !==
undefined) {
- fraction +=
upload[bar.progressProperty] * ( upload[bar.weightProperty] / totalWeight );
- if
(upload[bar.progressProperty] > 0 ) {
+ if (upload[ bar.progressProperty ] !==
undefined) {
+ fraction += upload[
bar.progressProperty ] * ( upload[ bar.weightProperty ] / totalWeight );
+ if (upload[
bar.progressProperty ] > 0 ) {
hasData = true;
}
}
diff --git a/resources/mw.LanguageUpWiz.js b/resources/mw.LanguageUpWiz.js
index 325a4b4..9920db0 100644
--- a/resources/mw.LanguageUpWiz.js
+++ b/resources/mw.LanguageUpWiz.js
@@ -23,7 +23,7 @@
// Helper function to see if a language is in the list.
checkForLang: function ( lang ) {
for ( var langIndex in mw.LanguageUpWiz.languages ) {
- if ( mw.LanguageUpWiz.languages[langIndex].code
=== lang ) {
+ if ( mw.LanguageUpWiz.languages[ langIndex
].code === lang ) {
return true;
}
}
@@ -45,7 +45,7 @@
mw.LanguageUpWiz.languages = [];
langs = mw.UploadWizard.config.uwLanguages;
for ( langcode in langs ) {
- mw.LanguageUpWiz.languages.push( { code:
langcode, text: langs[langcode] } );
+ mw.LanguageUpWiz.languages.push( { code:
langcode, text: langs[ langcode ] } );
}
// If a descriptionlang param is passed in the query
string, use that,
@@ -60,7 +60,7 @@
} else if ( mw.LanguageUpWiz.checkForLang( 'en' ) ) {
mw.LanguageUpWiz.defaultCode = 'en';
} else {
- mw.LanguageUpWiz.defaultCode =
mw.LanguageUpWiz.languages[0].code;
+ mw.LanguageUpWiz.defaultCode =
mw.LanguageUpWiz.languages[ 0 ].code;
}
mw.LanguageUpWiz.codes = {};
@@ -74,7 +74,7 @@
$select.append( $opt );
// add each language into dictionary
- mw.LanguageUpWiz.codes[language.code] =
language.text;
+ mw.LanguageUpWiz.codes[ language.code ] =
language.text;
} );
mw.LanguageUpWiz.$select = $select;
@@ -138,7 +138,7 @@
}
if ( code === 'nan' || code === 'minnan' ) {
return 'zh-min-nan';
- } else if ( mw.LanguageUpWiz.codes[code] !== undefined
) {
+ } else if ( mw.LanguageUpWiz.codes[ code ] !==
undefined ) {
return code;
}
return mw.LanguageUpWiz.getClosest( code.substring( 0,
code.indexOf( '-' )) );
diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 8ec7bfc..f039709 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -549,7 +549,7 @@
.css( { height: 0 } )
.insertAfter( $this );
- scrollHeight = $clone[0].scrollHeight;
+ scrollHeight = $clone[ 0 ].scrollHeight;
// Remove inline height property to measure natural
heights
$clone.css( 'height', '' );
innerHeight = $clone.innerHeight();
@@ -559,7 +559,7 @@
maxInnerHeight = $clone.innerHeight();
// Difference between reported innerHeight and
scrollHeight with no scrollbars present
// Equals 1 on Blink-based browsers and 0 everywhere
else
- measurementError = maxInnerHeight -
$clone[0].scrollHeight;
+ measurementError = maxInnerHeight - $clone[ 0
].scrollHeight;
$clone.remove();
idealHeight = Math.min( maxInnerHeight, scrollHeight +
measurementError );
// Only apply inline height when expansion beyond
natural height is needed
diff --git a/resources/mw.UploadWizardDeed.js b/resources/mw.UploadWizardDeed.js
index 0fe45cf..9c02a6b 100644
--- a/resources/mw.UploadWizardDeed.js
+++ b/resources/mw.UploadWizardDeed.js
@@ -118,9 +118,9 @@
defaultType =
config.licensing.defaultType;
if ( defaultType === 'ownwork' ) {
- defaultLicense =
config.licensing.ownWork.defaults[0];
+ defaultLicense =
config.licensing.ownWork.defaults[ 0 ];
} else {
- defaultLicense =
config.licensing.ownWork.licenses[0];
+ defaultLicense =
config.licensing.ownWork.licenses[ 0 ];
}
if ( this.showCustomDiv &&
this.licenseInput.getWikiText() !== '' ) {
@@ -164,14 +164,14 @@
defaultType =
config.licensing.defaultType;
if ( defaultType === 'ownwork' ) {
- defaultLicense =
config.licensing.ownWork.defaults[0];
+ defaultLicense =
config.licensing.ownWork.defaults[ 0 ];
} else {
- defaultLicense =
config.licensing.ownWork.licenses[0];
+ defaultLicense =
config.licensing.ownWork.licenses[ 0 ];
}
- defaultLicenseURL =
config.licenses[defaultLicense].url === undefined ?
+ defaultLicenseURL = config.licenses[
defaultLicense ].url === undefined ?
'#missing license URL' :
-
config.licenses[defaultLicense].url + 'deed.' + languageCode;
+ config.licenses[ defaultLicense
].url + 'deed.' + languageCode;
defaultLicenseMsg =
'mwe-upwiz-source-ownwork-assert-' + defaultLicense;
defaultLicenseExplainMsg =
'mwe-upwiz-source-ownwork-' + defaultLicense + '-explain';
defaultLicenseLink = $( '<a>' ).attr( {
target:'_blank', href:defaultLicenseURL } );
@@ -404,7 +404,7 @@
$selector.append( this.$form );
if ( defaultType === 'thirdparty' ) {
- defaultLicense =
config.licensing.thirdParty.defaults[0];
+ defaultLicense =
config.licensing.thirdParty.defaults[ 0 ];
defaultLicenseNum =
findLicenseRecursively( config, defaultLicense );
diff --git a/resources/mw.UploadWizardDetails.js
b/resources/mw.UploadWizardDetails.js
index e22ef0e..75e807d 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -374,7 +374,7 @@
!(
mw.UploadWizard.config.fields &&
mw.UploadWizard.config.fields.length &&
- mw.UploadWizard.config.fields[0].wikitext
+ mw.UploadWizard.config.fields[ 0 ].wikitext
),
mw.LanguageUpWiz.UNKNOWN,
false,
@@ -625,7 +625,7 @@
i, sourceMode,
details = this,
uploads = this.upload.wizard.uploads,
- sourceId = uploads[0].index;
+ sourceId = uploads[ 0 ].index;
// In the simplest case, we can use this
self-explanatory vanilla loop.
function simpleCopy( id, tag ) {
@@ -647,13 +647,13 @@
function oouiCopy( property, methods ) {
var i,
- sourceUpload = uploads[0],
+ sourceUpload = uploads[ 0 ],
getMethod = methods && methods.get ||
'getValue',
setMethod = methods && methods.set ||
'setValue',
- sourceValue =
sourceUpload.details[property][getMethod]();
+ sourceValue = sourceUpload.details[
property ][ getMethod ]();
for ( i = 1; i < uploads.length; i++ ) {
-
uploads[i].details[property][setMethod]( sourceValue );
+ uploads[ i ].details[ property ][
setMethod ]( sourceValue );
}
}
@@ -705,10 +705,10 @@
} else if ( metadataType === 'date' ) {
- sourceMode =
uploads[0].details.dateInputWidgetMode;
+ sourceMode = uploads[ 0
].details.dateInputWidgetMode;
for ( i = 1; i < uploads.length; i++ ) {
- uploads[i].details.setupDateInput(
sourceMode );
+ uploads[ i ].details.setupDateInput(
sourceMode );
}
oouiCopy( 'dateInputWidget' );
@@ -786,7 +786,7 @@
selected: defaultStatus
} );
- copyTypes[metadataName] = checkbox;
+ copyTypes[ metadataName ] = checkbox;
field = new OO.ui.FieldLayout( checkbox, {
label: copyMetadataMsg,
@@ -805,7 +805,7 @@
flags: [ 'constructive' ]
} ).on( 'click', function () {
$.each( details.copyMetadataTypes, function (
metadataType ) {
- if (
copyTypes[metadataType].isSelected() ) {
+ if ( copyTypes[ metadataType
].isSelected() ) {
details.copyMetadata(
metadataType );
}
} );
@@ -1119,7 +1119,7 @@
error: function () {
// copies arguments into a real array
var args = Array.prototype.slice.call( arguments ),
- msg = 'mwe-upwiz-upload-error-' + args[0];
+ msg = 'mwe-upwiz-upload-error-' + args[ 0 ];
$( this.errorDiv ).append( $( '<p
class="mwe-upwiz-upload-error"></p>' ).text( mw.message( msg, args.slice( 1 )
).text() ) );
// apply a error style to entire did
@@ -1175,22 +1175,22 @@
metadata = this.upload.imageinfo.metadata;
$.each( [ 'datetimeoriginal',
'datetimedigitized', 'datetime', 'date' ], function ( i, propName ) {
var matches, timeMatches,
- dateInfo = metadata[propName];
+ dateInfo = metadata[ propName ];
if ( !mw.isEmpty( dateInfo ) ) {
matches = $.trim( dateInfo
).match( yyyyMmDdRegex );
if ( !mw.isEmpty( matches ) ) {
timeMatches = $.trim(
dateInfo ).match( timeRegex );
if ( !mw.isEmpty(
timeMatches ) ) {
- dateObj = new
Date( parseInt( matches[1], 10 ),
-
parseInt( matches[2], 10 ) - 1,
-
parseInt( matches[3], 10 ),
-
parseInt( timeMatches[1], 10 ),
-
parseInt( timeMatches[2], 10 ),
-
parseInt( timeMatches[3], 10 ) );
+ dateObj = new
Date( parseInt( matches[ 1 ], 10 ),
+
parseInt( matches[ 2 ], 10 ) - 1,
+
parseInt( matches[ 3 ], 10 ),
+
parseInt( timeMatches[ 1 ], 10 ),
+
parseInt( timeMatches[ 2 ], 10 ),
+
parseInt( timeMatches[ 3 ], 10 ) );
} else {
- dateObj = new
Date( parseInt( matches[1], 10 ),
-
parseInt( matches[2], 10 ) - 1,
-
parseInt( matches[3], 10 ) );
+ dateObj = new
Date( parseInt( matches[ 1 ], 10 ),
+
parseInt( matches[ 2 ], 10 ) - 1,
+
parseInt( matches[ 3 ], 10 ) );
}
return false; // break
from $.each
}
@@ -1252,14 +1252,14 @@
*/
prefillDescription: function () {
if (
- this.descriptions[0].getDescriptionText() ===
'' &&
+ this.descriptions[ 0 ].getDescriptionText() ===
'' &&
this.upload.file !== undefined
) {
var m = this.upload.imageinfo.metadata,
- desc = this.descriptions[0],
+ desc = this.descriptions[ 0 ],
descText = this.upload.file.description
||
( m && m.imagedescription &&
- m.imagedescription[0] &&
m.imagedescription[0].value );
+ m.imagedescription[ 0 ] &&
m.imagedescription[ 0 ].value );
if ( descText ) {
desc.setText( descText );
@@ -1290,7 +1290,7 @@
// Apparently it can take the
form "x/y" instead of
// a decimal value. Mighty
silly, but let's save it.
dir = dir.split( '/' );
- dir = parseInt( dir[0], 10 ) /
parseInt( dir[1], 10 );
+ dir = parseInt( dir[ 0 ], 10 )
/ parseInt( dir[ 1 ], 10 );
}
this.$headingInput.val( dir );
@@ -1355,7 +1355,7 @@
makeLocationField: function ( name, $container ) {
var fieldId = 'location-' + name + this.upload.index,
fieldClass = 'loc-' + name,
- $input = this.makeTextInput( fieldId,
fieldClass, 10, undefined, mw.UploadWizard.config.defaults[name] );
+ $input = this.makeTextInput( fieldId,
fieldClass, 10, undefined, mw.UploadWizard.config.defaults[ name ] );
$( '<div>' )
.addClass( 'mwe-location-' + name )
@@ -1428,7 +1428,7 @@
info = '';
for ( key in information ) {
- info += '|' + key.replace( /:/g, '_' )
+ '=' + information[key] + '\n';
+ info += '|' + key.replace( /:/g, '_' )
+ '=' + information[ key ] + '\n';
}
wikiText += '=={{int:filedesc}}==\n';
@@ -1625,18 +1625,18 @@
}
if ( warnings && warnings.exists ) {
existingFile = warnings.exists;
- } else if ( warnings && warnings['exists-normalized'] )
{
- existingFile = warnings['exists-normalized'];
+ } else if ( warnings && warnings[ 'exists-normalized' ]
) {
+ existingFile = warnings[ 'exists-normalized' ];
existingFileExt = mw.Title.normalizeExtension(
existingFile.split( '.' ).pop() );
ourFileExt = mw.Title.normalizeExtension(
this.upload.title.getExtension() );
if ( existingFileExt !== ourFileExt ) {
- delete warnings['exists-normalized'];
+ delete warnings[ 'exists-normalized' ];
ignoreTheseWarnings = true;
}
}
- if ( warnings && warnings['was-deleted'] ) {
- delete warnings['was-deleted'];
+ if ( warnings && warnings[ 'was-deleted' ] ) {
+ delete warnings[ 'was-deleted' ];
ignoreTheseWarnings = true;
}
for ( wx in warnings ) {
@@ -1660,20 +1660,20 @@
return $.Deferred().reject( code, info
);
} );
} else if ( result && result.upload.warnings ) {
- if ( warnings.thumb || warnings['thumb-name'] )
{
+ if ( warnings.thumb || warnings[ 'thumb-name' ]
) {
this.recoverFromError( this.titleId,
mw.message( 'mwe-upwiz-error-title-thumbnail' ).text(), 'error-title-thumbnail'
);
} else if ( warnings.badfilename ) {
this.recoverFromError( this.titleId,
mw.message( 'mwe-upwiz-error-title-badchars' ).text(), 'title-badchars' );
- } else if ( warnings['bad-prefix'] ) {
+ } else if ( warnings[ 'bad-prefix' ] ) {
this.recoverFromError( this.titleId,
mw.message( 'mwe-upwiz-error-title-senselessimagename' ).text(),
'title-senselessimagename' );
} else if ( existingFile ) {
existingFileUrl = mw.config.get(
'wgServer' ) + new mw.Title( existingFile, NS_FILE ).getUrl();
this.recoverFromError( this.titleId,
mw.message( 'mwe-upwiz-api-warning-exists', existingFileUrl ).parse(),
'api-warning-exists' );
} else if ( warnings.duplicate ) {
this.recoverFromError( this.titleId,
mw.message( 'mwe-upwiz-upload-error-duplicate' ).text(),
'upload-error-duplicate' );
- } else if ( warnings['duplicate-archive'] !==
undefined ) {
- // warnings['duplicate-archive'] may be
'' (empty string) for revdeleted files
- if (
this.upload.ignoreWarning['duplicate-archive'] ) {
+ } else if ( warnings[ 'duplicate-archive' ] !==
undefined ) {
+ // warnings[ 'duplicate-archive' ] may
be '' (empty string) for revdeleted files
+ if ( this.upload.ignoreWarning[
'duplicate-archive' ] ) {
// We already told the
interface to ignore this warning, so
// let's steamroll over it and
re-call this handler.
params.ignorewarnings = true;
@@ -1756,8 +1756,8 @@
}
if ( result && result.error && result.error.code ) {
- if ( titleErrorMap[code] ) {
- this.recoverFromError( this.titleId,
mw.message( 'mwe-upwiz-error-title-' + titleErrorMap[code] ).escaped(),
'title-' + titleErrorMap[code] );
+ if ( titleErrorMap[ code ] ) {
+ this.recoverFromError( this.titleId,
mw.message( 'mwe-upwiz-error-title-' + titleErrorMap[ code ] ).escaped(),
'title-' + titleErrorMap[ code ] );
return;
} else {
statusKey = 'api-error-' + code;
diff --git a/resources/mw.UploadWizardLicenseInput.js
b/resources/mw.UploadWizardLicenseInput.js
index 1dd49d4..9030c2e 100644
--- a/resources/mw.UploadWizardLicenseInput.js
+++ b/resources/mw.UploadWizardLicenseInput.js
@@ -90,10 +90,10 @@
this.defaults = [];
- if ( config.defaults && config.defaults[0] ) {
+ if ( config.defaults && config.defaults[ 0 ] ) {
this.defaults = config.defaults;
- } else if ( config.licenses && config.licenses[0] ) {
- this.defaults = [ config.licenses[0] ];
+ } else if ( config.licenses && config.licenses[ 0 ] ) {
+ this.defaults = [ config.licenses[0 ] ];
}
mw.UploadWizardLicenseInput.prototype.count++;
@@ -181,9 +181,9 @@
}
$.each( config.licenses, function ( i, licenseName ) {
- if (
mw.UploadWizard.config.licenses[licenseName] !== undefined ) {
+ if ( mw.UploadWizard.config.licenses[
licenseName ] !== undefined ) {
var $customDiv,
- license = { name: licenseName,
props: mw.UploadWizard.config.licenses[licenseName] },
+ license = { name: licenseName,
props: mw.UploadWizard.config.licenses[ licenseName ] },
templates =
license.props.templates === undefined ? [ license.name ] :
license.props.templates.slice(0),
$input =
input.createInputElement( templates, config ),
$label =
input.createInputElementLabel( license, $input );
@@ -357,7 +357,7 @@
var input = this;
$.each( this.inputs, function ( i, $input ) {
var licenseName = $input.data( 'licenseName' );
- input.setInput( $input, values[licenseName] );
+ input.setInput( $input, values[ licenseName ] );
} );
},
@@ -414,7 +414,7 @@
setDefaultValues: function () {
var values = {};
$.each( this.defaults, function ( i, lic ) {
- values[lic] = true;
+ values[ lic ] = true;
} );
this.setValues( values );
},
@@ -506,8 +506,8 @@
} else {
// show the errors
$.each( errors, function ( i, err ) {
- var $el = err[0],
- msg = err[1];
+ var $el = err[ 0 ],
+ msg = err[ 1 ];
$el.msg( msg ).show();
} );
diff --git a/resources/mw.UploadWizardUpload.js
b/resources/mw.UploadWizardUpload.js
index cc5e8ca..8a75656 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -166,7 +166,7 @@
* Resume the upload, assume that whatever error(s) we got were benign.
*/
mw.UploadWizardUpload.prototype.removeErrors = function ( code ) {
- this.ignoreWarning[code] = true;
+ this.ignoreWarning[ code ] = true;
this.start();
};
@@ -194,7 +194,7 @@
if ( this.api.badToken ) {
this.api.badToken( 'edit' );
// Try again once
- if ( !this.ignoreWarning[code] ) {
+ if ( !this.ignoreWarning[ code ] ) {
this.removeErrors( code );
return;
}
@@ -220,7 +220,7 @@
result.upload.warnings = result.upload.warnings || {};
for ( warnCode in result.upload.warnings ) {
- if ( !this.ignoreWarning[warnCode] && this.state !==
'error' ) {
+ if ( !this.ignoreWarning[ warnCode ] && this.state !==
'error' ) {
switch ( warnCode ) {
case 'page-exists':
case 'exists':
@@ -232,16 +232,16 @@
case 'duplicate':
case 'duplicate-archive':
code = warnCode;
- this.setDuplicateError(
warnCode, result.upload.warnings[warnCode] );
+ this.setDuplicateError(
warnCode, result.upload.warnings[ warnCode ] );
break;
default:
// we have an unknown warning,
so let's say what we know
code = 'unknown-warning';
- if ( typeof
result.upload.warnings[warnCode] === 'string' ) {
+ if ( typeof
result.upload.warnings[ warnCode ] === 'string' ) {
// tack the original
error code onto the warning info
- info = warnCode +
mw.message( 'colon-separator' ).escaped() + result.upload.warnings[warnCode];
+ info = warnCode +
mw.message( 'colon-separator' ).escaped() + result.upload.warnings[ warnCode ];
} else {
- info =
result.upload.warnings[warnCode];
+ info =
result.upload.warnings[ warnCode ];
}
this.setError( code, info );
break;
@@ -461,7 +461,7 @@
// So, when multiple files are provided
(via select multiple), add the first file to this UploadWizardUpload
// and create new UploadWizardUpload
objects and corresponding interfaces for the rest.
- this.file = files[0];
+ this.file = files[ 0 ];
// If chunked uploading is enabled, we
can transfer any file that MediaWiki
// will accept. Otherwise we're bound
by PHP's limits.
@@ -509,7 +509,7 @@
arr = new
Uint8Array( binReader.result );
binStr = '';
for ( i = 0; i
< arr.byteLength; i++ ) {
- binStr
+= String.fromCharCode( arr[i] );
+ binStr
+= String.fromCharCode( arr[ i ] );
}
}
try {
@@ -613,10 +613,10 @@
pixelWidthDim = 'height';
}
if ( meta.general.pixelHeight ) {
- this.imageinfo[pixelHeightDim] =
meta.general.pixelHeight.value;
+ this.imageinfo[ pixelHeightDim ] =
meta.general.pixelHeight.value;
}
if ( meta.general.pixelWidth ) {
- this.imageinfo[pixelWidthDim] =
meta.general.pixelWidth.value;
+ this.imageinfo[ pixelWidthDim ] =
meta.general.pixelWidth.value;
}
}
}
@@ -652,7 +652,7 @@
function setMetadata( i, pair ) {
if ( pair !== undefined ) {
-
upload.imageinfo.metadata[pair.name.toLowerCase()] = pair.value;
+ upload.imageinfo.metadata[
pair.name.toLowerCase() ] = pair.value;
}
}
@@ -666,7 +666,7 @@
$.each( imageinfo.metadata, setMetadata
);
}
} else {
- this.imageinfo[key] = imageinfo[key];
+ this.imageinfo[ key ] = imageinfo[ key ];
}
}
};
@@ -799,7 +799,7 @@
if ( this.fromURL ) {
constructor = 'ApiUploadPostHandler';
}
- this.uploadHandler = new mw[constructor]( this,
this.api );
+ this.uploadHandler = new mw[ constructor ]( this,
this.api );
}
return this.uploadHandler;
};
@@ -816,8 +816,8 @@
var deferred,
key = width + '|' + height;
- if ( this.thumbnailPublishers[key] ) {
- return this.thumbnailPublishers[key];
+ if ( this.thumbnailPublishers[ key ] ) {
+ return this.thumbnailPublishers[ key ];
}
deferred = $.Deferred();
@@ -882,8 +882,8 @@
this.getImageInfo( thumbnailPublisher, [ 'url' ],
width, height );
}
- this.thumbnailPublishers[key] = deferred.promise();
- return this.thumbnailPublishers[key];
+ this.thumbnailPublishers[ key ] = deferred.promise();
+ return this.thumbnailPublishers[ key ];
};
/**
@@ -926,8 +926,8 @@
mw.UploadWizardUpload.prototype.getScalingFromConstraints = function (
image, constraints ) {
var scaling = 1;
$.each( [ 'width', 'height' ], function ( i, dim ) {
- if ( constraints[dim] && image[dim] > constraints[dim]
) {
- var s = constraints[dim] / image[dim];
+ if ( constraints[ dim ] && image[ dim ] > constraints[
dim ] ) {
+ var s = constraints[ dim ] / image[ dim ];
if ( s < scaling ) {
scaling = s;
}
@@ -1001,7 +1001,7 @@
}
$canvas = $( '<canvas></canvas>' ).attr( constraints );
- ctx = $canvas[0].getContext( '2d' );
+ ctx = $canvas[ 0 ].getContext( '2d' );
ctx.clearRect( 0, 0, width, height );
ctx.rotate( rotation / 180 * Math.PI );
ctx.drawImage( image, x, y, width, height );
diff --git a/resources/mw.UploadWizardUploadInterface.js
b/resources/mw.UploadWizardUploadInterface.js
index 4902555..e5d7a61 100644
--- a/resources/mw.UploadWizardUploadInterface.js
+++ b/resources/mw.UploadWizardUploadInterface.js
@@ -321,7 +321,7 @@
var files = [];
if ( mw.fileApi.isAvailable() ) {
if ( this.providedFile &&
!this.$fileInputCtrl.first().value ) { // default to the fileinput if it's
defined.
- files[0] = this.providedFile;
+ files[ 0 ] = this.providedFile;
} else {
$.each( this.$fileInputCtrl.get(0).files,
function ( i, file ) {
files.push( file );
@@ -348,8 +348,8 @@
var input = this.$fileInputCtrl.get(0);
// On IE 11, input.value is incorrect for <input
type=file multiple>, like we're using here;
// the input.files interface is reliable.
(T88223#1595320)
- if ( input.files && input.files[0] &&
input.files[0].name ) {
- return input.files[0].name;
+ if ( input.files && input.files[ 0 ] && input.files[ 0
].name ) {
+ return input.files[ 0 ].name;
}
return input.value;
}
diff --git a/resources/mw.units.js b/resources/mw.units.js
index 8b7ef06..0b86e16 100644
--- a/resources/mw.units.js
+++ b/resources/mw.units.js
@@ -19,7 +19,7 @@
size /= 1024.0;
i++;
}
- return mw.message( scaleMsgKeys[i], size.toFixed( i > 1
? 2 : 0 ) ).escaped();
+ return mw.message( scaleMsgKeys[ i ], size.toFixed( i >
1 ? 2 : 0 ) ).escaped();
}
};
diff --git a/resources/transports/mw.FirefoggTransport.js
b/resources/transports/mw.FirefoggTransport.js
index a55839a..466a59b 100644
--- a/resources/transports/mw.FirefoggTransport.js
+++ b/resources/transports/mw.FirefoggTransport.js
@@ -96,7 +96,7 @@
return false;
}
- if ( info.video && info.video.length > 0 &&
info.video[0].duration > 0.04 ) {
+ if ( info.video && info.video.length > 0 && info.video[ 0
].duration > 0.04 ) {
return true;
}
diff --git a/resources/transports/mw.FormDataTransport.js
b/resources/transports/mw.FormDataTransport.js
index 983d387..2034f9c 100644
--- a/resources/transports/mw.FormDataTransport.js
+++ b/resources/transports/mw.FormDataTransport.js
@@ -297,7 +297,7 @@
transport = this,
retryDeferred = $.Deferred(),
retry = function () {
- transport[methodName]( file, offset ).then(
retryDeferred.resolve, retryDeferred.reject );
+ transport[ methodName ]( file, offset ).then(
retryDeferred.resolve, retryDeferred.reject );
};
if ( this.config.useRetryTimeout !== false ) {
@@ -325,7 +325,7 @@
this.firstPoll = ( new Date() ).getTime();
}
$.each(this.formData, function (key, value) {
- params[key] = value;
+ params[ key ] = value;
});
params.checkstatus = true;
params.filekey = this.filekey;
diff --git a/resources/transports/mw.IframeTransport.js
b/resources/transports/mw.IframeTransport.js
index 50f382f..106e630 100644
--- a/resources/transports/mw.IframeTransport.js
+++ b/resources/transports/mw.IframeTransport.js
@@ -68,7 +68,7 @@
*/
mw.IframeTransport.prototype.processIframeResult = function ( iframe ) {
var response, json,
- doc = iframe.contentDocument ||
frames[iframe.id].document;
+ doc = iframe.contentDocument || frames[ iframe.id
].document;
// Fix for Opera 9.26
if ( doc.readyState && doc.readyState !== 'complete' ) {
diff --git a/resources/ui/uw.ui.Details.js b/resources/ui/uw.ui.Details.js
index 4c06fce..2f6b8ff 100644
--- a/resources/ui/uw.ui.Details.js
+++ b/resources/ui/uw.ui.Details.js
@@ -159,7 +159,7 @@
if ( errorCount > 0 ) {
this.$errorCount.msg( 'mwe-upwiz-details-error-count',
errorCount, this.uploads.length );
// Scroll to the first error
- $( 'html, body' ).animate( { scrollTop: $(
$errorElements[0] ).offset().top - 50 }, 'slow' );
+ $( 'html, body' ).animate( { scrollTop: $(
$errorElements[ 0 ] ).offset().top - 50 }, 'slow' );
} else {
this.$errorCount.empty();
}
diff --git a/resources/ui/uw.ui.Thanks.js b/resources/ui/uw.ui.Thanks.js
index d9b0f67..4af54ea 100644
--- a/resources/ui/uw.ui.Thanks.js
+++ b/resources/ui/uw.ui.Thanks.js
@@ -100,7 +100,7 @@
var thumbWikiText = '[[' + [
upload.title.toText(),
'thumb',
-
upload.details.descriptions[0].getDescriptionText()
+ upload.details.descriptions[ 0
].getDescriptionText()
].join( '|' ) + ']]',
$thanksDiv = $( '<div>' )
@@ -180,11 +180,11 @@
* @return {Object|undefined}
*/
uw.ui.Thanks.prototype.getButtonConfig = function ( buttonName,
configField ) {
- if ( !this.config || !this.config.display ||
!this.config.display[buttonName] ) {
+ if ( !this.config || !this.config.display ||
!this.config.display[ buttonName ] ) {
return;
}
- return this.config.display[buttonName][configField];
+ return this.config.display[ buttonName ][ configField ];
};
/**
@@ -197,8 +197,8 @@
uw.ui.Thanks.prototype.dropParameterFromURL = function ( url, paramName
) {
var newUrl = new mw.Uri( url );
if ( newUrl.query ) {
- delete newUrl.query[paramName];
- delete newUrl.query[paramName + '[]'];
+ delete newUrl.query[ paramName ];
+ delete newUrl.query[ paramName + '[]' ];
}
return newUrl.toString();
};
diff --git a/resources/ui/uw.ui.Wizard.js b/resources/ui/uw.ui.Wizard.js
index 565fee7..142370f 100644
--- a/resources/ui/uw.ui.Wizard.js
+++ b/resources/ui/uw.ui.Wizard.js
@@ -88,10 +88,10 @@
if ( typeof configAltUploadForm === 'object' ) {
userLanguage = mw.config.get( 'wgUserLanguage' );
- if ( configAltUploadForm[userLanguage] ) {
- altUploadForm =
configAltUploadForm[userLanguage];
- } else if ( configAltUploadForm['default'] ) {
- altUploadForm = configAltUploadForm['default'];
+ if ( configAltUploadForm[ userLanguage ] ) {
+ altUploadForm = configAltUploadForm[
userLanguage ];
+ } else if ( configAltUploadForm[ 'default' ] ) {
+ altUploadForm = configAltUploadForm[ 'default'
];
}
} else {
altUploadForm = configAltUploadForm;
diff --git a/resources/uw/model/uw.model.Description.js
b/resources/uw/model/uw.model.Description.js
index 04133ac..4021e6e 100644
--- a/resources/uw/model/uw.model.Description.js
+++ b/resources/uw/model/uw.model.Description.js
@@ -75,8 +75,8 @@
fix = this.languageTemplateFixups;
}
- if ( fix && fix[language] ) {
- language = fix[language];
+ if ( fix && fix[ language ] ) {
+ language = fix[ language ];
}
this.language = language;
diff --git a/tests/qunit/controller/uw.controller.Step.test.js
b/tests/qunit/controller/uw.controller.Step.test.js
index 5251a81..84fe770 100644
--- a/tests/qunit/controller/uw.controller.Step.test.js
+++ b/tests/qunit/controller/uw.controller.Step.test.js
@@ -28,7 +28,7 @@
var tostub, promise,
donestub = this.sandbox.stub(),
ds = [ $.Deferred(), $.Deferred(), $.Deferred() ],
- ps = [ ds[0].promise(), ds[1].promise(),
ds[2].promise() ],
+ ps = [ ds[0 ].promise(), ds[ 1 ].promise(), ds[ 2
].promise() ],
calls = [],
step = new uw.controller.Step( { on: $.noop }, {
maxSimultaneousConnections: 3
@@ -42,23 +42,23 @@
];
tostub = this.sandbox.stub( step, 'transitionOne' );
- tostub.onFirstCall().returns( ps[0] );
- tostub.onSecondCall().returns( ps[1] );
- tostub.onThirdCall().returns( ps[2] );
+ tostub.onFirstCall().returns( ps[ 0 ] );
+ tostub.onSecondCall().returns( ps[ 1 ] );
+ tostub.onThirdCall().returns( ps[ 2 ] );
this.sandbox.stub( step, 'canTransition' ).returns( true );
promise = step.transitionAll().done( donestub );
calls = [ tostub.getCall( 0 ), tostub.getCall( 1 ),
tostub.getCall( 2 ) ];
- assert.strictEqual( calls[0].args[0].id, 15 );
- assert.strictEqual( calls[1].args[0].id, 21 );
+ assert.strictEqual( calls[ 0 ].args[ 0 ].id, 15 );
+ assert.strictEqual( calls[ 1 ].args[ 0 ].id, 21 );
- ds[0].resolve();
- ds[1].resolve();
+ ds[ 0 ].resolve();
+ ds[ 1 ].resolve();
assert.strictEqual( donestub.called, false );
- ds[2].resolve();
+ ds[ 2 ].resolve();
assert.ok( donestub.called );
} );
}( mediaWiki.uploadWizard, jQuery ) );
diff --git a/tests/qunit/transports/mw.FormDataTransport.test.js
b/tests/qunit/transports/mw.FormDataTransport.test.js
index 8ffb8b1..2f491ce 100644
--- a/tests/qunit/transports/mw.FormDataTransport.test.js
+++ b/tests/qunit/transports/mw.FormDataTransport.test.js
@@ -111,7 +111,7 @@
transport.upload( fakeFile );
assert.strictEqual( this.sandbox.server.requests.length, 1 );
- request = this.sandbox.server.requests[0];
+ request = this.sandbox.server.requests[ 0 ];
assert.strictEqual( request.method, 'POST' );
assert.strictEqual( request.url, '/w/api.php' );
assert.ok( request.async );
@@ -138,7 +138,7 @@
transport.uploadChunk( fakeFile, 0 );
assert.strictEqual( this.sandbox.server.requests.length, 1 );
- request = this.sandbox.server.requests[0];
+ request = this.sandbox.server.requests[ 0 ];
assert.strictEqual( request.method, 'POST' );
assert.strictEqual( request.url, '/w/api.php' );
assert.ok( request.async );
diff --git a/tests/qunit/uw.EventFlowLogger.test.js
b/tests/qunit/uw.EventFlowLogger.test.js
index 876d677..20368d7 100644
--- a/tests/qunit/uw.EventFlowLogger.test.js
+++ b/tests/qunit/uw.EventFlowLogger.test.js
@@ -29,10 +29,10 @@
logger.logSkippedStep( 'bar' );
logger.logEvent( 'baz' );
assert.ok( eventLog.logEvent.calledThrice, 'all steps were
logged' );
- assert.strictEqual(
eventLog.logEvent.firstCall.args[1].flowPosition, 1, 'first event has position
1' );
- assert.strictEqual(
eventLog.logEvent.thirdCall.args[1].flowPosition, 3, 'third event has position
3' );
- assert.ok( eventLog.logEvent.firstCall.args[1].flowId, 'events
have a flowId' );
- assert.strictEqual( eventLog.logEvent.firstCall.args[1].flowId,
- eventLog.logEvent.thirdCall.args[1].flowId, 'flowId is
constant' );
+ assert.strictEqual( eventLog.logEvent.firstCall.args[ 1
].flowPosition, 1, 'first event has position 1' );
+ assert.strictEqual( eventLog.logEvent.thirdCall.args[ 1
].flowPosition, 3, 'third event has position 3' );
+ assert.ok( eventLog.logEvent.firstCall.args[ 1 ].flowId,
'events have a flowId' );
+ assert.strictEqual( eventLog.logEvent.firstCall.args[ 1
].flowId,
+ eventLog.logEvent.thirdCall.args[ 1 ].flowId, 'flowId
is constant' );
} );
} ( mediaWiki, mediaWiki.uploadWizard ) );
--
To view, visit https://gerrit.wikimedia.org/r/247049
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id19469dde78619db87f0c761907711334bd07f05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits