Added record of partID when modifying part info

master
Davide Bongiovanni 8 years ago
parent 7db9ff73dc
commit 685400dc42

@ -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" );

@ -68,7 +68,7 @@
<div class="details-content"><p id="datasheet-info"></p></div>
</div>
<div class="round-button"><a href="#" onclick="init_edit()"><i class="fa fa-pencil" aria-hidden="true"></i></a></div>
<div class="round-button"><a href="#" id="edit_button"><i class="fa fa-pencil" aria-hidden="true"></i></a></div>
<div class="small-square-button"><a href="#" onclick="overlay_out()"><i class="fa fa-times" aria-hidden="true"></i></a></div>
<!--<h2 class="card-id"></h2>
<input type="text" name="name" placeholder="Name" id="name"><br><br>

Loading…
Cancel
Save