diff options
| author | Callum Macrae <callum@macr.ae> | 2015-05-30 14:44:48 +0200 |
|---|---|---|
| committer | Callum Macrae <callum@macr.ae> | 2015-05-30 14:44:48 +0200 |
| commit | e3090e04c3fc2505155118abfd7e354bd858056b (patch) | |
| tree | 6a3fb3db15daea1458f2fb0e686c87af1efcf950 /phpBB/styles | |
| parent | 049f584111b5d7ce307d57d36b3be8a34d06194b (diff) | |
| download | forums-e3090e04c3fc2505155118abfd7e354bd858056b.tar forums-e3090e04c3fc2505155118abfd7e354bd858056b.tar.gz forums-e3090e04c3fc2505155118abfd7e354bd858056b.tar.bz2 forums-e3090e04c3fc2505155118abfd7e354bd858056b.tar.xz forums-e3090e04c3fc2505155118abfd7e354bd858056b.zip | |
[ticket/13898] js coding standaaards
PHPBB3-13898
Diffstat (limited to 'phpBB/styles')
| -rw-r--r-- | phpBB/styles/prosilver/template/ajax.js | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 1d95fa42fa..76c605dd19 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -9,9 +9,9 @@ phpbb.addAjaxCallback('mark_forums_read', function(res) { var readTitle = res.NO_UNREAD_POSTS; var unreadTitle = res.UNREAD_POSTS; var iconsArray = { - 'forum_unread': 'forum_read', - 'forum_unread_subforum': 'forum_read_subforum', - 'forum_unread_locked': 'forum_read_locked' + forum_unread: 'forum_read', + forum_unread_subforum: 'forum_read_subforum', + forum_unread_locked: 'forum_read_locked' }; $('li.row').find('dl[class*="forum_unread"]').each(function() { @@ -39,7 +39,7 @@ phpbb.addAjaxCallback('mark_forums_read', function(res) { phpbb.closeDarkenWrapper(3000); }); -/** +/** * This callback will mark all topic icons read * * @param {bool} [update_topic_links=true] Whether "Mark topics read" links @@ -49,10 +49,10 @@ phpbb.addAjaxCallback('mark_topics_read', function(res, updateTopicLinks) { var readTitle = res.NO_UNREAD_POSTS; var unreadTitle = res.UNREAD_POSTS; var iconsArray = { - 'global_unread': 'global_read', - 'announce_unread': 'announce_read', - 'sticky_unread': 'sticky_read', - 'topic_unread': 'topic_read' + global_unread: 'global_read', + announce_unread: 'announce_read', + sticky_unread: 'sticky_read', + topic_unread: 'topic_read' }; var iconsState = ['', '_hot', '_hot_mine', '_locked', '_locked_mine', '_mine']; var unreadClassSelectors; @@ -223,7 +223,7 @@ phpbb.addAjaxCallback('vote_poll', function(res) { // If the user can still vote, simply slide down the results poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show(500); } - + // Get the votes count of the highest poll option poll.find('[data-poll-option-id]').each(function() { var option = $(this); @@ -252,7 +252,7 @@ phpbb.addAjaxCallback('vote_poll', function(res) { var newBarClass = (percent === 100) ? 'pollbar5' : 'pollbar' + (Math.floor(percent / 20) + 1); setTimeout(function () { - bar.animate({width: percentRel + '%'}, 500) + bar.animate({ width: percentRel + '%' }, 500) .removeClass('pollbar1 pollbar2 pollbar3 pollbar4 pollbar5') .addClass(newBarClass) .html(res.vote_counts[optionId]); @@ -287,10 +287,10 @@ phpbb.addAjaxCallback('vote_poll', function(res) { var panelHeight = panel.height(); var innerHeight = panel.find('.inner').outerHeight(); - if (panelHeight != innerHeight) { - panel.css({'min-height': '', 'height': panelHeight}) - .animate({height: innerHeight}, time, function () { - panel.css({'min-height': innerHeight, 'height': ''}); + if (panelHeight !== innerHeight) { + panel.css({ minHeight: '', height: panelHeight }) + .animate({ height: innerHeight }, time, function () { + panel.css({ minHeight: innerHeight, height: '' }); }); } }; @@ -377,7 +377,8 @@ $('#member_search').click(function () { * Automatically resize textarea */ $(function() { - phpbb.resizeTextArea($('textarea:not(#message-box textarea, .no-auto-resize)'), {minHeight: 75, maxHeight: 250}); + var $textarea = $('textarea:not(#message-box textarea, .no-auto-resize)'); + phpbb.resizeTextArea($textarea, { minHeight: 75, maxHeight: 250 }); phpbb.resizeTextArea($('textarea', '#message-box')); }); |
