aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets
diff options
context:
space:
mode:
authorCallum Macrae <callum@lynxphp.com>2011-09-25 16:49:43 +0100
committerIgor Wiedler <igor@wiedler.ch>2012-03-31 02:09:17 +0200
commitdb7c4f938ec7440e40c2607fa18983f3a3a24146 (patch)
tree685082a9b3c3c59d9eedd222e57eea9f17db229e /phpBB/assets
parent0e55b2393dffa269a724f3090469dad563217dff (diff)
downloadforums-db7c4f938ec7440e40c2607fa18983f3a3a24146.tar
forums-db7c4f938ec7440e40c2607fa18983f3a3a24146.tar.gz
forums-db7c4f938ec7440e40c2607fa18983f3a3a24146.tar.bz2
forums-db7c4f938ec7440e40c2607fa18983f3a3a24146.tar.xz
forums-db7c4f938ec7440e40c2607fa18983f3a3a24146.zip
[ticket/10270] Added close buttons to phpbb.alert and phpbb.confirm.
PHPBB3-10270
Diffstat (limited to 'phpBB/assets')
-rw-r--r--phpBB/assets/javascript/core.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index d685d28c81..667e3fc561 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -68,6 +68,10 @@ phpbb.alert = function(title, msg, fadedark) {
}
return true;
});
+
+ div.find('.alert_close').one('click', function() {
+ dark.trigger('click');
+ });
if (loading_alert.is(':visible'))
{
@@ -115,6 +119,15 @@ phpbb.confirm = function(msg, callback, fadedark) {
callback(res);
return false;
});
+
+ dark.one('click', function(e) {
+ var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark;
+ fade.fadeOut(100, function() {
+ div.hide();
+ });
+ callback(false);
+ return false;
+ });
$(document).bind('keydown', function(e) {
if (e.keyCode === 13) {
@@ -127,6 +140,10 @@ phpbb.confirm = function(msg, callback, fadedark) {
return true;
});
+ div.find('.alert_close').one('click', function() {
+ dark.trigger('click');
+ });
+
if (loading_alert.is(':visible'))
{
loading_alert.fadeOut(100, function() {