Finished fixing stuff
This commit is contained in:
+10
-4
@@ -212,13 +212,13 @@ function perform_query() {
|
||||
var notes = $('<div class="results-notes"></div>');
|
||||
if (data[i].notes != null && data[i].notes.length > 0) {
|
||||
var icon = $('<i class="fa fa-sticky-note"></i>');
|
||||
var tooltipText = $('<div class="tooltiptext"></div>');
|
||||
var tooltipText = $('<div class="tooltiptext"></div>').text(data[i].notes);
|
||||
var tooltip = $('<div class="tooltip"></div>');
|
||||
tooltip.append(icon, tooltipText);
|
||||
notes.append(tooltip);
|
||||
}
|
||||
newClicker.append(notes);
|
||||
var datasheet = $('<div class="results-datashet"></div>');
|
||||
var datasheet = $('<div class="results-datasheet"></div>');
|
||||
if (data[i].datasheet != null)
|
||||
datasheet.html('<a href="https://www.elab.kth.se/parts/getfile/'
|
||||
+ data[i].datasheet.substring(0, data[i].datasheet.length - 4)
|
||||
@@ -286,7 +286,13 @@ $(document).ready(function() {
|
||||
$('.search-bar').on('keyup', function() {
|
||||
perform_query();
|
||||
});
|
||||
$('.toggle-btn').on('change', function() {
|
||||
perform_query();
|
||||
$('.checkbox').change( function() {
|
||||
if ( !$('#type').is(':checked')
|
||||
&& !$('#partno').is(':checked')
|
||||
&& !$('#description').is(':checked')
|
||||
&& !$('#notes').is(':checked'))
|
||||
$(this).prop('checked', true);
|
||||
else
|
||||
perform_query();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user