Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant into adminbsb_material_ui

This commit is contained in:
Yan
2017-10-31 13:41:36 +06:30
21 changed files with 319 additions and 167 deletions

View File

@@ -2,77 +2,93 @@
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<title>SmartSales : Restaurant</title>
<%= csrf_meta_tags %>
<!-- Favicon-->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<title>SmartSales : Restaurant</title>
<%= csrf_meta_tags %>
<!-- Favicon-->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- Google Fonts -->
<!-- <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css"> -->
<!-- Bootstrap Core Css -->
<!-- <link href="plugins/bootstrap/css/bootstrap.css" rel="stylesheet"> -->
<!-- Bootstrap Core Css -->
<!-- <link href="plugins/bootstrap/css/bootstrap.css" rel="stylesheet"> -->
<!-- Waves Effect Css -->
<!-- <link href="plugins/node-waves/waves.css" rel="stylesheet" /> -->
<!-- Waves Effect Css -->
<!-- <link href="plugins/node-waves/waves.css" rel="stylesheet" /> -->
<!-- Animation Css -->
<!-- <link href="plugins/animate-css/animate.css" rel="stylesheet" /> -->
<!-- Animation Css -->
<!-- <link href="plugins/animate-css/animate.css" rel="stylesheet" /> -->
<!-- Morris Chart Css-->
<!-- <link href="plugins/morrisjs/morris.css" rel="stylesheet" /> -->
<!-- Morris Chart Css-->
<!-- <link href="plugins/morrisjs/morris.css" rel="stylesheet" /> -->
<!-- Custom Css -->
<!-- <link href="css/style.css" rel="stylesheet"> -->
<!-- Custom Css -->
<!-- <link href="css/style.css" rel="stylesheet"> -->
<!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
<!-- <link href="css/themes/all-themes.css" rel="stylesheet" /> -->
<%= stylesheet_link_tag 'login', media: 'all', 'data-turbolinks-track': 'reload' %>
<!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
<!-- <link href="css/themes/all-themes.css" rel="stylesheet" /> -->
<%= stylesheet_link_tag 'login', media: 'all', 'data-turbolinks-track': 'reload' %>
<!-- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> -->
<%= javascript_include_tag 'login', 'data-turbolinks-track': 'reload' %>
</head>
</head>
<body class="login-page">
<body class="login-page">
<!-- Page Loader -->
<div class="page-loader-wrapper">
<div class="loader">
<div class="preloader">
<div class="spinner-layer pl-red">
<div class="circle-clipper left">
<div class="circle"></div>
</div>
<div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
<div class="loader">
<div class="preloader">
<div class="spinner-layer pl-red">
<div class="circle-clipper left">
<div class="circle"></div>
</div>
<p>Please wait...</p>
<div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
<p>Please wait...</p>
</div>
</div>
<!-- #END# Page Loader -->
<% flash.each do |type, message| %>
<%
if type == "notice"
color = "alert-success"
elsif type == "error"
color = "alert-danger"
elsif type == "warning"
color = "alert-warning"
else
color = "bg-black"
end %>
<p id="noti" class="hidden noti" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p>
<% end %>
<div class="login-box">
<div class="logo text-center">
<img src="/image/SX-logo.png" width="150px" height="150px">
<p>
<small>Version - 1.0.1</small>
</p>
</div>
<%= simple_form_for(@login_form, url: login_path, method: "post") do |f| %>
<div class="card padding-10">
<div class="card-header">
<div class="form-group">
<%= f.input :emp_id, as: :hidden, required: false, class: "form-control" %>
<div class="logo text-center">
<img src="/image/SX-logo.png" width="150px" height="150px">
<p>
<small>Version - 1.0.1</small>
</p>
</div>
<%= simple_form_for(@login_form, url: login_path, method: "post") do |f| %>
<div class="card padding-10">
<div class="card-header">
<div class="form-group">
<%= f.input :emp_id, as: :hidden, required: false, class: "form-control" %>
<%= f.input :password, label: "Access PIN", required: false, class: "form-control" %>
</div>
</div>
<%= f.input :password, label: "Access PIN", required: false, class: "form-control" %>
</div>
</div>
<div class="card-content">
<div class='col-md-12'>
<div class='row bottom'>
@@ -116,10 +132,43 @@
$("#login_form_password").val(old_value + value);
}
});
});
</script>
function showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit) {
if (colorName === null || colorName === '') { colorName = 'bg-black'; }
if (animateEnter === null || animateEnter === '') { animateEnter = 'animated fadeInDown'; }
if (animateExit === null || animateExit === '') { animateExit = 'animated fadeOutUp'; }
var allowDismiss = true;
$.notify({
message: text
},
{
type: colorName,
allow_dismiss: allowDismiss,
newest_on_top: true,
timer: 1000,
placement: {
from: placementFrom,
align: placementAlign
},
animate: {
enter: animateEnter,
exit: animateExit
},
template: '<div data-notify="container" class="bootstrap-notify-container alert alert-dismissible {0} ' + (allowDismiss ? "p-r-30" : "") + '" role="alert">' +
'<button type="button" aria-hidden="true" class="close float-right m-l-20 m-t--5" data-notify="dismiss">×</button>' +
'<span data-notify="icon"></span> ' +
'<span data-notify="title">{1}</span> ' +
'<span data-notify="message">{2}</span>' +
'<div class="progress" data-notify="progressbar">' +
'<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
'</div>' +
'<a href="{3}" target="{4}" data-notify="url"></a>' +
'</div>'
});
}
//end Notificaiotn message
</script>
</body>
</html>

View File

@@ -54,6 +54,7 @@
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p>
<% end %>
<!-- #END# Page Loader -->
<div class="container">
<div class="row">
@@ -158,7 +159,7 @@
$(document).ready(function () {
// for Notificaiotn message
console.log("hi");
var placementFrom = $("#noti").attr('data-placement-from');
var placementAlign = $("#noti").attr('data-placement-align');
var animateEnter = $("#noti").attr('data-animate-enter');