Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/221972
Change subject: Close tutorial when clicking in to search input ...................................................................... Close tutorial when clicking in to search input * Small improvement by showing tutorial with css bug: T99109 Change-Id: I12f4a9ab6aa6f9014d26b58dfdab9c48daebd02e --- M resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js M resources/ext.gather.collection.contentOverlay/content.hogan M resources/ext.gather.collection.contentOverlay/contentOverlay.less M resources/ext.gather.collection.editor/CollectionEditOverlay.js 4 files changed, 23 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/72/221972/1 diff --git a/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js b/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js index 7c55d0c..bce9f46 100644 --- a/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js +++ b/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js @@ -123,12 +123,10 @@ } this.expandForm(); if ( this.options.showTutorial ) { - // Changes content area background color while in tutorial + // Shows tutorial and modifies background color this.$( '.overlay-content' ).addClass( 'interstitial' ); // Hide collection content this.$( '.collectionContent' ).addClass( 'hidden' ); - // Show tutorial - this.$( '.tutorial' ).removeClass( 'hidden' ); } }, /** @@ -199,7 +197,6 @@ * Event handler for clicking the tutorial next button */ onClickTutorialNext: function () { - this.$( '.tutorial' ).addClass( 'hidden' ); this.$( '.collectionContent' ).removeClass( 'hidden' ); this.$( '.overlay-content' ).removeClass( 'interstitial' ); }, diff --git a/resources/ext.gather.collection.contentOverlay/content.hogan b/resources/ext.gather.collection.contentOverlay/content.hogan index cf8fd48..c5c37f5 100644 --- a/resources/ext.gather.collection.contentOverlay/content.hogan +++ b/resources/ext.gather.collection.contentOverlay/content.hogan @@ -1,5 +1,5 @@ {{{spinner}}} -<div class="tutorial hidden"> +<div class="tutorial"> <div class="heading">{{tutorialHeading}}</div> <div>{{tutorialSubheading}}</div> <div class="button-bar"> diff --git a/resources/ext.gather.collection.contentOverlay/contentOverlay.less b/resources/ext.gather.collection.contentOverlay/contentOverlay.less index b5a6cd0..8391d28 100644 --- a/resources/ext.gather.collection.contentOverlay/contentOverlay.less +++ b/resources/ext.gather.collection.contentOverlay/contentOverlay.less @@ -110,22 +110,30 @@ display: block; } } + + .tutorial { + display: none; + } + // Toggle class to change background of content area &.interstitial { background-color: @grayLightest; overflow-y: hidden; + + .tutorial { + display: block; + + .heading { + font-size: 1.5em; + margin: 1em 0; + } + .button-bar { + text-align: center; + margin: 1em 0; + } + } } - .tutorial { - .heading { - font-size: 1.5em; - margin: 1em 0; - } - .button-bar { - text-align: center; - margin: 1em 0; - } - } h3 { clear: both; diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js b/resources/ext.gather.collection.editor/CollectionEditOverlay.js index 02659ee..a74bb1d 100644 --- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js +++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js @@ -210,6 +210,9 @@ .addClass( 'hidden' ); this.$( this._selectors.search ).removeClass( 'hidden' ); this.$( '.search-header input' ).focus(); + if ( this.options.showTutorial ) { + this.searchTutorialOverlay.hide(); + } } }, /** -- To view, visit https://gerrit.wikimedia.org/r/221972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12f4a9ab6aa6f9014d26b58dfdab9c48daebd02e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Robmoen <rm...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits