Merge branch 'master' of git.elab.kth.se:davide/ELAB-partsearch

pull/3/head
Davide Bongiovanni 6 years ago
commit 112686b9c6

@ -244,6 +244,8 @@ function container_onchange() {
}
function octopartFetch(){
$.getJSON(rootURL + 'fetchOctopartSnippet/' + $('#partno-input').val()).done(function(json){
if (json['result']=='ok'){
@ -270,4 +272,10 @@ $(document).ready(function() {
else
perform_query();
});
// $('#partno-input').bind('blur',function() {
// if($('#partno-input').val().length > 0){
// octopartFetch();
// }
// });
});

@ -59,7 +59,7 @@
<tr id="partno" class="details-content"><td><p></p><input type="text" name="partno-input" placeholder="Part Number" class="pinfo-input" id="partno-input"/></td></tr>
<tr id="description-head" class="details-header"><td>DESCRIPTION</td></tr>
<tr id="description" class="details-content"><td><p></p><input type="text" name="description-input" placeholder="Description" class="pinfo-input" id="description-input"/></td></tr>
<tr id="magical_autofill" style="display:none"><td><input type="button" id="magic-autofill-button" onclick="octopartFetch()" value="magical auto-fill" style="margin-bottom:6pt"/></td></tr>
<tr id="magical_autofill" style="display:none"><td><input type="button" id="magic-autofill-button" onclick="octopartFetch()" value="magical auto-fill powered by OctoPart™" style="margin-bottom:6pt"/></td></tr>
<tr id="datasheet-head" class="details-header"><td>DATASHEET: </td></tr>
<tr id="datasheet" style="display: none"><td><input type="file" accept=".pdf" class="pinfo-input" id="datasheet-finput"></td></tr>
<tr id="datasheet" style="display: none"><td>OR: <input type="text" class="pinfo-input" name="datasheet-url-input" style="width:80%; margin-bottom: 6pt;" placeholder="Datasheet URL"></td></tr>

Loading…
Cancel
Save