Marek Baczynski 6 years ago
commit 7d5d5bb3b4

@ -11,9 +11,6 @@ from PIL import Image, ImageDraw
from io import BytesIO from io import BytesIO
from werkzeug.utils import secure_filename from werkzeug.utils import secure_filename
import pprint
pp = pprint.PrettyPrinter(indent=4)
app = Flask(__name__) app = Flask(__name__)
db_engine = {} db_engine = {}

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

@ -370,6 +370,7 @@ table#details #datasheet-head td {
.overlay img#map { .overlay img#map {
position: absolute; position: absolute;
right: 5%; right: 5%;
top: 5%; bottom: 5%;
height: 90%; height: calc(90% - 42pt);
max-width: 50%;
} }

@ -51,41 +51,6 @@
<tr id="datasheet-head"><td>DATASHEET: </td></tr> <tr id="datasheet-head"><td>DATASHEET: </td></tr>
</table> </table>
<img src="" id="map"/> <img src="" id="map"/>
<!-- <div class="details-row">
<div class="details-item">Location: block</div>
<div class="details-content"><p id="block-info"></p></div>
</div>
<div class="details-row">
<div class="details-item">Manufacturer</div>
<div class="details-content"><p id="type-info"></p></div>
</div>
<div class="details-row">
<div class="details-item">Part Number</div>
<div class="details-content"><p id="partno-info"></p></div>
</div>
<div class="details-row">
<div class="details-item">Description</div>
<div class="details-content"><p id="description-info"></p></div>
</div>
<div class="details-row">
<div class="details-item">Quantity</div>
<div class="details-content"><p id="quantity-info"></p></div>
</div>
<div class="details-row">
<div class="details-item">Notes</div>
<div class="details-content"><p id="notes-info"></p></div>
</div>
<div class="details-row">
<div class="details-item">Datasheet</div>
<div class="details-content"><p id="datasheet-info"></p></div>
</div> -->
<div class="round-button-left"><a href="#" id="edit-button"><i class="fa fa-pencil" aria-hidden="true"></i></a></div> <div class="round-button-left"><a href="#" id="edit-button"><i class="fa fa-pencil" aria-hidden="true"></i></a></div>
<div class="round-button"><a href="#" id="delete-button"><i class="fa fa-trash" aria-hidden="true"></i></a></div> <div class="round-button"><a href="#" id="delete-button"><i class="fa fa-trash" 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> <div class="small-square-button"><a href="#" onclick="overlay_out()"><i class="fa fa-times" aria-hidden="true"></i></a></div>

Loading…
Cancel
Save