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

Merged
marek merged 1 commits from fix-empty-location into master 1 year ago

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

You absolute twat, you forgot the $ before the identifier, therefore the entire system is now broken! You should be ashamed of your self Marek!

-Marek.

You absolute twat, you forgot the $ before the identifier, therefore the entire system is now broken! You should be ashamed of your self Marek! -Marek.
alert('Please select a location.');
return;
}

Loading…
Cancel
Save