r113049 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113048‎ | r113049 | r113050 >
Date:17:46, 5 March 2012
Author:reedy
Status:deferred
Tags:
Comment:
Modified paths:
  • /branches/REL1_19/extensions (modified) (history)
  • /branches/REL1_19/extensions/OggHandler/OggHandler_body.php (modified) (history)
  • /branches/REL1_19/extensions/UploadWizard (modified) (history)
  • /branches/REL1_19/extensions/UploadWizard/includes/specials/SpecialUploadWizard.php (modified) (history)
  • /branches/REL1_19/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)
  • /branches/REL1_19/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js (modified) (history)
  • /branches/REL1_19/extensions/WikiLove/ApiWikiLove.php (modified) (history)

Diff [purge]

Index: branches/REL1_19/extensions/UploadWizard/includes/specials/SpecialUploadWizard.php
@@ -73,6 +73,7 @@
7474 $this->addJsVars( $subPage );
7575
7676 // dependencies (css, js)
 77+ $out->addModuleStyles( 'ext.uploadWizard' );
7778 $out->addModules( 'ext.uploadWizard' );
7879
7980 // where the uploadwizard will go
Index: branches/REL1_19/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -51,7 +51,7 @@
5252
5353 // load list of languages so we'll have it ready when description interfaces are created
5454 // 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' } );
5656 mw.loader.load( languageHandlerUrl );
5757
5858 // remove first spinner
@@ -746,6 +746,7 @@
747747 } else {
748748 $j( '#mwe-upwiz-add-file' ).button( 'option', 'disabled', true );
749749 $j( _this.uploadToAdd.ui.div ).hide();
 750+ _this.uploadToAdd.ui.hideFileInput();
750751 }
751752
752753
Index: branches/REL1_19/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
@@ -460,28 +460,45 @@
461461 * @param selector jquery-compatible selector, for a single element
462462 */
463463 moveFileInputToCover: function( selector ) {
464 - var $covered = $j( selector );
 464+ var _this = this;
 465+ var update = function() {
 466+ var $covered = $j( selector );
465467
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() );
474476
475 - this.fileCtrlContainer.css( { 'z-index': 1 } );
 477+ _this.fileCtrlContainer.css( { 'z-index': 1 } );
476478
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+ }
484487
 488+ if (this.moveFileInputInterval) {
 489+ window.clearInterval(this.moveFileInputInterval);
 490+ }
 491+ this.moveFileInputInterval = window.setInterval(function() {
 492+ update();
 493+ }, 500);
 494+ update();
 495+ },
485496
 497+ hideFileInput: function() {
 498+ if (this.moveFileInputInterval) {
 499+ window.clearInterval(this.moveFileInputInterval);
 500+ }
 501+ this.moveFileInputInterval = null;
 502+ // Should we actually hide it?
486503 },
487504
488505 /**
Property changes on: branches/REL1_19/extensions/UploadWizard
___________________________________________________________________
Modified: svn:mergeinfo
489506 Merged /trunk/extensions/UploadWizard:r112229,112248,112253,112260,112758
Index: branches/REL1_19/extensions/OggHandler/OggHandler_body.php
@@ -261,9 +261,9 @@
262262
263263 global $wgOggThumbLocation;
264264 if ( $wgOggThumbLocation !== false ) {
265 - $status = $this->runOggThumb( $file->getPath(), $dstPath, $thumbTime );
 265+ $status = $this->runOggThumb( $file->getLocalRefPath(), $dstPath, $thumbTime );
266266 } else {
267 - $status = $this->runFFmpeg( $file->getPath(), $dstPath, $thumbTime );
 267+ $status = $this->runFFmpeg( $file->getLocalRefPath(), $dstPath, $thumbTime );
268268 }
269269 if ( $status === true ) {
270270 return new OggVideoDisplay( $file, $file->getURL(), $dstUrl, $width, $height,
Property changes on: branches/REL1_19/extensions/OggHandler/OggHandler_body.php
___________________________________________________________________
Modified: svn:mergeinfo
271271 Merged /trunk/extensions/OggHandler/OggHandler_body.php:r112260,112758
Index: branches/REL1_19/extensions/WikiLove/ApiWikiLove.php
@@ -20,16 +20,25 @@
2121 }
2222
2323 // not using section => 'new' here, as we like to give our own edit summary
24 - $api = new ApiMain( new FauxRequest( array(
25 - 'action' => 'edit',
26 - 'title' => $talk->getFullText(),
27 - // need to do this, as Article::replaceSection fails for non-existing pages
28 - 'appendtext' => ( $talk->exists() ? "\n\n" : '' ) . wfMsgForContent( 'newsectionheaderdefaultlevel', $params['subject'] )
29 - . "\n\n" . $params['text'],
30 - 'token' => $params['token'],
31 - 'summary' => wfMsgForContent( 'wikilove-summary', $wgParser->stripSectionName( $params['subject'] ) ),
32 - 'notminor' => true,
33 - ), false, array( 'wsEditToken' => $wgRequest->getSessionData( 'wsEditToken' ) ) ), true );
 24+ $api = new ApiMain(
 25+ new DerivativeRequest(
 26+ $wgRequest,
 27+ array(
 28+ 'action' => 'edit',
 29+ 'title' => $talk->getFullText(),
 30+ // need to do this, as Article::replaceSection fails for non-existing pages
 31+ 'appendtext' => ( $talk->exists() ? "\n\n" : '' ) .
 32+ wfMsgForContent( 'newsectionheaderdefaultlevel', $params['subject'] )
 33+ . "\n\n" . $params['text'],
 34+ 'token' => $params['token'],
 35+ 'summary' => wfMsgForContent( 'wikilove-summary',
 36+ $wgParser->stripSectionName( $params['subject'] ) ),
 37+ 'notminor' => true
 38+ ),
 39+ false // was posted?
 40+ ),
 41+ true // enable write?
 42+ );
3443
3544 $api->execute();
3645
Property changes on: branches/REL1_19/extensions
___________________________________________________________________
Modified: svn:mergeinfo
3746 Merged /trunk/extensions:r112229,112248,112253,112260,112758

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112229May or may not help with bug 34601 UW mispositioned file control - still can'...brion19:28, 23 February 2012
r112248Another stab at bug 34601: UploadWizard positioning issues with hidden file i...brion22:04, 23 February 2012
r112253* (bug 34652) Fix regression in UploadWizard custom language list...brion22:26, 23 February 2012
r112260Use getLocalRefPath() for shell scripts that need a source fileaaron23:08, 23 February 2012
r112758Use DerivativeRequest subclass of FauxRequest in order to pass on IP and Agen...aaron01:45, 1 March 2012

Status & tagging log