aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-05-30 12:40:46 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-05-30 12:40:46 +0200
commitd6cd90d3258387493da813a1251252c57344c405 (patch)
treeb76253c1ff8abbaad011cf9113db3bfe94fdf725 /phpBB/styles
parentdf4b391baadd3b9194062a4907ef4b55b265ffab (diff)
parentda6f751cefedd0573611cf3e9123b4345759d779 (diff)
downloadforums-d6cd90d3258387493da813a1251252c57344c405.tar
forums-d6cd90d3258387493da813a1251252c57344c405.tar.gz
forums-d6cd90d3258387493da813a1251252c57344c405.tar.bz2
forums-d6cd90d3258387493da813a1251252c57344c405.tar.xz
forums-d6cd90d3258387493da813a1251252c57344c405.zip
Merge pull request #3658 from callumacrae/js-refactoring-again
JS Refactoring
Diffstat (limited to 'phpBB/styles')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js14
-rw-r--r--phpBB/styles/subsilver2/template/posting_body.html2
2 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 168efff4b4..1d95fa42fa 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -42,8 +42,8 @@ phpbb.addAjaxCallback('mark_forums_read', function(res) {
/**
* This callback will mark all topic icons read
*
-* @param update_topic_links bool Whether "Mark topics read" links should be
-* updated. Defaults to true.
+* @param {bool} [update_topic_links=true] Whether "Mark topics read" links
+* should be updated. Defaults to true.
*/
phpbb.addAjaxCallback('mark_topics_read', function(res, updateTopicLinks) {
var readTitle = res.NO_UNREAD_POSTS;
@@ -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>&nbsp;<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>&nbsp;<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 -->