1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-05 22:14:59 +02:00

[ticket/10271] Removed excess whitespace from core.js.

PHPBB3-10271
This commit is contained in:
Callum Macrae 2011-09-27 19:32:06 +01:00 committed by Igor Wiedler
parent ba817086f8
commit 7d2422f928

View File

@ -60,7 +60,7 @@ phpbb.alert = function(title, msg, fadedark) {
}); });
return false; return false;
}); });
$(document).bind('keydown', function(e) { $(document).bind('keydown', function(e) {
if (e.keyCode === 13 || e.keyCode === 27) { if (e.keyCode === 13 || e.keyCode === 27) {
dark.trigger('click'); dark.trigger('click');
@ -68,7 +68,7 @@ phpbb.alert = function(title, msg, fadedark) {
} }
return true; return true;
}); });
div.find('.alert_close').one('click', function() { div.find('.alert_close').one('click', function() {
dark.trigger('click'); dark.trigger('click');
}); });
@ -91,7 +91,7 @@ phpbb.alert = function(title, msg, fadedark) {
div.show(); div.show();
dark.fadeIn(100); dark.fadeIn(100);
} }
return div; return div;
} }
@ -133,7 +133,7 @@ phpbb.confirm = function(msg, callback, fadedark) {
callback(false); callback(false);
return false; return false;
}); });
$(document).bind('keydown', function(e) { $(document).bind('keydown', function(e) {
if (e.keyCode === 13) { if (e.keyCode === 13) {
$('input[type="button"].button1').trigger('click'); $('input[type="button"].button1').trigger('click');
@ -144,11 +144,11 @@ phpbb.confirm = function(msg, callback, fadedark) {
} }
return true; return true;
}); });
div.find('.alert_close').one('click', function() { div.find('.alert_close').one('click', function() {
dark.trigger('click'); dark.trigger('click');
}); });
if (loading_alert.is(':visible')) if (loading_alert.is(':visible'))
{ {
loading_alert.fadeOut(100, function() { loading_alert.fadeOut(100, function() {
@ -167,7 +167,7 @@ phpbb.confirm = function(msg, callback, fadedark) {
div.show(); div.show();
dark.fadeIn(100); dark.fadeIn(100);
} }
return div; return div;
} }
@ -179,7 +179,7 @@ phpbb.confirm = function(msg, callback, fadedark) {
*/ */
phpbb.parse_querystring = function(string) { phpbb.parse_querystring = function(string) {
var end = {}, i; var end = {}, i;
string = string.split('&'); string = string.split('&');
for (i = 0; i < string.length; i++) for (i = 0; i < string.length; i++)
{ {
@ -204,15 +204,15 @@ phpbb.ajaxify = function(options, refresh, callback) {
{ {
selector = selector.find('input:submit'); selector = selector.find('input:submit');
} }
selector.click(function() { selector.click(function() {
var act, data, path, that = this; var act, data, path, that = this;
if ($(this).data('ajax') == false) if ($(this).data('ajax') == false)
{ {
return true; return true;
} }
function return_handler(res) function return_handler(res)
{ {
if (typeof res.S_CONFIRM_ACTION === 'undefined') if (typeof res.S_CONFIRM_ACTION === 'undefined')
@ -226,7 +226,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
{ {
dark.fadeOut(100); dark.fadeOut(100);
} }
if (typeof phpbb.ajax_callbacks[callback] === 'function') if (typeof phpbb.ajax_callbacks[callback] === 'function')
{ {
phpbb.ajax_callbacks[callback](that, res, (is_form) ? act : null); phpbb.ajax_callbacks[callback](that, res, (is_form) ? act : null);
@ -242,13 +242,13 @@ phpbb.ajaxify = function(options, refresh, callback) {
{ {
refresh = false; refresh = false;
} }
setTimeout(function() { setTimeout(function() {
if (refresh) if (refresh)
{ {
window.location = res.REFRESH_DATA.url; window.location = res.REFRESH_DATA.url;
} }
dark.fadeOut(100, function() { dark.fadeOut(100, function() {
alert.hide(); alert.hide();
}); });
@ -268,14 +268,14 @@ phpbb.ajaxify = function(options, refresh, callback) {
}, false); }, false);
} }
} }
var run_exception = (typeof options.exception === 'function'); var run_exception = (typeof options.exception === 'function');
if (is_form) if (is_form)
{ {
act = /action\[([a-z]+)\]/.exec(this.name); act = /action\[([a-z]+)\]/.exec(this.name);
data = decodeURI($(this).closest('form').serialize()); data = decodeURI($(this).closest('form').serialize());
path = $(this).closest('form').attr('action').replace('&amp;', '&'); path = $(this).closest('form').attr('action').replace('&amp;', '&');
if (act) if (act)
{ {
act = act[1] act = act[1]
@ -302,7 +302,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
phpbb.loading_alert(); phpbb.loading_alert();
$.get(this.href, return_handler); $.get(this.href, return_handler);
} }
return false; return false;
}); });
return this; return this;
@ -326,4 +326,4 @@ phpbb.add_ajax_callback('alt_text', function(el) {
}); });
})(jQuery); // Avoid conflicts with other libraries })(jQuery); // Avoid conflicts with other libraries