Added datasheet download button

pull/3/head
Davide Bongiovanni 6 years ago
parent 35d88de4e5
commit 43e7a00a58

@ -203,19 +203,17 @@ function show_part_info(partID) {
$('table#details tr#location td').text(text_filter(data.name)); // name is the location friendly name $('table#details tr#location td').text(text_filter(data.name)); // name is the location friendly name
$('table#details tr#partno td').text(text_filter(data.partno)); $('table#details tr#partno td').text(text_filter(data.partno));
$('table#details tr#description td').text(text_filter(data.description)); $('table#details tr#description td').text(text_filter(data.description));
// $('#description-info').text(text_filter(data.description)); $('img#map').attr('src', 'parts/map/' + data.map);
// $('#quantity-info').text(text_filter(data.quantity)); if (data.datasheet != null)
// $('#notes-info').text(text_filter(data.notes)); $('tr#datasheet-head').html($('<td>DATASHEET: <a href="http://127.0.0.1:5000/parts/getfile/' + data.datasheet.substring(0, data.datasheet.length - 4) + '"><i class="fa fa-file-text" aria-hidden="true"></i></a></td>'));
// if (data.datasheet != null) else
// $('#datasheet-info').html($('<a href="http://127.0.0.1:5000/parts/getfile/' + data.datasheet.substring(0, data.datasheet.length - 4) + '"><i class="fa fa-file-text" aria-hidden="true"></i></a>')); $('tr#datasheet-head td').text('DATASHEET: ');
// else $('#edit-button').click(function() {
// $('#datasheet-info').text(' '); init_edit(partID);
// $('#edit-button').click(function() { });
// init_edit(partID); $('#delete-button').click(function() {
// }); delete_entry(partID);
// $('#delete-button').click(function() { });
// delete_entry(partID);
// });
overlay_in(); overlay_in();
}).fail(function() { }).fail(function() {
console.log( "Fetching part info failed" ); console.log( "Fetching part info failed" );

Loading…
Cancel
Save