.
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
let normal = false;
|
let normal = false;
|
||||||
|
|
||||||
|
let active_file_inputs = new Set()
|
||||||
|
|
||||||
function showEditPopup(url) {
|
function showEditPopup(url) {
|
||||||
var win = window.open(url, "Edit",
|
var win = window.open(url, "Edit",
|
||||||
'height=500,width=800,resizable=yes,scrollbars=yes');
|
'height=500,width=800,resizable=yes,scrollbars=yes');
|
||||||
@@ -83,7 +85,6 @@
|
|||||||
file = evt.target.files[0];
|
file = evt.target.files[0];
|
||||||
$(evt.target).removeClass("image-ident-warning");
|
$(evt.target).removeClass("image-ident-warning");
|
||||||
$(evt.target).removeClass("image-ident-ok");
|
$(evt.target).removeClass("image-ident-ok");
|
||||||
//updateFileList();
|
|
||||||
|
|
||||||
|
|
||||||
console.log("input change1", evt);
|
console.log("input change1", evt);
|
||||||
@@ -130,15 +131,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateFileList() {
|
|
||||||
// Why do we update everything here?
|
|
||||||
$("#image_form_set input[type=file]").each((n, el) => {
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#add_abnormality").appendTo($("label[for='id_abnormality']"));
|
$("#add_abnormality").appendTo($("label[for='id_abnormality']"));
|
||||||
@@ -220,7 +212,6 @@
|
|||||||
|
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
//updateFileList();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -359,6 +350,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
active_file_inputs.add(el)
|
||||||
const readFile = (file, el) => {
|
const readFile = (file, el) => {
|
||||||
reader(file).then(reader => {
|
reader(file).then(reader => {
|
||||||
var image = new Image();
|
var image = new Image();
|
||||||
@@ -370,7 +362,11 @@
|
|||||||
$(el).parent().parent().find(".temp-thumb").remove();
|
$(el).parent().parent().find(".temp-thumb").remove();
|
||||||
$(el).parent().parent().prepend(image);
|
$(el).parent().parent().prepend(image);
|
||||||
//images.push(reader.result);
|
//images.push(reader.result);
|
||||||
|
|
||||||
|
active_file_inputs.delete(el)
|
||||||
|
if (active_file_inputs.length < 1) {
|
||||||
loadViewer();
|
loadViewer();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user