Change mid-upload 'cancel' button to 'back'

Bug: T114938
Change-Id: I964708e1267223b181630b9bea5b19e2bdf242be
This commit is contained in:
Matthias Mullie 2016-09-22 16:12:55 +02:00
parent 42a2a4fd59
commit 2b4948b0b6

View file

@ -86,10 +86,16 @@ ve.ui.MWMediaDialog.static.actions = [
flags: [ 'safe', 'back' ],
modes: [ 'info' ]
},
{
action: 'cancelupload',
label: OO.ui.deferMsg( 'visualeditor-dialog-media-goback' ),
flags: [ 'safe', 'back' ],
modes: [ 'upload-info' ]
},
{
label: OO.ui.deferMsg( 'visualeditor-dialog-action-cancel' ),
flags: [ 'safe', 'back' ],
modes: [ 'edit', 'insert', 'select', 'search', 'upload-upload', 'upload-info' ]
modes: [ 'edit', 'insert', 'select', 'search', 'upload-upload' ]
},
{
action: 'back',
@ -1371,6 +1377,13 @@ ve.ui.MWMediaDialog.prototype.getActionProcess = function ( action ) {
return this.mediaUploadBooklet.initialize();
};
break;
case 'cancelupload':
handler = function () {
this.searchTabs.setCard( 'upload' );
this.searchTabs.toggleMenu( true );
return this.mediaUploadBooklet.initialize();
};
break;
case 'upload':
return new OO.ui.Process( this.mediaUploadBooklet.uploadFile() );
case 'save':