aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver
diff options
context:
space:
mode:
authorCallum Macrae <callum@lynxphp.com>2012-06-21 19:16:05 +0100
committerCallum Macrae <callum@lynxphp.com>2012-06-21 19:16:05 +0100
commitd5a788ae5b615c1b6b642c631884a4d936be2a4c (patch)
treed9cb6cf33d30e90103050983b652882e5e1fd651 /phpBB/styles/prosilver
parente045a80d8d9257ef29557aef34383b7152698be9 (diff)
downloadforums-d5a788ae5b615c1b6b642c631884a4d936be2a4c.tar
forums-d5a788ae5b615c1b6b642c631884a4d936be2a4c.tar.gz
forums-d5a788ae5b615c1b6b642c631884a4d936be2a4c.tar.bz2
forums-d5a788ae5b615c1b6b642c631884a4d936be2a4c.tar.xz
forums-d5a788ae5b615c1b6b642c631884a4d936be2a4c.zip
[ticket/10949] Converted AJAX coding standards to new guidelines.
Basically, moved parentheses to same line and changed variable names to camel case. PHPBB3-10949
Diffstat (limited to 'phpBB/styles/prosilver')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 54f34e4204..83335b23af 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -5,14 +5,12 @@
// This callback finds the post from the delete link, and removes it.
phpbb.add_ajax_callback('post_delete', function() {
var el = $(this),
- post_id;
-
- if (el.attr('data-refresh') === undefined)
- {
- post_id = el[0].href.split('&p=')[1];
- var post = el.parents('#p' + post_id).css('pointer-events', 'none');
- if (post.hasClass('bg1') || post.hasClass('bg2'))
- {
+ postId;
+
+ if (el.attr('data-refresh') === undefined) {
+ postId = el[0].href.split('&p=')[1];
+ var post = el.parents('#p' + postId).css('pointer-events', 'none');
+ if (post.hasClass('bg1') || post.hasClass('bg2')) {
var posts1 = post.nextAll('.bg1');
post.nextAll('.bg2').removeClass('bg2').addClass('bg1');
posts1.removeClass('bg1').addClass('bg2');
@@ -54,8 +52,7 @@ $('[data-ajax]').each(function() {
ajax = $this.attr('data-ajax'),
fn;
- if (ajax !== 'false')
- {
+ if (ajax !== 'false') {
fn = (ajax !== 'true') ? ajax : null;
phpbb.ajaxify({
selector: this,
@@ -89,12 +86,9 @@ phpbb.ajaxify({
filter: function (data) {
var action = $('#quick-mod-select').val();
- if (action === 'make_normal')
- {
+ if (action === 'make_normal') {
return $(this).find('select option[value="make_global"]').length > 0;
- }
- else if (action === 'lock' || action === 'unlock')
- {
+ } else if (action === 'lock' || action === 'unlock') {
return true;
}