|
|
@ -59,8 +59,16 @@ function save(partID) {
|
|
|
|
var partno_v = $('table#details tr#partno td input').val();
|
|
|
|
var partno_v = $('table#details tr#partno td input').val();
|
|
|
|
var description_v = $('table#details tr#description td input').val();
|
|
|
|
var description_v = $('table#details tr#description td input').val();
|
|
|
|
var datasheet = $('table#details tr#datasheet td input')[0].files;
|
|
|
|
var datasheet = $('table#details tr#datasheet td input')[0].files;
|
|
|
|
|
|
|
|
if(partno_v.length == 0){
|
|
|
|
|
|
|
|
alert('Please enter a part number.');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
if(description_v.length > 200) {
|
|
|
|
if(description_v.length > 200) {
|
|
|
|
alert('Description too long (max 200 characters).')
|
|
|
|
alert('Description too long (max 200 characters).');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(description_v.length == 0) {
|
|
|
|
|
|
|
|
alert('Please enter a description.');
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var data = new FormData();
|
|
|
|
var data = new FormData();
|
|
|
|