partial update create kpi and progress bar
This commit is contained in:
@@ -1,63 +1,67 @@
|
||||
"use strict";
|
||||
|
||||
function moneyFormat(n, currency) {
|
||||
n = (n != null) ? n : 0;
|
||||
n = n != null ? n : 0;
|
||||
var v = parseFloat(n).toFixed(0);
|
||||
return currency + " " + v.replace(/./g, function (c, i, a) {
|
||||
return i > 0 && c !== "," && (a.length - i) % 3 === 0 ? "." + c : c;
|
||||
});
|
||||
return (
|
||||
currency +
|
||||
" " +
|
||||
v.replace(/./g, function (c, i, a) {
|
||||
return i > 0 && c !== "," && (a.length - i) % 3 === 0 ? "." + c : c;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
var KTToastr = function () {
|
||||
var KTToastr = (function () {
|
||||
var successToastr = function (msg, title) {
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"newestOnTop": false,
|
||||
"progressBar": false,
|
||||
"positionClass": "toast-top-right",
|
||||
"preventDuplicates": true,
|
||||
"onclick": null,
|
||||
"showDuration": "500",
|
||||
"hideDuration": "500",
|
||||
"timeOut": "3000",
|
||||
"extendedTimeOut": "3000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "swing",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
closeButton: true,
|
||||
debug: false,
|
||||
newestOnTop: false,
|
||||
progressBar: false,
|
||||
positionClass: "toast-top-right",
|
||||
preventDuplicates: true,
|
||||
onclick: null,
|
||||
showDuration: "500",
|
||||
hideDuration: "500",
|
||||
timeOut: "3000",
|
||||
extendedTimeOut: "3000",
|
||||
showEasing: "swing",
|
||||
hideEasing: "swing",
|
||||
showMethod: "fadeIn",
|
||||
hideMethod: "fadeOut",
|
||||
};
|
||||
var $toast = toastr["success"](msg, title);
|
||||
|
||||
if (typeof $toast === 'undefined') {
|
||||
if (typeof $toast === "undefined") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var errorToastr = function (msg, title) {
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"newestOnTop": false,
|
||||
"progressBar": false,
|
||||
"positionClass": "toast-top-right",
|
||||
"preventDuplicates": true,
|
||||
"onclick": null,
|
||||
"showDuration": "500",
|
||||
"hideDuration": "500",
|
||||
"timeOut": "3000",
|
||||
"extendedTimeOut": "3000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "swing",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
closeButton: true,
|
||||
debug: false,
|
||||
newestOnTop: false,
|
||||
progressBar: false,
|
||||
positionClass: "toast-top-right",
|
||||
preventDuplicates: true,
|
||||
onclick: null,
|
||||
showDuration: "500",
|
||||
hideDuration: "500",
|
||||
timeOut: "3000",
|
||||
extendedTimeOut: "3000",
|
||||
showEasing: "swing",
|
||||
hideEasing: "swing",
|
||||
showMethod: "fadeIn",
|
||||
hideMethod: "fadeOut",
|
||||
};
|
||||
var $toast = toastr["error"](msg, title);
|
||||
|
||||
if (typeof $toast === 'undefined') {
|
||||
if (typeof $toast === "undefined") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
initSuccess: function (msg, title) {
|
||||
@@ -65,11 +69,29 @@ var KTToastr = function () {
|
||||
},
|
||||
initError: function (msg, title) {
|
||||
errorToastr(msg, title);
|
||||
}
|
||||
},
|
||||
};
|
||||
}();
|
||||
})();
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
var li = $('.kt-menu__item--active');
|
||||
li.closest('li.kt-menu__item--submenu').addClass('kt-menu__item--open');
|
||||
});
|
||||
var li = $(".kt-menu__item--active");
|
||||
li.closest("li.kt-menu__item--submenu").addClass("kt-menu__item--open");
|
||||
|
||||
// Initialize Select2 globally
|
||||
if (typeof $.fn.select2 !== "undefined") {
|
||||
$(".select2").select2({
|
||||
theme: "bootstrap4",
|
||||
width: "100%",
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize DatePicker globally
|
||||
if (typeof $.fn.datepicker !== "undefined") {
|
||||
$(".datepicker").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
orientation: "bottom auto",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user