Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/72682
Change subject: Add tour for VisualEditor
......................................................................
Add tour for VisualEditor
* It automatically chooses the correct tour depending on whether
VisualEditor is detected.
Change-Id: I92958ba665b9462ca4ed941efcbe1170e3a0697c
---
M GettingStarted.i18n.php
M GettingStarted.php
M resources/ext.gettingstarted.taskToolbar.js
3 files changed, 37 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted
refs/changes/82/72682/1
diff --git a/GettingStarted.i18n.php b/GettingStarted.i18n.php
index ee89f91..c20fe30 100644
--- a/GettingStarted.i18n.php
+++ b/GettingStarted.i18n.php
@@ -65,6 +65,9 @@
// TODO (mattflaschen, 2013-04-25): Use <nowiki>[edit]</nowiki> after
bug 45173 is fixed.
'guidedtour-tour-gettingstartedtasktoolbar-edit-section-description' =>
'If you want to edit a specific section, you can click on the blue
\'{{int:editsection}}\' link at the top of each section.',
+ 'guidedtour-tour-gettingstartedtasktoolbarve-click-save-title' => 'You
can edit!',
+ 'guidedtour-tour-gettingstartedtasktoolbarve-click-save-description' =>
'You can now edit the page. When you\'re done, click
\'{{int:visualeditor-toolbar-savedialog}}\' and your changes will be saved.',
+
// Notifications
'notification-gettingstarted-start-editing' => '{{SITENAME}} is a free
encyclopedia written by people like you. [[Special:GettingStarted|Get started]]
by making your first edit!',
'notification-gettingstarted-start-editing-email-subject' => 'Get
started with editing {{SITENAME}}',
@@ -158,6 +161,8 @@
'guidedtour-tour-gettingstartedtasktoolbar-edit-article-description' =>
'Description of step showing user where to click {{msg-mw|vector-view-edit}}.',
'guidedtour-tour-gettingstartedtasktoolbar-edit-section-title' =>
'Title of step showing user how to edit a section.',
'guidedtour-tour-gettingstartedtasktoolbar-edit-section-description' =>
'Description of step showing user how to edit a section.',
+ 'guidedtour-tour-gettingstartedtasktoolbarve-click-save-title' =>
'Title of first step of GettingStarted tour that is on the VisualEditor screen.
It points to the {{msg-mw|visualeditor-toolbar-savedialog}} button.',
+ 'guidedtour-tour-gettingstartedtasktoolbarve-click-save-description' =>
'Description of first step of GettingStarted tour that is on the VisualEditor
screen. It points to the {{msg-mw|visualeditor-toolbar-savedialog}} button.',
'notification-gettingstarted-start-editing' => 'Text shown on web when
someone confirms their email but has not yet edited the main namespace:
* $1 - username (unused); GENDER is supported',
'notification-gettingstarted-start-editing-email-subject' => 'Subject
of email sent when someone confirms their email but has not yet edited the main
namespace:
diff --git a/GettingStarted.php b/GettingStarted.php
index 8f5bef6..999eae5 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -147,6 +147,29 @@
),
) + $gettingStartedModuleInfo;
+$wgResourceModules['ext.guidedTour.tour.gettingstartedtasktoolbarve'] = array(
+ 'scripts' => 'tours/gettingstartedtasktoolbarve.js',
+ 'dependencies' => array(
+ 'ext.guidedTour',
+ 'ext.gettingstarted.logging',
+ ),
+ 'messages' => array(
+ 'editsection',
+ 'vector-view-edit',
+ 'visualeditor-toolbar-savedialog',
+ 'guidedtour-tour-gettingstartedtasktoolbar-ambox-title',
+ 'guidedtour-tour-gettingstartedtasktoolbar-ambox-description',
+ 'guidedtour-tour-gettingstartedtasktoolbar-edit-article-title',
+
'guidedtour-tour-gettingstartedtasktoolbar-edit-article-description',
+ 'guidedtour-tour-gettingstartedtasktoolbar-edit-section-title',
+
'guidedtour-tour-gettingstartedtasktoolbar-edit-section-description',
+ 'guidedtour-tour-gettingstartedtasktoolbarve-click-save-title',
+
'guidedtour-tour-gettingstartedtasktoolbarve-click-save-description',
+ 'guidedtour-tour-gettingstarted-end-title',
+ 'guidedtour-tour-gettingstarted-end-description',
+ ),
+) + $gettingStartedModuleInfo;
+
// ext.gettingstarted.logging and ext.gettingstarted.openTask are on every
page site-wide
// regardless of bucket.
$wgResourceModules[ 'ext.gettingstarted.logging' ] = array(
diff --git a/resources/ext.gettingstarted.taskToolbar.js
b/resources/ext.gettingstarted.taskToolbar.js
index 8967770..a9f5bdf 100644
--- a/resources/ext.gettingstarted.taskToolbar.js
+++ b/resources/ext.gettingstarted.taskToolbar.js
@@ -1,4 +1,12 @@
( function ( $, mw ) {
+ function getEditingTourName() {
+ if ( mw.libs.ve !== undefined ) {
+ return 'gettingstartedtasktoolbarve';
+ } else {
+ return 'gettingstartedtasktoolbar';
+ }
+ }
+
$( document ).ready( function () {
var $toolbar, $left, $center, $centerMessage, $right,
$tryAnother, $close,
toolbarInfo, $relativeElements, $marginElements, logging,
@@ -54,7 +62,7 @@
title: mw.message(
'gettingstarted-task-toolbar-editing-help-title' ).text()
} ).text( mw.message(
'gettingstarted-task-toolbar-editing-help-text' ).text() )
.click( function ( evt ) {
- mw.guidedTour.launchTour(
'gettingstartedtasktoolbar' );
+ mw.guidedTour.launchTour( getEditingTourName()
);
evt.stopPropagation();
} );
--
To view, visit https://gerrit.wikimedia.org/r/72682
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I92958ba665b9462ca4ed941efcbe1170e3a0697c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits