jenkins-bot has submitted this change and it was merged.
Change subject: Make "uses wikitext" link open in new tab
..
Make "uses wikitext" link open in new tab
Bug: T97434
Change-Id: I48b00ede0c0aba4ecba42071bf25e811f8c06951
---
M modules/editor/editors/ext.flow.editors.none.js
1 file changed, 9 insertions(+), 3 deletions(-)
Approvals:
Matthias Mullie: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/editor/editors/ext.flow.editors.none.js
b/modules/editor/editors/ext.flow.editors.none.js
index ac86a2e..7ec8357 100644
--- a/modules/editor/editors/ext.flow.editors.none.js
+++ b/modules/editor/editors/ext.flow.editors.none.js
@@ -141,7 +141,7 @@
};
mw.flow.editors.none.prototype.attachControls = function () {
- var $preview, $controls, templateArgs,
+ var $preview, $usesWikitext, $controls, templateArgs,
board = mw.flow.getPrototypeMethod( 'board',
'getInstanceByElement' )( this.$node );
if ( mw.flow.editors.visualeditor.static.isSupported() ) {
@@ -151,10 +151,16 @@
'data-flow-target': '< form textarea'
} ).text( mw.message(
'flow-wikitext-editor-help-preview-the-result' ).text() );
+ $usesWikitext = $( '' )
+ .html( mw.message(
'flow-wikitext-editor-help-uses-wikitext' ).parse() )
+ .find( 'a' )
+ .attr( 'target', '_blank' )
+ .end();
+
templateArgs = {
enable_switcher: true,
help_text: mw.message(
'flow-wikitext-editor-help-and-preview' ).params( [
- mw.message(
'flow-wikitext-editor-help-uses-wikitext' ).parse(),
+ $usesWikitext.html(),
$preview[0].outerHTML
] ).parse()
};
@@ -163,7 +169,7 @@
templateArgs = {
enable_switcher: false,
help_text: mw.message(
'flow-wikitext-editor-help' ).params( [
- mw.message(
'flow-wikitext-editor-help-uses-wikitext' ).parse()
+ $usesWikitext.html()
] ).parse()
};
}
--
To view, visit https://gerrit.wikimedia.org/r/208845
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I48b00ede0c0aba4ecba42071bf25e811f8c06951
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope
Gerrit-Reviewer: Mattflaschen
Gerrit-Reviewer: Matthias Mullie
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits