Robert Vogel has submitted this change and it was merged.
Change subject: Bugfix: Popup position and links
......................................................................
Bugfix: Popup position and links
The notification popup position was wrong and one could not click the
links in the popup.
Change-Id: I577f1ddfab4e3093dda9b6bbe1e3ed07942cbe45
---
M resources/mediawiki.teahouse.css
M resources/mediawiki.teahouse.dialog.js
M resources/mediawiki.teahouse.notifications.js
3 files changed, 17 insertions(+), 1 deletion(-)
Approvals:
Robert Vogel: Verified; Looks good to me, approved
diff --git a/resources/mediawiki.teahouse.css b/resources/mediawiki.teahouse.css
index 15ac186..991f1ef 100644
--- a/resources/mediawiki.teahouse.css
+++ b/resources/mediawiki.teahouse.css
@@ -28,6 +28,10 @@
margin: 0;
}
+#p-teahouse-notif {
+ position: relative;
+}
+
#p-personal .th-notif-popup-content .th-notif-popup-list li {
float: none;
font-size: 100%;
diff --git a/resources/mediawiki.teahouse.dialog.js
b/resources/mediawiki.teahouse.dialog.js
index 6f4934a..bebe82f 100644
--- a/resources/mediawiki.teahouse.dialog.js
+++ b/resources/mediawiki.teahouse.dialog.js
@@ -78,6 +78,12 @@
//Register event handler for click on ...
$(d).on( 'click', '#p-teahouse',
mw.teahouse.dialog.openQuestionDialog ); //... menu link
$(d).on( 'click', '.th-ask',
mw.teahouse.dialog.openQuestionDialog ); //... custom element
+
+ //This is an experimental feature: We preload the dependency
when the
+ //user is about to click the link
+ $(d).on( 'mouseover', '#p-teahouse, .th-ask', function() {
+ mw.loader.load( 'oojs-ui' );
+ });
}
mw.teahouse.dialog = {
diff --git a/resources/mediawiki.teahouse.notifications.js
b/resources/mediawiki.teahouse.notifications.js
index 75c30c3..5cfe976 100644
--- a/resources/mediawiki.teahouse.notifications.js
+++ b/resources/mediawiki.teahouse.notifications.js
@@ -147,7 +147,13 @@
_checkForNotifications();
- $(d).on( 'click', '#p-teahouse-notif', _toggleNotifPopup );
+ $(d).on( 'click', '.th-notifications-badge', _toggleNotifPopup
);
+
+ //This is an experimental feature: We preload the dependency
when the
+ //user is about to click the link
+ $(d).on( 'mouseover', '.th-notifications-badge', function() {
+ mw.loader.load( 'oojs-ui' );
+ });
}
mw.teahouse.notifications = {
--
To view, visit https://gerrit.wikimedia.org/r/169669
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I577f1ddfab4e3093dda9b6bbe1e3ed07942cbe45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Teahouse
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits