mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Added a few more jquery options for prevoew flexibility
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
379c5f6790
commit
383b5b43bb
Binary file not shown.
BIN
public/js/dist/all.js
vendored
BIN
public/js/dist/all.js
vendored
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/build/app.js": "/js/build/app.js?id=790387868822daaa28dcc3722928b7b1",
|
||||
"/js/build/app.js": "/js/build/app.js?id=da037f537476ebca094531163cb611f5",
|
||||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=d9175e3d9b9074397343dddebfe23888",
|
||||
"/css/build/app.css": "/css/build/app.css?id=dcb8aa9f4501a370214a67442e88daf0",
|
||||
|
@ -34,7 +34,7 @@
|
|||
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=ee4896df8b8f008ce73a9a0c2549aefd",
|
||||
"/js/build/vendor.js": "/js/build/vendor.js?id=47ecbb4bb3b0e02315f391caadbdf971",
|
||||
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=14d9a2affec7b066d20fcba2e6e67ad2",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=93f3ed97355821b50ee5bbd4f658dd05",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=758f256419ccaf4b4266da3bbc742b0b",
|
||||
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",
|
||||
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=c0d21166315b7c2cdd4819fa4a5e4d1e",
|
||||
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb",
|
||||
|
|
|
@ -540,10 +540,16 @@ $(document).ready(function () {
|
|||
var id = '#' + $this.attr('id');
|
||||
var status = id + '-status';
|
||||
var $status = $(status);
|
||||
var delete_id = $(id + '-deleteCheckbox');
|
||||
var preview_container = $(id + '-previewContainer');
|
||||
|
||||
|
||||
|
||||
$status.removeClass('text-success').removeClass('text-danger');
|
||||
$(status + ' .goodfile').remove();
|
||||
$(status + ' .badfile').remove();
|
||||
$(status + ' .previewSize').hide();
|
||||
preview_container.hide();
|
||||
$(id + '-info').html('');
|
||||
|
||||
var max_size = $this.data('maxsize');
|
||||
|
@ -554,17 +560,15 @@ $(document).ready(function () {
|
|||
$(id + '-info').append('<span class="label label-default">' + htmlEntities(this.files[i].name) + ' (' + formatBytes(this.files[i].size) + ')</span> ');
|
||||
}
|
||||
|
||||
console.log('Max size is: ' + max_size);
|
||||
console.log('Real size is: ' + total_size);
|
||||
|
||||
if (total_size > max_size) {
|
||||
$status.addClass('text-danger').removeClass('help-block').prepend('<i class="badfile fas fa-times"></i> ').append('<span class="previewSize"> Upload is ' + formatBytes(total_size) + '.</span>');
|
||||
} else {
|
||||
|
||||
$status.addClass('text-success').removeClass('help-block').prepend('<i class="goodfile fas fa-check"></i> ');
|
||||
var $preview = $(id + '-imagePreview');
|
||||
readURL(this, $preview);
|
||||
$preview.fadeIn();
|
||||
preview_container.fadeIn();
|
||||
delete_id.hide();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue