From 227e725e95e5283c946d2a2119dbd79442456961 Mon Sep 17 00:00:00 2001 From: Marek Baczynski Date: Tue, 13 Nov 2018 22:09:34 +0100 Subject: [PATCH 1/2] more magical octopart button prototype (temporarily disabled) --- parts/static/script.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/parts/static/script.js b/parts/static/script.js index 0195bc0..9fc470f 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -242,6 +242,8 @@ function container_onchange() { } + + function octopartFetch(){ $.getJSON(rootURL + 'fetchOctopartSnippet/' + $('#partno-input').val()).done(function(json){ if (json['result']=='ok'){ @@ -268,4 +270,10 @@ $(document).ready(function() { else perform_query(); }); + + // $('#partno-input').bind('blur',function() { + // if($('#partno-input').val().length > 0){ + // octopartFetch(); + // } + // }); }); \ No newline at end of file From 7e60da93625bebe43f5dd598adf9d96138ebcf5f Mon Sep 17 00:00:00 2001 From: Marek Baczynski Date: Tue, 13 Nov 2018 22:10:26 +0100 Subject: [PATCH 2/2] octopart button now with more sponsor product placement! --- parts/templates/partsearch.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/templates/partsearch.html b/parts/templates/partsearch.html index 9e2e25b..3fbacfb 100644 --- a/parts/templates/partsearch.html +++ b/parts/templates/partsearch.html @@ -59,7 +59,7 @@

DESCRIPTION

- + DATASHEET: OR: