jenkins-bot has submitted this change and it was merged.
Change subject: Aligh the version 'c' dialog in the middle of the page
......................................................................
Aligh the version 'c' dialog in the middle of the page
Also, remove the confusing isDrawer option.
Depends on Id171118c104a872f7e2e00de57cc125645cb4207
Change-Id: Ida0a26e59a6eef10855e9df83b635e104760f2ac
---
M resources/dialog.c/DialogC.less
M resources/dialog.c/WikiGrokDialogC.js
M resources/dialog/WikiGrokDialog.js
M resources/startup/init.js
4 files changed, 5 insertions(+), 14 deletions(-)
Approvals:
Jdlrobson: Looks good to me, but someone else must approve
Phuedx: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/dialog.c/DialogC.less b/resources/dialog.c/DialogC.less
index a53a386..7253fab 100644
--- a/resources/dialog.c/DialogC.less
+++ b/resources/dialog.c/DialogC.less
@@ -3,7 +3,7 @@
.wikigrok.drawer {
padding: 0;
- margin-bottom: 0;
+ margin: 0 auto;
.mw-ui-button {
margin-bottom: 0;
diff --git a/resources/dialog.c/WikiGrokDialogC.js
b/resources/dialog.c/WikiGrokDialogC.js
index 6f8b742..2518a91 100644
--- a/resources/dialog.c/WikiGrokDialogC.js
+++ b/resources/dialog.c/WikiGrokDialogC.js
@@ -21,7 +21,6 @@
version: 'c',
closeOnScroll: false,
defaults: $.extend( Drawer.prototype.defaults,
WikiGrokDialog.prototype.defaults, {
- isDrawer: true,
continueBtnLbl: mw.msg(
'wikigrok-dialog-c-continue-button-label' )
} ),
events: $.extend( {}, Drawer.prototype.events,
WikiGrokDialog.prototype.events, {
diff --git a/resources/dialog/WikiGrokDialog.js
b/resources/dialog/WikiGrokDialog.js
index 387dc75..5c62d96 100644
--- a/resources/dialog/WikiGrokDialog.js
+++ b/resources/dialog/WikiGrokDialog.js
@@ -60,7 +60,6 @@
noThanksBtnLbl: mw.msg(
'wikigrok-dialog-no-thanks-button-label' ),
proceedBtnLbl: mw.msg(
'wikigrok-dialog-proceed-button-label' ),
spinner: icons.spinner().toHtmlString(),
- isDrawer: false
},
template: mw.template.get( 'ext.wikigrok.dialog',
'Dialog.hogan' ),
events: {
@@ -512,14 +511,6 @@
*/
_showThanksPane: function () {
this._showPane( 'thanks' );
- },
-
- /**
- * Is this dialog a Drawer?
- * @returns {Boolean} Whether it's a drawer
- */
- isDrawer: function () {
- return this.options.isDrawer;
},
/**
diff --git a/resources/startup/init.js b/resources/startup/init.js
index 93e888a..9ad894d 100644
--- a/resources/startup/init.js
+++ b/resources/startup/init.js
@@ -130,8 +130,7 @@
mw.loader.using( versionConfig.module ).done( function () {
var WikiGrokDialog = M.require( versionConfig.view ),
page = M.getCurrentPage(),
- // Initialize the dialog and insert it into the
page (but don't display yet)
- // The version c is a drawer and is
automatically inserted to the page and displayed
+ // Initialize the dialog and insert it into the
page
dialog = new WikiGrokDialog( {
campaign: campaign,
itemId: wikidataID,
@@ -139,7 +138,9 @@
userToken: wikiGrokUser.getToken(),
testing: ( idOverride ) ? true : false
} );
- if ( !dialog.isDrawer() ) {
+ // The version 'c' is a drawer and is automatically
inserted to the page and displayed
+ // We need to insert the version 'b' into the page
though
+ if ( dialog.version === 'b' ) {
// FIXME: If the table of contents code is not
loaded the dialog will still
// get added to the end of the lead section.
if ( $( '.toc-mobile' ).length ) {
--
To view, visit https://gerrit.wikimedia.org/r/204660
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida0a26e59a6eef10855e9df83b635e104760f2ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits