Merge branch 'master' of https://git.elab.kth.se/davide/ELAB-partsearch
This commit is contained in:
+11
-13
@@ -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#partno td').text(text_filter(data.partno));
|
||||
$('table#details tr#description td').text(text_filter(data.description));
|
||||
// $('#description-info').text(text_filter(data.description));
|
||||
// $('#quantity-info').text(text_filter(data.quantity));
|
||||
// $('#notes-info').text(text_filter(data.notes));
|
||||
// if (data.datasheet != null)
|
||||
// $('#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>'));
|
||||
// else
|
||||
// $('#datasheet-info').text(' ');
|
||||
// $('#edit-button').click(function() {
|
||||
// init_edit(partID);
|
||||
// });
|
||||
// $('#delete-button').click(function() {
|
||||
// delete_entry(partID);
|
||||
// });
|
||||
$('img#map').attr('src', 'parts/map/' + data.map);
|
||||
if (data.datasheet != null)
|
||||
$('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>'));
|
||||
else
|
||||
$('tr#datasheet-head td').text('DATASHEET: ');
|
||||
$('#edit-button').click(function() {
|
||||
init_edit(partID);
|
||||
});
|
||||
$('#delete-button').click(function() {
|
||||
delete_entry(partID);
|
||||
});
|
||||
overlay_in();
|
||||
}).fail(function() {
|
||||
console.log( "Fetching part info failed" );
|
||||
|
||||
@@ -370,6 +370,7 @@ table#details #datasheet-head td {
|
||||
.overlay img#map {
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
top: 5%;
|
||||
height: 90%;
|
||||
bottom: 5%;
|
||||
height: calc(90% - 42pt);
|
||||
max-width: 50%;
|
||||
}
|
||||
Reference in New Issue
Block a user