initial commit

This commit is contained in:
2026-06-29 14:51:56 +06:00
commit c5c4b7c509
2400 changed files with 725568 additions and 0 deletions

46
webroot/js/inventory.js Normal file
View File

@@ -0,0 +1,46 @@
$(function () {
$('#dropzone').on('dragover', function () {
$(this).addClass('hover');
});
$('#dropzone').on('dragleave', function () {
$(this).removeClass('hover');
});
$('#dropzone input').on('change', function (e) {
var file = this.files[0];
$('#dropzone').removeClass('hover');
if (this.accept && $.inArray(file.type, this.accept.split(/, ?/)) == -1) {
return alert('File type not allowed.');
}
$('#dropzone').addClass('dropped');
$('#dropzone img').remove();
if ((/^image\/(gif|png|jpeg)$/i).test(file.type)) {
var reader = new FileReader(file);
reader.readAsDataURL(file);
reader.onload = function (e) {
var data = e.target.result,
$img = $('<img />').attr('src', data).fadeIn();
$('#dropzone div').html($img);
};
} else {
var ext = file.name.split('.').pop();
$('#dropzone div').html(ext);
}
});
$('[data-toggle="tooltip"]').tooltip(); //this js is for tooltip option show
});