|
|
|
@ -59,8 +59,16 @@ function save(partID) {
|
|
|
|
|
var partno_v = $('table#details tr#partno td input').val();
|
|
|
|
|
var description_v = $('table#details tr#description td input').val();
|
|
|
|
|
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) {
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
var data = new FormData();
|
|
|
|
|