mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Fix dragula import, remove conflicting global
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
import { Controller } from '@hotwired/stimulus';
|
||||
import dragula from 'dragula';
|
||||
import jQuery from 'jquery';
|
||||
import 'tablesorter';
|
||||
|
||||
@@ -565,10 +566,9 @@ export default class PageController extends Controller {
|
||||
}
|
||||
|
||||
private recreateSortables() {
|
||||
const containers = jQuery('.group-by--selected-elements').toArray();
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any
|
||||
(dragula as any)(containers, {
|
||||
mirrorContainer: document.getElementById('group-by--area'),
|
||||
const containers = Array.from(document.querySelectorAll('.group-by--selected-elements'));
|
||||
dragula(containers, {
|
||||
mirrorContainer: document.getElementById('group-by--area')!,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Vendored
-3
@@ -11,14 +11,12 @@
|
||||
/// <reference path="../../node_modules/@types/moment-timezone/index.d.ts" />
|
||||
/// <reference path="../../node_modules/@types/urijs/index.d.ts" />
|
||||
/// <reference path="../../node_modules/@types/webpack-env/index.d.ts" />
|
||||
/// <reference path="../../node_modules/@types/dragula/index.d.ts" />
|
||||
/// <reference path="../../node_modules/@types/resize-observer-browser/index.d.ts" />
|
||||
|
||||
import { Injector } from '@angular/core';
|
||||
|
||||
import { OpenProject } from 'core-app/core/setup/globals/openproject';
|
||||
import * as TLodash from 'lodash';
|
||||
import { Dragula } from 'dragula';
|
||||
import { Screenfull } from 'screenfull';
|
||||
import { ErrorReporterBase } from 'core-app/core/errors/error-reporter-base';
|
||||
import { I18n } from 'i18n-js';
|
||||
@@ -57,7 +55,6 @@ declare module '@hotwired/turbo' {
|
||||
declare global {
|
||||
const _:typeof TLodash;
|
||||
const I18n:I18n;
|
||||
const dragula:Dragula;
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
Reference in New Issue
Block a user