Loading htdocs/_i18n/en/pages/devices.html +29 −1 Original line number Diff line number Diff line Loading @@ -259,6 +259,34 @@ </label> </div> </div> <div class="col-sm-2" id="legacy"> <label for="legacy" class="label-selector"><b>Show Legacy Device?</b></label> <div class="radio"> <label class="radio-label" for="legacy-0"> <input type="radio" class="rLabel" id="legacy-0" name="legacy" value="yes" /> <span class="ml-1">Yes</span> </label> </div> <div class="radio"> <label class="radio-label" for="legacy-1"> <input type="radio" class="rLabel" id="legacy-1" name="legacy" value="no" /> <span class="ml-1">No</span> </label> </div> </div> </div> </div> </div> Loading Loading @@ -292,7 +320,7 @@ {%- assign sorted = vendor.items | sort_natural: 'name' -%} {%- for device in sorted -%} {%- assign nbDevices = nbDevices | plus:'1' -%} <tr data-device-type="{{ device.type }}"> <tr data-device-type="{{ device.type }}" data-legacy="{{ device.legacy }}"> <td class="brand">{{ vendor.name }}</td> {% if device.models %} Loading htdocs/assets/js/code.js +28 −8 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ function updateFilters() { }); for (var column in selectedFilters) { value = selectedFilters[column].value.toLowerCase(); if (column === "device-type" && value != "-1") { $(".smartphone-table tbody tr").each((_, el) => { const deviceType = $(el).attr("data-device-type"); Loading @@ -52,6 +53,19 @@ function updateFilters() { }) continue; } if (column === "legacy" ) { $(".smartphone-table tbody tr").each((_, el) => { const legacyDevice = $(el).attr("data-legacy"); if(value === 'yes'){ $(el).show(); }else{ if(legacyDevice === 'yes'){ $(el).hide(); } } }) continue; } $(".smartphone-table tr ." + column).filter(function() { var lineValue = $(this).text().toLowerCase().replaceAll(/\s/g, ' '); if (selectedFilters[column].type == "truncate") { Loading Loading @@ -121,6 +135,7 @@ $(document).ready(function() { addFilterSelector("maturity", "maturity"); addFilterSelector("install", "install"); addFilterSelector("device-type", "device-type", "device-type"); addFilterSelector("legacy", "legacy", "legacy"); addFilterRadio("battery", "battery"); addFilterRadio("sim", "sim"); Loading Loading @@ -246,3 +261,8 @@ function getNbGitlabIssues(label) { return null; }); } $(document).ready(() => { $('#legacy-1').trigger('click'); $('#legacy-1').trigger('change'); }); Loading
htdocs/_i18n/en/pages/devices.html +29 −1 Original line number Diff line number Diff line Loading @@ -259,6 +259,34 @@ </label> </div> </div> <div class="col-sm-2" id="legacy"> <label for="legacy" class="label-selector"><b>Show Legacy Device?</b></label> <div class="radio"> <label class="radio-label" for="legacy-0"> <input type="radio" class="rLabel" id="legacy-0" name="legacy" value="yes" /> <span class="ml-1">Yes</span> </label> </div> <div class="radio"> <label class="radio-label" for="legacy-1"> <input type="radio" class="rLabel" id="legacy-1" name="legacy" value="no" /> <span class="ml-1">No</span> </label> </div> </div> </div> </div> </div> Loading Loading @@ -292,7 +320,7 @@ {%- assign sorted = vendor.items | sort_natural: 'name' -%} {%- for device in sorted -%} {%- assign nbDevices = nbDevices | plus:'1' -%} <tr data-device-type="{{ device.type }}"> <tr data-device-type="{{ device.type }}" data-legacy="{{ device.legacy }}"> <td class="brand">{{ vendor.name }}</td> {% if device.models %} Loading
htdocs/assets/js/code.js +28 −8 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ function updateFilters() { }); for (var column in selectedFilters) { value = selectedFilters[column].value.toLowerCase(); if (column === "device-type" && value != "-1") { $(".smartphone-table tbody tr").each((_, el) => { const deviceType = $(el).attr("data-device-type"); Loading @@ -52,6 +53,19 @@ function updateFilters() { }) continue; } if (column === "legacy" ) { $(".smartphone-table tbody tr").each((_, el) => { const legacyDevice = $(el).attr("data-legacy"); if(value === 'yes'){ $(el).show(); }else{ if(legacyDevice === 'yes'){ $(el).hide(); } } }) continue; } $(".smartphone-table tr ." + column).filter(function() { var lineValue = $(this).text().toLowerCase().replaceAll(/\s/g, ' '); if (selectedFilters[column].type == "truncate") { Loading Loading @@ -121,6 +135,7 @@ $(document).ready(function() { addFilterSelector("maturity", "maturity"); addFilterSelector("install", "install"); addFilterSelector("device-type", "device-type", "device-type"); addFilterSelector("legacy", "legacy", "legacy"); addFilterRadio("battery", "battery"); addFilterRadio("sim", "sim"); Loading Loading @@ -246,3 +261,8 @@ function getNbGitlabIssues(label) { return null; }); } $(document).ready(() => { $('#legacy-1').trigger('click'); $('#legacy-1').trigger('change'); });