http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90647
Revision: 90647
Author: neilk
Date: 2011-06-23 06:12:05 +0000 (Thu, 23 Jun 2011)
Log Message:
-----------
revert of r90646, committed some extraneous files
Modified Paths:
--------------
trunk/extensions/UploadWizard/resources/mw.Api.js
trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
trunk/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
trunk/extensions/UploadWizard/resources/mw.canvas.js
trunk/extensions/UploadWizard/resources/mw.fileApi.js
Removed Paths:
-------------
trunk/extensions/UploadWizard/resources/foo.txt
Deleted: trunk/extensions/UploadWizard/resources/foo.txt
===================================================================
--- trunk/extensions/UploadWizard/resources/foo.txt 2011-06-23 06:08:31 UTC
(rev 90646)
+++ trunk/extensions/UploadWizard/resources/foo.txt 2011-06-23 06:12:05 UTC
(rev 90647)
@@ -1,4 +0,0 @@
-fdlkjsdfljslfjlsdjlfjsd
-sdfsdfsf
-fdsfsdfsd
-
Modified: trunk/extensions/UploadWizard/resources/mw.Api.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.Api.js 2011-06-23 06:08:31 UTC
(rev 90646)
+++ trunk/extensions/UploadWizard/resources/mw.Api.js 2011-06-23 06:12:05 UTC
(rev 90647)
@@ -122,11 +122,7 @@
ajax: function( parameters, ajaxOptions ) {
parameters = $j.extend( {}, this.defaults.parameters,
parameters );
ajaxOptions = $j.extend( {}, this.defaults.ajax,
ajaxOptions );
-
- // Some deployed MediaWiki >= 1.17 forbid periods in
URLs, due to an IE XSS bug
- // So let's escape them here. See bug #28235
- // This works because jQuery accepts data as a query
string or as an Object
- ajaxOptions.data = $j.param( parameters ).replace(
/\./g, '%2E' );
+ ajaxOptions.data = parameters;
ajaxOptions.error = function( xhr, textStatus,
exception ) {
ajaxOptions.err( 'http', { xhr: xhr,
textStatus: textStatus, exception: exception } );
Modified: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.UploadWizard.js 2011-06-23
06:08:31 UTC (rev 90646)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizard.js 2011-06-23
06:12:05 UTC (rev 90647)
@@ -327,24 +327,22 @@
* @param {Object} (as returned by jpegmeta)
*/
extractMetadataFromJpegMeta: function( meta ) {
- if ( mw.isDefined( meta ) && meta !== null && typeof meta ===
'object' ) {
- if ( !mw.isDefined( this.imageinfo ) ) {
- this.imageinfo = {};
+ if ( !mw.isDefined( this.imageinfo ) ) {
+ this.imageinfo = {};
+ }
+ if ( !mw.isDefined( this.imageinfo.metadata ) ) {
+ this.imageinfo.metadata = {};
+ }
+ if ( meta.tiff && meta.tiff.Orientation ) {
+ this.imageinfo.metadata.orientation =
meta.tiff.Orientation.value;
+ }
+ if ( meta.general ) {
+ if ( meta.general.pixelHeight ) {
+ this.imageinfo.height =
meta.general.pixelHeight.value;
}
- if ( !mw.isDefined( this.imageinfo.metadata ) ) {
- this.imageinfo.metadata = {};
+ if ( meta.general.pixelWidth ) {
+ this.imageinfo.width =
meta.general.pixelWidth.value;
}
- if ( meta.tiff && meta.tiff.Orientation ) {
- this.imageinfo.metadata.orientation =
meta.tiff.Orientation.value;
- }
- if ( meta.general ) {
- if ( meta.general.pixelHeight ) {
- this.imageinfo.height =
meta.general.pixelHeight.value;
- }
- if ( meta.general.pixelWidth ) {
- this.imageinfo.width =
meta.general.pixelWidth.value;
- }
- }
}
},
Modified:
trunk/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
2011-06-23 06:08:31 UTC (rev 90646)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
2011-06-23 06:12:05 UTC (rev 90647)
@@ -274,17 +274,10 @@
});
}
- // TODO refactor -- the metadata is not extracted yet at
fileChanged event
- var statusItems = [];
- if ( this.upload.imageinfo && this.upload.imageinfo.width &&
this.upload.imageinfo.height ) {
- statusItems.push( this.upload.imageinfo.width +
'\u00d7' + this.upload.imageinfo.height );
- }
+ this.clearStatus();
if ( this.upload.file ) {
- statusItems.push( mw.units.bytes( this.upload.file.size
) );
+ this.setStatusString( mw.units.bytes(
this.upload.file.size ) );
}
-
- this.clearStatus();
- this.setStatusString( statusItems.join( ' \u00b7 ' ) );
},
/**
Modified: trunk/extensions/UploadWizard/resources/mw.canvas.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.canvas.js 2011-06-23
06:08:31 UTC (rev 90646)
+++ trunk/extensions/UploadWizard/resources/mw.canvas.js 2011-06-23
06:12:05 UTC (rev 90647)
@@ -5,7 +5,7 @@
* @return boolean
*/
isAvailable: function() {
- return false; //return !! (
document.createElement('canvas')['getContext'] );
+ return !! (
document.createElement('canvas')['getContext'] );
}
}
Modified: trunk/extensions/UploadWizard/resources/mw.fileApi.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.fileApi.js 2011-06-23
06:08:31 UTC (rev 90646)
+++ trunk/extensions/UploadWizard/resources/mw.fileApi.js 2011-06-23
06:12:05 UTC (rev 90647)
@@ -2,14 +2,13 @@
( function( $, mw ) {
+ /**
+ * Is the FileAPI available with sufficient functionality?
+ */
mw.fileApi = {
- /**
- * Is the FileAPI available with sufficient functionality?
- * @return boolean
- */
isAvailable: function() {
- return false; // return typeof window.FileReader !==
'undefined';
+ return typeof window.FileReader !== 'undefined';
},
/**
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs