mirror of
https://github.com/sorenpeter/timeline.git
synced 2025-12-15 19:07:01 +00:00
Styling refresh
This commit is contained in:
parent
2d88c1b051
commit
bd6a4b262d
2 changed files with 16 additions and 12 deletions
|
|
@ -246,10 +246,10 @@ nav.pagnation {
|
||||||
|
|
||||||
#refreshInfo {
|
#refreshInfo {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
/* display: block;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#refreshURL {
|
#refreshURL {
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#refreshCounter {
|
#refreshCounter {
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,10 @@ include 'partials/header.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p id="refreshLabel">
|
<p id="refreshLabel">
|
||||||
<span id=refreshInfo>Loading feeds followed by:</span>
|
<span id="refreshInfo">Loading feeds followed by:</span>
|
||||||
<span id=refreshURL><?= preg_replace('(^https?://)', '', $url) ?><span>
|
<span id="refreshURL"><?= preg_replace('(^https?://)', '', $url) ?></span>
|
||||||
<span id="refreshCounter">(1 of 10)</span>
|
<span id="refreshCounter"></span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<progress id="refreshProgress" value=""></progress>
|
<progress id="refreshProgress" value=""></progress>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -62,18 +61,21 @@ foreach ($fileLines as $currentLine) {
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$total = count($twtFollowingList);
|
$total = count($twtFollowingList);
|
||||||
|
|
||||||
|
echo '<script language="javascript">document.getElementById("refreshInfo").innerHTML = "Updating feed from:"</script>';
|
||||||
|
|
||||||
foreach ($twtFollowingList as $following) {
|
foreach ($twtFollowingList as $following) {
|
||||||
//ob_start();
|
//ob_start();
|
||||||
$float = $i/$total;
|
$float = $i/$total;
|
||||||
$percent = intval($float * 100)."%";
|
$percent = intval($float * 100)."%";
|
||||||
|
$feed = $following[1];
|
||||||
|
//$feed = preg_replace('(^https?://)', '', $feed);
|
||||||
|
//$feed = $following[0].'@'. parse_url($following[1], PHP_URL_HOST);
|
||||||
|
$feed = $following[0].' ('.$following[1].')';
|
||||||
|
|
||||||
// Javascript for updating the progress bar and information
|
// Javascript for updating the progress bar and information
|
||||||
echo '<script language="javascript">
|
echo '<script language="javascript">
|
||||||
document.getElementById("refreshInfo").innerHTML = "
|
document.getElementById("refreshURL").innerHTML = "'.$feed.'";
|
||||||
<span id=refreshInfo>Updating:</span>
|
document.getElementById("refreshCounter").innerHTML = "('.$i.' of '.$total.')";
|
||||||
<span id=refreshURL>'.preg_replace('(^https?://)', '', $following[1]).'<span>
|
|
||||||
<span id="refreshCounter">('.$i.' of '.$total.')</span>
|
|
||||||
";
|
|
||||||
document.getElementById("refreshProgress").value = "'.$float.'";
|
document.getElementById("refreshProgress").value = "'.$float.'";
|
||||||
document.getElementById("refreshProgress").innerHTML = "'.$percent.'";
|
document.getElementById("refreshProgress").innerHTML = "'.$percent.'";
|
||||||
</script>';
|
</script>';
|
||||||
|
|
@ -86,7 +88,9 @@ foreach ($twtFollowingList as $following) {
|
||||||
|
|
||||||
// Tell user that the process is completed
|
// Tell user that the process is completed
|
||||||
echo '<script language="javascript">
|
echo '<script language="javascript">
|
||||||
document.getElementById("refreshLabel").innerHTML="Refreshed '.$total.' feeds";
|
document.getElementById("refreshInfo").innerHTML="Refreshed '.$total.' feeds";
|
||||||
|
document.getElementById("refreshURL").innerHTML = "";
|
||||||
|
document.getElementById("refreshCounter").innerHTML = "";
|
||||||
history.back();
|
history.back();
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue