|
|
|
@ -14,6 +14,41 @@ function overlay_out() {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function init_edit() {
|
|
|
|
|
var block_input = $('<input type="text" class="part-edit-input" id="block-input" placeholder="Location">')
|
|
|
|
|
block_input.val($('#block-info').text());
|
|
|
|
|
$('#block-info').replaceWith(block_input);
|
|
|
|
|
|
|
|
|
|
var partno_input = $('<input type="text" class="part-edit-input" id="partno-input" placeholder="Part number">')
|
|
|
|
|
partno_input.val($('#partno-info').text());
|
|
|
|
|
$('#partno-info').replaceWith(partno_input);
|
|
|
|
|
|
|
|
|
|
var description_input = $('<input type="text" class="part-edit-input" id="description-input" placeholder="Description">')
|
|
|
|
|
description_input.val($('#description-info').text());
|
|
|
|
|
$('#description-info').replaceWith(description_input);
|
|
|
|
|
|
|
|
|
|
var quantity_input = $('<input type="text" class="part-edit-input" id="quantity-input" placeholder="Quantity">')
|
|
|
|
|
quantity_input.val($('#quantity-info').text());
|
|
|
|
|
$('#quantity-info').replaceWith(quantity_input);
|
|
|
|
|
|
|
|
|
|
var notes_input = $('<input type="text" class="part-edit-input" id="notes-input" placeholder="Notes">')
|
|
|
|
|
notes_input.val($('#notes-info').text());
|
|
|
|
|
$('#notes-info').replaceWith(notes_input);
|
|
|
|
|
|
|
|
|
|
var datasheet_input = $('<input type="text" class="part-edit-input" id="datasheet-input" placeholder="Datasheet">')
|
|
|
|
|
datasheet_input.val($('#datasheet-info').text());
|
|
|
|
|
$('#datasheet-info').replaceWith(datasheet_input);
|
|
|
|
|
|
|
|
|
|
var newButton = '<div class="round-button"><a href="#" onclick="save()"><i class="fa fa-check" aria-hidden="true"></i></a></div>';
|
|
|
|
|
$('.round-button').replaceWith(newButton);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function save() {
|
|
|
|
|
var newButton = '<div class="round-button"><a href="#" onclick="init_edit()"><i class="fa fa-pencil" aria-hidden="true"></i></a></div>';
|
|
|
|
|
console.log('pls add init edit code')
|
|
|
|
|
$('.round-button').replaceWith(newButton);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
$('.search-bar').on('keyup', function() {
|
|
|
|
|
var query = $('.search-bar').val();
|
|
|
|
|