diff --git a/resources/js/jethro.js b/resources/js/jethro.js index 19dab3b0..b1e919e7 100644 --- a/resources/js/jethro.js +++ b/resources/js/jethro.js @@ -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(''); + }) + + $('select.merge-template').change(function() { $('#merge-template-upload')[(this.value == '__NEW__') ? 'show' : 'hide'](); if (this.value == '__NEW__') $('#merge-template-upload input[type=file]').click(); @@ -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(''); - }) - // SERVICE PLAN TABLE: JethroServicePlanner.setDroppable($("#service-plan tbody tr"));