/* ======================================= STUPID TABLE ======================================= */ export let StupidTable = { init($table: JQuery) { ($table).stupidtable(); $table.on( 'aftertablesort', this.addArrows ); }, addArrows( evt: Event, data: any ) { let $th: JQuery = $(evt.currentTarget).find('th'), arrow: string = data.direction === 'asc' ? '↑' : '↓', index: number = data.column; $th.find( '.atum-arrow' ).remove(); $th.eq( index ).append( '' + arrow + '' ); } }