Browse Source

Fix #1371: Capture file identifier in thumbnails

Kartik Visweswaran 6 years ago
parent
commit
88cff4c2e2

+ 1 - 0
CHANGE.md

@@ -5,6 +5,7 @@ Change Log: `bootstrap-fileinput`
 
 **Date:** _under development_
 
+- (enh #1371): Capture file identifier in thumbnails
 - (enh #1367, #1286): Better validation of piexif.js and other code enhancements.
 - (enh #1362, #1337, #1269): AutoOrientImage enhancement for mobile safari.
 - (enh #1336): Ability to configure `alt` and `title` attributes for images in `initialPreviewConfig`.

+ 4 - 94
css/fileinput.css

@@ -14,7 +14,6 @@
     width: 0;
     height: 0;
 }
-
 .file-no-browse {
     position: absolute;
     left: 50%;
@@ -28,40 +27,32 @@
     outline: none;
     box-shadow: none;
 }
-
 .kv-hidden, .file-caption-icon, .file-zoom-dialog .modal-header:before, .file-zoom-dialog .modal-header:after, .file-input-new .file-preview, .file-input-new .close, .file-input-new .glyphicon-file, .file-input-new .fileinput-remove-button, .file-input-new .fileinput-upload-button, .file-input-new .no-browse .input-group-btn, .file-input-ajax-new .fileinput-remove-button, .file-input-ajax-new .fileinput-upload-button, .file-input-ajax-new .no-browse .input-group-btn, .hide-content .kv-file-content {
     display: none;
 }
-
 .btn-file input[type=file], .file-caption-icon, .file-preview .fileinput-remove, .krajee-default .file-thumb-progress, .file-zoom-dialog .btn-navigate, .file-zoom-dialog .floating-buttons {
     position: absolute;
 }
-
 .file-input, .file-loading:before, .btn-file, .file-caption, .file-preview, .krajee-default.file-preview-frame, .krajee-default .file-thumbnail-footer, .file-zoom-dialog .modal-dialog {
     position: relative;
 }
-
 .file-error-message pre, .file-error-message ul, .krajee-default .file-actions, .krajee-default .file-other-error {
     text-align: left;
 }
-
 .file-error-message pre, .file-error-message ul {
     margin: 0;
 }
-
 .krajee-default .file-drag-handle, .krajee-default .file-upload-indicator {
     float: left;
     margin: 5px 0 -5px;
     width: 16px;
     height: 16px;
 }
-
 .krajee-default .file-thumb-progress .progress, .krajee-default .file-thumb-progress .progress-bar {
     height: 11px;
     font-family: Verdana, Helvetica, sans-serif;
     font-size: 9px;
 }
-
 .krajee-default .file-caption-info, .krajee-default .file-size-info {
     display: block;
     white-space: nowrap;
@@ -71,21 +62,17 @@
     height: 15px;
     margin: auto;
 }
-
 .file-zoom-content > .file-object.type-video, .file-zoom-content > .file-object.type-flash, .file-zoom-content > .file-object.type-image {
     max-width: 100%;
     max-height: 100%;
     width: auto;
 }
-
 .file-zoom-content > .file-object.type-video, .file-zoom-content > .file-object.type-flash {
     height: 100%;
 }
-
 .file-zoom-content > .file-object.type-pdf, .file-zoom-content > .file-object.type-html, .file-zoom-content > .file-object.type-text, .file-zoom-content > .file-object.type-default {
     width: 100%;
 }
-
 .file-loading:before {
     content: " Loading...";
     display: inline-block;
@@ -96,16 +83,13 @@
     color: #999;
     background: transparent url(../img/loading.gif) top left no-repeat;
 }
-
 .file-object {
     margin: 0 0 -5px 0;
     padding: 0;
 }
-
 .btn-file {
     overflow: hidden;
 }
-
 .btn-file input[type=file] {
     top: 0;
     left: 0;
@@ -117,13 +101,11 @@
     cursor: inherit;
     display: block;
 }
-
 .btn-file ::-ms-browse {
     font-size: 10000px;
     width: 100%;
     height: 100%;
 }
-
 .file-caption .file-caption-name {
     width: 100%;
     margin: 0;
@@ -133,19 +115,15 @@
     background: none;
     outline: none;
 }
-
 .file-caption.icon-visible .file-caption-icon {
     display: inline-block;
 }
-
 .file-caption.icon-visible .file-caption-name {
     padding-left: 15px;
 }
-
 .file-caption-icon {
     left: 8px;
 }
-
 .file-error-message {
     color: #a94442;
     background-color: #f2dede;
@@ -154,17 +132,14 @@
     border-radius: 4px;
     padding: 15px;
 }
-
 .file-error-message pre {
     margin: 5px 0;
 }
-
 .file-caption-disabled {
     background-color: #eee;
     cursor: not-allowed;
     opacity: 1;
 }
-
 .file-preview {
     border-radius: 5px;
     border: 1px solid #ddd;
@@ -172,61 +147,50 @@
     width: 100%;
     margin-bottom: 5px;
 }
-
 .file-preview .btn-xs {
     padding: 1px 5px;
     font-size: 12px;
     line-height: 1.5;
     border-radius: 3px;
 }
-
 .file-preview .fileinput-remove {
     top: 1px;
     right: 1px;
     line-height: 10px;
 }
-
 .file-preview .clickable {
     cursor: pointer;
 }
-
 .file-preview-image {
     font: 40px Impact, Charcoal, sans-serif;
     color: #008000;
 }
-
 .krajee-default.file-preview-frame {
     margin: 8px;
-    border: 1px solid rgba(0,0,0,0.2);
-    box-shadow: 0 0 10px 0 rgba(0,0,0,0.2);
+    border: 1px solid rgba(0, 0, 0, 0.2);
+    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
     padding: 6px;
     float: left;
     text-align: center;
 }
-
 .krajee-default.file-preview-frame .kv-file-content {
     width: 213px;
     height: 160px;
 }
-
 .krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered {
     width: 400px;
 }
-
 .krajee-default.file-preview-frame[data-template="audio"] .kv-file-content {
     width: 240px;
     height: 55px;
 }
-
 .krajee-default.file-preview-frame .file-thumbnail-footer {
     height: 70px;
 }
-
 .krajee-default.file-preview-frame:not(.file-preview-error):hover {
-    border: 1px solid rgba(0,0,0,0.3);
-    box-shadow: 0 0 10px 0 rgba(0,0,0,0.4);
+    border: 1px solid rgba(0, 0, 0, 0.3);
+    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
 }
-
 .krajee-default .file-preview-text {
     display: block;
     color: #428bca;
@@ -236,21 +200,17 @@
     padding: 8px;
     resize: none;
 }
-
 .krajee-default .file-preview-html {
     border: 1px solid #ddd;
     padding: 8px;
     overflow: auto;
 }
-
 .krajee-default .file-other-icon {
     font-size: 6em;
 }
-
 .krajee-default .file-footer-buttons {
     float: right;
 }
-
 .krajee-default .file-footer-caption {
     display: block;
     text-align: center;
@@ -259,59 +219,48 @@
     color: #777;
     margin-bottom: 15px;
 }
-
 .krajee-default .file-preview-error {
     opacity: 0.65;
     box-shadow: none;
 }
-
 .krajee-default .file-thumb-progress {
     height: 11px;
     top: 37px;
     left: 0;
     right: 0;
 }
-
 .krajee-default.kvsortable-ghost {
     background: #e1edf7;
     border: 2px solid #a1abff;
 }
-
 .krajee-default .file-preview-other:hover {
     opacity: 0.8;
 }
-
 .krajee-default .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {
     color: #000;
 }
-
 .kv-upload-progress .progress {
     height: 20px;
     margin: 10px 0;
     overflow: hidden;
 }
-
 .kv-upload-progress .progress-bar {
     height: 20px;
     font-family: Verdana, Helvetica, sans-serif;
 }
-
 /*noinspection CssOverwrittenProperties*/
 .file-zoom-dialog .file-other-icon {
     font-size: 22em;
     font-size: 50vmin;
 }
-
 .file-zoom-dialog .modal-dialog {
     width: auto;
 }
-
 .file-zoom-dialog .modal-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
 }
-
 .file-zoom-dialog .btn-navigate {
     padding: 0;
     margin: 0;
@@ -323,30 +272,24 @@
     font-size: 4em;
     color: #1c94c4;
 }
-
 .file-zoom-dialog .btn-navigate:not([disabled]):hover {
     outline: none;
     box-shadow: none;
     opacity: 0.6;
 }
-
 .file-zoom-dialog .floating-buttons {
     top: 5px;
     right: 10px;
 }
-
 .file-zoom-dialog .btn-navigate[disabled] {
     opacity: 0.3;
 }
-
 .file-zoom-dialog .btn-prev {
     left: 1px;
 }
-
 .file-zoom-dialog .btn-next {
     right: 1px;
 }
-
 .file-zoom-dialog .kv-zoom-title {
     font-weight: 300;
     color: #999;
@@ -355,25 +298,20 @@
     white-space: nowrap;
     text-overflow: ellipsis;
 }
-
 .file-input-new .no-browse .form-control {
     border-top-right-radius: 4px;
     border-bottom-right-radius: 4px;
 }
-
 .file-input-ajax-new .no-browse .form-control {
     border-top-right-radius: 4px;
     border-bottom-right-radius: 4px;
 }
-
 .file-caption-main {
     width: 100%;
 }
-
 .file-thumb-loading {
     background: transparent url(../img/loading.gif) no-repeat scroll center center content-box !important;
 }
-
 .file-drop-zone {
     border: 1px dashed #aaa;
     border-radius: 4px;
@@ -382,95 +320,76 @@
     margin: 12px 15px 12px 12px;
     padding: 5px;
 }
-
 .file-drop-zone.clickable:hover {
     border: 2px dashed #999;
 }
-
 .file-drop-zone.clickable:focus {
     border: 2px solid #5acde2;
 }
-
 .file-drop-zone .file-preview-thumbnails {
     cursor: default;
 }
-
 .file-drop-zone-title {
     color: #aaa;
     font-size: 1.6em;
     padding: 85px 10px;
     cursor: default;
 }
-
 .file-highlighted {
     border: 2px dashed #999 !important;
     background-color: #eee;
 }
-
 .file-uploading {
     background: url(../img/loading-sm.gif) no-repeat center bottom 10px;
     opacity: 0.65;
 }
-
 .file-zoom-fullscreen .modal-dialog {
     min-width: 100%;
     margin: 0;
 }
-
 .file-zoom-fullscreen .modal-content {
     border-radius: 0;
     box-shadow: none;
     min-height: 100vh;
 }
-
 .file-zoom-fullscreen .modal-body {
     overflow-y: auto;
 }
-
 .floating-buttons {
     z-index: 3000;
 }
-
 .floating-buttons .btn-kv {
     margin-left: 3px;
     z-index: 3000;
 }
-
 .file-zoom-content {
     height: 480px;
     text-align: center;
 }
-
 .file-zoom-content .file-preview-image {
     max-height: 100%;
 }
-
 .file-zoom-content .file-preview-video {
     max-height: 100%;
 }
-
 .file-zoom-content > .file-object.type-image {
     height: auto;
     min-height: inherit;
 }
-
 .file-zoom-content > .file-object.type-audio {
     width: auto;
     height: 30px;
 }
-
 @media (min-width: 576px) {
     .file-zoom-dialog .modal-dialog {
         max-width: 500px;
     }
 }
-
 @media (min-width: 992px) {
     .file-zoom-dialog .modal-lg {
         max-width: 800px;
     }
 }
-
 @media (max-width: 767px) {
     .file-preview-thumbnails {
         display: flex;
@@ -478,47 +397,38 @@
         align-items: center;
         flex-direction: column;
     }
-
     .file-zoom-dialog .modal-header {
         flex-direction: column;
     }
 }
-
 @media (max-width: 350px) {
     .krajee-default.file-preview-frame:not([data-template="audio"]) .kv-file-content {
         width: 160px;
     }
 }
-
 @media (max-width: 420px) {
     .krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered {
         width: 100%;
     }
 }
-
 .file-loading[dir=rtl]:before {
     background: transparent url(../img/loading.gif) top right no-repeat;
     padding-left: 0;
     padding-right: 20px;
 }
-
 .file-sortable .file-drag-handle {
     cursor: move;
     opacity: 1;
 }
-
 .file-sortable .file-drag-handle:hover {
     opacity: 0.7;
 }
-
 .clickable .file-drop-zone-title {
     cursor: pointer;
 }
-
 .kv-zoom-actions .btn-kv {
     margin-left: 3px;
 }
-
 .file-preview-initial.sortable-chosen {
     background-color: #d9edf7;
 }

+ 150 - 139
examples/index.html

@@ -3,127 +3,138 @@
 <!--suppress JSUnresolvedLibraryURL -->
 <html lang="en">
 <head>
-    <meta charset="UTF-8"/>
-    <title>Krajee JQuery Plugins - &copy; Kartik</title>
-    
-    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" crossorigin="anonymous">
-    <link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
-    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" crossorigin="anonymous">
-    <link href="../themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>
-    <script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
-    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
-    <script src="../js/plugins/sortable.js" type="text/javascript"></script>
-    <script src="../js/fileinput.js" type="text/javascript"></script>
-    <script src="../js/locales/fr.js" type="text/javascript"></script>
-    <script src="../js/locales/es.js" type="text/javascript"></script>
-    <script src="../themes/fas/theme.js" type="text/javascript"></script>
-    <script src="../themes/explorer-fas/theme.js" type="text/javascript"></script>
+	<meta charset="UTF-8"/>
+	<title>Krajee JQuery Plugins - &copy; Kartik</title>
+
+	<link rel="stylesheet"
+	      href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
+	      crossorigin="anonymous">
+	<link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
+	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
+	      crossorigin="anonymous">
+	<link href="../themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>
+	<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
+	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js"
+	        crossorigin="anonymous"></script>
+	<script src="../js/plugins/piexif.js" type="text/javascript"></script>
+	<script src="../js/plugins/sortable.js" type="text/javascript"></script>
+	<script src="../js/fileinput.js" type="text/javascript"></script>
+	<script src="../js/locales/fr.js" type="text/javascript"></script>
+	<script src="../js/locales/es.js" type="text/javascript"></script>
+	<script src="../themes/fas/theme.js" type="text/javascript"></script>
+	<script src="../themes/explorer-fas/theme.js" type="text/javascript"></script>
 </head>
 <body>
 <div class="container my-4">
-    <h1>Bootstrap File Input Examples
-        <small><a href="https://github.com/kartik-v/bootstrap-fileinput-samples"><i
-                class="glyphicon glyphicon-download"></i> Download Sample Files</a></small>
-    </h1>
-    <hr>
-    <form enctype="multipart/form-data">
-        <div class="file-loading">
-            <input id="kv-explorer" type="file" multiple>
-        </div>
-        <br>
-        <div class="file-loading">
-            <input id="file-0a" class="file" type="file" multiple data-min-file-count="1" data-theme="fas">
-        </div>
-        <br>
-        <button type="submit" class="btn btn-primary">Submit</button>
-        <button type="reset" class="btn btn-outline-secondary">Reset</button>
-    </form>
-    <hr>
-    <form enctype="multipart/form-data">
-        <label for="file-0b">Test invalid input type</label>
-        <div class="file-loading">
-            <input id="file-0b" name="file-0b" class="file" type="text" multiple data-min-file-count="1" data-theme="fas">
-        </div>
-        <script>
+	<h1>Bootstrap File Input Examples
+		<small><a href="https://github.com/kartik-v/bootstrap-fileinput-samples"><i
+				class="glyphicon glyphicon-download"></i> Download Sample Files</a></small>
+	</h1>
+	<hr>
+	<form enctype="multipart/form-data">
+		<div class="file-loading">
+			<input id="kv-explorer" type="file" multiple>
+		</div>
+		<br>
+		<div class="file-loading">
+			<input id="file-0a" class="file" type="file" multiple data-min-file-count="1"
+			       data-theme="fas">
+		</div>
+		<br>
+		<button type="submit" class="btn btn-primary">Submit</button>
+		<button type="reset" class="btn btn-outline-secondary">Reset</button>
+	</form>
+	<hr>
+	<form enctype="multipart/form-data">
+		<label for="file-0b">Test invalid input type</label>
+		<div class="file-loading">
+			<input id="file-0b" name="file-0b" class="file" type="text" multiple
+			       data-min-file-count="1" data-theme="fas">
+		</div>
+		<script>
             $(document).on('ready', function () {
-                $("#file-0b").fileinput();
+                $('#file-0b').fileinput();
             });
-        </script>
-    </form>
-    <hr>
-    <form enctype="multipart/form-data">
-        <div class="file-loading">
-            <input id="file-0c" class="file" type="file" multiple data-min-file-count="3" data-theme="fas">
-        </div>
-        <hr>
-        <div class="form-group">
-            <div class="file-loading">
-                <input id="file-0d" class="file" type="file" data-theme="fas">
-            </div>
-        </div>
-        <hr>
-        <div class="form-group">
-            <div class="file-loading">
-                <input id="file-1" type="file" multiple class="file" data-overwrite-initial="false" data-min-file-count="2" data-theme="fas">
-            </div>
-        </div>
-        <hr>
-        <div class="form-group">
-            <div class="file-loading">
-                <input id="file-2" type="file" class="file" readonly data-show-upload="false" data-theme="fas">
-            </div>
-        </div>
-        <hr>
-        <div class="form-group">
-            <div class="file-loading">
-                <label>Preview File Icon</label>
-                <input id="file-3" type="file" multiple>
-            </div>
-        </div>
-        <hr>
-        <div class="form-group">
-            <div class="file-loading">
-                <input id="file-4" type="file" class="file" data-upload-url="#" data-theme="fas">
-            </div>
-        </div>
-        <hr>
-        <div class="form-group">
-            <button class="btn btn-warning" type="button">Disable Test</button>
-            <button class="btn btn-info" type="reset">Refresh Test</button>
-            <button class="btn btn-primary">Submit</button>
-            <button class="btn btn-outline-secondary" type="reset">Reset</button>
-        </div>
-        <hr>
-        <div class="form-group">
-            <div class="file-loading">
-                <input type="file" class="file" id="test-upload" multiple data-theme="fas">
-            </div>
-            <div id="errorBlock" class="help-block"></div>
-        </div>
-        <hr>
-        <div class="form-group">
-            <div class="file-loading">
-                <input id="file-5" class="file" type="file" multiple data-preview-file-type="any" data-upload-url="#" data-theme="fas">
-            </div>
-        </div>
-    </form>
+		</script>
+	</form>
+	<hr>
+	<form enctype="multipart/form-data">
+		<div class="file-loading">
+			<input id="file-0c" class="file" type="file" multiple data-min-file-count="3"
+			       data-theme="fas">
+		</div>
+		<hr>
+		<div class="form-group">
+			<div class="file-loading">
+				<input id="file-0d" class="file" type="file" data-theme="fas">
+			</div>
+		</div>
+		<hr>
+		<div class="form-group">
+			<div class="file-loading">
+				<input id="file-1" type="file" multiple class="file" data-overwrite-initial="false"
+				       data-min-file-count="2" data-theme="fas">
+			</div>
+		</div>
+		<hr>
+		<div class="form-group">
+			<div class="file-loading">
+				<input id="file-2" type="file" class="file" readonly data-show-upload="false"
+				       data-theme="fas">
+			</div>
+		</div>
+		<hr>
+		<div class="form-group">
+			<div class="file-loading">
+				<label>Preview File Icon</label>
+				<input id="file-3" type="file" multiple>
+			</div>
+		</div>
+		<hr>
+		<div class="form-group">
+			<div class="file-loading">
+				<input id="file-4" type="file" class="file" data-upload-url="#" data-theme="fas">
+			</div>
+		</div>
+		<hr>
+		<div class="form-group">
+			<button class="btn btn-warning" type="button">Disable Test</button>
+			<button class="btn btn-info" type="reset">Refresh Test</button>
+			<button class="btn btn-primary">Submit</button>
+			<button class="btn btn-outline-secondary" type="reset">Reset</button>
+		</div>
+		<hr>
+		<div class="form-group">
+			<div class="file-loading">
+				<input type="file" class="file" id="test-upload" multiple data-theme="fas">
+			</div>
+			<div id="errorBlock" class="help-block"></div>
+		</div>
+		<hr>
+		<div class="form-group">
+			<div class="file-loading">
+				<input id="file-5" class="file" type="file" multiple data-preview-file-type="any"
+				       data-upload-url="#" data-theme="fas">
+			</div>
+		</div>
+	</form>
 
 
-    <hr>
-    <h4>Multi Language Inputs</h4>
-    <form enctype="multipart/form-data">
-        <label>French Input</label>
-        <div class="file-loading">
-            <input id="file-fr" name="file-fr[]" type="file" multiple>
-        </div>
-        <hr style="border: 2px dotted">
-        <label>Spanish Input</label>
-            <div class="file-loading">
-                <input id="file-es" name="file-es[]" type="file" multiple>
-            </div>
-    </form>
-    <hr>
-    <br>
+	<hr>
+	<h4>Multi Language Inputs</h4>
+	<form enctype="multipart/form-data">
+		<label>French Input</label>
+		<div class="file-loading">
+			<input id="file-fr" name="file-fr[]" type="file" multiple>
+		</div>
+		<hr style="border: 2px dotted">
+		<label>Spanish Input</label>
+		<div class="file-loading">
+			<input id="file-es" name="file-es[]" type="file" multiple>
+		</div>
+	</form>
+	<hr>
+	<br>
 </div>
 </body>
 <script>
@@ -139,11 +150,11 @@
         uploadUrl: '#',
         allowedFileExtensions: ['jpg', 'png', 'gif']
     });
-    $("#file-0").fileinput({
+    $('#file-0').fileinput({
         theme: 'fas',
         'allowedFileExtensions': ['jpg', 'png', 'gif']
     });
-    $("#file-1").fileinput({
+    $('#file-1').fileinput({
         theme: 'fas',
         uploadUrl: '#', // you must set a valid URL here else you will get an error
         allowedFileExtensions: ['jpg', 'png', 'gif'],
@@ -160,40 +171,40 @@
      alert('File Selected. Name: ' + l + ', Num: ' + n);
      });
      */
-    $("#file-3").fileinput({
+    $('#file-3').fileinput({
         theme: 'fas',
         showUpload: false,
         showCaption: false,
-        browseClass: "btn btn-primary btn-lg",
-        fileType: "any",
-        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
+        browseClass: 'btn btn-primary btn-lg',
+        fileType: 'any',
+        previewFileIcon: '<i class=\'glyphicon glyphicon-king\'></i>',
         overwriteInitial: false,
         initialPreviewAsData: true,
         initialPreview: [
-            "http://lorempixel.com/1920/1080/transport/1",
-            "http://lorempixel.com/1920/1080/transport/2",
-            "http://lorempixel.com/1920/1080/transport/3"
+            'http://lorempixel.com/1920/1080/transport/1',
+            'http://lorempixel.com/1920/1080/transport/2',
+            'http://lorempixel.com/1920/1080/transport/3'
         ],
         initialPreviewConfig: [
-            {caption: "transport-1.jpg", size: 329892, width: "120px", url: "{$url}", key: 1},
-            {caption: "transport-2.jpg", size: 872378, width: "120px", url: "{$url}", key: 2},
-            {caption: "transport-3.jpg", size: 632762, width: "120px", url: "{$url}", key: 3}
+            {caption: 'transport-1.jpg', size: 329892, width: '120px', url: '{$url}', key: 1},
+            {caption: 'transport-2.jpg', size: 872378, width: '120px', url: '{$url}', key: 2},
+            {caption: 'transport-3.jpg', size: 632762, width: '120px', url: '{$url}', key: 3}
         ]
     });
-    $("#file-4").fileinput({
+    $('#file-4').fileinput({
         theme: 'fas',
         uploadExtraData: {kvId: '10'}
     });
-    $(".btn-warning").on('click', function () {
-        var $el = $("#file-4");
+    $('.btn-warning').on('click', function () {
+        var $el = $('#file-4');
         if ($el.attr('disabled')) {
             $el.fileinput('enable');
         } else {
             $el.fileinput('disable');
         }
     });
-    $(".btn-info").on('click', function () {
-        $("#file-4").fileinput('refresh', {previewClass: 'bg-info'});
+    $('.btn-info').on('click', function () {
+        $('#file-4').fileinput('refresh', {previewClass: 'bg-info'});
     });
     /*
      $('#file-4').on('fileselectnone', function() {
@@ -204,26 +215,26 @@
      });
      */
     $(document).ready(function () {
-        $("#test-upload").fileinput({
+        $('#test-upload').fileinput({
             'theme': 'fas',
             'showPreview': false,
             'allowedFileExtensions': ['jpg', 'png', 'gif'],
             'elErrorContainer': '#errorBlock'
         });
-        $("#kv-explorer").fileinput({
+        $('#kv-explorer').fileinput({
             'theme': 'explorer-fas',
             'uploadUrl': '#',
             overwriteInitial: false,
             initialPreviewAsData: true,
             initialPreview: [
-                "http://lorempixel.com/1920/1080/nature/1",
-                "http://lorempixel.com/1920/1080/nature/2",
-                "http://lorempixel.com/1920/1080/nature/3"
+                'http://lorempixel.com/1920/1080/nature/1',
+                'http://lorempixel.com/1920/1080/nature/2',
+                'http://lorempixel.com/1920/1080/nature/3'
             ],
             initialPreviewConfig: [
-                {caption: "nature-1.jpg", size: 329892, width: "120px", url: "{$url}", key: 1},
-                {caption: "nature-2.jpg", size: 872378, width: "120px", url: "{$url}", key: 2},
-                {caption: "nature-3.jpg", size: 632762, width: "120px", url: "{$url}", key: 3}
+                {caption: 'nature-1.jpg', size: 329892, width: '120px', url: '{$url}', key: 1},
+                {caption: 'nature-2.jpg', size: 872378, width: '120px', url: '{$url}', key: 2},
+                {caption: 'nature-3.jpg', size: 632762, width: '120px', url: '{$url}', key: 3}
             ]
         });
         /*

+ 2 - 1
js/fileinput.js

@@ -3254,7 +3254,8 @@
                 self._log(err);
             }
             if (!exifObj) {
-                self._log('Error loading the piexif.js library.');
+                self._log(
+                    'The piexif.js library was not detected. Either load piexif.js on your page OR set `autoOrientImage` to `false`.');
             }
             return exifObj;
         },

File diff suppressed because it is too large
+ 0 - 0
js/fileinput.min.js


+ 1 - 1
themes/explorer-fa/theme.js

@@ -15,7 +15,7 @@
 (function ($) {
     "use strict";
     var teTagBef = '<tr class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}"' +
-        ' data-template="{template}"', teContent = '<td class="kv-file-content">\n';
+        ' data-fileid="{fileid}" data-template="{template}"', teContent = '<td class="kv-file-content">\n';
     $.fn.fileinputThemes['explorer-fa'] = {
         layoutTemplates: {
             preview: '<div class="file-preview {class}">\n' +

File diff suppressed because it is too large
+ 0 - 0
themes/explorer-fa/theme.min.js


+ 1 - 1
themes/explorer-fas/theme.js

@@ -15,7 +15,7 @@
 (function ($) {
     "use strict";
     var teTagBef = '<tr class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}"' +
-        ' data-template="{template}"', teContent = '<td class="kv-file-content">\n';
+        ' data-fileid="{fileid}" data-template="{template}"', teContent = '<td class="kv-file-content">\n';
     $.fn.fileinputThemes['explorer-fas'] = {
         layoutTemplates: {
             preview: '<div class="file-preview {class}">\n' +

File diff suppressed because it is too large
+ 0 - 0
themes/explorer-fas/theme.min.js


+ 1 - 1
themes/explorer/theme.js

@@ -12,7 +12,7 @@
  */
 (function ($) {
     "use strict";
-    var teTagBef = '<tr class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}"' +
+    var teTagBef = '<tr class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}" data-fileid="{fileid}"' +
         ' data-template="{template}"', teContent = '<td class="kv-file-content">\n';
     $.fn.fileinputThemes.explorer = {
         layoutTemplates: {

+ 1 - 1
themes/explorer/theme.min.js

@@ -9,4 +9,4 @@
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
- */!function(e){"use strict";var t='<tr class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}"',i='<td class="kv-file-content">\n';e.fn.fileinputThemes.explorer={layoutTemplates:{preview:'<div class="file-preview {class}">\n    {close}    <div class="{dropClass}">\n    <table class="table table-bordered table-hover"><tbody class="file-preview-thumbnails">\n    </tbody></table>\n    <div class="clearfix"></div>    <div class="file-preview-status text-center text-success"></div>\n    <div class="kv-fileinput-error"></div>\n    </div>\n</div>',footer:'<td class="file-details-cell"><div class="explorer-caption" title="{caption}">{caption}</div> {size}{progress}</td><td class="file-actions-cell">{indicator} {actions}</td>',actions:'{drag}\n<div class="file-actions">\n    <div class="file-footer-buttons">\n        {upload} {download} {delete} {zoom} {other}     </div>\n</div>',zoomCache:'<tr style="display:none" class="kv-zoom-cache-theme"><td><table class="kv-zoom-cache">{zoomContent}</table></td></tr>'},previewMarkupTags:{tagBefore1:t+">"+i,tagBefore2:t+' title="{caption}">'+i,tagAfter:"</td>\n{footer}</tr>\n"},previewSettings:{image:{height:"60px"},html:{width:"100px",height:"60px"},text:{width:"100px",height:"60px"},video:{width:"auto",height:"60px"},audio:{width:"auto",height:"60px"},flash:{width:"100%",height:"60px"},object:{width:"100%",height:"60px"},pdf:{width:"100px",height:"60px"},other:{width:"100%",height:"60px"}},frameClass:"explorer-frame"}}(window.jQuery);
+ */!function(e){"use strict";var t='<tr class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}" data-fileid="{fileid}"',i='<td class="kv-file-content">\n';e.fn.fileinputThemes.explorer={layoutTemplates:{preview:'<div class="file-preview {class}">\n    {close}    <div class="{dropClass}">\n    <table class="table table-bordered table-hover"><tbody class="file-preview-thumbnails">\n    </tbody></table>\n    <div class="clearfix"></div>    <div class="file-preview-status text-center text-success"></div>\n    <div class="kv-fileinput-error"></div>\n    </div>\n</div>',footer:'<td class="file-details-cell"><div class="explorer-caption" title="{caption}">{caption}</div> {size}{progress}</td><td class="file-actions-cell">{indicator} {actions}</td>',actions:'{drag}\n<div class="file-actions">\n    <div class="file-footer-buttons">\n        {upload} {download} {delete} {zoom} {other}     </div>\n</div>',zoomCache:'<tr style="display:none" class="kv-zoom-cache-theme"><td><table class="kv-zoom-cache">{zoomContent}</table></td></tr>'},previewMarkupTags:{tagBefore1:t+">"+i,tagBefore2:t+' title="{caption}">'+i,tagAfter:"</td>\n{footer}</tr>\n"},previewSettings:{image:{height:"60px"},html:{width:"100px",height:"60px"},text:{width:"100px",height:"60px"},video:{width:"auto",height:"60px"},audio:{width:"auto",height:"60px"},flash:{width:"100%",height:"60px"},object:{width:"100%",height:"60px"},pdf:{width:"100px",height:"60px"},other:{width:"100%",height:"60px"}},frameClass:"explorer-frame"}}(window.jQuery);

Some files were not shown because too many files changed in this diff