From 6d9ba07e042d0950158c75fbb4cb21cd349c1811 Mon Sep 17 00:00:00 2001 From: Laetitia Fesselier Date: Wed, 10 Mar 2021 10:37:45 -0500 Subject: [PATCH] [Conflict Resolver] jQuery cleanup (#7380) Remove jQuery references in Conflict Resolver module. --- .eslintrc.json | 1 - modules/conflict_resolver/jsx/conflictResolverIndex.js | 5 +++-- modules/conflict_resolver/jsx/resolvedConflictsIndex.js | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9b50b067fbd..e4af21a7e28 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -149,7 +149,6 @@ "files": [ "modules/media/**", "modules/candidate_parameters/**", - "modules/conflict_resolver/**", "modules/bvl_feedback/**", "modules/dataquery/**", "modules/dqt/**", diff --git a/modules/conflict_resolver/jsx/conflictResolverIndex.js b/modules/conflict_resolver/jsx/conflictResolverIndex.js index c3c458274ba..b0b5bf947b4 100644 --- a/modules/conflict_resolver/jsx/conflictResolverIndex.js +++ b/modules/conflict_resolver/jsx/conflictResolverIndex.js @@ -338,8 +338,9 @@ window.addEventListener('load', () => { ); // Prevent tab switching const refresh = setInterval(function() { - if (document.getElementById('tab-ResolvedConflicts')) { - $('#tab-ResolvedConflicts').click(function(event) { + let resolvedTab = document.getElementById('tab-ResolvedConflicts'); + if (resolvedTab) { + resolvedTab.addEventListener('click', function(event) { event.preventDefault(); window.location.href = loris.BaseURL + '/conflict_resolver/resolved_conflicts/'; diff --git a/modules/conflict_resolver/jsx/resolvedConflictsIndex.js b/modules/conflict_resolver/jsx/resolvedConflictsIndex.js index 99d70cd6b45..7f7c94cb695 100644 --- a/modules/conflict_resolver/jsx/resolvedConflictsIndex.js +++ b/modules/conflict_resolver/jsx/resolvedConflictsIndex.js @@ -327,8 +327,9 @@ window.addEventListener('load', () => { ); // Prevent tab switching const refresh = setInterval(function() { - if (document.getElementById('tab-ResolvedConflicts')) { - $('#tab-UnresolvedConflicts').click(function(event) { + let unresolvedTab = document.getElementById('tab-UnresolvedConflicts'); + if (unresolvedTab) { + unresolvedTab.addEventListener('click', function(event) { event.preventDefault(); window.location.href = loris.BaseURL + '/conflict_resolver/'; return false;