mirror of
https://github.com/wekan/wekan.git
synced 2025-12-21 09:50:13 +01:00
Prettier & eslint project style update
This commit is contained in:
parent
a0a482aa8e
commit
3eb4d2c341
116 changed files with 6216 additions and 5240 deletions
|
|
@ -11,7 +11,10 @@
|
|||
$.event.fix = (function(originalFix) {
|
||||
return function(event) {
|
||||
event = originalFix.apply(this, arguments);
|
||||
if (event.type.indexOf('drag') === 0 || event.type.indexOf('drop') === 0) {
|
||||
if (
|
||||
event.type.indexOf('drag') === 0 ||
|
||||
event.type.indexOf('drop') === 0
|
||||
) {
|
||||
event.dataTransfer = event.originalEvent.dataTransfer;
|
||||
}
|
||||
return event;
|
||||
|
|
@ -23,7 +26,7 @@
|
|||
matchType: /image.*/,
|
||||
};
|
||||
|
||||
return $.fn.dropImageReader = function(options) {
|
||||
return ($.fn.dropImageReader = function(options) {
|
||||
if (typeof options === 'function') {
|
||||
options = {
|
||||
callback: options,
|
||||
|
|
@ -40,9 +43,9 @@
|
|||
return $(element).bind('drop', function(event) {
|
||||
stopFn(event);
|
||||
const files = event.dataTransfer.files;
|
||||
for(let i=0; i<files.length; i++) {
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const f = files[i];
|
||||
if(f.type.match(options.matchType)) {
|
||||
if (f.type.match(options.matchType)) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(evt) {
|
||||
return options.callback.call(element, {
|
||||
|
|
@ -58,5 +61,5 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue