This commit is contained in:
2025-12-11 13:30:40 +07:00
parent ebfaf799eb
commit 70ca13999e
10 changed files with 271 additions and 818 deletions

View File

@@ -361,11 +361,11 @@
// Xóa class current ở tất cả các tab
document.querySelectorAll("#js-admin-home-tab a").forEach(function (el) {
el.classList.remove("btn-active");
el.classList.remove("hura-btn-active");
});
// Gán class current vào tab đang click
this.classList.add("btn-active");
this.classList.add("hura-btn-active");
// Lấy ID từ href để show nội dung
var id = this.getAttribute("href");

View File

@@ -27,6 +27,10 @@
{% include javascript/product_form %}
{% elsif global.module == 'marketing' %}
{% include javascript/marketing_form %}
{% elsif global.module == 'brand' %}
{% include javascript/brand %}

View File

@@ -0,0 +1,21 @@
<!-- plugin upload image -->
<link href="https://unpkg.com/filepond/dist/filepond.min.css" rel="stylesheet" />
<link href="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css"
rel="stylesheet" />
<script src="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.js"></script>
<script src="https://unpkg.com/filepond/dist/filepond.min.js"></script>
<script>
// Quan trọng: đăng ký plugin
FilePond.registerPlugin(FilePondPluginImagePreview);
FilePond.create(document.querySelector("#avatar-promotion"), {
credits: false,
allowImageCrop: false,
allowImagePreview: false,
allowMultiple: true,
labelIdle: 'Kéo thả ảnh hoặc <span class="filepond--label-action">Chọn ảnh</span>',
})
</script>

View File

@@ -1,8 +1,10 @@
<script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
<script src="{{ 'RowExpand.js' | asset_url }}"></script>
<!-- plugin upload image -->
<link href="https://unpkg.com/filepond/dist/filepond.min.css" rel="stylesheet" />
<link href="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css"
rel="stylesheet" />
<script src="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.js"></script>
<script src="https://unpkg.com/filepond/dist/filepond.min.js"></script>