sdk: reformat
This commit is contained in:
parent
656c69ab5d
commit
ba3f85919f
@ -1,5 +1,4 @@
|
|||||||
;"use strict";
|
;
|
||||||
|
|
||||||
var contented = (function ($, currentScriptPath) {
|
var contented = (function ($, currentScriptPath) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
@ -103,6 +102,15 @@ var contented = (function($, currentScriptPath) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$f.find('.contented').on('drag', function (e) {
|
$f.find('.contented').on('drag', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
handleUploadFrom(event.originalEvent.dataTransfer.files);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("body").append($f);
|
||||||
|
|
||||||
|
var handleUploadFrom = function (files) {
|
||||||
|
|
||||||
input.files = event.originalEvent.dataTransfer.files;
|
input.files = event.originalEvent.dataTransfer.files;
|
||||||
refreshCaption();
|
refreshCaption();
|
||||||
setType("progress");
|
setType("progress");
|
||||||
@ -110,9 +118,8 @@ var contented = (function($, currentScriptPath) {
|
|||||||
// Ajax uploader
|
// Ajax uploader
|
||||||
// TODO
|
// TODO
|
||||||
form.submit();
|
form.submit();
|
||||||
});
|
|
||||||
|
|
||||||
$("body").append($f);
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -131,6 +138,7 @@ var contented = (function($, currentScriptPath) {
|
|||||||
})(
|
})(
|
||||||
jQuery,
|
jQuery,
|
||||||
(function () {
|
(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
// Determine current script path
|
// Determine current script path
|
||||||
// @ref https://stackoverflow.com/a/26023176
|
// @ref https://stackoverflow.com/a/26023176
|
||||||
|
Loading…
x
Reference in New Issue
Block a user