Skip to content

Commit

Permalink
Merge pull request phpbb#2529 from prototech/ticket/12641
Browse files Browse the repository at this point in the history
[ticket/12641] Use jQuery's trim() method. IE8 does not support the native one.

* prototech/ticket/12641:
  [ticket/12641] Use jQuery's trim() method. IE8 does not support the native one
  • Loading branch information
bantu committed May 31, 2014
2 parents 9c2687d + 6a00ff3 commit 48679ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions phpBB/adm/style/admin.js
Expand Up @@ -75,7 +75,7 @@ function parse_document(container)
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
dfn = cell.attr('data-dfn'),
text = dfn ? dfn : cell.text().trim();
text = dfn ? dfn : $.trim(cell.text());

if (text == ' ') text = '';
colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
Expand Down Expand Up @@ -114,7 +114,7 @@ function parse_document(container)
cells.each(function() {
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
text = cell.text().trim();
text = $.trim(cell.text());

if (headersLength <= column) {
return;
Expand Down
6 changes: 3 additions & 3 deletions phpBB/styles/prosilver/template/forum_fn.js
Expand Up @@ -517,7 +517,7 @@ function parse_document(container)
block = $this.find('dt .responsive-show:last-child');
}
else {
first = (block.text().trim().length == 0);
first = ($.trim(block.text()).length == 0);
}

// Copy contents of each column
Expand Down Expand Up @@ -570,7 +570,7 @@ function parse_document(container)
block = $this.find('dt .responsive-show:last-child');
}
else {
first = (block.text().trim().length == 0);
first = ($.trim(block.text()).length == 0);
}

// Copy contents of each column
Expand Down Expand Up @@ -648,7 +648,7 @@ function parse_document(container)
cells.each(function() {
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
text = cell.text().trim();
text = $.trim(cell.text());

if (headersLength <= column) {
return;
Expand Down

0 comments on commit 48679ee

Please sign in to comment.