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', [
'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();

View File

@@ -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',

View File

@@ -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('<div class="alert alert-warning" role="alert">Error loading newsfeed</div>');
}
});
}
});
$.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('<div class="alert alert-warning" role="alert">Error loading newsfeed</div>');
}
});
}
});

View File

@@ -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('<div class="alert alert-warning" role="alert">Error checking version</div>');
}
});
}
});
/*
* 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('<div class="alert alert-warning" role="alert">Error checking version</div>');
}
});
}
});