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

master
Davide Bongiovanni 6 years ago
commit 6e13be37e6

@ -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{

@ -313,6 +313,16 @@ table#details {
margin-top: 0;
}
#magical_autofill{
font-size: small;
}
a.small_link{
text-decoration: none;
color: #B0B0B0;
font-weight: 600;
}
.details-header {
color: #013A3A;
}

@ -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 powered by OctoPart™" 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" style="margin-bottom:6pt"/> powered by <a href="http://octopart.com" class="small_link">OctoPart™</a></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>

@ -9,7 +9,7 @@ The system allows searching for parts in ELAB by part name or a description text
Python, and the following packages:
* flask
* flask-login
* requests
* sqlalchemy
* werkzeug
* pillow

Loading…
Cancel
Save