https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112256

Revision: 112256
Author:   reedy
Date:     2012-02-23 22:32:45 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
MFT r112248, r112250, r112253

Modified Paths:
--------------
    branches/wmf/1.19wmf1/extensions/UploadWizard/UploadWizard.i18n.php
    branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizard.js
    
branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js

Property Changed:
----------------
    branches/wmf/1.19wmf1/extensions/UploadWizard/


Property changes on: branches/wmf/1.19wmf1/extensions/UploadWizard
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/uploadwizard/extensions/UploadWizard:73550-75905
/trunk/extensions/UploadWizard:111604,111796,112153,112160,112166,112229
/trunk/phase3/extensions/UploadWizard:85939
   + /branches/uploadwizard/extensions/UploadWizard:73550-75905
/trunk/extensions/UploadWizard:111604,111796,112153,112160,112166,112229,112248,112250,112253
/trunk/phase3/extensions/UploadWizard:85939

Modified: branches/wmf/1.19wmf1/extensions/UploadWizard/UploadWizard.i18n.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/UploadWizard/UploadWizard.i18n.php 
2012-02-23 22:29:37 UTC (rev 112255)
+++ branches/wmf/1.19wmf1/extensions/UploadWizard/UploadWizard.i18n.php 
2012-02-23 22:32:45 UTC (rev 112256)
@@ -212,17 +212,17 @@
        'mwe-upwiz-license-fal' => 'Free Art License',
        'mwe-upwiz-license-own-pd' => 'All rights waived with Creative Commons 
Zero license (like public domain)',
        'mwe-upwiz-license-pd-old-100' => 'Author died more than 100 years ago',
-        'mwe-upwiz-license-pd-old' => 'Author died more than 70 years ago',
-        'mwe-upwiz-license-pd-art' => 'Faithful reproduction of a painting 
that is in the public domain',
-        'mwe-upwiz-license-pd-us' => 'First published in the United States 
before 1923',
-        'mwe-upwiz-license-pd-usgov' => 'Original work of the US Federal 
Government',
-        'mwe-upwiz-license-pd-usgov-nasa' => 'Original work of NASA',
-        'mwe-upwiz-license-pd-usgov-military-navy' => 'Original work of the US 
Military Navy',
-        'mwe-upwiz-license-pd-ineligible' => 'Too simple to be copyrighted',
-        'mwe-upwiz-license-pd-ineligible-help' => 'Be careful with this one. 
The image has to be very simple, like a green circle or red square',
-        'mwe-upwiz-license-pd-textlogo' => 'Logo with only simple text 
(wordmark)',
-        'mwe-upwiz-license-copyrighted-free-use' => 'Copyrighted, but may be 
used for any purpose, including commercially',
-        'mwe-upwiz-license-attribution' => 'May be used for any purpose, 
including commercially, if the copyright holder is properly attributed',
+       'mwe-upwiz-license-pd-old' => 'Author died more than 70 years ago',
+       'mwe-upwiz-license-pd-art' => 'Faithful reproduction of a painting that 
is in the public domain',
+       'mwe-upwiz-license-pd-us' => 'First published in the United States 
before 1923',
+       'mwe-upwiz-license-pd-usgov' => 'Original work of the US Federal 
Government',
+       'mwe-upwiz-license-pd-usgov-nasa' => 'Original work of NASA',
+       'mwe-upwiz-license-pd-usgov-military-navy' => 'Original work of the US 
Military Navy',
+       'mwe-upwiz-license-pd-ineligible' => 'Too simple to be copyrighted',
+       'mwe-upwiz-license-pd-ineligible-help' => 'Be careful with this one. 
The image has to be very simple, like a green circle or red square',
+       'mwe-upwiz-license-pd-textlogo' => 'Logo with only simple text 
(wordmark)',
+       'mwe-upwiz-license-copyrighted-free-use' => 'Copyrighted, but may be 
used for any purpose, including commercially',
+       'mwe-upwiz-license-attribution' => 'May be used for any purpose, 
including commercially, if the copyright holder is properly attributed',
        'mwe-upwiz-license-gfdl' => 'GNU Free Documentation License',
        'mwe-upwiz-license-cc-by-sa-3.0-gfdl' => 'Copyleft, attribution 
required (GFDL, CC-BY-SA-3.0)',
 
@@ -335,6 +335,9 @@
        'mwe-upwiz-prefs-def-license-def' => 'Use whatever the default is',
        'mwe-upwiz-prefs-license-own' => 'Own work - $1',
        'mwe-upwiz-prefs-license-thirdparty' => "Someone else's work - $1",
+
+       // See for example.
+       'languageHandler.js' => '', # Do not translate this message.
 );
 
 /** Message documentation (Message documentation)

Modified: 
branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizard.js
===================================================================
--- branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizard.js  
2012-02-23 22:29:37 UTC (rev 112255)
+++ branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizard.js  
2012-02-23 22:32:45 UTC (rev 112256)
@@ -51,7 +51,7 @@
 
                // load list of languages so we'll have it ready when 
description interfaces are created
                // XXX replace this code once any of the following bugs are 
fixed: 25845, 27535, 27561
-               var languageHandlerUrl = mw.util.wikiScript() + '?' + $.param( 
{ 'title': 'MediaWiki:LanguageHandler.js', 'action': 'raw', 'ctype': 
'text/javascript' } );
+               var languageHandlerUrl = mw.config.get( 'wgServer' ) + 
mw.util.wikiScript() + '?' + $.param( { 'title': 
'MediaWiki:LanguageHandler.js', 'action': 'raw', 'ctype': 'text/javascript' } );
                mw.loader.load( languageHandlerUrl );
 
                // remove first spinner
@@ -414,10 +414,6 @@
 
                // we explicitly move the file input to cover the upload button
                upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' );
-               // do it again in case the layout didn't update immediately
-               setTimeout(function() {
-                       upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' );
-               }, 50);
 
                // we bind to the ui div since unbind doesn't work for non-DOM 
objects
 
@@ -750,6 +746,7 @@
                } else {
                        $j( '#mwe-upwiz-add-file' ).button( 'option', 
'disabled', true );
                        $j( _this.uploadToAdd.ui.div ).hide();
+                       _this.uploadToAdd.ui.hideFileInput();
                }
 
 

Modified: 
branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
===================================================================
--- 
branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
   2012-02-23 22:29:37 UTC (rev 112255)
+++ 
branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
   2012-02-23 22:32:45 UTC (rev 112256)
@@ -460,28 +460,45 @@
         * @param selector jquery-compatible selector, for a single element
         */
        moveFileInputToCover: function( selector ) {
-               var $covered = $j( selector ); 
+               var _this = this;
+               var update = function() {
+                       var $covered = $j( selector );
 
-               this.fileCtrlContainer
-                       .css( $covered.position() )
-                       .css( 'marginTop', $covered.css( 'marginTop' ) )
-                       .css( 'marginRight', $covered.css( 'marginRight' ) )
-                       .css( 'marginBottom', $covered.css( 'marginBottom' ) )
-                       .css( 'marginLeft', $covered.css( 'marginLeft' ) )
-                       .width( $covered.outerWidth() )
-                       .height( $covered.outerHeight() ); 
+                       _this.fileCtrlContainer
+                               .css( $covered.position() )
+                               .css( 'marginTop', $covered.css( 'marginTop' ) )
+                               .css( 'marginRight', $covered.css( 
'marginRight' ) )
+                               .css( 'marginBottom', $covered.css( 
'marginBottom' ) )
+                               .css( 'marginLeft', $covered.css( 'marginLeft' 
) )
+                               .width( $covered.outerWidth() )
+                               .height( $covered.outerHeight() );
 
-               this.fileCtrlContainer.css( { 'z-index': 1 } );
+                       _this.fileCtrlContainer.css( { 'z-index': 1 } );
 
-               // shift the file input over with negative margins, 
-               // internal to the overflow-containing div, so the div shows 
all button
-               // and none of the textfield-like input
-               this.$fileInputCtrl.css( {
-                       'margin-left': '-' + ~~( this.$fileInputCtrl.width() - 
$covered.outerWidth() - 10 ) + 'px',
-                       'margin-top' : '-' + ~~( this.$fileInputCtrl.height() - 
$covered.outerHeight() - 10 ) + 'px'
-               } );
+                       // shift the file input over with negative margins,
+                       // internal to the overflow-containing div, so the div 
shows all button
+                       // and none of the textfield-like input
+                       _this.$fileInputCtrl.css( {
+                               'margin-left': '-' + ~~( 
_this.$fileInputCtrl.width() - $covered.outerWidth() - 10 ) + 'px',
+                               'margin-top' : '-' + ~~( 
_this.$fileInputCtrl.height() - $covered.outerHeight() - 10 ) + 'px'
+                       } );
+               }
 
+               if (this.moveFileInputInterval) {
+                       window.clearInterval(this.moveFileInputInterval);
+               }
+               this.moveFileInputInterval = window.setInterval(function() {
+                       update();
+               }, 500);
+               update();
+       },
 
+       hideFileInput: function() {
+               if (this.moveFileInputInterval) {
+                       window.clearInterval(this.moveFileInputInterval);
+               }
+               this.moveFileInputInterval = null;
+               // Should we actually hide it?
        },
 
        /**


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

Reply via email to