input.featurematrix_version:last-child {
margin-right: 0;
}
+hr#featurematrix_version_divider {
+ margin: 0;
+}
td.fm_no {
background-color: #ffdddd !important;
}
* Filter feature matrix
*/
$(document).ready(function(){
- var eol_versions = $('#feature-matrix-filter').data('eol').split(',');
-
- // Create form to contain filter checkboxes
- $('#feature-matrix-filter').html('<form id="featurematrix_version_filter"><h5>Filter by version</h5></form>');
-
- // Generate a list of versions based on table column headers
- $('table tr:first th').not('th:nth-child(1)').each(function(){
- var version_class = $(this).text().replace('.', '');
-
- // Only mark a box as checked if no in the EOL list
- var checked = (eol_versions.indexOf($(this).text()) == -1 ? 'checked="checked"' : '');
-
- $('form#featurematrix_version_filter').append('<label for="' + version_class + '">' + $(this).text()
- + '</label><input class="featurematrix_version" ' + checked + ' type="checkbox" id="toggle_' + version_class + '"/ value="' +
- $(this).text() + '"/> ');
- });
-
- // Add a checkbox to hide rows where all values are the same between
- // displayed versions. Default: checked.
- $('form#featurematrix_version_filter').append('<hr style="margin: 0;" /> <label for="hide_unchanged">Hide unchanged features</label><input type="checkbox" id="hide_unchanged" />');
-
// Show/hide column based on whether supplied checkbox is checked.
function filter_version(checkbox)
{
if currentgroup:
groups.append(currentgroup)
- eol_versions = [v.tree for v in Version.objects.filter(supported=False, testing=False)]
+ versions = Version.objects.filter(tree__gte='8.1').order_by('-tree')
return render_pgweb(request, 'about', 'featurematrix/featurematrix.html', {
'groups': groups,
- 'eol_versions': eol_versions,
+ 'versions': versions,
})
def detail(request, featureid):
</ul>
<div class="row">
- <div id="feature-matrix-filter" class="col-8 offset-2 border" data-eol="{{eol_versions|join:','}}"></div>
+ <div id="feature-matrix-filter" class="col-8 offset-2 border">
+ <form id="featurematrix_version_filter"><h5>Filter by version</h5>
+ {% for version in versions %}
+ <label for="{{ version.numtree|cut:"." }}">{{ version.numtree }}</label>
+ <input type="checkbox" id="toggle_{{ version.numtree|cut:"." }}" class="featurematrix_version" {% if version.supported or version.testing %}checked{% endif %} value="{{ version.numtree }}" />
+ {% endfor %}
+ <hr id="featurematrix_version_divider" />
+ <label for="hide_unchanged">Hide unchanged features</label><input type="checkbox" id="hide_unchanged" />
+ </form>
+ </div>
</div>
{% for group in groups %}