Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/174637

Change subject: Hygiene: Apply requirePaddingNewLinesInObjects rule
......................................................................

Hygiene: Apply requirePaddingNewLinesInObjects rule

Change-Id: I9ae8f602a5a9114e57ae0e7ea07265cf920f0bd1
---
M javascripts/CtaDrawer.js
M javascripts/Overlay.js
M javascripts/OverlayManager.js
M javascripts/loggingSchemas/mobileWebUploads.js
M javascripts/loggingSchemas/mobileWebWikiGrok.js
M javascripts/loggingSchemas/mobileWebWikiGrokError.js
M javascripts/modules/editor/AbuseFilterPanel.js
M javascripts/modules/editor/EditorApi.js
M javascripts/modules/editor/EditorOverlayBase.js
M javascripts/modules/editor/VisualEditorOverlay.js
M javascripts/modules/editor/init.js
M javascripts/modules/issues/CleanupOverlay.js
M javascripts/modules/lastEdited/time.js
M javascripts/modules/mediaViewer/ImageOverlay.js
M javascripts/modules/nearby/NearbyApi.js
M javascripts/modules/notifications/NotificationsOverlay.js
M javascripts/modules/notifications/notifications.js
M javascripts/modules/references/ReferencesDrawer.js
M javascripts/modules/references/ReferencesDrawerBeta.js
M javascripts/modules/references/init.js
M javascripts/modules/routes.js
M javascripts/modules/search/SearchOverlay.js
M javascripts/modules/search/init.js
M javascripts/modules/talk/TalkOverlay.js
M javascripts/modules/talk/TalkSectionAddOverlay.js
M javascripts/modules/toc/TableOfContents.js
M javascripts/modules/uploads/LeadPhotoUploaderButton.js
M javascripts/modules/uploads/PhotoUploadOverlay.js
M javascripts/modules/uploads/PhotoUploaderButton.js
M javascripts/modules/watchlist/WatchList.js
M javascripts/modules/watchstar/Watchstar.js
M javascripts/modules/wikigrok/WikiGrokDialogB.js
M javascripts/specials/uploads.js
33 files changed, 261 insertions(+), 101 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/37/174637/1

diff --git a/javascripts/CtaDrawer.js b/javascripts/CtaDrawer.js
index 639515c..7ae7771 100644
--- a/javascripts/CtaDrawer.js
+++ b/javascripts/CtaDrawer.js
@@ -12,7 +12,10 @@
         */
        CtaDrawer = Drawer.extend( {
                defaults: {
-                       collapseButton: new Icon( { name: 'arrow-down', 
additionalClassNames: 'cancel' } ).toHtmlString(),
+                       collapseButton: new Icon( {
+                               name: 'arrow-down',
+                               additionalClassNames: 'cancel'
+                       } ).toHtmlString(),
                        loginCaption: mw.msg( 
'mobile-frontend-watchlist-cta-button-login' ),
                        signupCaption: mw.msg( 
'mobile-frontend-watchlist-cta-button-signup' )
                },
@@ -20,10 +23,12 @@
 
                preRender: function ( options ) {
                        var params = $.extend( {
-                               // use wgPageName as this includes the 
namespace if outside Main
-                               returnto: options.returnTo || mw.config.get( 
'wgPageName' )
-                       }, options.queryParams ),
-                               signupParams = $.extend( { type: 'signup' }, 
options.signupQueryParams );
+                                       // use wgPageName as this includes the 
namespace if outside Main
+                                       returnto: options.returnTo || 
mw.config.get( 'wgPageName' )
+                               }, options.queryParams ),
+                               signupParams = $.extend( {
+                                       type: 'signup'
+                               }, options.signupQueryParams );
 
                        options.loginUrl = mw.util.getUrl( 'Special:UserLogin', 
params );
                        options.signupUrl = mw.util.getUrl( 
'Special:UserLogin', $.extend( params, signupParams ) );
diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js
index c111ab6..9ef7f7b 100644
--- a/javascripts/Overlay.js
+++ b/javascripts/Overlay.js
@@ -48,14 +48,18 @@
                template: mw.template.get( 'mobile.overlays', 'Overlay.hogan' ),
                defaults: {
                        saveMsg: mw.msg( 'mobile-frontend-editor-save' ),
-                       cancelButton: new Icon( { tagName: 'button',
-                                       name: 'cancel', additionalClassNames: 
'cancel',
-                                       label: mw.msg( 
'mobile-frontend-overlay-close' )
-                               } ).toHtmlString(),
-                       backButton: new Icon( { tagName: 'button',
-                                       name: 'back', additionalClassNames: 
'back',
-                                       label: mw.msg( 
'mobile-frontend-overlay-close' )
-                               } ).toHtmlString(),
+                       cancelButton: new Icon( {
+                               tagName: 'button',
+                               name: 'cancel',
+                               additionalClassNames: 'cancel',
+                               label: mw.msg( 'mobile-frontend-overlay-close' )
+                       } ).toHtmlString(),
+                       backButton: new Icon( {
+                               tagName: 'button',
+                               name: 'back',
+                               additionalClassNames: 'back',
+                               label: mw.msg( 'mobile-frontend-overlay-close' )
+                       } ).toHtmlString(),
                        headerButtonsListClassName: '',
                        fixedHeader: true,
                        spinner: icons.spinner().toHtmlString()
diff --git a/javascripts/OverlayManager.js b/javascripts/OverlayManager.js
index 76d326b..ed9d23b 100644
--- a/javascripts/OverlayManager.js
+++ b/javascripts/OverlayManager.js
@@ -175,7 +175,10 @@
                 * which resolves to an overlay.
                 */
                add: function ( route, factory ) {
-                       var entry = { route: route, factory: factory };
+                       var entry = {
+                               route: route,
+                               factory: factory
+                       };
 
                        this.entries[route] = entry;
                        // check if overlay should be shown for the current path
diff --git a/javascripts/loggingSchemas/mobileWebUploads.js 
b/javascripts/loggingSchemas/mobileWebUploads.js
index 092a8ed..6c6afd0 100644
--- a/javascripts/loggingSchemas/mobileWebUploads.js
+++ b/javascripts/loggingSchemas/mobileWebUploads.js
@@ -20,6 +20,8 @@
                return logger;
        }
 
-       M.define( 'loggingSchemas/mobileWebUploads', { getLog: getLog } );
+       M.define( 'loggingSchemas/mobileWebUploads', {
+               getLog: getLog
+       } );
 
 }( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/loggingSchemas/mobileWebWikiGrok.js 
b/javascripts/loggingSchemas/mobileWebWikiGrok.js
index 9d00590..8aa3479 100644
--- a/javascripts/loggingSchemas/mobileWebWikiGrok.js
+++ b/javascripts/loggingSchemas/mobileWebWikiGrok.js
@@ -14,6 +14,8 @@
                return M.log( 'MobileWebWikiGrok', $.extend( options, data ) );
        }
 
-       M.define( 'loggingSchemas/mobileWebWikiGrok', { log: log } );
+       M.define( 'loggingSchemas/mobileWebWikiGrok', {
+               log: log
+       } );
 
 } )( mw.mobileFrontend, jQuery );
diff --git a/javascripts/loggingSchemas/mobileWebWikiGrokError.js 
b/javascripts/loggingSchemas/mobileWebWikiGrokError.js
index 4850196..eccbf0b 100644
--- a/javascripts/loggingSchemas/mobileWebWikiGrokError.js
+++ b/javascripts/loggingSchemas/mobileWebWikiGrokError.js
@@ -7,6 +7,8 @@
                return M.log( 'MobileWebWikiGrokError', $.extend( options, data 
) );
        }
 
-       M.define( 'loggingSchemas/mobileWebWikiGrokError', { log: log } );
+       M.define( 'loggingSchemas/mobileWebWikiGrokError', {
+               log: log
+       } );
 
 } )( mw.mobileFrontend, jQuery );
diff --git a/javascripts/modules/editor/AbuseFilterPanel.js 
b/javascripts/modules/editor/AbuseFilterPanel.js
index acf191a..fa89905 100644
--- a/javascripts/modules/editor/AbuseFilterPanel.js
+++ b/javascripts/modules/editor/AbuseFilterPanel.js
@@ -26,7 +26,9 @@
 
                        // OverlayManager will replace previous instance of the 
route if present
                        M.overlayManager.add( /^\/abusefilter$/, function () {
-                               return new AbuseFilterOverlay( { message: 
message } );
+                               return new AbuseFilterOverlay( {
+                                       message: message
+                               } );
                        } );
 
                        if ( type === 'warning' ) {
diff --git a/javascripts/modules/editor/EditorApi.js 
b/javascripts/modules/editor/EditorApi.js
index a74b0a2..e34f983 100644
--- a/javascripts/modules/editor/EditorApi.js
+++ b/javascripts/modules/editor/EditorApi.js
@@ -132,10 +132,16 @@
                                                result.resolve();
                                        } else if ( data && data.error ) {
                                                // Edit API error
-                                               result.reject( { type: 'error', 
details: data.error.code } );
+                                               result.reject( {
+                                                       type: 'error',
+                                                       details: data.error.code
+                                               } );
                                        } else if ( data && data.edit && 
data.edit.captcha ) {
                                                // CAPTCHAs
-                                               result.reject( { type: 
'captcha', details: data.edit.captcha } );
+                                               result.reject( {
+                                                       type: 'captcha',
+                                                       details: 
data.edit.captcha
+                                               } );
                                        } else if ( data && data.edit && 
data.edit.code ) {
                                                code = data.edit.code;
                                                warning = data.edit.warning;
@@ -143,30 +149,48 @@
                                                // FIXME: AbuseFilter should 
have more consistent API responses
                                                if ( 
/^abusefilter-warning/.test( code ) ) {
                                                        // AbuseFilter warning
-                                                       result.reject( { type: 
'abusefilter', details: {
-                                                               type: 'warning',
-                                                               message: warning
-                                                       } } );
+                                                       result.reject( {
+                                                               type: 
'abusefilter',
+                                                               details: {
+                                                                       type: 
'warning',
+                                                                       
message: warning
+                                                               }
+                                                       } );
                                                } else if ( 
/^abusefilter-disallow/.test( code ) ) {
                                                        // AbuseFilter disallow
-                                                       result.reject( { type: 
'abusefilter', details: {
-                                                               type: 
'disallow',
-                                                               message: warning
-                                                       } } );
+                                                       result.reject( {
+                                                               type: 
'abusefilter',
+                                                               details: {
+                                                                       type: 
'disallow',
+                                                                       
message: warning
+                                                               }
+                                                       } );
                                                } else if ( 
/^abusefilter/.test( code ) ) {
                                                        // AbuseFilter other
-                                                       result.reject( { type: 
'abusefilter', details: {
-                                                               type: 'other',
-                                                               message: warning
-                                                       } } );
+                                                       result.reject( {
+                                                               type: 
'abusefilter',
+                                                               details: {
+                                                                       type: 
'other',
+                                                                       
message: warning
+                                                               }
+                                                       } );
                                                } else {
                                                        // other errors
-                                                       result.reject( { type: 
'error', details: code } );
+                                                       result.reject( {
+                                                               type: 'error',
+                                                               details: code
+                                                       } );
                                                }
                                        } else {
-                                               result.reject( { type: 'error', 
details: 'unknown' } );
+                                               result.reject( {
+                                                       type: 'error',
+                                                       details: 'unknown'
+                                               } );
                                        }
-                               } ).fail( $.proxy( result, 'reject', { type: 
'error', details: 'http' } ) );
+                               } ).fail( $.proxy( result, 'reject', {
+                                       type: 'error',
+                                       details: 'http'
+                               } ) );
                        }
 
                        saveContent();
diff --git a/javascripts/modules/editor/EditorOverlayBase.js 
b/javascripts/modules/editor/EditorOverlayBase.js
index 33ff6af..68cb5f1 100644
--- a/javascripts/modules/editor/EditorOverlayBase.js
+++ b/javascripts/modules/editor/EditorOverlayBase.js
@@ -14,13 +14,20 @@
         */
        EditorOverlayBase = Overlay.extend( {
                defaults: $.extend( {}, Overlay.prototype.defaults, {
-                       switcherButton: new Icon( { tagName: 'button',
-                               name: 'edit-switch', additionalClassNames: 
'editor-switcher' } ).toHtmlString(),
-                       sourceButton: new Icon( { name: 'edit-source', 
additionalClassNames: 'icon-32px editor-choice',
+                       switcherButton: new Icon( {
+                               tagName: 'button',
+                               name: 'edit-switch',
+                               additionalClassNames: 'editor-switcher'
+                       } ).toHtmlString(),
+                       sourceButton: new Icon( {
+                               name: 'edit-source',
+                               additionalClassNames: 'icon-32px editor-choice',
                                hasText: true,
                                label: mw.msg( 
'mobile-frontend-editor-source-editor' )
                        } ).toHtmlString(),
-                       veButton: new Icon( { name: 'edit-ve', 
additionalClassNames: 'icon-32px editor-choice',
+                       veButton: new Icon( {
+                               name: 'edit-ve',
+                               additionalClassNames: 'icon-32px editor-choice',
                                hasText: true,
                                label: mw.msg( 
'mobile-frontend-editor-visual-editor' )
                        } ).toHtmlString(),
@@ -110,7 +117,9 @@
 
                        // Set a cookie for 30 days indicating that this user 
has edited from
                        // the mobile interface.
-                       $.cookie( 'mobileEditor', 'true', { expires: 30 } );
+                       $.cookie( 'mobileEditor', 'true', {
+                               expires: 30
+                       } );
                },
                initialize: function ( options ) {
                        if ( !options.previewingMsg ) {
diff --git a/javascripts/modules/editor/VisualEditorOverlay.js 
b/javascripts/modules/editor/VisualEditorOverlay.js
index 00a4889..6880b54 100644
--- a/javascripts/modules/editor/VisualEditorOverlay.js
+++ b/javascripts/modules/editor/VisualEditorOverlay.js
@@ -112,7 +112,9 @@
                                self = this,
                                doc = 
this.target.surface.getModel().getDocument(),
                                summary = this.$( '.save-panel .summary' 
).val(),
-                               options = { summary: summary };
+                               options = {
+                                       summary: summary
+                               };
 
                        EditorOverlayBase.prototype._save.apply( this, 
arguments );
                        if ( this.confirmAborted ) {
@@ -158,7 +160,9 @@
                onSurfaceReady: function () {
                        this.clearSpinner();
                        this.$( '.surface' ).show();
-                       this.target.surface.getModel().getDocument().connect( 
this, { transact: 'onTransact' } );
+                       this.target.surface.getModel().getDocument().connect( 
this, {
+                               transact: 'onTransact'
+                       } );
                        this.target.surface.$element.addClass( 'content' );
 
                        // we have to do it here because contenteditable 
elements still do not
diff --git a/javascripts/modules/editor/init.js 
b/javascripts/modules/editor/init.js
index 2bf63a6..07c7cc9 100644
--- a/javascripts/modules/editor/init.js
+++ b/javascripts/modules/editor/init.js
@@ -3,8 +3,12 @@
        var
                settings = M.require( 'settings' ),
                Icon = M.require( 'Icon' ),
-               disabledEditIcon = new Icon( { name: 'edit' } ),
-               enabledEditIcon = new Icon( { name: 'edit-enabled' } ),
+               disabledEditIcon = new Icon( {
+                       name: 'edit'
+               } ),
+               enabledEditIcon = new Icon( {
+                       name: 'edit-enabled'
+               } ),
                enabledClass = enabledEditIcon.getGlyphClassName(),
                disabledClass = disabledEditIcon.getGlyphClassName(),
                user = M.require( 'user' ),
@@ -25,7 +29,9 @@
                        queryParams: {
                                campaign: 'mobile_editPageActionCta'
                        },
-                       signupQueryParams: { returntoquery: 
'article_action=signup-edit' },
+                       signupQueryParams: {
+                               returntoquery: 'article_action=signup-edit'
+                       },
                        content: mw.msg( 'mobile-frontend-editor-cta' )
                } );
 
@@ -43,14 +49,19 @@
        }
 
        function makeCta( $el, section, allowAnonymous ) {
-               var options = { queryParams: {
-                       returnto: mw.config.get( 'wgPageName' ),
-                       returntoquery: 'action=edit&section=' + section
-               } };
+               var options = {
+                       queryParams: {
+                               returnto: mw.config.get( 'wgPageName' ),
+                               returntoquery: 'action=edit&section=' + section
+                       }
+               };
 
                if ( allowAnonymous ) {
-                       options.links = [ { label: mw.msg( 
'mobile-frontend-editor-anon' ),
-                               href: $el[0].href, selector: 'edit-anon 
mw-ui-progressive' } ];
+                       options.links = [ {
+                               label: mw.msg( 'mobile-frontend-editor-anon' ),
+                               href: $el[0].href,
+                               selector: 'edit-anon mw-ui-progressive'
+                       } ];
                }
                $el
                        .on( 'click', function ( ev ) {
diff --git a/javascripts/modules/issues/CleanupOverlay.js 
b/javascripts/modules/issues/CleanupOverlay.js
index bdb1fbc..763e710 100644
--- a/javascripts/modules/issues/CleanupOverlay.js
+++ b/javascripts/modules/issues/CleanupOverlay.js
@@ -1,7 +1,11 @@
 ( function ( M ) {
        var Overlay = M.require( 'Overlay' ),
                Icon = M.require( 'Icon' ),
-               icon = new Icon( { name: 'cleanup-gray', additionalClassNames: 
'issue-notice', hasText: true } ),
+               icon = new Icon( {
+                       name: 'cleanup-gray',
+                       additionalClassNames: 'issue-notice',
+                       hasText: true
+               } ),
                CleanupOverlay;
 
        /**
diff --git a/javascripts/modules/lastEdited/time.js 
b/javascripts/modules/lastEdited/time.js
index fe70f9e..8de7002 100644
--- a/javascripts/modules/lastEdited/time.js
+++ b/javascripts/modules/lastEdited/time.js
@@ -7,7 +7,10 @@
                while ( i < limits.length && timestampDelta > limits[i + 1] ) {
                        ++i;
                }
-               return { value: Math.round( timestampDelta / limits[i] ), unit: 
units[i] };
+               return {
+                       value: Math.round( timestampDelta / limits[i] ),
+                       unit: units[i]
+               };
        }
 
        function getTimeAgoDelta( timestamp ) {
diff --git a/javascripts/modules/mediaViewer/ImageOverlay.js 
b/javascripts/modules/mediaViewer/ImageOverlay.js
index 7d84579..4677f9c 100644
--- a/javascripts/modules/mediaViewer/ImageOverlay.js
+++ b/javascripts/modules/mediaViewer/ImageOverlay.js
@@ -19,9 +19,11 @@
                closeOnBack: true,
 
                defaults: {
-                       cancelButton: new Icon( { tagName: 'button',
+                       cancelButton: new Icon( {
+                               tagName: 'button',
                                // Uses a dark theme so swap out the icon
-                               name: 'cancel-light', additionalClassNames: 
'cancel',
+                               name: 'cancel-light',
+                               additionalClassNames: 'cancel',
                                label: mw.msg( 'mobile-frontend-overlay-close' )
                        } ).toHtmlString(),
                        detailsMsg: mw.msg( 'mobile-frontend-media-details' ),
diff --git a/javascripts/modules/nearby/NearbyApi.js 
b/javascripts/modules/nearby/NearbyApi.js
index 60defc4..67a7fea 100644
--- a/javascripts/modules/nearby/NearbyApi.js
+++ b/javascripts/modules/nearby/NearbyApi.js
@@ -86,7 +86,9 @@
                 * @return {jQuery.Deferred} Object taking list of pages as 
argument
                 */
                getPagesAroundPage: function ( page, range ) {
-                       return this._search( { ggspage: page }, range, page );
+                       return this._search( {
+                               ggspage: page
+                       }, range, page );
                },
 
                /**
@@ -135,7 +137,10 @@
                                // If we have coordinates then set them so that 
the results are sorted by
                                // distance
                                if ( params.ggscoord ) {
-                                       loc = { latitude: params.ggscoord[0], 
longitude: params.ggscoord[1] };
+                                       loc = {
+                                               latitude: params.ggscoord[0],
+                                               longitude: params.ggscoord[1]
+                                       };
                                }
                                // If we have no coords (searching for a page's 
nearby), find the
                                // page in the results and get its coords.
@@ -165,7 +170,10 @@
                                        page.url = mw.util.getUrl( page.title );
                                        if ( page.coordinates && loc ) { // 
FIXME: protect against bug 47133 (remove when resolved)
                                                coords = page.coordinates[0];
-                                               lngLat = { latitude: 
coords.lat, longitude: coords.lon };
+                                               lngLat = {
+                                                       latitude: coords.lat,
+                                                       longitude: coords.lon
+                                               };
                                                page.dist = calculateDistance( 
loc, lngLat );
                                                page.latitude = coords.lat;
                                                page.longitude = coords.lon;
diff --git a/javascripts/modules/notifications/NotificationsOverlay.js 
b/javascripts/modules/notifications/NotificationsOverlay.js
index c17d57a..7222edf 100644
--- a/javascripts/modules/notifications/NotificationsOverlay.js
+++ b/javascripts/modules/notifications/NotificationsOverlay.js
@@ -47,7 +47,10 @@
                                        var notifications;
                                        if ( result.query && 
result.query.notifications ) {
                                                notifications = $.map( 
result.query.notifications.list, function ( a ) {
-                                                       return { message: 
a['*'], timestamp: a.timestamp.mw };
+                                                       return {
+                                                               message: a['*'],
+                                                               timestamp: 
a.timestamp.mw
+                                                       };
                                                } ).sort( function ( a, b ) {
                                                        return a.timestamp < 
b.timestamp ? 1 : -1;
                                                } );
diff --git a/javascripts/modules/notifications/notifications.js 
b/javascripts/modules/notifications/notifications.js
index 48a76a0..06d6bc3 100644
--- a/javascripts/modules/notifications/notifications.js
+++ b/javascripts/modules/notifications/notifications.js
@@ -46,7 +46,10 @@
                        loadModuleScript( 'mobile.notifications.overlay' 
).done( function () {
                                var NotificationsOverlay = M.require( 
'modules/notifications/NotificationsOverlay' );
                                result.resolve(
-                                       new NotificationsOverlay( { $badge: 
$btn, count: parseInt( $btn.find( 'span' ).text(), 10 ) } )
+                                       new NotificationsOverlay( {
+                                               $badge: $btn,
+                                               count: parseInt( $btn.find( 
'span' ).text(), 10 )
+                                       } )
                                );
                        } );
 
diff --git a/javascripts/modules/references/ReferencesDrawer.js 
b/javascripts/modules/references/ReferencesDrawer.js
index ef0813d..595edf2 100644
--- a/javascripts/modules/references/ReferencesDrawer.js
+++ b/javascripts/modules/references/ReferencesDrawer.js
@@ -11,7 +11,8 @@
        ReferencesDrawer = Drawer.extend( {
                defaults: {
                        cancelButton: new Icon( {
-                               name: 'cancel', additionalClassNames: 'cancel',
+                               name: 'cancel',
+                               additionalClassNames: 'cancel',
                                label: mw.msg( 'mobile-frontend-overlay-close' )
                        } ).toHtmlString()
                },
diff --git a/javascripts/modules/references/ReferencesDrawerBeta.js 
b/javascripts/modules/references/ReferencesDrawerBeta.js
index acf9941..b6eb654 100644
--- a/javascripts/modules/references/ReferencesDrawerBeta.js
+++ b/javascripts/modules/references/ReferencesDrawerBeta.js
@@ -11,11 +11,13 @@
        ReferencesDrawerBeta = ReferencesDrawer.extend( {
                defaults: {
                        cancelButton: new Icon( {
-                               name: 'cancel-light', additionalClassNames: 
'cancel',
+                               name: 'cancel-light',
+                               additionalClassNames: 'cancel',
                                label: mw.msg( 'mobile-frontend-overlay-close' )
                        } ).toHtmlString(),
                        citation: new Icon( {
-                               name: 'citation', additionalClassNames: 'text 
icon-16px',
+                               name: 'citation',
+                               additionalClassNames: 'text icon-16px',
                                hasText: true,
                                label: mw.msg( 
'mobile-frontend-references-citation' )
                        } ).toHtmlString()
diff --git a/javascripts/modules/references/init.js 
b/javascripts/modules/references/init.js
index ace2520..5efda4e 100644
--- a/javascripts/modules/references/init.js
+++ b/javascripts/modules/references/init.js
@@ -55,6 +55,8 @@
                setup();
        } );
 
-       M.define( 'references', { setup: setup } );
+       M.define( 'references', {
+               setup: setup
+       } );
 
 }( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/modules/routes.js b/javascripts/modules/routes.js
index 0b7f460..b2cf80b 100644
--- a/javascripts/modules/routes.js
+++ b/javascripts/modules/routes.js
@@ -13,7 +13,9 @@
                var result = $.Deferred();
                M.loadModule( 'mobile.uploads' ).done( function () {
                        var UploadTutorialNew = M.require( 
'modules/uploads/UploadTutorial' );
-                       result.resolve( new UploadTutorialNew( { funnel: funnel 
|| null } ) );
+                       result.resolve( new UploadTutorialNew( {
+                               funnel: funnel || null
+                       } ) );
                } );
                return result;
        } );
diff --git a/javascripts/modules/search/SearchOverlay.js 
b/javascripts/modules/search/SearchOverlay.js
index 71a347b..89f57cf 100644
--- a/javascripts/modules/search/SearchOverlay.js
+++ b/javascripts/modules/search/SearchOverlay.js
@@ -20,7 +20,11 @@
                className: 'overlay search-overlay',
                template: mw.template.get( 'mobile.search', 
'SearchOverlay.hogan' ),
                defaults: {
-                       clearIcon: new Icon( { tagName: 'button', name: 
'clear', additionalClassNames: 'clear' } ).toHtmlString(),
+                       clearIcon: new Icon( {
+                               tagName: 'button',
+                               name: 'clear',
+                               additionalClassNames: 'clear'
+                       } ).toHtmlString(),
                        searchTerm: '',
                        placeholderMsg: $( '#searchInput' ).attr( 'placeholder' 
),
                        clearMsg: mw.msg( 'mobile-frontend-clear-search' ),
@@ -85,7 +89,11 @@
                                        window.history.back();
                                        // Add fulltext input to force fulltext 
search
                                        $( '<input>' )
-                                               .attr( { type: 'hidden', name: 
'fulltext', value: 'search' } )
+                                               .attr( {
+                                                       type: 'hidden',
+                                                       name: 'fulltext',
+                                                       value: 'search'
+                                               } )
                                                .appendTo( $form );
                                        $form.submit();
                                } );
@@ -146,7 +154,10 @@
                                                                        
.filter( data.results.length ? '.with-results' : '.without-results' )
                                                                        .show();
                                                                self.$( 
'.spinner' ).hide();
-                                                               pageList = new 
PageList( { pages: data.results, el: $results } );
+                                                               pageList = new 
PageList( {
+                                                                       pages: 
data.results,
+                                                                       el: 
$results
+                                                               } );
                                                                
pageList.renderPageImages();
                                                                M.emit( 
'search-results', self, data.results );
                                                        }
diff --git a/javascripts/modules/search/init.js 
b/javascripts/modules/search/init.js
index fc2b6fe..9b7065e 100644
--- a/javascripts/modules/search/init.js
+++ b/javascripts/modules/search/init.js
@@ -11,7 +11,9 @@
        // 
http://stackoverflow.com/questions/6837543/show-virtual-keyboard-on-mobile-phones-in-javascript
        $( '#searchInput' ).on( 'click', function () {
                schema.log( 'search' );
-               new SearchOverlay( { searchTerm: $( this ).val() } ).show();
+               new SearchOverlay( {
+                       searchTerm: $( this ).val()
+               } ).show();
                M.router.navigate( '/search' );
        } );
 
diff --git a/javascripts/modules/talk/TalkOverlay.js 
b/javascripts/modules/talk/TalkOverlay.js
index 0995da6..8b83d26 100644
--- a/javascripts/modules/talk/TalkOverlay.js
+++ b/javascripts/modules/talk/TalkOverlay.js
@@ -85,7 +85,10 @@
                                        // talk page doesn't exist yet.
                                        if ( resp === 'missingtitle' ) {
                                                // Create an empty page for new 
pages
-                                               self._addContent( { title: 
options.title, sections: [] }, options );
+                                               self._addContent( {
+                                                       title: options.title,
+                                                       sections: []
+                                               }, options );
                                        } else {
                                                // If the API request fails for 
any other reason, load the talk
                                                // page manually rather than 
leaving the spinner spinning.
diff --git a/javascripts/modules/talk/TalkSectionAddOverlay.js 
b/javascripts/modules/talk/TalkSectionAddOverlay.js
index 55ff65b..bfcd08d 100644
--- a/javascripts/modules/talk/TalkSectionAddOverlay.js
+++ b/javascripts/modules/talk/TalkSectionAddOverlay.js
@@ -118,7 +118,10 @@
                                } ).done( function () {
                                        result.resolve( 'ok' );
                                } ).fail( function ( msg ) {
-                                       result.reject( { type: 'error', 
details: msg } );
+                                       result.reject( {
+                                               type: 'error',
+                                               details: msg
+                                       } );
                                } );
                        } else {
                                if ( !text ) {
@@ -127,7 +130,10 @@
                                if ( !heading ) {
                                        $subject.addClass( 'error' );
                                }
-                               result.reject( { type: 'error', details: 'empty 
message or heading' } );
+                               result.reject( {
+                                       type: 'error',
+                                       details: 'empty message or heading'
+                               } );
                        }
                        return result;
                }
diff --git a/javascripts/modules/toc/TableOfContents.js 
b/javascripts/modules/toc/TableOfContents.js
index eb8295b..6a82d12 100644
--- a/javascripts/modules/toc/TableOfContents.js
+++ b/javascripts/modules/toc/TableOfContents.js
@@ -14,8 +14,10 @@
                        tocHeading: mw.template.get( 'mobile.toc', 
'heading.hogan' )
                },
                defaults: {
-                       tocIcon: new Icon( { tagName: 'span',
-                               name: 'toc', additionalClasses: 'icon-16px'
+                       tocIcon: new Icon( {
+                               tagName: 'span',
+                               name: 'toc',
+                               additionalClasses: 'icon-16px'
                        } ).toHtmlString(),
                        contentsMsg: mw.msg( 'toc' )
                },
diff --git a/javascripts/modules/uploads/LeadPhotoUploaderButton.js 
b/javascripts/modules/uploads/LeadPhotoUploaderButton.js
index 2a59b6f..5f53503 100644
--- a/javascripts/modules/uploads/LeadPhotoUploaderButton.js
+++ b/javascripts/modules/uploads/LeadPhotoUploaderButton.js
@@ -2,7 +2,10 @@
        var
                PhotoUploaderButton = M.require( 
'modules/uploads/PhotoUploaderButton' ),
                Icon = M.require( 'Icon' ),
-               uploadIcon = new Icon( { name: 'addimage-enabled', 
additionalClassNames: 'enabled' } ),
+               uploadIcon = new Icon( {
+                       name: 'addimage-enabled',
+                       additionalClassNames: 'enabled'
+               } ),
                LeadPhotoUploaderButton;
 
        /**
diff --git a/javascripts/modules/uploads/PhotoUploadOverlay.js 
b/javascripts/modules/uploads/PhotoUploadOverlay.js
index 564c1f8..86bdb3c 100644
--- a/javascripts/modules/uploads/PhotoUploadOverlay.js
+++ b/javascripts/modules/uploads/PhotoUploadOverlay.js
@@ -22,9 +22,10 @@
                        ownerStatement: ownershipMessage,
                        heading: mw.msg( 
'mobile-frontend-image-heading-describe' ),
                        headerButtonsListClassName: 'overlay-action',
-                       headerButtons: [
-                               { className: 'submit', msg: mw.msg( 
'mobile-frontend-photo-submit' ) }
-                       ]
+                       headerButtons: [ {
+                               className: 'submit',
+                               msg: mw.msg( 'mobile-frontend-photo-submit' )
+                       } ]
                },
 
                className: 'overlay photo-overlay',
@@ -44,14 +45,18 @@
                                        var dataUri = fileReader.result;
                                        // add mimetype if not present (some 
browsers need it, e.g. Android browser)
                                        dataUri = dataUri.replace( 
/^data:base64/, 'data:image/jpeg;base64' );
-                                       self.log( { action: 'preview' } );
+                                       self.log( {
+                                               action: 'preview'
+                                       } );
                                        self.setImageUrl( dataUri );
                                };
                        }
 
                        if ( options.insertInPage ) {
                                this.api = new PhotoApi( {
-                                       editorApi: new EditorApi( { title: 
options.pageTitle } )
+                                       editorApi: new EditorApi( {
+                                               title: options.pageTitle
+                                       } )
                                } );
                        } else {
                                this.api = new PhotoApi();
@@ -62,7 +67,9 @@
 
                        this.progressPopup = new PhotoUploadProgress().on( 
'cancel', function () {
                                self.api.abort();
-                               self.log( { action: 'cancel' } );
+                               self.log( {
+                                       action: 'cancel'
+                               } );
                        } ).on( 'submit', function () {
                                // handle resubmitting after abusefilter message
                                self._save();
@@ -97,7 +104,9 @@
                        this.api.save( saveOptions ).done( function ( fileName, 
descriptionUrl ) {
                                self.progressPopup.hide( true );
 
-                               self.log( { action: 'success' } );
+                               self.log( {
+                                       action: 'success'
+                               } );
                                if ( self.options.insertInPage ) {
                                        popup.show( mw.msg( 
'mobile-frontend-photo-upload-success-article' ), 'toast' );
 
@@ -126,9 +135,9 @@
                                                if ( typeof err.details === 
'string' ) {
                                                        errMsg += '/' + 
err.details;
                                                }
-                                       // Otherwise, record the stage as 
'unknown' and record the type as the
-                                       // status message ("timeout", "error", 
"abort", etc. ) and include any
-                                       // HTTP error that was thrown.
+                                               // Otherwise, record the stage 
as 'unknown' and record the type as the
+                                               // status message ("timeout", 
"error", "abort", etc. ) and include any
+                                               // HTTP error that was thrown.
                                        } else {
                                                errMsg = 'unknown';
                                                if ( statusMessage ) {
@@ -138,7 +147,10 @@
                                                        }
                                                }
                                        }
-                                       self.log( { action: 'error', errorText: 
errMsg } );
+                                       self.log( {
+                                               action: 'error',
+                                               errorText: errMsg
+                                       } );
                                }
                        } );
                },
@@ -159,7 +171,9 @@
                        $submitButton = this.$( '.submit' )
                                .prop( 'disabled', true )
                                .on( 'click', function () {
-                                       self.log( { action: 'previewSubmit' } );
+                                       self.log( {
+                                               action: 'previewSubmit'
+                                       } );
                                        self._submit();
                                } );
                        this.$description = this.$( 'textarea' )
@@ -188,9 +202,13 @@
                                EXIF.getData( this.file, function () {
                                        if ( $.isEmptyObject( this.exifdata ) ) 
{
                                                if ( window.confirm( mw.msg( 
'mobile-frontend-photo-upload-copyvio' ) ) ) {
-                                                       self.log( { action: 
'copyvioOk' } );
+                                                       self.log( {
+                                                               action: 
'copyvioOk'
+                                                       } );
                                                } else {
-                                                       self.log( { action: 
'copyvioCancel' } );
+                                                       self.log( {
+                                                               action: 
'copyvioCancel'
+                                                       } );
                                                        self.hide( true );
                                                }
                                        }
@@ -205,7 +223,9 @@
                                return _super.apply( this, arguments );
                        } else if ( window.confirm( mw.msg( 
'mobile-frontend-image-cancel-confirm' ) ) ) {
                                this.emit( 'cancel' );
-                               this.log( { action: 'previewCancel' } );
+                               this.log( {
+                                       action: 'previewCancel'
+                               } );
                                return _super.apply( this, arguments );
                        } else {
                                return false;
@@ -222,7 +242,9 @@
                        this.imageUrl = url;
                        this.$( '.spinner' ).hide();
                        this.$( '.help' ).on( 'click', function () {
-                               self.log( { action: 'whatDoesThisMean' } );
+                               self.log( {
+                                       action: 'whatDoesThisMean'
+                               } );
                        } );
                        $( '<img>' )
                                .attr( 'src', url )
diff --git a/javascripts/modules/uploads/PhotoUploaderButton.js 
b/javascripts/modules/uploads/PhotoUploaderButton.js
index 066c9e6..7720bff 100644
--- a/javascripts/modules/uploads/PhotoUploaderButton.js
+++ b/javascripts/modules/uploads/PhotoUploaderButton.js
@@ -1,8 +1,11 @@
 ( function ( M, $ ) {
        var View = M.require( 'View' ),
                Icon = M.require( 'Icon' ),
-               photoIcon = new Icon( { name: 'photo', hasText: true,
-                       additionalClassNames: 'mw-ui-progressive mw-ui-button 
button' } ),
+               photoIcon = new Icon( {
+                       name: 'photo',
+                       hasText: true,
+                       additionalClassNames: 'mw-ui-progressive mw-ui-button 
button'
+               } ),
                PhotoUploaderButton;
 
        function isSupported() {
diff --git a/javascripts/modules/watchlist/WatchList.js 
b/javascripts/modules/watchlist/WatchList.js
index 34abed6..3582dfd 100644
--- a/javascripts/modules/watchlist/WatchList.js
+++ b/javascripts/modules/watchlist/WatchList.js
@@ -26,7 +26,9 @@
                        PageList.prototype.postRender.apply( this, arguments );
                        this.$el.find( 'a.title' ).on( 'mousedown', function () 
{
                                // name funnel for watchlists to catch 
subsequent uploads
-                               $.cookie( 'mwUploadsFunnel', 'watchlist', { 
expires: new Date( new Date().getTime() + 60000 ) } );
+                               $.cookie( 'mwUploadsFunnel', 'watchlist', {
+                                       expires: new Date( new Date().getTime() 
+ 60000 )
+                               } );
                        } );
                }
        } );
diff --git a/javascripts/modules/watchstar/Watchstar.js 
b/javascripts/modules/watchstar/Watchstar.js
index 06edcfd..b000a25 100644
--- a/javascripts/modules/watchstar/Watchstar.js
+++ b/javascripts/modules/watchstar/Watchstar.js
@@ -3,8 +3,14 @@
        var View = M.require( 'View' ), Watchstar,
                WatchstarApi = M.require( 'modules/watchstar/WatchstarApi' ),
                Icon = M.require( 'Icon' ),
-               watchIcon = new Icon( { name: 'watch', additionalClassNames: 
'icon-32px watch-this-article' } ),
-               watchedIcon = new Icon( { name: 'watched', 
additionalClassNames: 'icon-32px watch-this-article' } ),
+               watchIcon = new Icon( {
+                       name: 'watch',
+                       additionalClassNames: 'icon-32px watch-this-article'
+               } ),
+               watchedIcon = new Icon( {
+                       name: 'watched',
+                       additionalClassNames: 'icon-32px watch-this-article'
+               } ),
                toast = M.require( 'toast' ),
                user = M.require( 'user' ),
                api = new WatchstarApi(),
diff --git a/javascripts/modules/wikigrok/WikiGrokDialogB.js 
b/javascripts/modules/wikigrok/WikiGrokDialogB.js
index 66ceab6..90d5109 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialogB.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialogB.js
@@ -49,10 +49,10 @@
 
                        $.each( suggestions, function ( type, data ) {
                                var prop = {
-                                               type: type,
-                                               name: data.name,
-                                               id: data.id
-                                       };
+                                       type: type,
+                                       name: data.name,
+                                       id: data.id
+                               };
 
                                allSuggestions = allSuggestions.concat( 
data.list );
                                // Make sure it's easy to look up the property 
later.
diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js
index 73004df..43169ea 100644
--- a/javascripts/specials/uploads.js
+++ b/javascripts/specials/uploads.js
@@ -43,7 +43,9 @@
                                        iiurlwidth: IMAGE_WIDTH
                                }, {
                                        url: corsUrl || this.apiUrl,
-                                       xhrFields: { withCredentials: true }
+                                       xhrFields: {
+                                               withCredentials: true
+                                       }
                                } ).done( function ( resp ) {
                                        if ( resp.query && resp.query.pages ) {
                                                // FIXME: [API] in an ideal 
world imageData would be a sorted array

-- 
To view, visit https://gerrit.wikimedia.org/r/174637
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ae8f602a5a9114e57ae0e7ea07265cf920f0bd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to