From 2f3f7ba4844ca4acff33569f3fa46ccf6301c92f Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Thu, 4 Oct 2018 03:19:44 +0200 Subject: [serversetup-bwlp] bootmenu-edit UI improvements - add cancel button - add checkbox to hide menu entries - add button to remove menu entries - hide input fields not relevant for spacers - add modal to select an entry that shows some information about the selected entry --- modules-available/serversetup-bwlp/page.inc.php | 6 +- .../serversetup-bwlp/templates/menu-edit.html | 269 ++++++++++++++------- 2 files changed, 189 insertions(+), 86 deletions(-) diff --git a/modules-available/serversetup-bwlp/page.inc.php b/modules-available/serversetup-bwlp/page.inc.php index 4ebb7530..615bac64 100644 --- a/modules-available/serversetup-bwlp/page.inc.php +++ b/modules-available/serversetup-bwlp/page.inc.php @@ -261,7 +261,11 @@ class Page_ServerSetup extends Page $menu['entries'] = Database::queryAll("SELECT menuentryid, entryid, hotkey, title, hidden, sortval, plainpass FROM serversetup_menuentry WHERE menuid = :id ORDER BY sortval ASC", compact('id')); $menu['keys'] = array_map(function ($item) { return ['key' => $item]; }, MenuEntry::getKeyList()); - $menu['entrylist'] = Database::queryAll("SELECT entryid, title, hotkey FROM serversetup_bootentry ORDER BY title ASC"); + $menu['entrylist'] = Database::queryAll("SELECT entryid, title, hotkey, data FROM serversetup_bootentry ORDER BY title ASC"); + foreach ($menu['entrylist'] as &$bootentry) { + $bootentry['json'] = $bootentry['data']; + $bootentry['data'] = json_decode($bootentry['data']); + } foreach ($menu['entries'] as &$entry) { $entry['isdefault'] = ($entry['menuentryid'] == $menu['defaultentryid']); // TODO: plainpass only when permissions diff --git a/modules-available/serversetup-bwlp/templates/menu-edit.html b/modules-available/serversetup-bwlp/templates/menu-edit.html index c0a353b4..e695ef20 100644 --- a/modules-available/serversetup-bwlp/templates/menu-edit.html +++ b/modules-available/serversetup-bwlp/templates/menu-edit.html @@ -7,7 +7,7 @@
{{title}} {{^title}} - {{lang_newMenu}} + {{lang_newMenu}} {{/title}}
@@ -50,86 +50,151 @@ - - - + + + - - + + + + {{#entries}} - - - - - - + + + + - + + - - {{#entryid}} - - {{/entryid}} - - - + + + + + + + + + + {{/entries}}
{{lang_entryId}}{{lang_entryId}} {{lang_title}}{{lang_hotkey}}{{lang_password}}{{lang_hotkey}}{{lang_password}}
- - -
- - -
-
+ + + +
+ + +
+
+ + - - - - - -
+ + + + + + +
+ + +
+
+ +
-
+
+
+
+ {{lang_cancel}}
+ +
- @@ -141,38 +206,52 @@ -
+ - + + - - + + + +
+ + +
+ + + \ No newline at end of file -- cgit v1.2.3-55-g7522