From f4235556f765589292c271c4b9802b6439d1072a Mon Sep 17 00:00:00 2001 From: Marek Baczynski Date: Wed, 14 Nov 2018 16:40:28 +0100 Subject: [PATCH] octopart-fetch button is mash-like-an-idiot proof --- parts/static/script.js | 2 ++ parts/templates/partsearch.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/parts/static/script.js b/parts/static/script.js index 4081da5..9714d0e 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -248,7 +248,9 @@ function container_onchange() { } function octopartFetch(){ + $('#magic-autofill-button').attr('disabled', 'disabled'); $.getJSON(rootURL + 'fetchOctopartSnippet/' + $('#partno-input').val()).done(function(json){ + $('#magic-autofill-button').removeAttr('disabled'); if (json['result']=='ok'){ $('#description-input').val(json['snippet']); }else{ diff --git a/parts/templates/partsearch.html b/parts/templates/partsearch.html index 3fbacfb..77b0b3e 100644 --- a/parts/templates/partsearch.html +++ b/parts/templates/partsearch.html @@ -59,7 +59,7 @@

DESCRIPTION

- + powered by OctoPartâ„¢ DATASHEET: OR: