|
@@ -7,10 +7,13 @@
|
|
<title>Krajee JQuery Plugins - © Kartik</title>
|
|
<title>Krajee JQuery Plugins - © Kartik</title>
|
|
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
|
|
<link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
|
|
|
|
+ <link href="../themes/explorer/theme.css" media="all" rel="stylesheet" type="text/css"/>
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
|
|
|
+ <script src="../js/plugins/sortable.js" type="text/javascript"></script>
|
|
<script src="../js/fileinput.js" type="text/javascript"></script>
|
|
<script src="../js/fileinput.js" type="text/javascript"></script>
|
|
<script src="../js/fileinput_locale_fr.js" type="text/javascript"></script>
|
|
<script src="../js/fileinput_locale_fr.js" type="text/javascript"></script>
|
|
<script src="../js/fileinput_locale_es.js" type="text/javascript"></script>
|
|
<script src="../js/fileinput_locale_es.js" type="text/javascript"></script>
|
|
|
|
+ <script src="../themes/explorer/theme.js" type="text/javascript"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
@@ -22,6 +25,8 @@
|
|
</h1>
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
<form enctype="multipart/form-data">
|
|
<form enctype="multipart/form-data">
|
|
|
|
+ <input id="kv-explorer" type="file" multiple>
|
|
|
|
+ <br>
|
|
<input id="file-0a" class="file" type="file" multiple data-min-file-count="1">
|
|
<input id="file-0a" class="file" type="file" multiple data-min-file-count="1">
|
|
<br>
|
|
<br>
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
@@ -128,7 +133,19 @@
|
|
showCaption: false,
|
|
showCaption: false,
|
|
browseClass: "btn btn-primary btn-lg",
|
|
browseClass: "btn btn-primary btn-lg",
|
|
fileType: "any",
|
|
fileType: "any",
|
|
- previewFileIcon: "<i class='glyphicon glyphicon-king'></i>"
|
|
|
|
|
|
+ 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",
|
|
|
|
+ ],
|
|
|
|
+ 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},
|
|
|
|
+ ],
|
|
});
|
|
});
|
|
$("#file-4").fileinput({
|
|
$("#file-4").fileinput({
|
|
uploadExtraData: {kvId: '10'}
|
|
uploadExtraData: {kvId: '10'}
|
|
@@ -158,6 +175,22 @@
|
|
'allowedFileExtensions': ['jpg', 'png', 'gif'],
|
|
'allowedFileExtensions': ['jpg', 'png', 'gif'],
|
|
'elErrorContainer': '#errorBlock'
|
|
'elErrorContainer': '#errorBlock'
|
|
});
|
|
});
|
|
|
|
+ $("#kv-explorer").fileinput({
|
|
|
|
+ 'theme': 'explorer',
|
|
|
|
+ '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",
|
|
|
|
+ ],
|
|
|
|
+ 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},
|
|
|
|
+ ]
|
|
|
|
+ });
|
|
/*
|
|
/*
|
|
$("#test-upload").on('fileloaded', function(event, file, previewId, index) {
|
|
$("#test-upload").on('fileloaded', function(event, file, previewId, index) {
|
|
alert('i = ' + index + ', id = ' + previewId + ', file = ' + file.name);
|
|
alert('i = ' + index + ', id = ' + previewId + ', file = ' + file.name);
|