mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Special:CollabPad supports importTitle
parameter
This lets us begin the import from another page, for example an edit tab or button. If the CollabPad page already exists, it will be opened without overwriting with freshly-imported page contents. Change-Id: I89293b9b06253243826d8f8144a5e93d55856e7c
This commit is contained in:
parent
0e77a51898
commit
b189ce2825
|
@ -237,7 +237,7 @@
|
|||
history.pushState( { tag: 'collabTarget', title: title.toString() }, title.getMain(), specialTitle.getUrl() );
|
||||
showPage( title, importTitle );
|
||||
} else {
|
||||
location.href = specialTitle.getUrl();
|
||||
location.href = specialTitle.getUrl( { import: importTitle } );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,10 @@
|
|||
onImportChange();
|
||||
|
||||
if ( pageTitle ) {
|
||||
showPage( pageTitle );
|
||||
var uri = new mw.Uri( location.href ),
|
||||
importTitleText = uri.query.import,
|
||||
importTitleParam = ( importTitleText ? mw.Title.newFromText( importTitleText ) : null );
|
||||
showPage( pageTitle, importTitleParam );
|
||||
} else {
|
||||
showForm();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue