* Waste logo on every page

* username displayed right on every page
This commit is contained in:
lukas-heiligenbrunner 2020-01-12 11:23:47 +01:00
parent 7c8a0d3018
commit 86dc38a8da
8 changed files with 93 additions and 81 deletions

View File

@ -23,7 +23,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" <img src="/favicon.png"
alt="AdminLTE Logo" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" <img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span> <span class="brand-text font-weight-light">Waste Control</span>
@ -271,5 +271,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
</body> </body>
</html> </html>

View File

@ -47,7 +47,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" <img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span> <span class="brand-text font-weight-light">Waste Control</span>
@ -440,12 +440,16 @@
<script type="text/javascript" <script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script> src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="js/dashboard.js"></script>
<!-- DataTables --> <!-- DataTables -->
<script src="lib/AdminLTE/plugins/datatables/jquery.dataTables.js"></script> <script src="lib/AdminLTE/plugins/datatables/jquery.dataTables.js"></script>
<script src="lib/AdminLTE/plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script> <script src="lib/AdminLTE/plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<!-- OWN -->
<script type="text/javascript" src="js/dashboard.js"></script>
<script src="js/userManager.js"></script>
</body> </body>
</html> </html>

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" <img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span> <span class="brand-text font-weight-light">Waste Control</span>
@ -288,6 +288,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
<script src="js/device.js"></script> <script src="js/device.js"></script>
</body> </body>
</html> </html>

View File

@ -18,7 +18,8 @@
<script src="lib/bootstrap.min.js"></script> <script src="lib/bootstrap.min.js"></script>
<!--Fontawesome CDN--> <!--Fontawesome CDN-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<!--Custom styles--> <!--Custom styles-->
<link rel="stylesheet" type="text/css" href="css/index.css"> <link rel="stylesheet" type="text/css" href="css/index.css">
@ -28,6 +29,8 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/png" href="/favicon.png">
</head> </head>
<body> <body>
<div class="container"> <div class="container">

View File

@ -1,17 +1,4 @@
$(document).ready(function () { $(document).ready(function () {
console.log("page loaded");
$.post('/senddata/checkloginstate', 'action=getloginstate', function (data) {
console.log(data);
if (data.loggedin == true) {
$("#userlabel").html(" " + data.username);
if (data.permission > 0) {
$("#adminpanel").show();
}
} else {
$("#userlabel").html(" not logged in!!");
}
}, 'json');
//load total collections //load total collections
$.post('/senddata/wastedata', 'action=getStartHeaderData', function (data) { $.post('/senddata/wastedata', 'action=getStartHeaderData', function (data) {
console.log(data); console.log(data);
@ -291,7 +278,6 @@ $(document).ready(function () {
}); });
}); });

View File

@ -0,0 +1,14 @@
$(document).ready(function () {
console.log("page loaded");
$.post('/senddata/checkloginstate', 'action=getloginstate', function (data) {
console.log(data);
if (data.loggedin == true) {
$("#userlabel").html(" " + data.username);
if (data.permission > 0) {
$("#adminpanel").show();
}
} else {
$("#userlabel").html(" not logged in!!");
}
}, 'json');
});

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" <img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span> <span class="brand-text font-weight-light">Waste Control</span>
@ -289,5 +289,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
</body> </body>
</html> </html>