From e9b670bea897d806d512c961f43ef5e9b244d1a9 Mon Sep 17 00:00:00 2001 From: Davide Bongiovanni Date: Mon, 12 Nov 2018 13:45:18 +0100 Subject: [PATCH] Fixed syntax error. Minor refactoring. --- parts/static/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/parts/static/script.js b/parts/static/script.js index c47d389..01322ea 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -55,9 +55,9 @@ function end_edit() { } function save(partID) { - var location_id_v = $('table#details tr#location td select').val(); - var partno_v = $('table#details tr#partno td input').val(); - var description_v = $('table#details tr#description td input').val(); + var location_id_v = $('#location-dropdown').val(); + var partno_v = $('input[name=partno-input]').val(); + var description_v = $('input[name=description-input]').val(); var datasheet = $('table#details tr#datasheet td input')[0].files; if(partno_v.length == 0){ alert('Please enter a part number.'); @@ -151,7 +151,7 @@ function show_part_info(partID) { $('table#details tr#description td input').val(text_filter(data.description)); container_onchange(); if (data.datasheet != null) { - $('tr#datasheet-head').html($('DATASHEET: ')); + $('tr#datasheet-head').html($('DATASHEET: ')); $('#datasheet-input').val(data.datasheet); } else