update
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
|
||||
{% include javascript/product_form %}
|
||||
|
||||
{% elsif global.module == 'marketing' %}
|
||||
|
||||
{% include javascript/marketing_form %}
|
||||
|
||||
{% elsif global.module == 'brand' %}
|
||||
|
||||
{% include javascript/brand %}
|
||||
|
||||
21
template/javascript/marketing_form.html
Normal file
21
template/javascript/marketing_form.html
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user