diff --git a/parts/server.py b/parts/server.py index 7f5bc21..f4ae96a 100644 --- a/parts/server.py +++ b/parts/server.py @@ -11,9 +11,6 @@ from PIL import Image, ImageDraw from io import BytesIO from werkzeug.utils import secure_filename -import pprint -pp = pprint.PrettyPrinter(indent=4) - app = Flask(__name__) db_engine = {} diff --git a/parts/static/script.js b/parts/static/script.js index f120cbd..a7e171c 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -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($('')); - // 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($('DATASHEET: ')); + 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" ); diff --git a/parts/static/style.css b/parts/static/style.css index ca3fa2e..7600153 100644 --- a/parts/static/style.css +++ b/parts/static/style.css @@ -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%; } \ No newline at end of file diff --git a/parts/templates/partsearch.html b/parts/templates/partsearch.html index 00ae34a..f277d4d 100644 --- a/parts/templates/partsearch.html +++ b/parts/templates/partsearch.html @@ -51,41 +51,6 @@ DATASHEET: - -