mirror of
https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git
synced 2023-10-10 13:37:40 +02:00
Add checkbox to filter experimental fw versions
This commit is contained in:
parent
1c4d91b445
commit
33a0b6a061
@ -319,10 +319,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
var experimental = (fw.experimental ? 'checked=""' : '')
|
var experimental = (fw.experimental ? 'checked=""' : '')
|
||||||
var downloaded = (fw.image ? 'checked=""' : '')
|
var downloaded = (fw.image ? 'checked=""' : '')
|
||||||
var cls = '';
|
var cls = '';
|
||||||
|
var style = '';
|
||||||
if (fw.installed) cls = ' class="warning"';
|
if (fw.installed) cls = ' class="warning"';
|
||||||
if (fw.experimental) cls = ' class="error"';
|
if (fw.experimental) { cls = ' class="error"'; style = 'visibility: collapse;' }
|
||||||
if (fw.latest) cls = ' class="positive"';
|
if (fw.latest) cls = ' class="positive"';
|
||||||
$("#firmware-info tbody").append($('<tr' + cls + '>').append(
|
$("#firmware-info tbody").append($('<tr' + cls + ' style="' + style + '">').attr('data-experimental', fw.experimental).append(
|
||||||
$('<td>').append($('<a>', {text: fw.version, title: i18next.t('open_release_info'), href: fw.info_url, target: "_blank"})),
|
$('<td>').append($('<a>', {text: fw.version, title: i18next.t('open_release_info'), href: fw.info_url, target: "_blank"})),
|
||||||
$('<td class="center aligned">').append($('<div class="ui disabled checkbox">').append($('<input type="checkbox" disabled="disabled" '+available+'>'),$('<label></label>'))),
|
$('<td class="center aligned">').append($('<div class="ui disabled checkbox">').append($('<input type="checkbox" disabled="disabled" '+available+'>'),$('<label></label>'))),
|
||||||
$('<td class="center aligned">').append($('<div class="ui disabled checkbox">').append($('<input type="checkbox" disabled="disabled" '+experimental+'>'),$('<label></label>'))),
|
$('<td class="center aligned">').append($('<div class="ui disabled checkbox">').append($('<input type="checkbox" disabled="disabled" '+experimental+'>'),$('<label></label>'))),
|
||||||
@ -352,6 +353,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function show_experimental_firmware(show) {
|
||||||
|
$('tr[data-experimental="true"]').css('visibility', show ? '' : 'collapse');
|
||||||
|
}
|
||||||
|
|
||||||
function get_system_info() {
|
function get_system_info() {
|
||||||
rest("GET", "/get_system_info", null, function(data) {
|
rest("GET", "/get_system_info", null, function(data) {
|
||||||
$("#system-info").empty();
|
$("#system-info").empty();
|
||||||
@ -789,6 +794,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
delete: 'Delete',
|
delete: 'Delete',
|
||||||
partiton_table_deleted: 'Partiton table deleted.',
|
partiton_table_deleted: 'Partiton table deleted.',
|
||||||
firmwares: 'Firmwares',
|
firmwares: 'Firmwares',
|
||||||
|
show_experimental_fw: 'Show experimental versions',
|
||||||
current_installed_version: 'Current installed version',
|
current_installed_version: 'Current installed version',
|
||||||
latest_available_version: 'Latest available version',
|
latest_available_version: 'Latest available version',
|
||||||
loading: 'Loading',
|
loading: 'Loading',
|
||||||
@ -876,6 +882,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
delete: 'Löschen',
|
delete: 'Löschen',
|
||||||
partiton_table_deleted: 'Partitionstabelle gelöscht.',
|
partiton_table_deleted: 'Partitionstabelle gelöscht.',
|
||||||
firmwares: 'Firmwares',
|
firmwares: 'Firmwares',
|
||||||
|
show_experimental_fw: 'Experimentelle Versionen anzeigen',
|
||||||
current_installed_version: 'Momentan installierte Version',
|
current_installed_version: 'Momentan installierte Version',
|
||||||
latest_available_version: 'Aktuellste verfügbare Version',
|
latest_available_version: 'Aktuellste verfügbare Version',
|
||||||
loading: 'Lade',
|
loading: 'Lade',
|
||||||
@ -1059,6 +1066,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
install
|
install
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ui checkbox" style="margin-top: 20px;">
|
||||||
|
<input id="show-experimental-fw" type="checkbox" onchange="show_experimental_firmware(this.checked);">
|
||||||
|
<label data-i18n="show_experimental_fw"></label>
|
||||||
|
</div>
|
||||||
<table id="firmware-info" class="ui celled stackable table">
|
<table id="firmware-info" class="ui celled stackable table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user