|
|
|
@ -4,17 +4,20 @@ function init_edit(partID) {
|
|
|
|
|
$('#container-dropdown').show();
|
|
|
|
|
|
|
|
|
|
$('table#details tr#partno td p').hide();
|
|
|
|
|
$('table#details tr#partno td input').show();
|
|
|
|
|
$('input[name=partno-input]').show();
|
|
|
|
|
|
|
|
|
|
$('table#details tr#description td p').hide();
|
|
|
|
|
$('table#details tr#description td input').show();
|
|
|
|
|
$('input[name=description-input]').show();
|
|
|
|
|
|
|
|
|
|
$('table#details tr#datasheet td input').closest().show();
|
|
|
|
|
$('table#details tr#datasheet td input').show();
|
|
|
|
|
// $('input[name=datasheet-url-input]').closest().show();
|
|
|
|
|
|
|
|
|
|
$('#duplicate-button').closest('div').hide();
|
|
|
|
|
|
|
|
|
|
var datasheet_input = $('<input type="file" class="part-edit-file" id="datasheet-input" accept=".pdf">')
|
|
|
|
|
$('#datasheet-info').replaceWith(datasheet_input);
|
|
|
|
|
$('tr#datasheet').show();
|
|
|
|
|
// var datasheet_input = $('<input type="file" class="part-edit-file" id="datasheet-input" accept=".pdf">')
|
|
|
|
|
// $('#datasheet-info').replaceWith(datasheet_input);
|
|
|
|
|
|
|
|
|
|
var newButton = '<div class="round-button-left"><a href="#" onclick="save(' + partID + ')"><i class="fa fa-check" aria-hidden="true"></i></a></div>';
|
|
|
|
|
$('.round-button-left').replaceWith(newButton);
|
|
|
|
@ -46,7 +49,10 @@ function end_edit() {
|
|
|
|
|
$('table#details tr#description td p').show();
|
|
|
|
|
$('table#details tr#description td input').hide();
|
|
|
|
|
|
|
|
|
|
$('table#details tr#datasheet td input').hide();
|
|
|
|
|
$('tr#datasheet').hide();
|
|
|
|
|
// $('table#details tr#datasheet td input').closest().hide();
|
|
|
|
|
// $('table#details tr#datasheet td input').hide();
|
|
|
|
|
// $('input[name=datasheet-url-input]').closest().hide();
|
|
|
|
|
|
|
|
|
|
$('#duplicate-button').closest('div').show();
|
|
|
|
|
|
|
|
|
@ -180,8 +186,7 @@ function perform_query() {
|
|
|
|
|
var data = {
|
|
|
|
|
l:$('#location').is(':checked'),
|
|
|
|
|
p:$('#partno').is(':checked'),
|
|
|
|
|
d:$('#description').is(':checked'),
|
|
|
|
|
n:$('#has-docs').is(':checked')
|
|
|
|
|
d:$('#description').is(':checked')
|
|
|
|
|
};
|
|
|
|
|
filter = '0';
|
|
|
|
|
$("#results").find("tr:not(:first)").remove(); // Delete all table rows
|
|
|
|
|