mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
Merge branch '3.3.x'
This commit is contained in:
@@ -123,8 +123,8 @@ function parse_document(container)
|
||||
}
|
||||
|
||||
if ((text.length && text !== '-') || cell.children().length) {
|
||||
if (headers[column] != '') {
|
||||
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
|
||||
if (headers[column].length) {
|
||||
cell.prepend($("<dfn>").css('display', 'none').text(headers[column]));
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -145,7 +145,7 @@ function parse_document(container)
|
||||
*/
|
||||
container.find('table.responsive > tbody').each(function() {
|
||||
var items = $(this).children('tr');
|
||||
if (items.length == 0)
|
||||
if (!items.length)
|
||||
{
|
||||
$(this).parent('table:first').addClass('responsive-hide');
|
||||
}
|
||||
@@ -159,7 +159,6 @@ function parse_document(container)
|
||||
if ($this.html() == ' ') {
|
||||
$this.addClass('responsive-hide');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -175,7 +174,6 @@ function parse_document(container)
|
||||
$this.value = inputChars.slice(0, maxLength).join('');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -202,7 +200,7 @@ function parse_document(container)
|
||||
var width = $body.width(),
|
||||
height = $this.height();
|
||||
|
||||
if (arguments.length == 0 && (!responsive || width <= lastWidth) && height <= maxHeight) {
|
||||
if (!arguments.length && (!responsive || width <= lastWidth) && height <= maxHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -284,14 +284,20 @@ function submitPermissions() {
|
||||
if ($alertBoxLink) {
|
||||
// Remove forum_id[] from URL
|
||||
$alertBoxLink.attr('href', $alertBoxLink.attr('href').replace(/(&forum_id\[\]=[0-9]+)/g, ''));
|
||||
var previousPageForm = '<form action="' + $alertBoxLink.attr('href') + '" method="post">';
|
||||
$.each(forumIds, function (key, value) {
|
||||
previousPageForm += '<input type="text" name="forum_id[]" value="' + value + '" />';
|
||||
const $previousPageForm = $('<form>').attr({
|
||||
action: $alertBoxLink.attr('href'),
|
||||
method: 'post'
|
||||
});
|
||||
|
||||
$.each(forumIds, function (key, value) {
|
||||
$previousPageForm.append($('<input>').attr({
|
||||
type: 'text',
|
||||
name: 'forum_id[]',
|
||||
value: value
|
||||
}));
|
||||
});
|
||||
previousPageForm += '</form>';
|
||||
|
||||
$alertBoxLink.on('click', function (e) {
|
||||
var $previousPageForm = $(previousPageForm);
|
||||
$('body').append($previousPageForm);
|
||||
e.preventDefault();
|
||||
$previousPageForm.submit();
|
||||
@@ -306,12 +312,19 @@ function submitPermissions() {
|
||||
setTimeout(function () {
|
||||
// Create forum to submit using POST. This will prevent
|
||||
// exceeding the maximum length of URLs
|
||||
var form = '<form action="' + res.REFRESH_DATA.url.replace(/(&forum_id\[\]=[0-9]+)/g, '') + '" method="post">';
|
||||
$.each(forumIds, function (key, value) {
|
||||
form += '<input type="text" name="forum_id[]" value="' + value + '" />';
|
||||
const $form = $('<form>').attr({
|
||||
action: res.REFRESH_DATA.url.replace(/(&forum_id\[\]=[0-9]+)/g, ''),
|
||||
method: 'post'
|
||||
});
|
||||
form += '</form>';
|
||||
$form = $(form);
|
||||
|
||||
$.each(forumIds, function (key, value) {
|
||||
$form.append($('<input>').attr({
|
||||
type: 'text',
|
||||
name: 'forum_id[]',
|
||||
value: value
|
||||
}));
|
||||
});
|
||||
|
||||
$('body').append($form);
|
||||
|
||||
// Hide the alert even if we refresh the page, in case the user
|
||||
|
Reference in New Issue
Block a user