update checkout all formm
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Page Loader -->
|
||||
|
||||
|
||||
<div class="login-box">
|
||||
<div class="logo text-center">
|
||||
<img src="/image/SX-logo.png" width="150px" height="150px">
|
||||
@@ -115,6 +115,7 @@
|
||||
$("#login_form_password").val(old_value + value);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -38,6 +38,24 @@
|
||||
<p>Please wait...</p>
|
||||
</div>
|
||||
</div>
|
||||
<% flash.each do |type, message| %>
|
||||
<% puts type
|
||||
puts message
|
||||
puts "ssssssssssssss"
|
||||
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" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
|
||||
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
|
||||
</p>
|
||||
<% end %>
|
||||
<!-- #END# Page Loader -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@@ -140,11 +158,27 @@
|
||||
|
||||
<script>
|
||||
$(document).on('turbolinks:load', function () {
|
||||
|
||||
// for Notificaiotn message
|
||||
|
||||
var placementFrom = $("#noti").attr('data-placement-from');
|
||||
var placementAlign = $("#noti").attr('data-placement-align');
|
||||
var animateEnter = $("#noti").attr('data-animate-enter');
|
||||
var animateExit = $("#noti").attr('data-animate-exit');
|
||||
var colorName = $("#noti").attr('data-color-name');
|
||||
var text = $("#noti").attr('data-message');
|
||||
console.log(text);
|
||||
console.log(colorName);
|
||||
if (text != null || colorName != null){
|
||||
showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
|
||||
}
|
||||
|
||||
$(".empBtn").click(function (event) {
|
||||
event.preventDefault();
|
||||
var item = $(this).data("formid");
|
||||
$(item).submit();
|
||||
});
|
||||
|
||||
});
|
||||
function empID(){
|
||||
$('#emp_id').keyup(function(e) {
|
||||
@@ -159,6 +193,41 @@
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user