update adminbsb for confirms
This commit is contained in:
@@ -61,7 +61,7 @@ $(function(){
|
||||
+JSON.stringify(item_attributes)+"' data-toggle='modal' data-target='.sx_item_detailModal'>"
|
||||
|
||||
+"<div class='card-block custom-card-block'>"
|
||||
+"<img id='logo' src='"+image_path+"'>"
|
||||
+"<img id='logo' height='125px' src='"+image_path+"'>"
|
||||
+"</div>"
|
||||
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
@@ -170,7 +170,7 @@ $(function(){
|
||||
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"'>"
|
||||
|
||||
+"<div class='card-block custom-card-block'>"
|
||||
+"<img id='logo' src='"+image_path+"'>"
|
||||
+"<img id='logo' height='125px' src='"+image_path+"'>"
|
||||
+"</div>"
|
||||
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
//= require bootstrap-select/js/bootstrap-select
|
||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||
//= require node-waves/waves.js
|
||||
//= require sweetalert/sweetalert.min.js
|
||||
//= require autosize/autosize.js
|
||||
//= require jquery-countto/jquery.countTo.js
|
||||
//= require raphael/raphael.min
|
||||
@@ -33,9 +34,9 @@
|
||||
//= require BSBMaterial/pages/index.js
|
||||
//= require BSBMaterial/demo.js
|
||||
|
||||
|
||||
$(document).on('turbolinks:load', function() {
|
||||
// $(document).ready(function(){
|
||||
//Datetimepicker plugin
|
||||
|
||||
$('.datetimepicker').bootstrapMaterialDatePicker({
|
||||
format: 'DD-MM YYYY - HH:mm',
|
||||
clearButton: true,
|
||||
@@ -54,14 +55,52 @@ $(document).on('turbolinks:load', function() {
|
||||
clearButton: true,
|
||||
date: false
|
||||
});
|
||||
/*
|
||||
$('.datepicker').attr('ReadOnly','true');
|
||||
$('.datepicker').css('cursor','pointer');*/
|
||||
|
||||
|
||||
});
|
||||
|
||||
function showConfirmMessage() {
|
||||
swal({
|
||||
title: "Information",
|
||||
text: "You will not be able to recover this imaginary file!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "OK",
|
||||
closeOnConfirm: true
|
||||
}, function () {
|
||||
swal("Deleted!", "Your imaginary file has been deleted.", "success");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$(function(){
|
||||
$('.delete').click(function(){
|
||||
var currentForm = $(this).closest("form");
|
||||
console.log(currentForm);
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "You will not be able to recover this imaginary file!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "Yes, delete it!",
|
||||
cancelButtonText: "No, cancel plx!",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}, function (isConfirm) {
|
||||
console.log(isConfirm);
|
||||
if (isConfirm) {
|
||||
console.log("hi")
|
||||
currentForm.submit();
|
||||
} else {
|
||||
swal("Cancelled", "Your imaginary file is safe :)", "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('body').bootstrapMaterialDesign();
|
||||
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user