fixed issue with being able to add a part to an empty location

pull/12/head
Marek Baczynski 2 years ago
parent 3c3f72b14f
commit c11c192d1c

@ -38,9 +38,10 @@ function new_entry() {
$('table#details tr#partno td input').val(''); $('table#details tr#partno td input').val('');
$('table#details tr#description td input').val(''); $('table#details tr#description td input').val('');
$('input[name=datasheet-url-input]').val(''); $('input[name=datasheet-url-input]').val('');
// container_onchange();
init_edit(-1); init_edit(-1);
overlay_in(); overlay_in();
container_onchange();
} }
function end_edit() { function end_edit() {
@ -74,7 +75,7 @@ function end_edit() {
} }
function save(partID) { function save(partID) {
if (!$('#location-dropdown').val()) { if (!$('#location-dropdown').val() || ('#location-dropdown').val()== -1 ) {
alert('Please select a location.'); alert('Please select a location.');
return; return;
} }

Loading…
Cancel
Save