diff --git a/parts/static/script.js b/parts/static/script.js index ae31607..4081da5 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -177,6 +177,10 @@ function show_part_info(partID) { $('table#details tr#description td input').val(text_filter(data.description)); $('table#details tr#notes td p').text(text_filter(data.notes)); $('input[name=notes-input]').val(text_filter(data.notes)); + // Resetting file input. Super dirty hack. Disgusting + var $el = $('#datasheet-finput'); + $el.wrap('
').closest('form').get(0).reset(); + $el.unwrap(); container_onchange(); if (data.datasheet != null) { $('tr#datasheet-head').html($('DATASHEET: ')); @@ -243,9 +247,6 @@ function container_onchange() { } } - - - function octopartFetch(){ $.getJSON(rootURL + 'fetchOctopartSnippet/' + $('#partno-input').val()).done(function(json){ if (json['result']=='ok'){