jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/375098 )
Change subject: Various small fixes ...................................................................... Various small fixes * Note that namemsg also works for custom action button text. * Throw exception if you try to attach without a position. * No default title or description. Change-Id: I95fd7f41ab1b0717de1e04fc896a00c2746eb423 --- M modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js M modules/ext.guidedTour.lib/ext.guidedTour.lib.StepBuilder.js M modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js 3 files changed, 8 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Mooeypoo: Looks good to me, approved diff --git a/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js b/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js index 0490351..a7d085b 100644 --- a/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js +++ b/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js @@ -184,6 +184,8 @@ * * currently 'next', 'back', okay', or 'end' * * @param {Function} button.callback Function to call if they click the button * * @param {HTMLElement} button.callback.btn Raw DOM element of the button + * * @param {string} [button.namemsg] Message key of button text to override + * * default. * * @param {string} [button.name] Button text to override default. * * @return {Object} Guiders button specification diff --git a/modules/ext.guidedTour.lib/ext.guidedTour.lib.StepBuilder.js b/modules/ext.guidedTour.lib/ext.guidedTour.lib.StepBuilder.js index d338d9f..debc4c7 100644 --- a/modules/ext.guidedTour.lib/ext.guidedTour.lib.StepBuilder.js +++ b/modules/ext.guidedTour.lib/ext.guidedTour.lib.StepBuilder.js @@ -31,6 +31,10 @@ throw new gt.TourDefinitionError( '\'stepSpec.name\' must be a string, the step name, without the characters \'.\' and \'-\'.' ); } + if ( stepSpec.attachTo && stepSpec.position === undefined ) { + throw new gt.TourDefinitionError( 'If you specify an \'attachTo\', you must also specify \'position\'; see TourBuilder.step' ); + } + /** * Step being built by this StepBuilder * diff --git a/modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js b/modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js index 8ec9e09..3c43896 100644 --- a/modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js +++ b/modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js @@ -56,7 +56,7 @@ classString: null, closeOnEscape: false, closeOnClickOutside: false, - description: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', + description: '', // If guider would go off screen to the left or right, flip horizontally. // If guider would go off the top of the screen, flip vertically. If it would go off the bottom of the screen do nothing, since most pages scroll in the vertical direction. // It will be flipped both ways if it would be off-screen on two sides. @@ -76,7 +76,7 @@ // 1-12 follows an analog clock, 0 means centered. You can also use the string positions // listed below at guiders._offsetNameMapping, such as "topRight". position: 0, - title: 'Sample title goes here', + title: '', width: 400, xButton: false // this places a closer "x" button in the top right of the guider }; -- To view, visit https://gerrit.wikimedia.org/r/375098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95fd7f41ab1b0717de1e04fc896a00c2746eb423 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/GuidedTour Gerrit-Branch: master Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org> Gerrit-Reviewer: Mooeypoo <mor...@gmail.com> Gerrit-Reviewer: Phuedx <samsm...@wikimedia.org> Gerrit-Reviewer: Swalling <steven.wall...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits