Fetching containers instead of locations. Fixed query and relative script for get_part_info
This commit is contained in:
@@ -131,13 +131,13 @@ function delete_entry(partID) {
|
||||
|
||||
function show_part_info(partID) {
|
||||
$.getJSON(rootURL + 'getpartinfo/' + partID, function(data) {
|
||||
$('table#details tr#location td p').text(text_filter(data.name)); // name is the location friendly name
|
||||
$('table#details tr#location td p').text(text_filter(data.location_descriptor)); // name is the location friendly name
|
||||
$('table#details tr#location td select').val(data.location_id); // name is the location friendly name
|
||||
$('table#details tr#partno td p').text(text_filter(data.partno));
|
||||
$('table#details tr#partno td input').val(text_filter(data.partno));
|
||||
$('table#details tr#description td p').text(text_filter(data.description));
|
||||
$('table#details tr#description td input').val(text_filter(data.description));
|
||||
$('img#map').attr('src', 'parts/map/' + data.map);
|
||||
$('img#map').attr('src', 'parts/map/' + data.container_id);
|
||||
if (data.datasheet != null)
|
||||
$('tr#datasheet-head').html($('<td>DATASHEET: <a href="' + rootURL + 'getfile/' + data.datasheet.substring(0, data.datasheet.length - 4) + '"><i class="fa fa-file-text" aria-hidden="true"></i></a></td>'));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user