.
This commit is contained in:
@@ -193,7 +193,6 @@
|
||||
$(`img[data-input-id='${input.id}'`).removeClass("image-ident-loading");
|
||||
console.log(l);
|
||||
if (l.includes("accesion") || l.includes("number") || l.search(/(ref|rk9|rh8|ra9|rbz)\d+/g) > -1) {
|
||||
console.log("SHIT", input);
|
||||
$(input).addClass("image-ident-warning");
|
||||
$(`img[data-input-id='${input.id}'`).addClass("image-ident-warning");
|
||||
} else {
|
||||
@@ -218,13 +217,14 @@
|
||||
});
|
||||
}
|
||||
|
||||
const readFile = (file) => {
|
||||
const readFile = (file, el) => {
|
||||
reader(file).then(reader => {
|
||||
var image = new Image();
|
||||
image.height = 100;
|
||||
image.title = file.name;
|
||||
image.src = reader.result;
|
||||
$("#images").append(image);
|
||||
console.log("read" ,el);
|
||||
$(el).parent().parent().preppend(image);
|
||||
//images.push(reader.result);
|
||||
loadViewer(images);
|
||||
});
|
||||
@@ -239,7 +239,7 @@
|
||||
console.log(el);
|
||||
if (el.files.length > 0) {
|
||||
filename = el.files[0].name;
|
||||
await readFile(el.files[0]);
|
||||
await readFile(el.files[0], el);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
image_set = $("#images img");
|
||||
image_set = $("#image_form_set img");
|
||||
if (n == image_set.length) {
|
||||
const event = new CustomEvent('loadDicomViewer', { "detail": images });
|
||||
|
||||
@@ -282,9 +282,13 @@
|
||||
console.log(ul)
|
||||
|
||||
file_element = $(ul).find("input[type=file]").get(0);
|
||||
console.log(file_element);
|
||||
|
||||
""
|
||||
// If a (new) file is being uploaded we save it's name prior to it being hashed
|
||||
if (file_element.files.length > 0) {
|
||||
file_name = file_element.files[0].name
|
||||
$(ul).find("input[type=text]").val(file_name);
|
||||
}
|
||||
|
||||
if (file_element.files.length > 0 || $(ul).find(":contains('Currently:')")) {
|
||||
n++;
|
||||
$(ul).find("input[type=number]").val(n);
|
||||
|
||||
Reference in New Issue
Block a user