first commit
This commit is contained in:
+1920
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
!function(a){a.fn.datepicker.dates.vi={days:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"],daysShort:["CN","Thứ 2","Thứ 3","Thứ 4","Thứ 5","Thứ 6","Thứ 7"],daysMin:["CN","T2","T3","T4","T5","T6","T7"],months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],monthsShort:["Th1","Th2","Th3","Th4","Th5","Th6","Th7","Th8","Th9","Th10","Th11","Th12"],today:"Hôm nay",clear:"Xóa",format:"dd/mm/yyyy"}}(jQuery);
|
||||
Vendored
+6659
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
// Wait for the DOM to load before running the script
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Get the remember-me container, checkbox, and custom checkbox from the DOM
|
||||
var rememberMeContainer = document.querySelector('.remember-me');
|
||||
var checkbox = rememberMeContainer.querySelector('input[type="checkbox"]');
|
||||
var checkboxCustom = rememberMeContainer.querySelector('.checkbox-custom');
|
||||
|
||||
// Add a click event listener to the remember-me container
|
||||
rememberMeContainer.addEventListener('click', function(event) {
|
||||
// If the clicked element isn't the checkbox itself, toggle the checkbox
|
||||
if (event.target !== checkbox) {
|
||||
checkbox.checked = !checkbox.checked;
|
||||
|
||||
// Manually trigger the change event on the checkbox
|
||||
var changeEvent = new Event('change', {
|
||||
'bubbles': true,
|
||||
'cancelable': true
|
||||
});
|
||||
checkbox.dispatchEvent(changeEvent);
|
||||
}
|
||||
});
|
||||
|
||||
// Add a change event listener to the checkbox
|
||||
checkbox.addEventListener('change', function() {
|
||||
// This function will be called any time the checkbox is checked or unchecked
|
||||
// You can add any additional functionality you need here
|
||||
});
|
||||
|
||||
// Optional: If you have a form and want to perform a custom submit action
|
||||
var form = document.querySelector('.login-form');
|
||||
form.addEventListener('submit', function(event) {
|
||||
// Prevent the default form submit
|
||||
event.preventDefault();
|
||||
|
||||
// You can add custom form submit functionality here
|
||||
// For example, you could use AJAX to submit the form data to your server
|
||||
});
|
||||
|
||||
// Additional event listeners and functionality can be added below
|
||||
});
|
||||
@@ -0,0 +1,72 @@
|
||||
const mobileScreen = window.matchMedia("(max-width: 990px )");
|
||||
$(document).ready(function () {
|
||||
$(".dashboard-nav-dropdown-toggle").click(function () {
|
||||
$(this).closest(".dashboard-nav-dropdown")
|
||||
.toggleClass("show")
|
||||
.find(".dashboard-nav-dropdown")
|
||||
.removeClass("show");
|
||||
$(this).parent()
|
||||
.siblings()
|
||||
.removeClass("show");
|
||||
});
|
||||
$(".menu-toggle").click(function () {
|
||||
if (mobileScreen.matches) {
|
||||
$(".dashboard-nav").toggleClass("mobile-show");
|
||||
} else {
|
||||
$(".dashboard").toggleClass("dashboard-compact");
|
||||
}
|
||||
});
|
||||
|
||||
new DataTable('#table', {
|
||||
responsive: true,
|
||||
bAutoWidth: false,
|
||||
bLengthChange: true,
|
||||
lengthMenu: [[5, 10, 15, -1], ["5", "10", "15", "Tất cả"]],
|
||||
style_data :
|
||||
[{'border': 'none'}],
|
||||
info: false,
|
||||
paging: true,
|
||||
pageLength: 10,
|
||||
language: {
|
||||
search: "",
|
||||
info: "Hiển thị _START_ tới _END_ của _TOTAL_ giường",
|
||||
paginate: {
|
||||
previous: 'Trang trước',
|
||||
next: 'Trang sau'
|
||||
},
|
||||
lengthMenu: 'Hiển thị _MENU_ dòng trên mỗi trang'
|
||||
},
|
||||
dom: "<'row'<'col-sm-10'l><'col-sm-2'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// ordering: false,
|
||||
// order: [
|
||||
// [4, 'asc'],
|
||||
// [1, 'asc'],
|
||||
// [2, 'asc'],
|
||||
// [6, 'desc']
|
||||
// ],
|
||||
// draw: 1,
|
||||
pagingType: 'simple_numbers',
|
||||
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
$('td:eq(0)', nRow).html(iDisplayIndexFull +1);
|
||||
},
|
||||
});
|
||||
|
||||
var multiImgPreview = function(input, imgPreviewPlaceholder) {
|
||||
if (input.files) {
|
||||
$('.imgPreview').empty();
|
||||
var filesAmount = input.files.length;
|
||||
for (i = 0; i < filesAmount; i++) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(event) {
|
||||
$($.parseHTML('<img>')).attr('src', event.target.result).appendTo(imgPreviewPlaceholder);
|
||||
}
|
||||
reader.readAsDataURL(input.files[i]);
|
||||
}
|
||||
}
|
||||
};
|
||||
$('#upload-image').on('change', function() {
|
||||
multiImgPreview(this, 'div.imgPreview');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user