update
BIN
old/assets/images/arrow.png
Normal file
|
After Width: | Height: | Size: 166 B |
BIN
old/assets/images/avatars/1.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
old/assets/images/avatars/10.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
old/assets/images/avatars/2.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
old/assets/images/avatars/3.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
old/assets/images/avatars/4.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
old/assets/images/avatars/5.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
old/assets/images/avatars/6.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
old/assets/images/avatars/7.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
old/assets/images/avatars/8.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
old/assets/images/avatars/9.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
old/assets/images/brand-1.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
old/assets/images/global-sprite.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
old/assets/images/icons/1.png
Normal file
|
After Width: | Height: | Size: 758 B |
BIN
old/assets/images/icons/10.png
Normal file
|
After Width: | Height: | Size: 934 B |
BIN
old/assets/images/icons/11.png
Normal file
|
After Width: | Height: | Size: 909 B |
BIN
old/assets/images/icons/12.png
Normal file
|
After Width: | Height: | Size: 591 B |
BIN
old/assets/images/icons/13.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
old/assets/images/icons/14.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
old/assets/images/icons/15.png
Normal file
|
After Width: | Height: | Size: 921 B |
BIN
old/assets/images/icons/16.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
old/assets/images/icons/17.png
Normal file
|
After Width: | Height: | Size: 693 B |
BIN
old/assets/images/icons/18.png
Normal file
|
After Width: | Height: | Size: 825 B |
BIN
old/assets/images/icons/19.png
Normal file
|
After Width: | Height: | Size: 599 B |
BIN
old/assets/images/icons/2.png
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
old/assets/images/icons/20.png
Normal file
|
After Width: | Height: | Size: 635 B |
BIN
old/assets/images/icons/21.png
Normal file
|
After Width: | Height: | Size: 410 B |
BIN
old/assets/images/icons/22.png
Normal file
|
After Width: | Height: | Size: 382 B |
BIN
old/assets/images/icons/23.png
Normal file
|
After Width: | Height: | Size: 334 B |
BIN
old/assets/images/icons/24.png
Normal file
|
After Width: | Height: | Size: 742 B |
BIN
old/assets/images/icons/25.png
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
old/assets/images/icons/26.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
old/assets/images/icons/27.png
Normal file
|
After Width: | Height: | Size: 712 B |
BIN
old/assets/images/icons/28.png
Normal file
|
After Width: | Height: | Size: 622 B |
BIN
old/assets/images/icons/29.png
Normal file
|
After Width: | Height: | Size: 893 B |
BIN
old/assets/images/icons/3.png
Normal file
|
After Width: | Height: | Size: 456 B |
BIN
old/assets/images/icons/30.png
Normal file
|
After Width: | Height: | Size: 847 B |
BIN
old/assets/images/icons/31.png
Normal file
|
After Width: | Height: | Size: 405 B |
BIN
old/assets/images/icons/32.png
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
old/assets/images/icons/4.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
old/assets/images/icons/5.png
Normal file
|
After Width: | Height: | Size: 889 B |
BIN
old/assets/images/icons/6.png
Normal file
|
After Width: | Height: | Size: 619 B |
BIN
old/assets/images/icons/7.png
Normal file
|
After Width: | Height: | Size: 674 B |
BIN
old/assets/images/icons/8.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
old/assets/images/icons/9.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
old/assets/images/image-big.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
old/assets/images/img-product.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
old/assets/images/logo_hura8.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
old/assets/images/logo_new.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
old/assets/images/logo_small.png
Normal file
|
After Width: | Height: | Size: 416 B |
14
old/assets/script/charts.js
Normal file
51
old/assets/script/checkbox.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Created by Glee on 03-Nov-2020.
|
||||
*/
|
||||
|
||||
const Checkbox = function (deleteItemCb) {
|
||||
|
||||
const INPUT_CHECKBOX_CLASS = '.js-checkbox-id';
|
||||
let _deleteItemCb = deleteItemCb;
|
||||
|
||||
return {
|
||||
setAllChecked,
|
||||
getCheckedIds,
|
||||
deleteSelected
|
||||
}
|
||||
|
||||
function setAllChecked() {
|
||||
var all_checkboxes = $(INPUT_CHECKBOX_CLASS);
|
||||
|
||||
if ($(this).is(':checked')) {
|
||||
all_checkboxes.each(function (index, item) {
|
||||
$(item).prop("checked", true);
|
||||
})
|
||||
} else {
|
||||
all_checkboxes.each(function (index, item) {
|
||||
$(item).prop("checked", false);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function deleteSelected() {
|
||||
if (!confirm('Bạn chắc chắn muốn xóa ?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(INPUT_CHECKBOX_CLASS).each(function (index, item) {
|
||||
if ($(item).is(':checked')) {
|
||||
//delete_deal(item.value, false);
|
||||
_deleteItemCb(item.value)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getCheckedIds() {
|
||||
let list_ids = [];
|
||||
$(INPUT_CHECKBOX_CLASS).each(function (index, item) {
|
||||
if ($(item).is(':checked')) list_ids.push(item.value);
|
||||
});
|
||||
|
||||
return list_ids;
|
||||
}
|
||||
};
|
||||
40
old/assets/script/global.js
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
const AdminFunction = (() => {
|
||||
function capNhatTrangThaiMenu(e) {
|
||||
!1 === e ? $("#js-admin-content-container").addClass("show-large-menu") : $("#js-admin-content-container").removeClass("show-large-menu"), $("#js-menu-big").toggleClass("hidden", e), $("#js-menu-small").toggleClass("hidden", !e), $("#js-form-search").toggleClass("menu-hide", e), localStorage.setItem(e ? "menu_big" : "menu_small", "hidden"), localStorage.removeItem(e ? "menu_small" : "menu_big");
|
||||
}
|
||||
function e(e) {
|
||||
let t = null;
|
||||
return function (...n) {
|
||||
const o = this, a = function () {
|
||||
t = null, n.length > 0 && !e && func.apply(o, n);
|
||||
}, i = e && !t;
|
||||
clearTimeout(t), t = setTimeout(a, wait), i && func.apply(o, n);
|
||||
};
|
||||
}
|
||||
function t(t) {
|
||||
$("#status_" + t).html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Đang xử lý..</span>'), setTimeout(() => {
|
||||
$("#status_" + t).html("");
|
||||
}, 1e3);
|
||||
}
|
||||
function n(e) {
|
||||
$(e).keyup((() => {
|
||||
$("#js-show-search").show();
|
||||
}));
|
||||
$("body").click((() => {
|
||||
$("#js-show-search").hide();
|
||||
}));
|
||||
}
|
||||
function o(e) {
|
||||
$("#js-status-hottype-" + e).html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Đang xử lý..</span>'), setTimeout(() => {
|
||||
$("#js-status-hottype-" + e).html("");
|
||||
}, 1e3);
|
||||
}
|
||||
function i(e) {
|
||||
$("#overlay").addClass("active"), $(".status-notificatiom").addClass("active"), !0 === e ? $(".status-notificatiom .content").html('<i class="fa fa-check"></i> <b>Cập nhật thành công</b>\n <p>Đơn hàng #000-368 đã được cập nhật thành công</p>') : $(".status-notificatiom .content").html('<i class="fa-solid fa-triangle-exclamation"></i> <b>Lỗi cập nhật</b><p>Có một số vấn đề với hoạt động của bạn.</p>');
|
||||
}
|
||||
function r() {
|
||||
$("#overlay").removeClass("active"), $(".status-notificatiom").removeClass("active");
|
||||
}
|
||||
return { capNhatTrangThaiMenu: capNhatTrangThaiMenu, add_product_to_category: t, run_search: n, update_product_hot: o, checkForm: i, closeForm: r };
|
||||
})();
|
||||
41
old/assets/script/hura.global.css
Normal file
@@ -0,0 +1,41 @@
|
||||
/* ===========================
|
||||
FONT IMPORT (Dùng chung)
|
||||
=========================== */
|
||||
@import "https://fonts.googleapis.com/css2?family=DM+Sans:wght@100;200;300;400;500;600;700;800;900;1000&display=swap";
|
||||
@import "https://fonts.googleapis.com/css2?family=Wix+Madefor+Text:wght@400;500;600;700;800;1000&display=swap";
|
||||
@import "https://fonts.googleapis.com/css2?family=Inclusive+Sans:wght@400;500;600;700;800;900;1000&display=swap";
|
||||
@import "https://fonts.googleapis.com/css2?family=AR+One+Sans:wght@400;500;600;700;800;1000&display=swap";
|
||||
|
||||
@layer properties {
|
||||
:root {
|
||||
--font-sans: "Inclusive Sans", sans-serif;
|
||||
--text-base: 16px;
|
||||
--color-hura: #0041e8;
|
||||
--color-header: #002bb5;
|
||||
--text-base--line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
html,
|
||||
body {
|
||||
font-family: var(--font-sans);
|
||||
font-size: var(--text-base);
|
||||
line-height: var(--text-base--line-height);
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.btn-active {
|
||||
--btn-bg: var(--color-hura);
|
||||
--btn-fg: #ffffff;
|
||||
--btn-border: var(--color-hura);
|
||||
}
|
||||
.btn-active:hover {
|
||||
--btn-bg: #002bb5;
|
||||
--btn-border: #002bb5;
|
||||
}
|
||||
}
|
||||
114
old/assets/script/hura_style.css
Normal file
2
old/assets/script/jquery.js
vendored
Normal file
16584
old/assets/script/style.css
Normal file
65
old/assets/typescript/main.js
Normal file
@@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
var AdminFunctions = (function () {
|
||||
function toggleMenuVisibility(hideLargeMenu) {
|
||||
var contentContainer = $('#js-admin-content-container');
|
||||
var largeMenu = $('#js-menu-big');
|
||||
var smallMenu = $('#js-menu-small');
|
||||
var searchForm = $('#js-form-search');
|
||||
contentContainer.toggleClass('show-large-menu', !hideLargeMenu);
|
||||
largeMenu.toggleClass('hidden', hideLargeMenu);
|
||||
smallMenu.toggleClass('hidden', !hideLargeMenu);
|
||||
searchForm.toggleClass('menu-hide', hideLargeMenu);
|
||||
localStorage.setItem(hideLargeMenu ? 'menu_big' : 'menu_small', 'hidden');
|
||||
localStorage.removeItem(hideLargeMenu ? 'menu_small' : 'menu_big');
|
||||
}
|
||||
function debounce(func, wait, immediate) {
|
||||
var timeout = null;
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var context = this;
|
||||
var later = function () {
|
||||
timeout = null;
|
||||
if (!immediate)
|
||||
func.apply(context, args);
|
||||
};
|
||||
var callNow = immediate && !timeout;
|
||||
if (timeout !== null) {
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
timeout = setTimeout(later, wait);
|
||||
if (callNow)
|
||||
func.apply(context, args);
|
||||
};
|
||||
}
|
||||
function addProductToCategory(productId) {
|
||||
var statusElement = $('#status_' + productId);
|
||||
statusElement.html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Processing...</span>');
|
||||
setTimeout(function () {
|
||||
statusElement.html('');
|
||||
}, 1000);
|
||||
}
|
||||
function searchSuggestions(inputSelector) {
|
||||
$(inputSelector).keyup(debounce(function () {
|
||||
$('#js-show-search').show();
|
||||
}, 300, false));
|
||||
$('body').click(function () {
|
||||
$('#js-show-search').hide();
|
||||
});
|
||||
}
|
||||
function markProductAsHot(productId) {
|
||||
var statusElement = $('#js-status-hottype-' + productId);
|
||||
statusElement.html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Processing...</span>');
|
||||
setTimeout(function () {
|
||||
statusElement.html('');
|
||||
}, 1000);
|
||||
}
|
||||
return {
|
||||
toggleMenuVisibility: toggleMenuVisibility,
|
||||
addProductToCategory: addProductToCategory,
|
||||
searchSuggestions: searchSuggestions,
|
||||
markProductAsHot: markProductAsHot
|
||||
};
|
||||
})();
|
||||
76
old/assets/typescript/main.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
|
||||
interface AdminFunctions {
|
||||
toggleMenuVisibility(hideLargeMenu: boolean): void;
|
||||
addProductToCategory(productId: string): void;
|
||||
searchSuggestions(inputSelector: string): void;
|
||||
markProductAsHot(productId: string): void;
|
||||
}
|
||||
|
||||
const AdminFunctions: AdminFunctions = (() => {
|
||||
|
||||
function toggleMenuVisibility(hideLargeMenu: boolean): void {
|
||||
const contentContainer = $('#js-admin-content-container');
|
||||
const largeMenu = $('#js-menu-big');
|
||||
const smallMenu = $('#js-menu-small');
|
||||
const searchForm = $('#js-form-search');
|
||||
|
||||
contentContainer.toggleClass('show-large-menu', !hideLargeMenu);
|
||||
largeMenu.toggleClass('hidden', hideLargeMenu);
|
||||
smallMenu.toggleClass('hidden', !hideLargeMenu);
|
||||
searchForm.toggleClass('menu-hide', hideLargeMenu);
|
||||
|
||||
localStorage.setItem(hideLargeMenu ? 'menu_big' : 'menu_small', 'hidden');
|
||||
localStorage.removeItem(hideLargeMenu ? 'menu_small' : 'menu_big');
|
||||
}
|
||||
|
||||
function debounce(func: (...args: any[]) => void, wait: number, immediate: boolean) {
|
||||
let timeout: ReturnType<typeof setTimeout> | null = null;
|
||||
return function (this: HTMLInputElement, ...args: any[]) {
|
||||
const context = this;
|
||||
const later = function () {
|
||||
timeout = null;
|
||||
if (!immediate) func.apply(context, args);
|
||||
};
|
||||
const callNow = immediate && !timeout;
|
||||
if (timeout !== null) {
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
timeout = setTimeout(later, wait);
|
||||
if (callNow) func.apply(context, args);
|
||||
};
|
||||
}
|
||||
|
||||
function addProductToCategory(productId: string): void {
|
||||
const statusElement = $('#status_' + productId);
|
||||
statusElement.html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Processing...</span>');
|
||||
setTimeout(() => {
|
||||
statusElement.html('');
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function searchSuggestions(inputSelector: string): void {
|
||||
$(inputSelector).keyup(debounce(function (this: HTMLInputElement) {
|
||||
$('#js-show-search').show();
|
||||
}, 300, false) as any);
|
||||
|
||||
$('body').click(function () {
|
||||
$('#js-show-search').hide();
|
||||
});
|
||||
}
|
||||
|
||||
function markProductAsHot(productId: string): void {
|
||||
const statusElement = $('#js-status-hottype-' + productId);
|
||||
statusElement.html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Processing...</span>');
|
||||
setTimeout(() => {
|
||||
statusElement.html('');
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
return {
|
||||
toggleMenuVisibility,
|
||||
addProductToCategory,
|
||||
searchSuggestions,
|
||||
markProductAsHot
|
||||
};
|
||||
})();
|
||||