$(document).ready(function() { $('body').bootstrapMaterialDesign(); var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight())); $('#custom-slimscroll').slimScroll({ height: height, size: '5px', color: 'rgba(0,0,0,0.5)', alwaysVisible: false, borderRadius: '0', railBorderRadius: '0', touchScrollStep : 25 }); $('#order-detail-slimscroll').slimScroll({ height: height-$('#order-detail-slimscroll').attr('data-height'), size: '5px', color: 'rgba(0,0,0,0.5)', alwaysVisible: false, borderRadius: '0', railBorderRadius: '0', touchScrollStep : 25 }); $('#menu-slimscroll').slimScroll({ height: height-$('#menu-slimscroll').attr('data-height'), size: '5px', color: 'rgba(0,0,0,0.5)', alwaysVisible: false, borderRadius: '0', railBorderRadius: '0', touchScrollStep : 25 }); // $('.delete').click(function(){ // var method = $(this).attr('data-method'); // var url = $(this).attr('data-ref'); // var html_text = $(this).siblings( "#delete_text" ).html(); // //var page = url.substring(url.lastIndexOf('/') + 1); // swal({ // title: "Confirmation", // text: html_text, // type: "warning", // showCancelButton: true, // confirmButtonColor: "#DD6B55", // html: true // }, function (isConfirm) { // if (isConfirm) { // $.ajax({ // type: method, // url: url , // success: function(data) { // location.href = data.url; // } // }); // } else { // swal("Cancelled", "Your imaginary file is safe :)", "error"); // } // }); // }); // for Notificaiotn message var placementFrom = $("#notify_message").attr('data-placement-from'); var placementAlign = $("#notify_message").attr('data-placement-align'); var animateEnter = $("#notify_message").attr('data-animate-enter'); var animateExit = $("#notify_message").attr('data-animate-exit'); var colorName = $("#notify_message").attr('data-color-name'); var text = $("#notify_message").attr('data-message'); if (text != null || colorName != null){ showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit); } 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: '
' }); } //end Notificaiotn message });