First step format upload with progress
This commit is contained in:
@@ -243,13 +243,13 @@ $("#search").on("change input.typeahead:selected", function(event) {
|
||||
});
|
||||
});
|
||||
|
||||
$("#btn-upload-format").on("change", function () {
|
||||
/*$("#btn-upload-format").on("change", function () {
|
||||
var filename = $(this).val();
|
||||
if (filename.substring(3, 11) === "fakepath") {
|
||||
filename = filename.substring(12);
|
||||
} // Remove c:\fake at beginning from localhost chrome
|
||||
$("#upload-format").text(filename);
|
||||
});
|
||||
});*/
|
||||
|
||||
$("#btn-upload-cover").on("change", function () {
|
||||
var filename = $(this).val();
|
||||
|
||||
+27
-8
@@ -130,8 +130,13 @@ $(".container-fluid").bind('drop', function (e) {
|
||||
}
|
||||
});
|
||||
if (dt.files.length) {
|
||||
$("#btn-upload")[0].files = dt.files;
|
||||
$("#form-upload").submit();
|
||||
if($("btn-upload-format").length) {
|
||||
$("#btn-upload-format")[0].files = dt.files;
|
||||
$("#form-upload-format").submit();
|
||||
} else {
|
||||
$("#btn-upload")[0].files = dt.files;
|
||||
$("#form-upload").submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -140,14 +145,28 @@ $("#btn-upload").change(function() {
|
||||
$("#form-upload").submit();
|
||||
});
|
||||
|
||||
$("#form-upload").uploadprogress({
|
||||
redirect_url: getPath() + "/", //"{{ url_for('web.index')}}",
|
||||
uploadedMsg: $("#form-upload").data("message"), //"{{_('Upload done, processing, please wait...')}}",
|
||||
modalTitle: $("#form-upload").data("title"), //"{{_('Uploading...')}}",
|
||||
modalFooter: $("#form-upload").data("footer"), //"{{_('Close')}}",
|
||||
modalTitleFailed: $("#form-upload").data("failed") //"{{_('Error')}}"
|
||||
$("#btn-upload-format").change(function() {
|
||||
$("#form-upload-format").submit();
|
||||
});
|
||||
|
||||
|
||||
$("#form-upload").uploadprogress({
|
||||
redirect_url: getPath() + "/",
|
||||
uploadedMsg: $("#form-upload").data("message"),
|
||||
modalTitle: $("#form-upload").data("title"),
|
||||
modalFooter: $("#form-upload").data("footer"),
|
||||
modalTitleFailed: $("#form-upload").data("failed")
|
||||
});
|
||||
|
||||
$("#form-upload-format").uploadprogress({
|
||||
redirect_url: getPath() + "/",
|
||||
uploadedMsg: $("#form-upload-format").data("message"),
|
||||
modalTitle: $("#form-upload-format").data("title"),
|
||||
modalFooter: $("#form-upload-format").data("footer"),
|
||||
modalTitleFailed: $("#form-upload-format").data("failed")
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var inp = $('#query').first()
|
||||
if (inp.length) {
|
||||
|
||||
Reference in New Issue
Block a user