Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added dark-sidebar menu #10

Merged
merged 4 commits into from May 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions demandshaper-module/Views/sidebar.php
@@ -0,0 +1,2 @@

<ul class="sidenav-menu nav sidebar-menu sub-nav"></ul>
25 changes: 7 additions & 18 deletions demandshaper-module/demandshaper_menu.php
@@ -1,19 +1,8 @@
<?php
$domain = "messages";
$menu_left[] = array(
'id'=>"demandshaper_menu",
'name'=>"DemandShaper",
'path'=>"demandshaper" ,
'session'=>"write",
'order' => 4,
'icon'=>'icon-calendar icon-white',
'hideinactive'=>0
);
$menu_dropdown[] = array(
'id'=>"demandshaper_menu_extras",
'name'=>"DemandShaper",
'path'=>"demandshaper" ,
'session'=>"write",
'order' => 0,
'icon'=>'icon-calendar'
);
$menu['sidebar']['emoncms'][] = array(
'text' => _("DemandShaper"),
'path' => 'demandshaper',
'icon' => 'calendar',
'data'=> array('sidebar' => '#sidebar_demandshaper')
);
$menu['sidebar']['includes']['emoncms']['demandshaper'] = view('Modules/demandshaper/Views/sidebar.php',array());
18 changes: 2 additions & 16 deletions demandshaper-module/view.php
Expand Up @@ -44,20 +44,8 @@
<script language="javascript" type="text/javascript" src="<?php echo $path;?>Modules/vis/visualisations/common/vis.helper.js"></script>

<link rel="stylesheet" href="<?php echo $path; ?>Modules/demandshaper/demandshaper.css?v=<?php echo $v; ?>">
<link rel="stylesheet" href="<?php echo $path; ?>Lib/misc/sidebar.css?v=<?php echo $v; ?>">
<script type="text/javascript" src="<?php echo $path; ?>Modules/demandshaper/battery.js?v=<?php echo $v; ?>"></script>
<script type="text/javascript" src="<?php echo $path; ?>Lib/misc/sidebar.js?v=<?php echo $v; ?>"></script>

<div id="wrapper">
<!------------------------------------------------------------------------------------------------------>
<div class="sidenav">
<div class="sidenav-inner">
<ul class="sidenav-menu"></ul>
</div>
</div>

<!------------------------------------------------------------------------------------------------------>


<div id="scheduler-top"></div>

<div id="auth-check" class="hide">
Expand Down Expand Up @@ -96,7 +84,7 @@
update_sidebar();
setInterval(update_sidebar,10000);
function update_sidebar() {
$.ajax({ url: emoncmspath+"device/list.json", dataType: 'json', async: true, success: function(result) {
$.ajax({ url: emoncmspath+"device/list.json", dataType: 'json', async: true, success: function(result) {
// Associative array of devices by nodeid
devices = {};
var out = "";
Expand Down Expand Up @@ -133,9 +121,7 @@ function ucfirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
</script>


</div>
<script>
var emoncmspath = "<?php echo $emoncmspath; ?>";
// -------------------------------------------------------------------------------------------------------
Expand Down