Resetting url input on new part if datasheet is empty
This commit is contained in:
@@ -182,8 +182,10 @@ function show_part_info(partID) {
|
|||||||
$('tr#datasheet-head').html($('<td>DATASHEET: <a href="' + data.datasheet + '" target="_blank"><i class="fa fa-file-text" aria-hidden="true"></i></a></td>'));
|
$('tr#datasheet-head').html($('<td>DATASHEET: <a href="' + data.datasheet + '" target="_blank"><i class="fa fa-file-text" aria-hidden="true"></i></a></td>'));
|
||||||
$('input[name=datasheet-url-input]').val(data.datasheet);
|
$('input[name=datasheet-url-input]').val(data.datasheet);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
$('tr#datasheet-head td').text('DATASHEET: ');
|
$('tr#datasheet-head td').text('DATASHEET: ');
|
||||||
|
$('input[name=datasheet-url-input]').val('');
|
||||||
|
}
|
||||||
$('#edit-button').click(function() {
|
$('#edit-button').click(function() {
|
||||||
init_edit(partID);
|
init_edit(partID);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user