diff --git a/static/script.js b/static/script.js index d17d9f5..4a9ef9e 100644 --- a/static/script.js +++ b/static/script.js @@ -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(''); else $('#datasheet-info').text(' '); + $('#edit-button').on('click', function() { + init_edit(partID); + }); overlay_in(); }).fail(function() { console.log( "Fetching part info failed" ); diff --git a/templates/partsearch.html b/templates/partsearch.html index a2127ca..ee6a4c0 100644 --- a/templates/partsearch.html +++ b/templates/partsearch.html @@ -68,7 +68,7 @@

-
+