From bd1e5c83e63b8327355f53e32e003175a3f7c153 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Mon, 28 Feb 2022 13:57:53 +0100 Subject: [PATCH] fix tablelisting in customer_extras; formatting js files Signed-off-by: Michael Kaufmann --- customer_extras.php | 4 +- .../customer/tablelisting.htaccess.php | 6 +-- .../Froxlor/src/js/components/newsfeed.js | 42 +++++++++---------- .../Froxlor/src/js/components/updatecheck.js | 34 +++++++-------- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/customer_extras.php b/customer_extras.php index 703b5e1e..f261b5bd 100644 --- a/customer_extras.php +++ b/customer_extras.php @@ -178,10 +178,10 @@ if ($page == 'overview' || $page == 'htpasswds') { UI::twigBuffer('user/table.html.twig', [ 'listing' => \Froxlor\UI\Listing::format($collection, $htaccess_list_data['htaccess_list']), - 'add_link' => [ + 'actions_links' => [[ 'href' => $linker->getLink(['section' => 'extras', 'page' => 'htaccess', 'action' => 'add']), 'label' => $lng['extras']['pathoptions_add'] - ], + ]], 'entity_info' => $lng['extras']['description'] ]); UI::twigOutputBuffer(); diff --git a/lib/tablelisting/customer/tablelisting.htaccess.php b/lib/tablelisting/customer/tablelisting.htaccess.php index d2e6ea1d..9d7bbfec 100644 --- a/lib/tablelisting/customer/tablelisting.htaccess.php +++ b/lib/tablelisting/customer/tablelisting.htaccess.php @@ -30,9 +30,9 @@ return [ 'field' => 'path', 'callback' => [Ftp::class, 'pathRelative'] ], - 'option_indexes' => [ + 'options_indexes' => [ 'label' => $lng['extras']['view_directory'], - 'field' => 'option_indexes', + 'field' => 'options_indexes', 'callback' => [Text::class, 'boolean'] ], 'error404path' => [ @@ -56,7 +56,7 @@ return [ ], 'visible_columns' => Listing::getVisibleColumnsForListing('htaccess_list', [ 'path', - 'option_indexes', + 'options_indexes', 'error404path', 'error403path', 'error500path', diff --git a/templates/Froxlor/src/js/components/newsfeed.js b/templates/Froxlor/src/js/components/newsfeed.js index bd81490a..aa8413fe 100644 --- a/templates/Froxlor/src/js/components/newsfeed.js +++ b/templates/Froxlor/src/js/components/newsfeed.js @@ -1,24 +1,24 @@ $(document).ready(function () { - /* - * newsfeed - */ - if (document.getElementById('newsfeed')) { - let role = ""; + /* + * newsfeed + */ + if (document.getElementById('newsfeed')) { + let role = ""; - if (typeof $("#newsfeed").data("role") !== "undefined") { - role = "&role=" + $("#newsfeed").data("role"); - } + if (typeof $("#newsfeed").data("role") !== "undefined") { + role = "&role=" + $("#newsfeed").data("role"); + } - $.ajax({ - url: "lib/ajax.php?action=newsfeed" + role + "&theme=" + window.$theme + "&s=" + window.$session, - type: "GET", - success: function (data) { - $("#newsfeeditems").html(data); - }, - error: function (request, status, error) { - console.log(request, status, error) - $("#newsfeeditems").html(''); - } - }); - } -}); \ No newline at end of file + $.ajax({ + url: "lib/ajax.php?action=newsfeed" + role + "&theme=" + window.$theme + "&s=" + window.$session, + type: "GET", + success: function (data) { + $("#newsfeeditems").html(data); + }, + error: function (request, status, error) { + console.log(request, status, error) + $("#newsfeeditems").html(''); + } + }); + } +}); diff --git a/templates/Froxlor/src/js/components/updatecheck.js b/templates/Froxlor/src/js/components/updatecheck.js index 866bb4dc..7d8717bd 100644 --- a/templates/Froxlor/src/js/components/updatecheck.js +++ b/templates/Froxlor/src/js/components/updatecheck.js @@ -1,18 +1,18 @@ $(document).ready(function () { - /* - * updatecheck - */ - if (document.getElementById('updatecheck')) { - $.ajax({ - url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme + "&s=" + window.$session, - type: "GET", - success: function (data) { - $("#updatecheck").html(data); - }, - error: function (request, status, error) { - console.log(request, status, error) - $("#updatecheck").html(''); - } - }); - } -}); \ No newline at end of file + /* + * updatecheck + */ + if (document.getElementById('updatecheck')) { + $.ajax({ + url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme + "&s=" + window.$session, + type: "GET", + success: function (data) { + $("#updatecheck").html(data); + }, + error: function (request, status, error) { + console.log(request, status, error) + $("#updatecheck").html(''); + } + }); + } +});