Index: branches/wmf/1.19wmf1/extensions/UploadWizard/UploadWizard.i18n.php |
— | — | @@ -212,17 +212,17 @@ |
213 | 213 | 'mwe-upwiz-license-fal' => 'Free Art License', |
214 | 214 | 'mwe-upwiz-license-own-pd' => 'All rights waived with Creative Commons Zero license (like public domain)', |
215 | 215 | 'mwe-upwiz-license-pd-old-100' => 'Author died more than 100 years ago', |
216 | | - 'mwe-upwiz-license-pd-old' => 'Author died more than 70 years ago', |
217 | | - 'mwe-upwiz-license-pd-art' => 'Faithful reproduction of a painting that is in the public domain', |
218 | | - 'mwe-upwiz-license-pd-us' => 'First published in the United States before 1923', |
219 | | - 'mwe-upwiz-license-pd-usgov' => 'Original work of the US Federal Government', |
220 | | - 'mwe-upwiz-license-pd-usgov-nasa' => 'Original work of NASA', |
221 | | - 'mwe-upwiz-license-pd-usgov-military-navy' => 'Original work of the US Military Navy', |
222 | | - 'mwe-upwiz-license-pd-ineligible' => 'Too simple to be copyrighted', |
223 | | - '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', |
224 | | - 'mwe-upwiz-license-pd-textlogo' => 'Logo with only simple text (wordmark)', |
225 | | - 'mwe-upwiz-license-copyrighted-free-use' => 'Copyrighted, but may be used for any purpose, including commercially', |
226 | | - 'mwe-upwiz-license-attribution' => 'May be used for any purpose, including commercially, if the copyright holder is properly attributed', |
| 216 | + 'mwe-upwiz-license-pd-old' => 'Author died more than 70 years ago', |
| 217 | + 'mwe-upwiz-license-pd-art' => 'Faithful reproduction of a painting that is in the public domain', |
| 218 | + 'mwe-upwiz-license-pd-us' => 'First published in the United States before 1923', |
| 219 | + 'mwe-upwiz-license-pd-usgov' => 'Original work of the US Federal Government', |
| 220 | + 'mwe-upwiz-license-pd-usgov-nasa' => 'Original work of NASA', |
| 221 | + 'mwe-upwiz-license-pd-usgov-military-navy' => 'Original work of the US Military Navy', |
| 222 | + 'mwe-upwiz-license-pd-ineligible' => 'Too simple to be copyrighted', |
| 223 | + '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', |
| 224 | + 'mwe-upwiz-license-pd-textlogo' => 'Logo with only simple text (wordmark)', |
| 225 | + 'mwe-upwiz-license-copyrighted-free-use' => 'Copyrighted, but may be used for any purpose, including commercially', |
| 226 | + 'mwe-upwiz-license-attribution' => 'May be used for any purpose, including commercially, if the copyright holder is properly attributed', |
227 | 227 | 'mwe-upwiz-license-gfdl' => 'GNU Free Documentation License', |
228 | 228 | 'mwe-upwiz-license-cc-by-sa-3.0-gfdl' => 'Copyleft, attribution required (GFDL, CC-BY-SA-3.0)', |
229 | 229 | |
— | — | @@ -335,6 +335,9 @@ |
336 | 336 | 'mwe-upwiz-prefs-def-license-def' => 'Use whatever the default is', |
337 | 337 | 'mwe-upwiz-prefs-license-own' => 'Own work - $1', |
338 | 338 | 'mwe-upwiz-prefs-license-thirdparty' => "Someone else's work - $1", |
| 339 | + |
| 340 | + // See for example. |
| 341 | + 'languageHandler.js' => '', # Do not translate this message. |
339 | 342 | ); |
340 | 343 | |
341 | 344 | /** Message documentation (Message documentation) |
Index: branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js |
— | — | @@ -460,28 +460,45 @@ |
461 | 461 | * @param selector jquery-compatible selector, for a single element |
462 | 462 | */ |
463 | 463 | moveFileInputToCover: function( selector ) { |
464 | | - var $covered = $j( selector ); |
| 464 | + var _this = this; |
| 465 | + var update = function() { |
| 466 | + var $covered = $j( selector ); |
465 | 467 | |
466 | | - this.fileCtrlContainer |
467 | | - .css( $covered.position() ) |
468 | | - .css( 'marginTop', $covered.css( 'marginTop' ) ) |
469 | | - .css( 'marginRight', $covered.css( 'marginRight' ) ) |
470 | | - .css( 'marginBottom', $covered.css( 'marginBottom' ) ) |
471 | | - .css( 'marginLeft', $covered.css( 'marginLeft' ) ) |
472 | | - .width( $covered.outerWidth() ) |
473 | | - .height( $covered.outerHeight() ); |
| 468 | + _this.fileCtrlContainer |
| 469 | + .css( $covered.position() ) |
| 470 | + .css( 'marginTop', $covered.css( 'marginTop' ) ) |
| 471 | + .css( 'marginRight', $covered.css( 'marginRight' ) ) |
| 472 | + .css( 'marginBottom', $covered.css( 'marginBottom' ) ) |
| 473 | + .css( 'marginLeft', $covered.css( 'marginLeft' ) ) |
| 474 | + .width( $covered.outerWidth() ) |
| 475 | + .height( $covered.outerHeight() ); |
474 | 476 | |
475 | | - this.fileCtrlContainer.css( { 'z-index': 1 } ); |
| 477 | + _this.fileCtrlContainer.css( { 'z-index': 1 } ); |
476 | 478 | |
477 | | - // shift the file input over with negative margins, |
478 | | - // internal to the overflow-containing div, so the div shows all button |
479 | | - // and none of the textfield-like input |
480 | | - this.$fileInputCtrl.css( { |
481 | | - 'margin-left': '-' + ~~( this.$fileInputCtrl.width() - $covered.outerWidth() - 10 ) + 'px', |
482 | | - 'margin-top' : '-' + ~~( this.$fileInputCtrl.height() - $covered.outerHeight() - 10 ) + 'px' |
483 | | - } ); |
| 479 | + // shift the file input over with negative margins, |
| 480 | + // internal to the overflow-containing div, so the div shows all button |
| 481 | + // and none of the textfield-like input |
| 482 | + _this.$fileInputCtrl.css( { |
| 483 | + 'margin-left': '-' + ~~( _this.$fileInputCtrl.width() - $covered.outerWidth() - 10 ) + 'px', |
| 484 | + 'margin-top' : '-' + ~~( _this.$fileInputCtrl.height() - $covered.outerHeight() - 10 ) + 'px' |
| 485 | + } ); |
| 486 | + } |
484 | 487 | |
| 488 | + if (this.moveFileInputInterval) { |
| 489 | + window.clearInterval(this.moveFileInputInterval); |
| 490 | + } |
| 491 | + this.moveFileInputInterval = window.setInterval(function() { |
| 492 | + update(); |
| 493 | + }, 500); |
| 494 | + update(); |
| 495 | + }, |
485 | 496 | |
| 497 | + hideFileInput: function() { |
| 498 | + if (this.moveFileInputInterval) { |
| 499 | + window.clearInterval(this.moveFileInputInterval); |
| 500 | + } |
| 501 | + this.moveFileInputInterval = null; |
| 502 | + // Should we actually hide it? |
486 | 503 | }, |
487 | 504 | |
488 | 505 | /** |
Index: branches/wmf/1.19wmf1/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | |
53 | 53 | // load list of languages so we'll have it ready when description interfaces are created |
54 | 54 | // XXX replace this code once any of the following bugs are fixed: 25845, 27535, 27561 |
55 | | - var languageHandlerUrl = mw.util.wikiScript() + '?' + $.param( { 'title': 'MediaWiki:LanguageHandler.js', 'action': 'raw', 'ctype': 'text/javascript' } ); |
| 55 | + var languageHandlerUrl = mw.config.get( 'wgServer' ) + mw.util.wikiScript() + '?' + $.param( { 'title': 'MediaWiki:LanguageHandler.js', 'action': 'raw', 'ctype': 'text/javascript' } ); |
56 | 56 | mw.loader.load( languageHandlerUrl ); |
57 | 57 | |
58 | 58 | // remove first spinner |
— | — | @@ -414,10 +414,6 @@ |
415 | 415 | |
416 | 416 | // we explicitly move the file input to cover the upload button |
417 | 417 | upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' ); |
418 | | - // do it again in case the layout didn't update immediately |
419 | | - setTimeout(function() { |
420 | | - upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' ); |
421 | | - }, 50); |
422 | 418 | |
423 | 419 | // we bind to the ui div since unbind doesn't work for non-DOM objects |
424 | 420 | |
— | — | @@ -750,6 +746,7 @@ |
751 | 747 | } else { |
752 | 748 | $j( '#mwe-upwiz-add-file' ).button( 'option', 'disabled', true ); |
753 | 749 | $j( _this.uploadToAdd.ui.div ).hide(); |
| 750 | + _this.uploadToAdd.ui.hideFileInput(); |
754 | 751 | } |
755 | 752 | |
756 | 753 | |
Property changes on: branches/wmf/1.19wmf1/extensions/UploadWizard |
___________________________________________________________________ |
Modified: svn:mergeinfo |
757 | 754 | Merged /trunk/extensions/UploadWizard:r112248,112250,112253 |