mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/11103] Hide notifications flyout on a click outside of the list.
PHPBB3-11103
This commit is contained in:
parent
a080af4b05
commit
3557b39115
2 changed files with 21 additions and 0 deletions
|
@ -80,6 +80,13 @@ $('#qr_full_editor').click(function() {
|
||||||
$('#notification_list_button').click(function() {
|
$('#notification_list_button').click(function() {
|
||||||
$('#notification_list').toggle();
|
$('#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
|
* This AJAXifies the quick-mod tools. The reason it cannot be a standard
|
||||||
|
|
|
@ -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 -->
|
<!-- 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}
|
{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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Reference in a new issue