PATH:
home
/
lab2454c
/
costbloc.com
/
public
/
dist
/
js
/
custom
"use strict"; /* It's using for actual form data where need not necessary any kind of change */ function clickOnSaveForm(url = null, method = null, data = [], successMessage = null, redirect = null) { $.ajax({ type: method, url: SITE_URL + url, data:data, dataType:'JSON', contentType: false, cache: false, processData: false, success: function (data) { if (data.status == 1) { if (successMessage != null && successMessage.length > 0) { swal(jsLang(successMessage), { icon: "success", buttons: [false, jsLang('Ok')], }); } else { swal(jsLang('Successfully Saved'), { icon: "success", buttons: [false, jsLang('Ok')], }); } if (redirect != null && redirect.length > 0) { window.location.href = SITE_URL + redirect; } } else if(typeof (data.error != undefined)) { swal(data.error, { icon: "error", buttons: [false, jsLang('Ok')], }); } else { swal(jsLang('Something went wrong, please try again.'), { icon: "error", buttons: [false, jsLang('Ok')], }); } } }); } /* it's using for changes form data or add extra data */ function clickOnSave(url = null, method = null, data = []) { return $.ajax({ type: method, url: SITE_URL + url, data: { "_token": token, data: data, }, success: function (data) { if (data.status == 1) { swal(jsLang('Successfully Saved'), { icon: "success", buttons: [false, jsLang('Ok')], }); } else if(typeof (data.error != undefined)) { swal(data.error, { icon: "error", buttons: [false, jsLang('Ok')], }); } else { swal(jsLang('Something went wrong, please try again.'), { icon: "error", buttons: [false, jsLang('Ok')], }); } } }); } function dataTable(tableSelector, target) { $(tableSelector).DataTable({ "columnDefs": [{ "targets": target, "orderable": false }], "language": { "url": app_locale_url }, "pageLength": parseInt(row_per_page) }); } function confirmDelete(modalId, buttonId, lebelId, formId) { $(modalId).on('show.bs.modal', function (e) { var button = $(e.relatedTarget); var modal = $(this); $(buttonId).attr('data-task', '').removeClass('delete-task-btn'); if (button.data("label") == 'Delete') { modal.find(buttonId).addClass('delete-task-btn').attr('data-task', button.data('id')).text(jsLang('Delete')).show(); modal.find(lebelId).text(button.data('title')); modal.find('.modal-body').text(button.data('message')); } $('#confirmDeleteSubmitBtn').on('click', function () { $(formId + $(this).data('task')).trigger('submit'); }); }); } function confirmDeleteAjax(url = null, method = null, id = null, doReload = null) { swal({ title: jsLang("Are you sure?"), text: jsLang("Once deleted, you will not be able to recover this file."), icon: "warning", buttons: true, dangerMode: true, }) .then((willDelete) => { if (willDelete) { $.ajax({ type: method, url: SITE_URL + url, data: { "_token": token, id: id, }, success: function (data) { if (data.status == 1) { swal(jsLang('Deleted Successfully'), { icon: "success", buttons: [false, jsLang('Ok')], }); } else if(typeof (data.error != undefined)) { swal(data.error, { icon: "error", buttons: [false, jsLang('Ok')], }); } else { swal(jsLang('Something went wrong, please try again.'), { icon: "error", buttons: [false, jsLang('Ok')], }); } if (doReload == 'resfreshJSTree') { resfreshJSTree(); } } }); } else { swal("Your data is safe!"); } }); }
[-] create-product.min.js
[edit]
[-] refund.js
[edit]
[-] shops.js
[edit]
[-] commission.min.js
[edit]
[-] user.min.js
[edit]
[-] installer.js
[edit]
[-] category.min.js
[edit]
[+]
site
[-] jquery.blockUI.js
[edit]
[-] category.js
[edit]
[-] create-product.js
[edit]
[-] refund.min.js
[edit]
[+]
..
[-] shipping.min.js
[edit]
[-] user.js
[edit]
[-] jquery.blockUI.min.js
[edit]
[-] option.min.js
[edit]
[-] users-activity-list.js
[edit]
[-] attribute.min.js
[edit]
[-] email-configuration.min.js
[edit]
[-] dashboard.js
[edit]
[-] order.min.js
[edit]
[-] delete-modal.js
[edit]
[-] withdrawal.js
[edit]
[-] product-setting.js
[edit]
[-] validation.js
[edit]
[-] vendors.min.js
[edit]
[-] shops.min.js
[edit]
[-] roles.js
[edit]
[-] review.js
[edit]
[-] common.min.js
[edit]
[-] geolocale-suggestion.min.js
[edit]
[-] custom-category.js
[edit]
[-] product.js
[edit]
[-] order-invoice.min.js
[edit]
[-] common.js
[edit]
[-] product_list.js
[edit]
[-] settings.js
[edit]
[-] permission.min.js
[edit]
[-] coupon.js
[edit]
[-] export.js
[edit]
[-] yajra-custom.min.js
[edit]
[-] users-activity-list.min.js
[edit]
[-] finance.min.js
[edit]
[-] geolocale-suggestion.js
[edit]
[-] option.js
[edit]
[-] newsletter.min.js
[edit]
[-] order.js
[edit]
[-] role-permission.js
[edit]
[-] brand.min.js
[edit]
[-] transaction.js
[edit]
[-] popup.min.js
[edit]
[-] validation.min.js
[edit]
[-] templates.min.js
[edit]
[-] attribute.js
[edit]
[-] brand.js
[edit]
[-] app-layout.js
[edit]
[-] preference.js
[edit]
[-] invoice.js
[edit]
[-] order-invoice.js
[edit]
[-] yajra-export.js
[edit]
[-] product-setting.min.js
[edit]
[-] yajra-custom.js
[edit]
[-] installer.min.js
[edit]
[-] invoice.min.js
[edit]
[-] product_list.min.js
[edit]
[-] email-configuration.js
[edit]
[-] custom-category.min.js
[edit]
[-] settings.min.js
[edit]
[-] yajra-export.min.js
[edit]
[-] withdrawal.min.js
[edit]
[-] payment.js
[edit]
[-] preference.min.js
[edit]
[-] roles.min.js
[edit]
[-] finance.js
[edit]
[-] app-layout.min.js
[edit]
[-] permission.js
[edit]
[-] transaction.min.js
[edit]
[-] popup.js
[edit]
[-] order_status.min.js
[edit]
[-] commission.js
[edit]
[-] coupon.min.js
[edit]
[-] shipping.js
[edit]
[-] review.min.js
[edit]
[-] templates.js
[edit]
[-] delete-modal.min.js
[edit]
[-] vendors.js
[edit]
[-] order_status.js
[edit]
[-] dashboard.min.js
[edit]
[-] newsletter.js
[edit]
[-] product.min.js
[edit]
[-] export.min.js
[edit]