mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10270] Added close buttons to phpbb.alert and phpbb.confirm.
PHPBB3-10270
This commit is contained in:
parent
0e55b2393d
commit
db7c4f938e
4 changed files with 28 additions and 1 deletions
|
@ -69,6 +69,10 @@ phpbb.alert = function(title, msg, fadedark) {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
div.find('.alert_close').one('click', function() {
|
||||||
|
dark.trigger('click');
|
||||||
|
});
|
||||||
|
|
||||||
if (loading_alert.is(':visible'))
|
if (loading_alert.is(':visible'))
|
||||||
{
|
{
|
||||||
loading_alert.fadeOut(100, function() {
|
loading_alert.fadeOut(100, function() {
|
||||||
|
@ -116,6 +120,15 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
||||||
return false;
|
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) {
|
$(document).bind('keydown', function(e) {
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
$('.jalertbut.button1').trigger('click');
|
$('.jalertbut.button1').trigger('click');
|
||||||
|
@ -127,6 +140,10 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
div.find('.alert_close').one('click', function() {
|
||||||
|
dark.trigger('click');
|
||||||
|
});
|
||||||
|
|
||||||
if (loading_alert.is(':visible'))
|
if (loading_alert.is(':visible'))
|
||||||
{
|
{
|
||||||
loading_alert.fadeOut(100, function() {
|
loading_alert.fadeOut(100, function() {
|
||||||
|
|
|
@ -30,8 +30,12 @@
|
||||||
<div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
|
<div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
|
||||||
</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">
|
<div id="jalert_confirm" class="jalert">
|
||||||
|
<a href="#"><img src="{T_THEME_PATH}/images/alert_close.png" class="alert_close" /></a>
|
||||||
<p></p>
|
<p></p>
|
||||||
<input type="button" class="jalertbut button1" value="Yes" />
|
<input type="button" class="jalertbut button1" value="Yes" />
|
||||||
<input type="button" class="jalertbut button2" value="No" />
|
<input type="button" class="jalertbut button2" value="No" />
|
||||||
|
|
|
@ -603,6 +603,12 @@ li.pagination {
|
||||||
padding: 0 25px 20px 25px;
|
padding: 0 25px 20px 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jalert img.alert_close {
|
||||||
|
float: right;
|
||||||
|
margin-top: -7px;
|
||||||
|
margin-right: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
.jalert p {
|
.jalert p {
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
|
|
BIN
phpBB/styles/prosilver/theme/images/alert_close.png
Normal file
BIN
phpBB/styles/prosilver/theme/images/alert_close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 669 B |
Loading…
Add table
Reference in a new issue