aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-10-16 17:31:48 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-10-16 17:31:48 -0500
commit3557b391154286d1cb18a6e6f88925758247860d (patch)
treebd61a07f21a62589da023f25a4e17d9b90e83ab5 /phpBB/styles
parenta080af4b05603dadf12adc171508db9c16dd73a4 (diff)
downloadforums-3557b391154286d1cb18a6e6f88925758247860d.tar
forums-3557b391154286d1cb18a6e6f88925758247860d.tar.gz
forums-3557b391154286d1cb18a6e6f88925758247860d.tar.bz2
forums-3557b391154286d1cb18a6e6f88925758247860d.tar.xz
forums-3557b391154286d1cb18a6e6f88925758247860d.zip
[ticket/11103] Hide notifications flyout on a click outside of the list.
PHPBB3-11103
Diffstat (limited to 'phpBB/styles')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js7
-rw-r--r--phpBB/styles/subsilver2/template/overall_footer.html14
2 files changed, 21 insertions, 0 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 0fd56f0e28..f4519bf7aa 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -80,6 +80,13 @@ $('#qr_full_editor').click(function() {
$('#notification_list_button').click(function() {
$('#notification_list').toggle();
});
+$('#phpbb').click(function(e) {
+ var target = e.target;
+
+ if (!$(target).is('#notification_list') && !$(target).is('#notification_list_button') && !$(target).parents().is('#notification_list')) {
+ $('#notification_list').hide();
+ }
+});
/**
* This AJAXifies the quick-mod tools. The reason it cannot be a standard
diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html
index 24c6f8105c..210159732e 100644
--- a/phpBB/styles/subsilver2/template/overall_footer.html
+++ b/phpBB/styles/subsilver2/template/overall_footer.html
@@ -12,5 +12,19 @@
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
{SCRIPTS}
+<script type="text/javascript">
+// <![CDATA[
+<!-- IF S_NOTIFICATIONS_DISPLAY -->
+$(document).click(function(e) {
+ var target = e.target;
+
+ if (!$(target).is('#notification_list') && !$(target).is('#notification_list_button') && !$(target).parents().is('#notification_list')) {
+ $('#notification_list').hide();
+ }
+});
+<!-- ENDIF -->
+// ]]>
+</script>
+
</body>
</html>