mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10954] Use function for closing alert popup
PHPBB3-10954
This commit is contained in:
parent
f4ff335369
commit
46cc204523
1 changed files with 11 additions and 8 deletions
|
@ -2,6 +2,15 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close popup alert after a small delay
|
||||||
|
*/
|
||||||
|
phpbb.closeDarkenWrapper = function() {
|
||||||
|
setTimeout(function() {
|
||||||
|
$('#darkenwrapper').trigger('click');
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
// This callback will mark all forum icons read
|
// This callback will mark all forum icons read
|
||||||
phpbb.add_ajax_callback('mark_forums_read', function(res) {
|
phpbb.add_ajax_callback('mark_forums_read', function(res) {
|
||||||
var readTitle = res.NO_UNREAD_POSTS;
|
var readTitle = res.NO_UNREAD_POSTS;
|
||||||
|
@ -28,10 +37,7 @@ phpbb.add_ajax_callback('mark_forums_read', function(res) {
|
||||||
$(this).attr('href', res.U_MARK_FORUMS);
|
$(this).attr('href', res.U_MARK_FORUMS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Hide alert after 3 seconds
|
phpbb.closeDarkenWrapper();
|
||||||
setTimeout(function () {
|
|
||||||
$('#darkenwrapper').trigger('click');
|
|
||||||
}, 3000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// This callback will mark all topic icons read
|
// This callback will mark all topic icons read
|
||||||
|
@ -85,10 +91,7 @@ phpbb.add_ajax_callback('mark_topics_read', function(res) {
|
||||||
$(this).attr('href', res.U_MARK_TOPICS);
|
$(this).attr('href', res.U_MARK_TOPICS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Hide alert after 3 seconds
|
phpbb.closeDarkenWrapper();
|
||||||
setTimeout(function () {
|
|
||||||
$('#darkenwrapper').trigger('click');
|
|
||||||
}, 3000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// This callback finds the post from the delete link, and removes it.
|
// This callback finds the post from the delete link, and removes it.
|
||||||
|
|
Loading…
Add table
Reference in a new issue