Filip has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331989 )

Change subject: Added "autoHideSeconds" setting in mw.notify()
......................................................................

Added "autoHideSeconds" setting in mw.notify()

Bug: T155228
Change-Id: If0d141b67515546f1605f24c2f4a50a05d5f2ba4
---
M resources/src/mediawiki/mediawiki.notification.js
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/331989/1

diff --git a/resources/src/mediawiki/mediawiki.notification.js 
b/resources/src/mediawiki/mediawiki.notification.js
index e1287db..e6a1c3f 100644
--- a/resources/src/mediawiki/mediawiki.notification.js
+++ b/resources/src/mediawiki/mediawiki.notification.js
@@ -350,7 +350,7 @@
                notify: function ( message, options ) {
                        var notif;
                        options = $.extend( {}, notification.defaults, options 
);
-
+                       this.autoHideSeconds = options.autoHideSeconds;
                        notif = new Notification( message, options );
 
                        if ( isPageReady ) {
@@ -370,6 +370,9 @@
                 *   A boolean indicating whether the notifification should 
automatically
                 *   be hidden after shown. Or if it should persist.
                 *
+                * - autoHideSeconds:
+                *   Number of seconds to wait before auto-hiding notifications.
+                *
                 * - tag:
                 *   An optional string. When a notification is tagged only one 
message
                 *   with that tag will be displayed. Trying to display a new 
notification
@@ -387,6 +390,7 @@
                 */
                defaults: {
                        autoHide: true,
+                       autoHideSeconds: 5,
                        tag: false,
                        title: undefined,
                        type: false

-- 
To view, visit https://gerrit.wikimedia.org/r/331989
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0d141b67515546f1605f24c2f4a50a05d5f2ba4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Filip <r...@protonmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to