mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 09:42:11 +00:00
Pass correct "context" object to openDialog
Change-Id: I236fc93d5c58542a9b935894ab1e4f99663bd734
This commit is contained in:
parent
24dd704bb0
commit
c56593d4c6
|
@ -465,11 +465,12 @@ module.exports = {
|
|||
windowManager.addWindows( [ uploadDialog ] );
|
||||
windowManager.openWindow( uploadDialog );
|
||||
|
||||
uploadDialog.uploadBooklet.on( 'fileSaved', function ( imageInfo ) {
|
||||
uploadDialog.uploadBooklet.on( 'fileSaved', ( imageInfo ) => {
|
||||
uploadDialog.close();
|
||||
windowManager.$element.remove();
|
||||
|
||||
$.wikiEditor.modules.dialogs.api.openDialog( this, 'insert-file' );
|
||||
const context = $( this ).data( 'context' );
|
||||
$.wikiEditor.modules.dialogs.api.openDialog( context, 'insert-file' );
|
||||
$( '#wikieditor-toolbar-file-target' ).val( imageInfo.canonicaltitle );
|
||||
} );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue