mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/10270] Renamed the CSS class "jalert" to "phpbb_alert".
PHPBB3-10270
This commit is contained in:
parent
db7c4f938e
commit
ba817086f8
3 changed files with 19 additions and 14 deletions
|
@ -45,7 +45,7 @@ phpbb.loading_alert = function() {
|
|||
* @returns object Returns the div created.
|
||||
*/
|
||||
phpbb.alert = function(title, msg, fadedark) {
|
||||
var div = $('#jalert_alert');
|
||||
var div = $('#phpbb_alert');
|
||||
div.find('h3').html(title);
|
||||
div.find('p').html(msg);
|
||||
|
||||
|
@ -107,15 +107,20 @@ phpbb.alert = function(title, msg, fadedark) {
|
|||
* @returns object Returns the div created.
|
||||
*/
|
||||
phpbb.confirm = function(msg, callback, fadedark) {
|
||||
var div = $('#jalert_confirm');
|
||||
var div = $('#phpbb_confirm');
|
||||
div.find('p').html(msg);
|
||||
|
||||
div.find('.jalertbut').bind('click', function() {
|
||||
var res = this.value === 'Yes';
|
||||
|
||||
div.bind('click', function(e) {
|
||||
e.stopPropagation();
|
||||
return true;
|
||||
});
|
||||
div.find('input[type="button"]').one('click', function() {
|
||||
var res = this.className === 'button1';
|
||||
var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark;
|
||||
fade.fadeOut(100, function() {
|
||||
div.hide();
|
||||
});
|
||||
div.find('input[type="button"]').unbind('click');
|
||||
callback(res);
|
||||
return false;
|
||||
});
|
||||
|
@ -131,10 +136,10 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
|||
|
||||
$(document).bind('keydown', function(e) {
|
||||
if (e.keyCode === 13) {
|
||||
$('.jalertbut.button1').trigger('click');
|
||||
$('input[type="button"].button1').trigger('click');
|
||||
return false;
|
||||
} else if (e.keyCode === 27) {
|
||||
$('.jalertbut.button2').trigger('click');
|
||||
$('input[type="button"].button2').trigger('click');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -30,15 +30,15 @@
|
|||
<div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
|
||||
</div>
|
||||
|
||||
<div id="jalert_alert" class="jalert">
|
||||
<div id="phpbb_alert" class="phpbb_alert">
|
||||
<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="phpbb_confirm" class="phpbb_alert">
|
||||
<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" />
|
||||
<input type="button" class="jalertbut button2" value="No" />
|
||||
<input type="button" class="button1" value="{L_YES}" />
|
||||
<input type="button" class="button2" value="{L_NO}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -590,7 +590,7 @@ li.pagination {
|
|||
|
||||
/* jQuery popups
|
||||
---------------------------------------- */
|
||||
.jalert {
|
||||
.phpbb_alert {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #999999;
|
||||
position: fixed;
|
||||
|
@ -603,13 +603,13 @@ li.pagination {
|
|||
padding: 0 25px 20px 25px;
|
||||
}
|
||||
|
||||
.jalert img.alert_close {
|
||||
.phpbb_alert img.alert_close {
|
||||
float: right;
|
||||
margin-top: -7px;
|
||||
margin-right: -30px;
|
||||
}
|
||||
|
||||
.jalert p {
|
||||
.phpbb_alert p {
|
||||
margin: 8px 0;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue