aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
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
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')
-rw-r--r--phpBB/assets/javascript/core.js17
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html6
-rw-r--r--phpBB/styles/prosilver/theme/common.css6
-rw-r--r--phpBB/styles/prosilver/theme/images/alert_close.pngbin0 -> 669 bytes
4 files changed, 28 insertions, 1 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() {
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 362f8bc1cc..b7697afbb4 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -30,8 +30,12 @@
<div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
</div>
- <div id="jalert_alert" class="jalert"><h3></h3><p></p></div>
+ <div id="jalert_alert" class="jalert">
+ <a href="#"><img src="{T_THEME_PATH}/images/alert_close.png" class="alert_close" /></a>
+ <h3></h3><p></p>
+ </div>
<div id="jalert_confirm" class="jalert">
+ <a href="#"><img src="{T_THEME_PATH}/images/alert_close.png" class="alert_close" /></a>
<p></p>
<input type="button" class="jalertbut button1" value="Yes" />&nbsp;
<input type="button" class="jalertbut button2" value="No" />
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index a3d2c5660e..0190ec7e85 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -603,6 +603,12 @@ li.pagination {
padding: 0 25px 20px 25px;
}
+.jalert img.alert_close {
+ float: right;
+ margin-top: -7px;
+ margin-right: -30px;
+}
+
.jalert p {
margin: 8px 0;
padding-bottom: 8px;
diff --git a/phpBB/styles/prosilver/theme/images/alert_close.png b/phpBB/styles/prosilver/theme/images/alert_close.png
new file mode 100644
index 0000000000..123ac4ac90
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/alert_close.png
Binary files differ