Skip to content

Commit

Permalink
Add general support for table-sortable class for future extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tbar0970 committed May 30, 2024
1 parent 5f72020 commit 4cd212f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions resources/js/jethro.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,13 @@ $(document).ready(function() {

JethroSMS.init();

$('table.table-sortable').stupidtable().bind('aftertablesort', function(event, data) {
$(this).find('th .icon-arrow-up, th .icon-arrow-down').remove();
var cn = (data.direction === "asc") ? 'up' : 'down';
$(this).find('th').eq(data.column).append('<i class="icon-arrow-'+cn+'"></i>');
})


$('select.merge-template').change(function() {
$('#merge-template-upload')[(this.value == '__NEW__') ? 'show' : 'hide']();
if (this.value == '__NEW__') $('#merge-template-upload input[type=file]').click();
Expand Down Expand Up @@ -1092,13 +1099,6 @@ JethroServicePlanner.init = function() {

$("#service-comps td, #service-plan td").css('cursor', 'default').disableSelection();


$('#service-comps table').stupidtable().bind('aftertablesort', function(event, data) {
$(this).find('th .icon-arrow-up, th .icon-arrow-down').remove();
var cn = (data.direction === "asc") ? 'up' : 'down';
$(this).find('th').eq(data.column).append('<i class="icon-arrow-'+cn+'"></i>');
})

// SERVICE PLAN TABLE:
JethroServicePlanner.setDroppable($("#service-plan tbody tr"));

Expand Down

0 comments on commit 4cd212f

Please sign in to comment.