* 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">
<!-- Brand Logo -->
<a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png"
<img src="/favicon.png"
alt="AdminLTE Logo"
class="brand-image img-circle elevation-3"
style="opacity: .8">

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<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"
style="opacity: .8">
<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="js/userManager.js"></script>
</body>
</html>

View File

@ -47,7 +47,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<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"
style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span>
@ -440,12 +440,16 @@
<script type="text/javascript"
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 -->
<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/sweetalert2/sweetalert2.all.js"></script>
<!-- OWN -->
<script type="text/javascript" src="js/dashboard.js"></script>
<script src="js/userManager.js"></script>
</body>
</html>

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<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"
style="opacity: .8">
<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="js/userManager.js"></script>
<script src="js/device.js"></script>
</body>
</html>

View File

@ -1,74 +1,77 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<head>
<meta charset="utf-8">
<title>Login Page</title>
<!--Made with love by Mutiullah Samim -->
<title>Login Page</title>
<!--Made with love by Mutiullah Samim -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="lib/bootstrap.min.css">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="lib/bootstrap.min.css">
<!-- jQuery library -->
<script src="lib/jquery.min.js"></script>
<!-- jQuery library -->
<script src="lib/jquery.min.js"></script>
<!-- Popper JS -->
<script src="lib/popper.min.js"></script>
<!-- Popper JS -->
<script src="lib/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="lib/bootstrap.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="lib/bootstrap.min.js"></script>
<!--Fontawesome CDN-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<!--Fontawesome CDN-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<!--Custom styles-->
<link rel="stylesheet" type="text/css" href="css/index.css">
<!--Custom styles-->
<link rel="stylesheet" type="text/css" href="css/index.css">
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<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>
<body>
<div class="container">
<div class="d-flex justify-content-center h-100">
<div class="card">
<div class="card-header">
<h3>Sign In</h3>
</div>
<div class="card-body">
<form>
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-user"></i></span>
</div>
<input type="text" class="form-control" placeholder="username" id="userfield">
<div class="d-flex justify-content-center h-100">
<div class="card">
<div class="card-header">
<h3>Sign In</h3>
</div>
<div class="card-body">
<form>
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-user"></i></span>
</div>
<input type="text" class="form-control" placeholder="username" id="userfield">
</div>
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-key"></i></span>
</div>
<input type="password" class="form-control" placeholder="password" id="passfield">
</div>
<div class="row align-items-center remember">
<input type="checkbox">Remember Me
</div>
<div class="form-group">
<input type="submit" value="Login" class="btn float-right login_btn" id="loginbtn">
</div>
</form>
</div>
<div class="card-footer">
<div class="d-flex justify-content-center links">
Don't have an account?<a href="register.html">Sign Up</a>
</div>
<div class="d-flex justify-content-center">
<a href="#">Forgot your password?</a>
</div>
</div>
</div>
</div>
</div>
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-key"></i></span>
</div>
<input type="password" class="form-control" placeholder="password" id="passfield">
</div>
<div class="row align-items-center remember">
<input type="checkbox">Remember Me
</div>
<div class="form-group">
<input type="submit" value="Login" class="btn float-right login_btn" id="loginbtn">
</div>
</form>
</div>
<div class="card-footer">
<div class="d-flex justify-content-center links">
Don't have an account?<a href="register.html">Sign Up</a>
</div>
<div class="d-flex justify-content-center">
<a href="#">Forgot your password?</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -1,17 +1,4 @@
$(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
$.post('/senddata/wastedata', 'action=getStartHeaderData', function (data) {
console.log(data);
@ -27,7 +14,7 @@ $(document).ready(function () {
//load version footer
//
$.post('/senddata/wastedata', 'action=getversionandbuildtime', function (data) {
$("#version-footer-label").html("<b>Version</b> "+data.version+" <b>Build</b> "+data.buildtime);
$("#version-footer-label").html("<b>Version</b> " + data.version + " <b>Build</b> " + data.buildtime);
}, 'json');
@ -112,7 +99,7 @@ $(document).ready(function () {
if (data.query == "ok") {
$('#picupdates-tablebody').html("");
$(".delbtndate").off();
$(".delbtndate").off();
for (var i = 0; i < data.data.length; i++) {
$('#picupdates-tablebody').append("<tr>" +
@ -156,11 +143,11 @@ $(document).ready(function () {
});
}
datetable = $("#table-pickupdates").DataTable({
"order": [[ 3, "asc" ]]
} );
"order": [[3, "asc"]]
});
//todo picupdates-tablebody
},"json");
}, "json");
}
reloadtable();
@ -274,7 +261,7 @@ $(document).ready(function () {
dropdata.html("");
console.log("clickeeeed");
$.post('/senddata/newdate', 'action=gettypes&cityname=' + $("#dropdown-city").html()+'&zonename='+$("#dropdown-zone").html(), function (data) {
$.post('/senddata/newdate', 'action=gettypes&cityname=' + $("#dropdown-city").html() + '&zonename=' + $("#dropdown-zone").html(), function (data) {
console.log(data);
if (data.query == "ok") {
for (var i = 0; i < data.data.length; i++) {
@ -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">
<!-- Brand Logo -->
<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"
style="opacity: .8">
<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="js/userManager.js"></script>
</body>
</html>