Files
Redmine/app/javascript/controllers/tablesort_controller.js
Marius Balteanu acf0f9019e Support Loofah for textile (#43643):
* Add TablesortScrubber to both CommonMark and Textile Formatters. It will now be determined on the server-side whether to use tablesort.
* Migrate tablesort to Stimulus controller.
* Update tablesort to v5.7.0.
* Switch tablesort to ESM.

Patch by Takashi Kato (user:tohosaku).



git-svn-id: https://svn.redmine.org/redmine/trunk@24357 e93f8b46-1217-0410-a6f0-8f06a7374b81
2026-01-23 16:05:42 +00:00

19 lines
541 B
JavaScript

/**
* Redmine - project management software
* Copyright (C) 2006- Jean-Philippe Lang
* This code is released under the GNU General Public License.
*/
import { Controller } from "@hotwired/stimulus"
import Tablesort from 'tablesort';
import numberPlugin from 'tablesort.number';
// Extensions must be loaded explicitly
Tablesort.extend(numberPlugin.name, numberPlugin.pattern, numberPlugin.sort);
// Connects to data-controller="tablesort"
export default class extends Controller {
connect() {
new Tablesort(this.element);
}
}