.
This commit is contained in:
@@ -569,7 +569,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
const viewLoadChecker = setInterval(function() {
|
||||
const viewLoadChecker = setInterval(function () {
|
||||
if (load_viewer) {
|
||||
load_viewer = false;
|
||||
loadViewer();
|
||||
@@ -632,31 +632,54 @@
|
||||
|
||||
}
|
||||
|
||||
function checkHash(hash) {
|
||||
$.ajax({
|
||||
url: "{% url 'rapids:rapid_question_by_hash' %}",
|
||||
data: {
|
||||
csrfmiddlewaretoken: '{{ csrf_token }}',
|
||||
hash: hash
|
||||
},
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
function checkHash(hash, input) {
|
||||
$.ajax({
|
||||
url: "{% url 'rapids:rapid_question_by_hash' %}",
|
||||
data: {
|
||||
csrfmiddlewaretoken: '{{ csrf_token }}',
|
||||
hash: hash
|
||||
},
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
})
|
||||
// $.ajax().done(), $.ajax().fail(), $ajax().always() are upto you. Add/change accordingly
|
||||
.done(function (data) {
|
||||
console.log(data);
|
||||
// $.ajax().done(), $.ajax().fail(), $ajax().always() are upto you. Add/change accordingly
|
||||
.done(function (data) {
|
||||
console.log(data);
|
||||
|
||||
if (data.status == "success") {
|
||||
console.log("success");
|
||||
console.log(data.id)
|
||||
if (data.id) {
|
||||
toastr.info(`id ${data.id}`)
|
||||
}
|
||||
}
|
||||
})
|
||||
.always(function () {
|
||||
console.log('[Done]');
|
||||
})
|
||||
if (data.status == "success") {
|
||||
console.log("success");
|
||||
console.log(data.id)
|
||||
if (data.id) {
|
||||
//toastr.info(`id ${data.id}`)
|
||||
uploading_el = $(`img[data-input-id='${input.id}'], div[data-input-id='${input.id}']`)
|
||||
$(input).addClass("image-duplicate");
|
||||
uploading_el.addClass("image-duplicate");
|
||||
|
||||
toastr.warning(`Image (${input.files[0].name}) already exists.<br /><a href='${data.url}'>Click to view</a><br /><button type="button" class="btn clear">Dismiss</button>`, "Duplicate image", {
|
||||
"closeButton": false,
|
||||
"debug": false,
|
||||
"newestOnTop": false,
|
||||
"progressBar": false,
|
||||
"positionClass": "toast-top-full-width",
|
||||
"preventDuplicates": false,
|
||||
"onclick": null,
|
||||
"showDuration": "0",
|
||||
"hideDuration": "0",
|
||||
"timeOut": 0,
|
||||
"extendedTimeOut": 0,
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut",
|
||||
"tapToDismiss": false
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
.always(function () {
|
||||
console.log('[Done]');
|
||||
})
|
||||
}
|
||||
|
||||
function extractDicomStudyDescription(byteArray) {
|
||||
|
||||
Reference in New Issue
Block a user