mirror of
https://github.com/redmine/redmine.git
synced 2026-02-24 23:51:23 +01:00
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
This commit is contained in:
18
app/javascript/controllers/tablesort_controller.js
Normal file
18
app/javascript/controllers/tablesort_controller.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user