Added datasheet URL possiblity
This commit is contained in:
+12
-7
@@ -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
|
||||
|
||||
@@ -60,7 +60,8 @@
|
||||
<tr id="description-head"><td>DESCRIPTION</td></tr>
|
||||
<tr id="description"><td><p></p><input type="text" name="description-input" placeholder="Description" class="pinfo-input"/></td></tr>
|
||||
<tr id="datasheet-head"><td>DATASHEET: </td></tr>
|
||||
<tr id="datasheet"><td><input type="file" accept=".pdf" class="pinfo-input"></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%" placeholder="Datasheet URL"></td></tr>
|
||||
</table>
|
||||
<img src="" id="map" class="map"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user