|
|
@ -145,6 +145,31 @@ function save(partID) {
|
|
|
|
perform_query();
|
|
|
|
perform_query();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function report_missing(partID, missing){
|
|
|
|
|
|
|
|
var data = new FormData();
|
|
|
|
|
|
|
|
data.append('partID', partID);
|
|
|
|
|
|
|
|
if(missing){
|
|
|
|
|
|
|
|
data.append('missing', 'missing')
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
data.append('missing', 'found')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
url: rootURL + 'report_missing',
|
|
|
|
|
|
|
|
type: 'POST',
|
|
|
|
|
|
|
|
data: data,
|
|
|
|
|
|
|
|
cache: false,
|
|
|
|
|
|
|
|
contentType: false,
|
|
|
|
|
|
|
|
processData: false,
|
|
|
|
|
|
|
|
success: function(data) {
|
|
|
|
|
|
|
|
alert("Thank you for reporting part as " + missing ".");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function() {
|
|
|
|
|
|
|
|
alert("Couldn't update the part information. Please retry.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function text_filter(string) {
|
|
|
|
function text_filter(string) {
|
|
|
|
if (string != null)
|
|
|
|
if (string != null)
|
|
|
|
return string;
|
|
|
|
return string;
|
|
|
|