Server IP : 66.29.132.124 / Your IP : 3.129.71.13 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/public/js/ |
Upload File : |
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); window.bravo_format_money = function($money) { if (!$money) { //return bookingCore.free_text; } //if (typeof bookingCore.booking_currency_precision && bookingCore.booking_currency_precision) { // $money = Math.round($money).toFixed(bookingCore.booking_currency_precision); //} $money = bravo_number_format($money/bookingCore.currency_rate, bookingCore.booking_decimals, bookingCore.decimal_separator, bookingCore.thousand_separator); var $symbol = bookingCore.currency_symbol; var $money_string = ''; switch (bookingCore.currency_position) { case "right": $money_string = $money + $symbol; break; case "left_space": $money_string = $symbol + " " + $money; break; case "right_space": $money_string = $money + " " + $symbol; break; case "left": default: $money_string = $symbol + $money; break; } return $money_string; } window.bravo_number_format = function (number, decimals, dec_point, thousands_sep) { number = (number + '') .replace(/[^0-9+\-Ee.]/g, ''); var n = !isFinite(+number) ? 0 : +number, prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, dec = (typeof dec_point === 'undefined') ? '.' : dec_point, s = '', toFixedFix = function (n, prec) { var k = Math.pow(10, prec); return '' + (Math.round(n * k) / k) .toFixed(prec); }; // Fix for IE parseFloat(0.55).toFixed(0) = 0; s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)) .split('.'); if (s[0].length > 3) { s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); } if ((s[1] || '') .length < prec) { s[1] = s[1] || ''; s[1] += new Array(prec - s[1].length + 1) .join('0'); } return s.join(dec); } window.bravo_handle_error_response = function(e){ switch (e.status) { case 401: // not logged in $('#login').modal('show'); break; } }; // Form validation var forms = document.getElementsByClassName('needs-validation'); // Loop over them and prevent submission var validation = Array.prototype.filter.call(forms, function(form) { form.addEventListener('submit', function(event) { if (form.checkValidity() === false) { event.preventDefault(); event.stopPropagation(); } form.classList.add('was-validated'); }, false); }); var bookingCoreApp ={ showSuccess:function (configs){ var args = {}; if(typeof configs == 'object') { args = configs; }else{ args.message = configs; } if(!args.title){ args.title = i18n.success; } args.centerVertical = true; bootbox.alert(args); }, showError:function (configs) { var args = {}; if(typeof configs == 'object') { args = configs; }else{ args.message = configs; } if(!args.title){ args.title = i18n.warning; } args.centerVertical = true; bootbox.alert(args); }, showAjaxError:function (e) { var json = e.responseJSON; if(typeof json !='undefined'){ if(typeof json.errors !='undefined'){ var html = ''; _.forEach(json.errors,function (val) { html+=val+'<br>'; }); return this.showError(html); } if(json.message){ return this.showError(json.message); } } if(e.responseText){ return this.showError(e.responseText); } }, showAjaxMessage:function (json) { if(json.message) { if(json.status){ this.showSuccess(json); }else{ this.showError(json); } } }, showConfirm:function (configs) { var args = {}; if(typeof configs == 'object') { args = configs; } args.buttons = { confirm: { label: '<i class="fa fa-check"></i> '+i18n.confirm, }, cancel: { label: '<i class="fa fa-times"></i> '+i18n.cancel, } }; args.centerVertical = true; bootbox.confirm(args); } };