Merge branch 'master' of https://git.elab.kth.se/davide/ELAB-partsearch
This commit is contained in:
+2
-2
@@ -197,10 +197,10 @@ def getMap(containerID):
|
|||||||
|
|
||||||
@app.route('/parts/getfile/<filename>')
|
@app.route('/parts/getfile/<filename>')
|
||||||
def getfile(filename):
|
def getfile(filename):
|
||||||
if(re.match('^[\w\-_]+$', filename) == None):
|
if(re.match('^[\w\-_]+.[p|P][d|D][f|F]$', filename) == None):
|
||||||
return 'No injections pls.'
|
return 'No injections pls.'
|
||||||
|
|
||||||
return send_from_directory('/srv/datasheets/', filename + '.pdf')
|
return send_from_directory('/srv/datasheets/', filename)
|
||||||
|
|
||||||
@app.route('/parts/alter/<partID>', methods=['POST'])
|
@app.route('/parts/alter/<partID>', methods=['POST'])
|
||||||
@requires_auth
|
@requires_auth
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
var active_timer = 100;
|
||||||
|
|
||||||
function init_edit(partID) {
|
function init_edit(partID) {
|
||||||
$('table#details tr#location td p').hide();
|
$('table#details tr#location td p').hide();
|
||||||
$('#location-dropdown').show();
|
$('#location-dropdown').show();
|
||||||
@@ -254,7 +256,8 @@ function octopartFetch(){
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$.ajaxSetup({ cache: false });
|
$.ajaxSetup({ cache: false });
|
||||||
$('.search-bar').on('keyup', function() {
|
$('.search-bar').on('keyup', function() {
|
||||||
perform_query();
|
clearTimeout(active_timer);
|
||||||
|
active_timer = setTimeout(perform_query, 100);
|
||||||
});
|
});
|
||||||
$('.checkbox').change( function() {
|
$('.checkbox').change( function() {
|
||||||
if ( !$('#location').is(':checked')
|
if ( !$('#location').is(':checked')
|
||||||
|
|||||||
Reference in New Issue
Block a user