diff options
author | Callum Macrae <callum@macr.ae> | 2015-05-29 12:51:28 +0200 |
---|---|---|
committer | Callum Macrae <callum@macr.ae> | 2015-05-29 12:51:28 +0200 |
commit | 143578ad09e45e1d8a8abea0c718bf04043bed70 (patch) | |
tree | 63a2083ca88b5d566f942f95a29769c1606931be /phpBB/styles | |
parent | 2a83290e7c3f143790e6703dbe26ba914852e3e7 (diff) | |
download | forums-143578ad09e45e1d8a8abea0c718bf04043bed70.tar forums-143578ad09e45e1d8a8abea0c718bf04043bed70.tar.gz forums-143578ad09e45e1d8a8abea0c718bf04043bed70.tar.bz2 forums-143578ad09e45e1d8a8abea0c718bf04043bed70.tar.xz forums-143578ad09e45e1d8a8abea0c718bf04043bed70.zip |
[ticket/13887] Minor JS refactoring
PHPBB3-13887
Diffstat (limited to 'phpBB/styles')
-rw-r--r-- | phpBB/styles/prosilver/template/ajax.js | 10 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/posting_body.html | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 85eb841c80..1d95fa42fa 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -138,9 +138,9 @@ phpbb.markNotifications = function($popup, unreadCount) { } // Update page title - $('title').text( - (unreadCount ? '(' + unreadCount + ')' : '') + $('title').text().replace(/(\(([0-9])\))/, '') - ); + var $title = $('title'); + var originalTitle = $title.text().replace(/(\((\d+)\))/, ''); + $title.text((unreadCount ? '(' + unreadCount + ')' : '') + originalTitle); }; // This callback finds the post from the delete link, and removes it. @@ -205,7 +205,7 @@ phpbb.addAjaxCallback('vote_poll', function(res) { // Set min-height to prevent the page from jumping when the content changes var updatePanelHeight = function (height) { - var height = (typeof height === 'undefined') ? panel.find('.inner').outerHeight() : height; + height = (typeof height === 'undefined') ? panel.find('.inner').outerHeight() : height; panel.css('min-height', height); }; updatePanelHeight(); @@ -378,7 +378,7 @@ $('#member_search').click(function () { */ $(function() { phpbb.resizeTextArea($('textarea:not(#message-box textarea, .no-auto-resize)'), {minHeight: 75, maxHeight: 250}); - phpbb.resizeTextArea($('#message-box textarea')); + phpbb.resizeTextArea($('textarea', '#message-box')); }); diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html index 815d8c4a99..cde6873a90 100644 --- a/phpBB/styles/subsilver2/template/posting_body.html +++ b/phpBB/styles/subsilver2/template/posting_body.html @@ -221,7 +221,7 @@ <!-- IF S_INLINE_ATTACHMENT_OPTIONS --> <tr> <td class="row1"><b class="genmed">{L_ATTACHMENTS}{L_COLON}</b></td> - <td class="row2"><select name="attachments">{S_INLINE_ATTACHMENT_OPTIONS}</select> <input type="button" class="btnbbcode" accesskey="a" value="{L_PLACE_INLINE}" name="attachinline" onclick="attach_form = document.forms[form_name].elements['attachments']; attach_inline(attach_form.value, attach_form.options[attach_form.selectedIndex].text);" onmouseover="helpline('a')" onmouseout="helpline('tip')" /> + <td class="row2"><select name="attachments">{S_INLINE_ATTACHMENT_OPTIONS}</select> <input type="button" class="btnbbcode" accesskey="a" value="{L_PLACE_INLINE}" name="attachinline" onclick="attach_form = document.forms[form_name].elements['attachments']; attachInline(attach_form.value, attach_form.options[attach_form.selectedIndex].text);" onmouseover="helpline('a')" onmouseout="helpline('tip')" /> </td> </tr> <!-- ENDIF --> |