sdk: reformat

This commit is contained in:
mappu 2017-10-08 14:15:16 +13:00
parent 656c69ab5d
commit ba3f85919f
1 changed files with 48 additions and 40 deletions

View File

@ -1,5 +1,4 @@
;"use strict";
;
var contented = (function ($, currentScriptPath) {
"use strict";
@ -103,6 +102,15 @@ var contented = (function($, currentScriptPath) {
});
$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;
refreshCaption();
setType("progress");
@ -110,9 +118,8 @@ var contented = (function($, currentScriptPath) {
// Ajax uploader
// TODO
form.submit();
});
$("body").append($f);
}
});
@ -131,6 +138,7 @@ var contented = (function($, currentScriptPath) {
})(
jQuery,
(function () {
"use strict";
// Determine current script path
// @ref https://stackoverflow.com/a/26023176