[MediaWiki-commits] [Gerrit] Make "uses wikitext" link open in new tab - change (mediawiki...Flow)

2015-05-06 Thread jenkins-bot (Code Review)
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


[MediaWiki-commits] [Gerrit] Make "uses wikitext" link open in new tab - change (mediawiki...Flow)

2015-05-04 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/208845

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, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/45/208845/1

diff --git a/modules/editor/editors/ext.flow.editors.none.js 
b/modules/editor/editors/ext.flow.editors.none.js
index d9f6f25..2dda49e 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()
};

-- 
To view, visit https://gerrit.wikimedia.org/r/208845
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48b00ede0c0aba4ecba42071bf25e811f8c06951
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits