.
This commit is contained in:
@@ -26,9 +26,9 @@
|
|||||||
document.addEventListener('drop', function (e) { e.preventDefault(); }, false);
|
document.addEventListener('drop', function (e) { e.preventDefault(); }, false);
|
||||||
|
|
||||||
function add_input_form() {
|
function add_input_form() {
|
||||||
var form_idx = $('#id_series-TOTAL_FORMS').val();
|
var form_idx = $('#id_images-TOTAL_FORMS').val();
|
||||||
$('#image_form_set').append($('#empty_form').html().replace(/__prefix__/g, form_idx));
|
$('#image_form_set').append($('#empty_form').html().replace(/__prefix__/g, form_idx));
|
||||||
$('#id_series-TOTAL_FORMS').val(parseInt(form_idx) + 1);
|
$('#id_images-TOTAL_FORMS').val(parseInt(form_idx) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_answers_input_form() {
|
function add_answers_input_form() {
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
$(evt.target).removeClass("drop-target-active");
|
$(evt.target).removeClass("drop-target-active");
|
||||||
|
|
||||||
// Get all input elements
|
// Get all input elements
|
||||||
inputs = $("#long-form input[type=file][id^=id_series-]");
|
inputs = $("#long-form input[type=file][id^=id_images-]");
|
||||||
//fileInput = document.getElementById("id_series-0-image");
|
//fileInput = document.getElementById("id_images-0-image");
|
||||||
|
|
||||||
// Make sure we have enough input targets
|
// Make sure we have enough input targets
|
||||||
input_diff = (evt.dataTransfer.files.length - inputs.length)
|
input_diff = (evt.dataTransfer.files.length - inputs.length)
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Need to make sure we include the new ones...
|
// Need to make sure we include the new ones...
|
||||||
inputs = $("#long-form input[type=file][id^=id_series-]");
|
inputs = $("#long-form input[type=file][id^=id_images-]");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop through each dropped file and try to assign to an
|
// Loop through each dropped file and try to assign to an
|
||||||
|
|||||||
Reference in New Issue
Block a user