mirror of
https://github.com/redmine/redmine.git
synced 2026-01-28 18:29:58 +01:00
* 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
19 lines
541 B
JavaScript
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);
|
|
}
|
|
}
|