jenkins-bot has submitted this change and it was merged.
Change subject: Remove the ability to configure enableFormData,
enableMultiFileSelect, enableMultipleFiles
......................................................................
Remove the ability to configure enableFormData, enableMultiFileSelect,
enableMultipleFiles
All of these are core features of UploadWizard. Perhaps they weren't
years ago when the project was started, and when browsers did not
always support the HTML and JS features necessary to implement these,
but they are now. I don't think anyone has tested when happens if any
of these is disabled for years.
Bug: T126763
Change-Id: Icb0a59e4ada76f253041ca224b23b8c3796eb41d
---
M UploadWizard.config.php
M resources/mw.UploadWizard.js
M resources/mw.UploadWizardUpload.js
M resources/ui/steps/uw.ui.Upload.js
4 files changed, 3 insertions(+), 27 deletions(-)
Approvals:
MarkTraceur: Looks good to me, approved
jenkins-bot: Verified
diff --git a/UploadWizard.config.php b/UploadWizard.config.php
index fdd8bc3..1284a3e 100644
--- a/UploadWizard.config.php
+++ b/UploadWizard.config.php
@@ -648,12 +648,6 @@
// Wiki page for reporting issues with the blacklist
'blacklistIssuesPage' => '',
- // should File API uploads be available? Required for chunked
uploading and multi-file select
- 'enableFormData' => true,
-
- // should multi-file select be available in supporting browsers?
- 'enableMultiFileSelect' => true,
-
// should chunked uploading be enabled? false for now since the backend
isn't really ready.
// set to "opt-in" to control via experimental user preference under
'Uploads' tab
'enableChunked' => false,
@@ -663,9 +657,6 @@
// Should feature to copy metadata across a batch of uploads be enabled?
'copyMetadataFeature' => true,
-
- // Should we allow multiple files in a form?
- 'enableMultipleFiles' => true,
// Should we pester the user with a confirmation step when submitting a
file without assigning it
// to any categories?
diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 1e7be97..b08b108 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -90,8 +90,7 @@
wizard = this;
$fileInputCtrl = $( '<input type="file" name="file"
class="mwe-upwiz-file-input" />' );
- if ( mw.UploadWizard.config.enableFormData &&
mw.fileApi.isFormDataAvailable() &&
- mw.UploadWizard.config.enableMultiFileSelect &&
mw.UploadWizard.config.enableMultipleFiles ) {
+ if ( mw.fileApi.isFormDataAvailable() ) {
// Multiple uploads requires the FormData
transport
$fileInputCtrl.attr( 'multiple', '1' );
}
diff --git a/resources/mw.UploadWizardUpload.js
b/resources/mw.UploadWizardUpload.js
index efc4f11..9608056 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -769,7 +769,7 @@
if ( !this.uploadHandler ) {
if ( mw.UploadWizard.config.enableFirefogg &&
mw.Firefogg.isInstalled() ) {
constructor = 'FirefoggHandler';
- } else if ( mw.UploadWizard.config.enableFormData &&
mw.fileApi.isAvailable() && mw.fileApi.isFormDataAvailable() ) {
+ } else if ( mw.fileApi.isAvailable() &&
mw.fileApi.isFormDataAvailable() ) {
constructor = 'ApiUploadFormDataHandler';
} else {
constructor = 'ApiUploadHandler';
diff --git a/resources/ui/steps/uw.ui.Upload.js
b/resources/ui/steps/uw.ui.Upload.js
index d3d4cdf..8a9d595 100644
--- a/resources/ui/steps/uw.ui.Upload.js
+++ b/resources/ui/steps/uw.ui.Upload.js
@@ -202,29 +202,15 @@
* @param {boolean} fewerThanMax Whether we can add more uploads.
*/
uw.ui.Upload.prototype.updateFileCounts = function ( haveUploads,
fewerThanMax ) {
- var $needToHide;
-
this.$fileList.toggleClass( 'mwe-upwiz-filled-filelist',
haveUploads );
this.$addFileContainer.toggleClass( 'mwe-upwiz-add-files-0',
!haveUploads );
- this.setAddButtonText( haveUploads &&
this.config.enableMultipleFiles === true );
+ this.setAddButtonText( haveUploads );
if ( haveUploads ) {
// we have uploads ready to go, so allow us to proceed
this.$addFileContainer.add( this.$buttons ).show();
this.$uploadCenterDivide.hide();
-
- if ( this.config.enableMultipleFiles !== true ) {
- $needToHide = $( '.mwe-upwiz-file-input' )
- .add( this.$addFileContainer );
-
- if ( this.isFlickrImportEnabled() ) {
- $needToHide.add(
this.$flickrAddFileContainer )
- .add(
this.$flickrSelectListContainer );
- }
-
- $needToHide.hide();
- }
// fix the rounded corners on file elements.
// we want them to be rounded only when their edge
touched the top or bottom of the filelist.
--
To view, visit https://gerrit.wikimedia.org/r/277938
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icb0a59e4ada76f253041ca224b23b8c3796eb41d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits