Merge pull request #107 from narspt/patch-5

dashboard: smooth page refresh with jquery
This commit is contained in:
LX1IQ 2018-10-24 09:15:41 +02:00 committed by GitHub
commit b6d5eda70c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 28 deletions

View File

@ -10,6 +10,10 @@ h1 {
font-size : 25pt; font-size : 25pt;
} }
a img {
border: 0;
}
a.tip { a.tip {
text-decoration : none; text-decoration : none;
} }
@ -117,18 +121,19 @@ a.tip:hover span {
.listingtable th { .listingtable th {
height : 35px; height : 35px;
text-align : center; text-align : center;
background-image: -webkit-gradient( background-color : #D5EBF0;
background-image : -webkit-gradient(
linear, linear,
left top, left top,
left bottom, left bottom,
color-stop(0, rgb(201, 231, 233)), color-stop(0, rgb(201, 231, 233)),
color-stop(0.8, rgb(220, 237, 244)) color-stop(0.8, rgb(220, 237, 244))
); );
background-image: -o-linear-gradient(bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%); background-image: -o-linear-gradient(bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%);
background-image: -moz-linear-gradient(bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%); background-image: -moz-linear-gradient(bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%);
background-image: -webkit-linear-gradient(bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%); background-image: -webkit-linear-gradient(bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%);
background-image: -ms-linear-gradient(bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%); background-image: -ms-linear-gradient(bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%);
background-image: linear-gradient(to bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%); background-image: linear-gradient(to bottom, rgb(201, 231, 233) 0%, rgb(220, 237, 244) 80%);
} }
.listingtable td { .listingtable td {

View File

@ -94,22 +94,22 @@ else {
if ($PageOptions['PageRefreshActive']) { if ($PageOptions['PageRefreshActive']) {
echo ' echo '
<script src="./js/jquery-1.12.4.min.js"></script>
<script> <script>
var PageRefresh; var PageRefresh;
function ReloadPage() {'; function ReloadPage() {
if (($_SERVER['REQUEST_METHOD'] === 'POST') || isset($_GET['do'])) { $.get("./index.php'.(isset($_GET['show'])?'?show='.$_GET['show']:'').'", function(data) {
echo ' var BodyStart = data.indexOf("<bo"+"dy");
document.location.href = "./index.php'; var BodyEnd = data.indexOf("</bo"+"dy>");
if (isset($_GET['show'])) { if ((BodyStart >= 0) && (BodyEnd > BodyStart)) {
echo '?show='.$_GET['show']; BodyStart = data.indexOf(">", BodyStart)+1;
$("body").html(data.substring(BodyStart, BodyEnd));
} }
echo '";'; })
} else { .always(function() {
echo ' PageRefresh = setTimeout(ReloadPage, '.$PageOptions['PageRefreshDelay'].');
document.location.reload();'; });
}
echo '
}'; }';
if (!isset($_GET['show']) || (($_GET['show'] != 'liveircddb') && ($_GET['show'] != 'reflectors') && ($_GET['show'] != 'interlinks'))) { if (!isset($_GET['show']) || (($_GET['show'] != 'liveircddb') && ($_GET['show'] != 'reflectors') && ($_GET['show'] != 'interlinks'))) {

5
dashboard/js/jquery-1.12.4.min.js vendored Normal file

File diff suppressed because one or more lines are too long