diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index cdba6f9d26..ab0891e70c 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -510,11 +510,11 @@ $('#notification_list_button').click(function(e) {
e.preventDefault();
});
$('#phpbb').click(function(e) {
- var target = $(e.target);
+ var target = $(e.target);
- if (!target.is('#notification_list') && !target.is('#notification_list_button') && !target.parents().is('#notification_list')) {
- $('#notification_list').hide();
- }
+ if (!target.is('#notification_list, #notification_list_button') && !target.parents().is('#notification_list, #notification_list_button')) {
+ $('#notification_list').hide();
+ }
});
phpbb.ajaxCallbacks = {};
@@ -624,8 +624,7 @@ phpbb.resizeTextArea = function(items, options) {
function resetAutoResize(item)
{
var $item = $(item);
- if ($item.hasClass('auto-resized'))
- {
+ if ($item.hasClass('auto-resized')) {
$(item).css({height: '', resize: ''}).removeClass('auto-resized');
configuration.resetCallback.call(item, $item);
}
@@ -635,14 +634,14 @@ phpbb.resizeTextArea = function(items, options) {
{
function setHeight(height)
{
+ height += parseInt($item.css('height')) - $item.height();
$item.css({height: height + 'px', resize: 'none'}).addClass('auto-resized');
configuration.resizeCallback.call(item, $item);
}
var windowHeight = $(window).height();
- if (windowHeight < configuration.minWindowHeight)
- {
+ if (windowHeight < configuration.minWindowHeight) {
resetAutoResize(item);
return;
}
@@ -652,12 +651,14 @@ phpbb.resizeTextArea = function(items, options) {
height = parseInt($item.height()),
scrollHeight = (item.scrollHeight) ? item.scrollHeight : 0;
- if (height > maxHeight)
- {
+ if (height < 0) {
+ return;
+ }
+
+ if (height > maxHeight) {
setHeight(maxHeight);
}
- else if (scrollHeight > (height + 5))
- {
+ else if (scrollHeight > (height + 5)) {
setHeight(Math.min(maxHeight, scrollHeight));
}
}
@@ -670,8 +671,7 @@ phpbb.resizeTextArea = function(items, options) {
$(window).resize(function() {
items.each(function() {
- if ($(this).hasClass('auto-resized'))
- {
+ if ($(this).hasClass('auto-resized')) {
autoResize(this);
}
});
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 8ae7acaa11..3f58ce20b4 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -658,10 +658,10 @@ class ucp_profile
));
}
}
- }
- // Replace "error" strings with their real, localised form
- $error = $phpbb_avatar_manager->localize_errors($user, $error);
+ // Replace "error" strings with their real, localised form
+ $error = $phpbb_avatar_manager->localize_errors($user, $error);
+ }
$avatar = phpbb_get_user_avatar($user->data, 'USER_AVATAR', true);
diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js
index 4c70ee345f..66a3cb51ac 100644
--- a/phpBB/styles/prosilver/template/editor.js
+++ b/phpBB/styles/prosilver/template/editor.js
@@ -311,7 +311,7 @@ function colorPalette(dir, width, height) {
numberList[3] = 'BF';
numberList[4] = 'FF';
- html += '
';
+ html += '';
for (r = 0; r < 5; r++) {
if (dir == 'h') {
@@ -325,7 +325,7 @@ function colorPalette(dir, width, height) {
for (b = 0; b < 5; b++) {
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
- html += '';
+ html += ' | ';
html += '';
html += ' | ';
}
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 800fadd972..a2758de9dc 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -414,6 +414,9 @@ function insert_single_user(formId, user)
*/
(function($) {
$(document).ready(function() {
+ // Swap .nojs and .hasjs
+ $('#phpbb.nojs').toggleClass('nojs hasjs');
+
// Focus forms
$('form[data-focus]:first').each(function() {
$('#' + this.getAttribute('data-focus')).focus();
@@ -435,8 +438,396 @@ function insert_single_user(formId, user)
delete test;
if (oldBrowser) {
- // Fix .linkslist.bulletin lists
+ // Fix .linklist.bulletin lists
$('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin');
+
+ // Do not run functions below for old browsers
+ return;
}
+
+ // Adjust topiclist lists with check boxes
+ $('ul.topiclist dd.mark').siblings('dt').children('.list-inner').addClass('with-mark');
+
+ // Resize navigation block to keep all links on same line
+ $('.navlinks').each(function() {
+ var $this = $(this),
+ left = $this.children().not('.rightside'),
+ right = $this.children('.rightside');
+
+ if (left.length !== 1 || !right.length) return;
+
+ function resize() {
+ var width = 0,
+ diff = left.outerWidth(true) - left.width();
+
+ right.each(function() {
+ width += $(this).outerWidth(true);
+ });
+ left.css('max-width', Math.floor($this.width() - width - diff) + 'px');
+ }
+
+ resize();
+ $(window).resize(resize);
+ });
+
+ // Responsive breadcrumbs
+ $('.breadcrumbs:not(.skip-responsive, .linklist.leftside .breadcrumbs)').each(function() {
+ var $this = $(this),
+ $body = $('body'),
+ links = $this.find('.crumb'),
+ length = links.length,
+ classes = ['wrapped-wide', 'wrapped-medium', 'wrapped-small'],
+ classesLength = classes.length,
+ maxHeight = 0,
+ lastWidth = false,
+ wrapped = false;
+
+ // Test height by setting nowrap
+ $this.css('white-space', 'nowrap');
+ maxHeight = $this.height() + 1;
+ $this.css('white-space', '');
+
+ // Set tooltips
+ $this.find('a').each(function() {
+ var $link = $(this);
+ $link.attr('title', $link.text());
+ });
+
+ // Funciton that checks breadcrumbs
+ function check() {
+ var height = $this.height(),
+ width = $body.width(),
+ link, i, j;
+
+ if (height <= maxHeight) {
+ if (!wrapped || lastWidth === false || lastWidth >= width) {
+ lastWidth = width;
+ return;
+ }
+ }
+ lastWidth = width;
+
+ if (wrapped) {
+ $this.removeClass('wrapped').find('.crumb.wrapped').removeClass('wrapped ' + classes.join(' '));
+ wrapped = false;
+ if ($this.height() <= maxHeight) {
+ return;
+ }
+ }
+
+ wrapped = true;
+ $this.addClass('wrapped');
+ if ($this.height() <= maxHeight) {
+ return;
+ }
+
+ for (i = 0; i < classesLength; i ++) {
+ for (j = length - 1; j >= 0; j --) {
+ links.eq(j).addClass('wrapped ' + classes[i]);
+ if ($this.height() <= maxHeight) {
+ return;
+ }
+ }
+ }
+ }
+
+ // Run function and set event
+ check();
+ $(window).resize(check);
+ });
+
+ // Responsive tables
+ $('table.table1').not('.not-responsive').each(function() {
+ var $this = $(this),
+ th = $this.find('thead > tr > th'),
+ columns = th.length,
+ headers = [],
+ totalHeaders = 0,
+ i, headersLength;
+
+ // Find each header
+ th.each(function() {
+ var cell = $(this),
+ colspan = parseInt(cell.attr('colspan')),
+ dfn = cell.attr('data-dfn'),
+ text = dfn ? dfn : cell.text();
+
+ colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
+
+ for (i=0; i
+ $this.addClass('responsive');
+
+ if (totalHeaders < 2) {
+ $this.addClass('show-header');
+ return;
+ }
+
+ $this.find('tbody > tr').each(function() {
+ var row = $(this),
+ cells = row.children('td'),
+ column = 0;
+
+ if (cells.length == 1) {
+ row.addClass('big-column');
+ return;
+ }
+
+ cells.each(function() {
+ var cell = $(this),
+ colspan = parseInt(cell.attr('colspan')),
+ text = cell.text().trim();
+
+ if (headersLength <= column) {
+ return;
+ }
+
+ if (text.length && text !== '-') {
+ cell.prepend('' + headers[column] + '');
+ }
+ else {
+ cell.addClass('empty');
+ }
+
+ colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
+ column += colspan;
+ });
+ });
+ });
+
+ // Responsive link lists
+ $('.linklist:not(.navlinks, .skip-responsive), .postbody ul.profile-icons:not(.skip-responsive)').each(function() {
+ var $this = $(this),
+ $body = $('body'),
+ links = $this.children().not('.skip-responsive'),
+ html = '',
+ // List of items that should be hidden last
+ filterString = '.pagination, .icon-notifications, .icon-pm, .icon-logout, .icon-login, .mark-read, .breadcrumbs, .edit-icon, .quote-icon',
+ filtered = links.filter(filterString);
+
+ if (links.is('.rightside'))
+ {
+ links.filter('.rightside:first').before(html);
+ }
+ else
+ {
+ $this.append(html);
+ }
+
+ var toggle = $this.children('.responsive-menu'),
+ toggleLink = toggle.find('a.responsive-menu-link'),
+ menu = toggle.find('ul.responsive-popup'),
+ lastWidth = false,
+ compact = false,
+ responsive = false,
+ copied = false;
+
+ function check() {
+ var width = $body.width();
+ if (responsive && width <= lastWidth) {
+ return;
+ }
+
+ // Reset responsive and compact layout
+ if (responsive) {
+ responsive = false;
+ $this.removeClass('responsive');
+ links.css('display', '');
+ toggle.css('display', 'none');
+ }
+
+ if (compact) {
+ compact = false;
+ $this.removeClass('compact');
+ }
+
+ // Find tallest element
+ var maxHeight = 0;
+ links.each(function() {
+ if (!$(this).height()) return;
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ });
+
+ if (maxHeight < 1) {
+ return;
+ }
+
+ // Nothing to resize if block's height is not bigger than tallest element's height
+ if ($this.height() <= maxHeight) {
+ toggle.removeClass('visible');
+ menu.hide();
+ return;
+ }
+
+ // Enable compact layout, find tallest element, compare to height of whole block
+ compact = true;
+ $this.addClass('compact');
+
+ var compactMaxHeight = 0;
+ links.each(function() {
+ if (!$(this).height()) return;
+ compactMaxHeight = Math.max(compactMaxHeight, $(this).outerHeight(true));
+ });
+
+ if ($this.height() <= maxHeight) {
+ toggle.removeClass('visible');
+ menu.hide();
+ return;
+ }
+
+ // Compact layout did not resize block enough, switch to responsive layout
+ compact = false;
+ $this.removeClass('compact');
+ responsive = true;
+
+ if (!copied) {
+ if (menu.parents().is('.rightside')) {
+ menu.addClass('responsive-rightside');
+ }
+ menu.append(links.clone(true));
+ menu.find('li.leftside, li.rightside').removeClass('leftside rightside');
+ menu.find('.inputbox').parents('li:first').css('white-space', 'normal');
+ copied = true;
+ }
+ else {
+ menu.children().css('display', '');
+ }
+
+ toggle.css('display', '');
+ $this.addClass('responsive');
+
+ // Try to not hide filtered items
+ if (filtered.length) {
+ links.not(filterString).css('display', 'none');
+
+ maxHeight = 0;
+ filtered.each(function() {
+ if (!$(this).height()) return;
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ });
+
+ if ($this.height() <= maxHeight) {
+ menu.children().filter(filterString).css('display', 'none');
+ return;
+ }
+ }
+
+ links.css('display', 'none');
+ }
+
+ toggleLink.click(function() {
+ if (!responsive) return;
+ if (!toggle.hasClass('visible')) {
+ // Hide other popups
+ $('.responsive-menu.visible').removeClass('visible').find('.responsive-popup').hide();
+ }
+ toggle.toggleClass('visible');
+ menu.toggle();
+ });
+
+ check();
+ $(window).resize(check);
+ });
+
+ // Responsive tabs
+ $('#tabs, #minitabs').not('.skip-responsive').each(function() {
+ var $this = $(this),
+ $body = $('body'),
+ ul = $this.children(),
+ tabs = ul.children().not('.skip-responsive'),
+ links = tabs.children('a'),
+ toggle = ul.append(' ').find('li.responsive-tab'),
+ toggleLink = toggle.find('a.responsive-tab-link'),
+ menu = toggle.find('ul.responsive-tabs'),
+ maxHeight = 0,
+ lastWidth = false,
+ responsive = false;
+
+ links.each(function() {
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ })
+
+ function check() {
+ var width = $body.width(),
+ height = $this.height();
+
+ if (arguments.length == 0 && (!responsive || width <= lastWidth) && height <= maxHeight) {
+ return;
+ }
+
+ tabs.show();
+ toggle.hide();
+
+ lastWidth = width;
+ height = $this.height();
+ if (height <= maxHeight) {
+ responsive = false;
+ return;
+ }
+
+ responsive = true;
+ toggle.show();
+ menu.hide().html('');
+
+ var availableTabs = tabs.filter(':not(.activetab, .responsive-tab)'),
+ total = availableTabs.length,
+ i, tab;
+
+ for (i = total - 1; i >= 0; i --) {
+ tab = availableTabs.eq(i);
+ menu.prepend(tab.clone(true));
+ tab.hide();
+ if ($this.height() <= maxHeight) {
+ menu.find('a').click(function() { check(true); });
+ return;
+ }
+ }
+ menu.find('a').click(function() { check(true); });
+ }
+
+ toggleLink.click(function() {
+ if (!responsive) return;
+ menu.toggle();
+ });
+
+ check(true);
+ $(window).resize(check);
+ });
+
+ // Hide responsive menu and tabs
+ $('#phpbb').click(function(e) {
+ var parents = $(e.target).parents();
+ if (!parents.is('.responsive-menu.visible')) {
+ $('.responsive-menu.visible').removeClass('visible').find('.responsive-popup').hide();
+ }
+ if (!parents.is('.responsive-tab')) {
+ $('.responsive-tabs').hide();
+ }
+ });
+
+ // Hide *CP navigation if there is only 1 item
+ $('#navigation').each(function() {
+ var items = $(this).children('ol, ul').children('li');
+ if (items.length == 1)
+ {
+ $(this).addClass('responsive-hide');
+ }
+ });
+
+ // Hide empty responsive tables
+ $('table.responsive > tbody').each(function() {
+ var items = $(this).children('tr');
+ if (items.length == 0)
+ {
+ $(this).parent('table:first').addClass('responsive-hide');
+ }
+ });
});
})(jQuery);
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index e0a9279738..2e21c5a341 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -1,7 +1,7 @@
-{LAST_VISIT_DATE}{CURRENT_TIME}
-{CURRENT_TIME}
[ {L_MCP} ]
{CURRENT_TIME}
+{LAST_VISIT_DATE}{CURRENT_TIME}
+{CURRENT_TIME}
[ {L_MCP} ]
{CURRENT_TIME}
diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html
index a205164e60..25464085a0 100644
--- a/phpBB/styles/prosilver/template/mcp_post.html
+++ b/phpBB/styles/prosilver/template/mcp_post.html
@@ -48,6 +48,8 @@
+
+
- {L_EDIT_POST}
@@ -56,7 +58,6 @@
{L_EXPAND_VIEW}
-
{L_SENT_AT}{L_COLON} {POST_DATE}
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 46b35eae2c..cec566f846 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -28,7 +28,7 @@
-
+
-
{L_FIND_USERNAME} • {L_HIDE_MEMBER_SEARCH} •
@@ -58,7 +58,7 @@
- {L_RANK}{L_GROUP_LEADER}{L_USERNAME} |
+ {L_RANK}{L_GROUP_LEADER}{L_USERNAME} |
{L_POSTS} |
{L_WEBSITE}{L_COMMA_SEPARATOR}{L_LOCATION} |
{L_JOINED} |
@@ -89,7 +89,7 @@
- {L_RANK}{L_GROUP_MEMBERS}{L_USERNAME} |
+ {L_RANK}{L_GROUP_MEMBERS}{L_USERNAME} |
{L_POSTS} |
{L_WEBSITE}{L_COMMA_SEPARATOR}{L_LOCATION} |
{L_JOINED} |
diff --git a/phpBB/styles/prosilver/template/memberlist_leaders.html b/phpBB/styles/prosilver/template/memberlist_leaders.html
index d0daa564c1..c2c1644375 100644
--- a/phpBB/styles/prosilver/template/memberlist_leaders.html
+++ b/phpBB/styles/prosilver/template/memberlist_leaders.html
@@ -11,7 +11,7 @@
- {L_RANK} {group.GROUP_NAME}{group.GROUP_NAME} |
+ {L_RANK} {group.GROUP_NAME}{group.GROUP_NAME} |
{L_PRIMARY_GROUP} |
{L_MODERATOR} |
diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html
index 0d103b5914..afe93ef9ac 100644
--- a/phpBB/styles/prosilver/template/memberlist_view.html
+++ b/phpBB/styles/prosilver/template/memberlist_view.html
@@ -14,7 +14,7 @@
-
+
- {L_USERNAME}{L_COLON}
-
{USERNAME}
@@ -105,7 +105,7 @@
{L_SIGNATURE}
-
+
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index b26a4c1610..6940024627 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -6,7 +6,7 @@
- - {L_SITE_HOME} ‹ {L_INDEX}
+
- {L_SITE_HOME} ‹ {L_INDEX}
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 25a54dd427..6ab0b3d553 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -2,6 +2,7 @@
+
{META}
@@ -28,6 +29,7 @@
+
@@ -47,7 +49,7 @@
{$STYLESHEETS}
-
+