Florianschmidtwelzow has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/354026 )
Change subject: Do not hide the toast for the blocked message ...................................................................... Do not hide the toast for the blocked message This also implements a way for users of the toast module to pass further options to the mw.notify function, if needed. Bug: T165513 Change-Id: If31bee9e6d686b311853ba2b37ea4136564ed72c --- M resources/mobile.startup/toast.js M resources/skins.minerva.editor/init.js 2 files changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/26/354026/1 diff --git a/resources/mobile.startup/toast.js b/resources/mobile.startup/toast.js index be4c083..adf8ccb 100644 --- a/resources/mobile.startup/toast.js +++ b/resources/mobile.startup/toast.js @@ -16,12 +16,16 @@ * @method * @param {string} msg Message to show in the toast * @param {string} cssClass CSS class to add to the element + * @param {object} options More options for the notification, see {@link mw.notification.show} */ - Toast.prototype.show = function ( msg, cssClass ) { - this.notification = mw.notify( msg, { + Toast.prototype.show = function ( msg, cssClass, options ) { + options = $.extend( { type: cssClass, tag: 'toast' - } ); + }, options ); + + console.log(options); + this.notification = mw.notify( msg, options ); }; /** diff --git a/resources/skins.minerva.editor/init.js b/resources/skins.minerva.editor/init.js index 408b144..16e3f9f 100644 --- a/resources/skins.minerva.editor/init.js +++ b/resources/skins.minerva.editor/init.js @@ -288,7 +288,11 @@ 'mobile-frontend-editor-blocked-info-loggedin', blockInfo.blockReason, blockInfo.blockedBy - ) + ), + '', + { + autoHide: false + } ); ev.preventDefault(); } ); -- To view, visit https://gerrit.wikimedia.org/r/354026 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If31bee9e6d686b311853ba2b37ea4136564ed72c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits