|
|
|
@ -140,7 +140,6 @@ function text_filter(string) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function show_part_info(partID) {
|
|
|
|
|
//var partID = $(this).attr('part-id');
|
|
|
|
|
$.getJSON('https://www.elab.kth.se/parts/getpartinfo/' + partID, function(data) {
|
|
|
|
|
$('#block-info').text(text_filter(data.block));
|
|
|
|
|
$('#partno-info').text(text_filter(data.partno) + ' ' + text_filter(data.partnoalt) + ' ' + text_filter(data.partnoalt2));
|
|
|
|
@ -151,6 +150,9 @@ function show_part_info(partID) {
|
|
|
|
|
$('#datasheet-info').text('<a href="https://www.elab.kth.se/parts/getfile/' + data.datasheet + '"><i class="fa fa-file-text" aria-hidden="true"></i></a>');
|
|
|
|
|
else
|
|
|
|
|
$('#datasheet-info').text(' ');
|
|
|
|
|
$('#edit-button').on('click', function() {
|
|
|
|
|
init_edit(partID);
|
|
|
|
|
});
|
|
|
|
|
overlay_in();
|
|
|
|
|
}).fail(function() {
|
|
|
|
|
console.log( "Fetching part info failed" );
|
|
|
|
|