This commit is contained in:
2024-05-09 10:29:45 +07:00
parent ce9710c758
commit f66da1b416
2 changed files with 1 additions and 110 deletions

View File

@@ -1,64 +1 @@
"use strict";
var AdminFunction = (function () {
function capNhatTrangThaiMenu(hideMenuBig) {
if (hideMenuBig === false) {
$('#js-admin-content-container').addClass('show-large-menu')
} else {
$('#js-admin-content-container').removeClass('show-large-menu')
}
$('#js-menu-big').toggleClass('hidden', hideMenuBig);
$('#js-menu-small').toggleClass('hidden', !hideMenuBig);
$('#js-form-search').toggleClass('menu-hide', hideMenuBig);
localStorage.setItem(hideMenuBig ? 'menu_big' : 'menu_small', 'hidden');
localStorage.removeItem(hideMenuBig ? 'menu_small' : 'menu_big');
}
function add_product_to_category(id) {
$('#status_' + id).html('<span class= "loading loading-bars loading-sm" ></span ><span class="ml-[3px]">Đang xử lý..</span>');
setTimeout(function () {
$('#status_' + id).html('');
}, 1000)
}
function run_search(holder) {
$(holder).keyup(debounce(function () {
var inputString = $(this).val();
$('#js-show-search').show()
}, 300));
$('body').click(function () {
$("#js-show-search").hide();
});
}
function update_product_hot(id) {
$('#js-status-hottype-' + id).html('<span class= "loading loading-bars loading-sm" ></span ><span class="ml-[3px]">Đang xử lý..</span>');
setTimeout(function () {
$('#js-status-hottype-' + id).html('');
}, 1000)
}
function searchSelect(holder) {
$(holder).select2();
}
return {
capNhatTrangThaiMenu: capNhatTrangThaiMenu,
add_product_to_category: add_product_to_category,
run_search: run_search,
searchSelect: searchSelect,
update_product_hot: update_product_hot
}
})();
(function () { const t = document.createElement("link").relList; if (t && t.supports && t.supports("modulepreload")) return; for (const e of document.querySelectorAll('link[rel="modulepreload"]')) i(e); new MutationObserver(e => { for (const r of e) if (r.type === "childList") for (const o of r.addedNodes) o.tagName === "LINK" && o.rel === "modulepreload" && i(o) }).observe(document, { childList: !0, subtree: !0 }); function s(e) { const r = {}; return e.integrity && (r.integrity = e.integrity), e.referrerPolicy && (r.referrerPolicy = e.referrerPolicy), e.crossOrigin === "use-credentials" ? r.credentials = "include" : e.crossOrigin === "anonymous" ? r.credentials = "omit" : r.credentials = "same-origin", r } function i(e) { if (e.ep) return; e.ep = !0; const r = s(e); fetch(e.href, r) } })();