Skip to content

Commit 2806149

Browse files
committed
FIX versions MOBILE tables
1 parent e0e210e commit 2806149

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

eol.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
more recent versions of PHP.
3636
</p>
3737

38-
<table class="standard">
38+
<table class="standard versions">
3939
<thead>
4040
<tr>
4141
<th>Branch</th>

js/common.js

+7-10
Original file line numberDiff line numberDiff line change
@@ -826,16 +826,13 @@ function getLanguage() {
826826
* "data-label" with the text of the th.
827827
*/
828828
$(document).ready(function () {
829-
$('table').each(function () {
830-
var $table = $(this);
831-
$table.find('th').each(function (index) {
832-
var $th = $(this);
833-
var text = $th.text();
834-
if (text === '') {
835-
return;
836-
}
837-
$table.find('td:nth-child(' + (index + 1) + ')')
838-
.attr('data-label', text);
829+
$('table.versions').each(function () {
830+
var $columns = $(this).find('td:not(.collapse-phone)');
831+
var $headers = $(this).find('th');
832+
$headers.each(function (index) {
833+
$columns.filter(function (counter) {
834+
return index === counter % $headers.length;
835+
}).attr('data-label', $(this).text());
839836
});
840837
});
841838
});

styles/supported-versions.css

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ table.standard tr.stable td:first-child {
1919
}
2020

2121
table.standard td.collapse-phone {
22-
padding: 0;
23-
}
24-
25-
table.standard td.collapse-phone * {
2622
display: none;
2723
}
2824
}

supported-versions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<h3>Currently Supported Versions</h3>
3838

39-
<table class="standard">
39+
<table class="standard versions">
4040
<thead>
4141
<tr>
4242
<th>Branch</th>

0 commit comments

Comments
 (0)