From 093d16682743eb1502819bb6c127afeac65d4ede Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Fri, 9 Nov 2018 02:46:50 +0100 Subject: [serversetup-bwlp] add location selection to menu edit + ui improvements - add multiselect to select the locations - add architecture information to the bootentry select modal - add glyphicon to the hide entry column header - default menu is now selected in the menu list - fixed error when creating a menu (isdefault has no default value) and when creating a menu without bootentries --- .../serversetup-bwlp/templates/menu-edit.html | 124 ++++++++++++++++----- 1 file changed, 96 insertions(+), 28 deletions(-) (limited to 'modules-available/serversetup-bwlp/templates/menu-edit.html') diff --git a/modules-available/serversetup-bwlp/templates/menu-edit.html b/modules-available/serversetup-bwlp/templates/menu-edit.html index e695ef20..09814da9 100644 --- a/modules-available/serversetup-bwlp/templates/menu-edit.html +++ b/modules-available/serversetup-bwlp/templates/menu-edit.html @@ -38,12 +38,17 @@
+
-
- - -
+ + {{#globalMenuWarning}} + + {{/globalMenuWarning}}
@@ -56,7 +61,7 @@ {{lang_title}} {{lang_hotkey}} {{lang_password}} - + @@ -124,7 +129,7 @@
{{lang_cancel}} - @@ -154,29 +159,69 @@
{{#data}} {{#script}} -
- -
{{.}}
-
+
+ +
{{.}}
+
+ {{/script}} + {{^script}} +
+ +
{{arch}}
+
+ {{#archAgnostic}} +
+ +
{{executable}}
+
+
+ +
{{initRd}}
+
+
+ +
{{commandLine}}
+
+ {{/archAgnostic}} + {{#PCBIOS}} +
+
PCBIOS
+
+
+ +
{{executable}}
+
+
+ +
{{initRd}}
+
+
+ +
{{commandLine}}
+
+
+
+ {{/PCBIOS}} + {{#EFI}} +
+
EFI
+
+
+ +
{{executable}}
+
+
+ +
{{initRd}}
+
+
+ +
{{commandLine}}
+
+
+
+ {{/EFI}} {{/script}} - {{#executable}} -
- -
{{.}}
-
- {{/executable}} - {{#initRd}} -
- -
{{.}}
-
- {{/initRd}} - {{#commandLine}} -
- -
{{.}}
-
- {{/commandLine}} {{/data}} {{/entrylist}} @@ -244,6 +289,29 @@ var spacerText = "{{lang_spacer}}"; document.addEventListener("DOMContentLoaded", function() { + var locationSelect = $('#panel-locations'); + locationSelect.multiselect({numberDisplayed: 1}); + var globalMenuWarning = $('#global-menu-warning'); + if (globalMenuWarning.length) { + var saveButton = $('#save-button'); + if (locationSelect.val() !== null) { + saveButton.prop('disabled', false); + globalMenuWarning.hide(); + } else { + saveButton.prop('disabled', true); + globalMenuWarning.show(); + } + locationSelect.change(function () { + if ($(this).val() !== null) { + saveButton.prop('disabled', false); + globalMenuWarning.hide(); + } else { + saveButton.prop('disabled', true); + globalMenuWarning.show(); + } + }); + } + function reassignSortValues() { var startValue = 1; $('.sort-val').each(function(index, element) { -- cgit v1.2.3-55-g7522