From b44d05aabd27d748750dd0cbb7ca5a891683431f Mon Sep 17 00:00:00 2001 From: Davide Bongiovanni Date: Tue, 13 Nov 2018 22:07:02 +0100 Subject: [PATCH] Resetting url input on new part if datasheet is empty --- parts/static/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parts/static/script.js b/parts/static/script.js index 0195bc0..d59268c 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -182,8 +182,10 @@ function show_part_info(partID) { $('tr#datasheet-head').html($('DATASHEET: ')); $('input[name=datasheet-url-input]').val(data.datasheet); } - else + else { $('tr#datasheet-head td').text('DATASHEET: '); + $('input[name=datasheet-url-input]').val(''); + } $('#edit-button').click(function() { init_edit(partID); });