fix tablelisting in customer_extras; formatting js files

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-02-28 13:57:53 +01:00
parent 8742c9302e
commit bd1e5c83e6
4 changed files with 43 additions and 43 deletions

View File

@@ -178,10 +178,10 @@ if ($page == 'overview' || $page == 'htpasswds') {
UI::twigBuffer('user/table.html.twig', [ UI::twigBuffer('user/table.html.twig', [
'listing' => \Froxlor\UI\Listing::format($collection, $htaccess_list_data['htaccess_list']), 'listing' => \Froxlor\UI\Listing::format($collection, $htaccess_list_data['htaccess_list']),
'add_link' => [ 'actions_links' => [[
'href' => $linker->getLink(['section' => 'extras', 'page' => 'htaccess', 'action' => 'add']), 'href' => $linker->getLink(['section' => 'extras', 'page' => 'htaccess', 'action' => 'add']),
'label' => $lng['extras']['pathoptions_add'] 'label' => $lng['extras']['pathoptions_add']
], ]],
'entity_info' => $lng['extras']['description'] 'entity_info' => $lng['extras']['description']
]); ]);
UI::twigOutputBuffer(); UI::twigOutputBuffer();

View File

@@ -30,9 +30,9 @@ return [
'field' => 'path', 'field' => 'path',
'callback' => [Ftp::class, 'pathRelative'] 'callback' => [Ftp::class, 'pathRelative']
], ],
'option_indexes' => [ 'options_indexes' => [
'label' => $lng['extras']['view_directory'], 'label' => $lng['extras']['view_directory'],
'field' => 'option_indexes', 'field' => 'options_indexes',
'callback' => [Text::class, 'boolean'] 'callback' => [Text::class, 'boolean']
], ],
'error404path' => [ 'error404path' => [
@@ -56,7 +56,7 @@ return [
], ],
'visible_columns' => Listing::getVisibleColumnsForListing('htaccess_list', [ 'visible_columns' => Listing::getVisibleColumnsForListing('htaccess_list', [
'path', 'path',
'option_indexes', 'options_indexes',
'error404path', 'error404path',
'error403path', 'error403path',
'error500path', 'error500path',

View File

@@ -1,24 +1,24 @@
$(document).ready(function () { $(document).ready(function () {
/* /*
* newsfeed * newsfeed
*/ */
if (document.getElementById('newsfeed')) { if (document.getElementById('newsfeed')) {
let role = ""; let role = "";
if (typeof $("#newsfeed").data("role") !== "undefined") { if (typeof $("#newsfeed").data("role") !== "undefined") {
role = "&role=" + $("#newsfeed").data("role"); role = "&role=" + $("#newsfeed").data("role");
} }
$.ajax({ $.ajax({
url: "lib/ajax.php?action=newsfeed" + role + "&theme=" + window.$theme + "&s=" + window.$session, url: "lib/ajax.php?action=newsfeed" + role + "&theme=" + window.$theme + "&s=" + window.$session,
type: "GET", type: "GET",
success: function (data) { success: function (data) {
$("#newsfeeditems").html(data); $("#newsfeeditems").html(data);
}, },
error: function (request, status, error) { error: function (request, status, error) {
console.log(request, status, error) console.log(request, status, error)
$("#newsfeeditems").html('<div class="alert alert-warning" role="alert">Error loading newsfeed</div>'); $("#newsfeeditems").html('<div class="alert alert-warning" role="alert">Error loading newsfeed</div>');
} }
}); });
} }
}); });

View File

@@ -1,18 +1,18 @@
$(document).ready(function () { $(document).ready(function () {
/* /*
* updatecheck * updatecheck
*/ */
if (document.getElementById('updatecheck')) { if (document.getElementById('updatecheck')) {
$.ajax({ $.ajax({
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme + "&s=" + window.$session, url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme + "&s=" + window.$session,
type: "GET", type: "GET",
success: function (data) { success: function (data) {
$("#updatecheck").html(data); $("#updatecheck").html(data);
}, },
error: function (request, status, error) { error: function (request, status, error) {
console.log(request, status, error) console.log(request, status, error)
$("#updatecheck").html('<div class="alert alert-warning" role="alert">Error checking version</div>'); $("#updatecheck").html('<div class="alert alert-warning" role="alert">Error checking version</div>');
} }
}); });
} }
}); });