remove turbolink in backend and update logout
This commit is contained in:
@@ -38,8 +38,10 @@ $(document).ready(function() {
|
||||
type: method,
|
||||
url: url ,
|
||||
success: function(data) {
|
||||
// console.log(data.url);
|
||||
location.href = data.url;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
swal("Cancelled", "Your imaginary file is safe :)", "error");
|
||||
}
|
||||
|
||||
@@ -15,6 +15,5 @@
|
||||
//= require tether
|
||||
//= require bootstrap/js/popper.min
|
||||
//= require bootstrap/js/bootstrap-material-design.min
|
||||
//= require turbolinks
|
||||
//= require node-waves/waves.js
|
||||
//= require BSBMaterial/admin.js
|
||||
@@ -84,7 +84,8 @@ class HomeController < ApplicationController
|
||||
# clear in employee session
|
||||
Employee.logout(session[:session_token])
|
||||
session[:session_token] = nil
|
||||
redirect_to root_path
|
||||
# redirect_to root_path
|
||||
render :json => {:status=> "Success", :url => root_path }.to_json
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).on('turbolinks:load', function () {
|
||||
$(document).ready(function () {
|
||||
$("#login_form_password").focus();
|
||||
|
||||
$(".pin_pad").click(function (event) {
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
</html>
|
||||
|
||||
<script>
|
||||
$(document).on('turbolinks:load', function () {
|
||||
$(document).ready(function () {
|
||||
|
||||
// for Notificaiotn message
|
||||
|
||||
|
||||
Reference in New Issue
Block a user