Merge pull request #683 from laf/font-awesome-2-webui

WebUI update to support dark / light theme - dark is default
This commit is contained in:
Paul Gear
2015-03-31 22:25:56 +10:00
18 changed files with 148 additions and 110 deletions

View File

@@ -168,7 +168,9 @@ if (empty($config['favicon'])) {
<link href="css/tagmanager.css" rel="stylesheet" type="text/css" />
<link href="css/mktree.css" rel="stylesheet" type="text/css" />
<link href="css/vis.min.css" rel="stylesheet" type="text/css" />
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo($config['stylesheet']); ?>" rel="stylesheet" type="text/css" />
<link href="css/<?php echo $config['site_style']; ?>.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-hover-dropdown.min.js"></script>
@@ -211,18 +213,6 @@ if ((isset($vars['bare']) && $vars['bare'] != "yes") || !isset($vars['bare'])) {
?>
<br />
<div class="container-fluid">
<?php
if ($_SESSION['authenticated'])
{
?>
<div class="row">
<div class="col-md-12">
&nbsp;<br /><br />
</div>
</div>
<?php
}
?>
<div class="row">
<div class="col-md-12">
<?php
@@ -316,17 +306,17 @@ if (isset($pagetitle) && is_array($pagetitle))
<?php
if($config['enable_footer'] == 1) {
?>
<footer>
<nav class="navbar navbar-default <?php echo $navbar; ?> navbar-fixed-bottom">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<?php
echo('<em> Powered by <a href="/about/" target="_blank">' . $config['project_name'].'</a>.</em><br/>');
echo('<h5>Powered by <a href="http://www.librenms.org/" target="_blank" class="red">' . $config['project_name'].'</a>.</h5>');
?>
</div>
</div>
</div>
</footer>
</nav>
<?php
}
@@ -354,37 +344,33 @@ if (is_array($sql_debug) && is_array($php_debug)) {
}
?>
</body>
<?php
if ($no_refresh !== TRUE && $config['page_refresh'] != 0) {
$refresh = $config['page_refresh'] * 1000;
echo('<script type="text/javascript">
$(document).ready(function() {
$("#countdown_timer_status").html("<img src=\"images/16/clock_pause.png\"> Pause");
$("#countdown_timer_status").html("<i class=\"fa fa-pause fa-fw\"></i> Pause");
var Countdown = {
sec: '. $config['page_refresh'] .',
Start: function() {
var cur = this;
this.interval = setInterval(function() {
$("#countdown_timer_status").html("<img src=\"images/16/clock_pause.png\"> Pause");
$("#countdown_timer_status").html("<i class=\"fa fa-pause fa-fw\"></i> Pause");
cur.sec -= 1;
display_time = cur.sec;
if (display_time == 0) {
location.reload();
}
if (display_time % 1 === 0 && display_time <= 300) {
$("#countdown_timer").html("<img src=\"images/16/clock.png\"> Refresh in " + display_time);
$("#countdown_timer").html("<i class=\"fa fa-clock-o fa-fw\"></i> Refresh in " + display_time);
}
}, 1000);
},
Pause: function() {
clearInterval(this.interval);
$("#countdown_timer_status").html("<img src=\"images/16/clock_play.png\"> Resume");
$("#countdown_timer_status").html("<i class=\"fa fa-play fa-fw\"></i> Resume");
delete this.interval;
},
@@ -414,5 +400,5 @@ if ($no_refresh !== TRUE && $config['page_refresh'] != 0) {
}
?>
</body>
</html>