From ab8400a616c462bcdb963ce2edc35709b19eea7d Mon Sep 17 00:00:00 2001 From: Sumanai Date: Sat, 12 Jul 2014 22:03:58 +0400 Subject: [ticket/12843] Fix Mark forums read browser console error When you click on "Mark forums read" in the browser console error occurs ReferenceError: assignment to undeclared variable phpbbAlertTimer ajax.js (line13) PHPBB3-12843 --- phpBB/assets/javascript/core.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'phpBB/assets/javascript') diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 296c5b0ef9..d08e6c223e 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -47,6 +47,18 @@ phpbb.clearLoadingTimeout = function() { } }; + +/** +* Close popup alert after a specified delay +* +* @param int Delay in ms until darkenwrapper's click event is triggered +*/ +phpbb.closeDarkenWrapper = function(delay) { + phpbbAlertTimer = setTimeout(function() { + $('#darkenwrapper').trigger('click'); + }, delay); +}; + /** * Display a simple alert similar to JSs native alert(). * -- cgit v1.2.1