http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70019

Revision: 70019
Author:   neilk
Date:     2010-07-27 17:23:02 +0000 (Tue, 27 Jul 2010)

Log Message:
-----------
misc fixes for IE6 / strict JS linting

Modified Paths:
--------------
    trunk/extensions/UploadWizard/js/jquery/plugins/jquery.tipsy.js
    trunk/extensions/UploadWizard/js/mw.ApiUploadHandler.js
    trunk/extensions/UploadWizard/js/mw.DestinationChecker.js
    trunk/extensions/UploadWizard/js/mw.IframeTransport.js
    trunk/extensions/UploadWizard/js/mw.LanguageUpWiz.js
    trunk/extensions/UploadWizard/js/mw.MockUploadHandler.js

Modified: trunk/extensions/UploadWizard/js/jquery/plugins/jquery.tipsy.js
===================================================================
--- trunk/extensions/UploadWizard/js/jquery/plugins/jquery.tipsy.js     
2010-07-27 15:52:42 UTC (rev 70018)
+++ trunk/extensions/UploadWizard/js/jquery/plugins/jquery.tipsy.js     
2010-07-27 17:23:02 UTC (rev 70019)
@@ -179,7 +179,7 @@
         opacity: 1.0,
         title: 'title',
         trigger: 'hover',
-       type: 'help',
+       type: 'help'
     };
     
     // Overwrite this method to provide options on a per-element basis.

Modified: trunk/extensions/UploadWizard/js/mw.ApiUploadHandler.js
===================================================================
--- trunk/extensions/UploadWizard/js/mw.ApiUploadHandler.js     2010-07-27 
15:52:42 UTC (rev 70018)
+++ trunk/extensions/UploadWizard/js/mw.ApiUploadHandler.js     2010-07-27 
17:23:02 UTC (rev 70019)
@@ -20,8 +20,8 @@
        // can also use Xhr Binary depending on config
        _this.transport = new mw.IframeTransport(
                _this.upload.ui.form, 
-               function( fraction ){ _this.upload.setTransportProgress( 
fraction ) },
-               function( result ) { _this.upload.setTransported( result ) }
+               function( fraction ){ _this.upload.setTransportProgress( 
fraction ); },
+               function( result ) { _this.upload.setTransported( result ); }
        );
 
 };
@@ -72,7 +72,7 @@
        addFormInputIfMissing: function( name, value ) {
                var _this = this;
                var $jForm = $j( _this.upload.ui.form );
-               if ( $jForm.find( "[name='" + name + "']" ).length == 0 ) {
+               if ( $jForm.find( "[name='" + name + "']" ).length === 0 ) {
                        $jForm.append( 
                                $j( '<input />' )
                                .attr( { 
@@ -93,7 +93,7 @@
                _this.beginTime = ( new Date() ).getTime();
                _this.upload.ui.busy();
                $j( this.upload.ui.form ).submit();
-       },
+       }
 };
 
 

Modified: trunk/extensions/UploadWizard/js/mw.DestinationChecker.js
===================================================================
--- trunk/extensions/UploadWizard/js/mw.DestinationChecker.js   2010-07-27 
15:52:42 UTC (rev 70018)
+++ trunk/extensions/UploadWizard/js/mw.DestinationChecker.js   2010-07-27 
17:23:02 UTC (rev 70019)
@@ -47,7 +47,7 @@
                $j( _this.selector )[eventName]( check );
        } );
 
-}
+};
 
 mw.DestinationChecker.prototype = {
 
@@ -73,7 +73,7 @@
         * @param something
         * @return that same thing
         */
-       preprocess: function(x) { return x },
+       preprocess: function(x) { return x; },
 
        /**
         * fire when the input changes value or keypress
@@ -94,7 +94,7 @@
                                function() { checker.checkUnique(); },
                                checker.delay 
                        );
-               }
+               };
        },
 
        /**
@@ -165,10 +165,11 @@
                                        // Conflict found, this filename is NOT 
unique
                                        mw.log( " conflict! " );
 
+                                       var ntitle;
                                        if ( data.query.normalized ) {
-                                               var ntitle = 
data.query.normalized[0].to;
+                                               ntitle = 
data.query.normalized[0].to;
                                        } else {
-                                               var ntitle = data.query.pages[ 
page_id ].title
+                                               ntitle = data.query.pages[ 
page_id ].title;
                                        }
 
                                        var img = data.query.pages[ page_id 
].imageinfo[0];

Modified: trunk/extensions/UploadWizard/js/mw.IframeTransport.js
===================================================================
--- trunk/extensions/UploadWizard/js/mw.IframeTransport.js      2010-07-27 
15:52:42 UTC (rev 70018)
+++ trunk/extensions/UploadWizard/js/mw.IframeTransport.js      2010-07-27 
17:23:02 UTC (rev 70019)
@@ -29,7 +29,7 @@
                .attr( { 'src'   : 'javascript:false;', 
                         'id'    : _this.iframeId,
                         'name'  : _this.iframeId } )
-               .load( function() { _this.configureForm() } )
+               .load( function() { _this.configureForm(); } )
                .css( 'display', 'none' );
 
        $j( "body" ).append( iframe ); 
@@ -90,7 +90,7 @@
                        // Get the json string
                        // XXX wait... why are we grepping it out of an HTML 
doc? We requested jsonfm, why?
                        json = $j( doc.body ).find( 'pre' ).text();
-                       mw.log( 'iframe:json::' + json )
+                       mw.log( 'iframe:json::' + json );
                        if ( json ) {
                                response = window["eval"]( "( " + json + " )" );
                        } else {

Modified: trunk/extensions/UploadWizard/js/mw.LanguageUpWiz.js
===================================================================
--- trunk/extensions/UploadWizard/js/mw.LanguageUpWiz.js        2010-07-27 
15:52:42 UTC (rev 70018)
+++ trunk/extensions/UploadWizard/js/mw.LanguageUpWiz.js        2010-07-27 
17:23:02 UTC (rev 70019)
@@ -26,8 +26,8 @@
                { code: "ace",           text: "Ac\u00e8h" },
                { code: "af",            text: "Afrikaans" },
                { code: "ak",            text: "Akan" },
-               { code: "als",           text: "Alemannisch" },   // } XXX 
someone fix this please
-               { code: "gsw",           text: "Alemannisch" },   // } 
+               { code: "als",           text: "Alemannisch" },   //  XXX 
someone fix this please
+               { code: "gsw",           text: "Alemannisch" },   //  
                { code: "ang",           text: "Anglo-Saxon" },
                { code: "an",            text: "Aragon\u00e9s" },
                { code: "roa-rup",       text: "Arm\u00e3neashce" },
@@ -76,8 +76,8 @@
                { code: "ext",           text: "Estreme\u00f1u" },
                { code: "eu",            text: "Euskara" },
                { code: "ee",            text: "E\u028begbe" },
-               { code: "hif",           text: "Fiji Hindi" },   // } XXX fix 
this
-               { code: "hif-latn",      text: "Fiji Hindi" },   // }
+               { code: "hif",           text: "Fiji Hindi" },   //  XXX fix 
this
+               { code: "hif-latn",      text: "Fiji Hindi" },   // 
                { code: "fr",            text: "Fran\u00e7ais" },
                { code: "frc",           text: "Fran\u00e7ais canadien" },
                { code: "fy",            text: "Frysk" },
@@ -378,7 +378,7 @@
                { code: "ii",            text: "\ua187\ua259" },
                { code: "ko",            text: "\ud55c\uad6d\uc5b4" },
                { code: "ko-kp",         text: "\ud55c\uad6d\uc5b4 
(\uc870\uc120)" },
-               { code: "got",           text: 
"\ud800\udf32\ud800\udf3f\ud800\udf44\ud800\udf39\ud800\udf43\ud800\udf3a" },
+               { code: "got",           text: 
"\ud800\udf32\ud800\udf3f\ud800\udf44\ud800\udf39\ud800\udf43\ud800\udf3a" }
        ],
 
        /**
@@ -449,7 +449,7 @@
                        return code;                                    
                } 
                return mw.LanguageUpWiz.getClosest( code.substring( 0, 
code.indexOf( '-' )) );
-       },
+       }
 
 
        // enhance a simple text input to be an autocompleting language menu
@@ -489,4 +489,4 @@
        // although other info such as Information boxes was recorded 
correctly.        
        // This is presumed not to apply to the shiny new world of JS2, where 
i18n is handled in other ways.
 
-}
+};

Modified: trunk/extensions/UploadWizard/js/mw.MockUploadHandler.js
===================================================================
--- trunk/extensions/UploadWizard/js/mw.MockUploadHandler.js    2010-07-27 
15:52:42 UTC (rev 70018)
+++ trunk/extensions/UploadWizard/js/mw.MockUploadHandler.js    2010-07-27 
17:23:02 UTC (rev 70019)
@@ -28,9 +28,9 @@
                if (1.0 - _this.progress < delta) {
                        _this.upload.setTransported();
                } else {
-                       setTimeout( function() { _this.nextState() }, 200 );
+                       setTimeout( function() { _this.nextState(); }, 200 );
                }
-       },
+       }
  
 };
 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to