From 9bd2ecf085e8856d0ae07509bb705bcdc0faee9e Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 18 Nov 2018 20:18:01 +0100 Subject: [PATCH] firmware: more on #2579, move changelogs to dedicated tab --- .../app/models/OPNsense/Base/Menu/Menu.xml | 5 +- .../mvc/app/views/OPNsense/Core/firmware.volt | 121 +++++++++--------- 2 files changed, 64 insertions(+), 62 deletions(-) diff --git a/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml b/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml index aa99213cd..83e62d6fd 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml +++ b/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml @@ -41,8 +41,9 @@ - - + + + diff --git a/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt b/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt index 35646dbd0..b44178958 100644 --- a/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt +++ b/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt @@ -362,7 +362,7 @@ /** * show package info */ - function packagesInfo(changelog_display) { + function packagesInfo(UNUSED_XXX) { ajaxGet('/api/core/firmware/info', {}, function (data, status) { $('#packageslist > tbody').empty(); $('#pluginlist > tbody').empty(); @@ -464,52 +464,50 @@ ); } - if (changelog_display) { - $("#updatelist > tbody").empty(); - $("#updatelist > thead").html("{{ lang._('Version') }}" + - "{{ lang._('Date') }}"); + $("#changeloglist > tbody").empty(); + $("#changeloglist > thead").html("{{ lang._('Version') }}" + + "{{ lang._('Date') }}"); - installed_version = data['product_version'].replace(/[_-].*/, ''); + installed_version = data['product_version'].replace(/[_-].*/, ''); - $.each(data['changelog'], function(index, row) { - changelog_count += 1; + $.each(data['changelog'], function(index, row) { + changelog_count += 1; - status_text = ''; - bold_on = ''; - bold_off = ''; + status_text = ''; + bold_on = ''; + bold_off = ''; - if (installed_version == row['version']) { - status_text = ' ({{ lang._('installed') }})'; - bold_on = ''; - bold_off = ''; - } + if (installed_version == row['version']) { + status_text = ' ({{ lang._('installed') }})'; + bold_on = ''; + bold_off = ''; + } - $('#updatelist > tbody').append( - ' changelog_max ? ' class="changelog-hidden" style="display: none;" ' : '' ) + - '>' + bold_on + row['version'] + status_text + bold_off + '' + bold_on + row['date'] + bold_off + '' + - '' - ); + $('#changeloglist > tbody').append( + ' changelog_max ? ' class="changelog-hidden" style="display: none;" ' : '' ) + + '>' + bold_on + row['version'] + status_text + bold_off + '' + bold_on + row['date'] + bold_off + '' + + '' + ); + }); + + if (!data['changelog'].length) { + $('#changeloglist > tbody').append( + '{{ lang._('Check for updates to view changelog history.') }}' + ); + } + + if (changelog_count > changelog_max) { + $('#changeloglist > tbody').append( + '{{ lang._('Click to view full changelog history.') }}' + ); + $("#changelog-act").click(function(event) { + event.preventDefault(); + $(".changelog-hidden").attr('style', ''); + $(".changelog-full").attr('style', 'display: none;'); + $.changelog_keep_full = 1; }); - - if (!data['changelog'].length) { - $('#updatelist > tbody').append( - '{{ lang._('Check for updates to view changelog history.') }}' - ); - } - - if (changelog_count > changelog_max) { - $('#updatelist > tbody').append( - '{{ lang._('Click to view full changelog history.') }}' - ); - $("#changelog-act").click(function(event) { - event.preventDefault(); - $(".changelog-hidden").attr('style', ''); - $(".changelog-full").attr('style', 'display: none;'); - $.changelog_keep_full = 1; - }); - } } // link buttons to actions @@ -758,38 +756,35 @@
-
-
- - - - - - - - - - - - - -
{{ lang._('Current version') }}{{ lang._('Next version') }}
{{ lang._('Loading...') }}{{ lang._('Loading...') }}
-
-
- + + + + + + + + + + + + + +
{{ lang._('Current version') }}{{ lang._('Next version') }}
{{ lang._('Loading...') }}{{ lang._('Loading...') }}
+
@@ -822,6 +817,12 @@
+
+ + + +
+