This commit is contained in:
2024-05-07 15:42:55 +07:00
parent 6415cca99f
commit fe7ddf826e
8 changed files with 327 additions and 165 deletions

View File

@@ -1,6 +1,23 @@
"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 () {
@@ -8,8 +25,39 @@ var AdminFunction = (function () {
}, 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 {
add_product_to_category: add_product_to_category
capNhatTrangThaiMenu: capNhatTrangThaiMenu,
add_product_to_category: add_product_to_category,
run_search: run_search,
searchSelect: searchSelect,
update_product_hot: update_product_hot
}
})();

View File

@@ -911,28 +911,27 @@ input[type=radio]:focus:before {
vertical-align: inherit;
}
#js-form-search [type=search]:focus::before {
position: absolute;
content: "\f00d";
font-family: "Font Awesome 6 Free";
font-weight: 900;
left: 0;
top: 0;
}
.autocomplete-suggestions {
height: 334px;
overflow-y: auto;
z-index: 999;
}
.autocomplete-suggestions .item {
padding: 12px 0;
padding: 10px 15px;
border-bottom: 1px solid #ededed;
}
.autocomplete-suggestions .item .info {
width: calc(100% - 108px);
margin-right: 48px;
}
.autocomplete-suggestions .item img {
width: 60px;
display: block;
}
.autocomplete-suggestions .item .name {
font-weight: 600;
line-height: 20px;
}
.autocomplete-suggestions .item .price {
font-weight: 600;
color: #fb4e4e;
line-height: 20px;
display: block;
margin-top: 5px;
.autocomplete-suggestions .item:hover {
font-weight: 700;
background: #f6f6f6;
}
.table-list-customer th {
@@ -1268,4 +1267,9 @@ input[type=radio]:focus:before {
}
.list-category .style-checkbox {
color: #919699;
}
.order-detail-page .select2-container {
width: 100% !important;
margin-top: 10px;
}/*# sourceMappingURL=pc_style.css.map */

View File

@@ -941,28 +941,25 @@ input[type="radio"] {
}
}
#js-form-search [type="search"]:focus::before {
position: absolute;
content: "\f00d";
font-family: "Font Awesome 6 Free";
font-weight: 900;
left: 0;
top: 0;
}
.autocomplete-suggestions {
height: 334px;
overflow-y: auto;
z-index: 999;
.item {
padding: 12px 0;
padding: 10px 15px;
border-bottom: 1px solid #ededed;
.info {
width: calc(100% - 108px);
margin-right: 48px;
}
img {
width: 60px;
display: block;
}
.name {
font-weight: 600;
line-height: 20px;
}
.price {
font-weight: 600;
color: #fb4e4e;
line-height: 20px;
display: block;
margin-top: 5px;
&:hover {
font-weight: 700;
background: #f6f6f6;
}
}
}
@@ -1314,3 +1311,8 @@ input[type="radio"] {
color: #919699;
}
}
.order-detail-page .select2-container {
width: 100% !important;
margin-top: 10px;
}