From 55cab34eb4e9cf1c419692523717aa7ac695a4fd Mon Sep 17 00:00:00 2001 From: mlorb Date: Thu, 13 Dec 2018 16:46:08 +0100 Subject: [PATCH] fix export projects getting fired miltiple times --- app/assets/javascripts/projects/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index 2e37ae7f1..c3962e0e1 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -220,7 +220,7 @@ * Initialize the JS for export projects modal to work. */ function initExportProjectsModal() { - exportProjectsBtn.click(function() { + exportProjectsBtn.off('click').click(function() { // Load HTML to refresh users list $.ajax({ url: exportProjectsBtn.data('export-projects-modal-url'), @@ -264,7 +264,7 @@ function initExportProjects() { // Submit the export projects - exportProjectsSubmit.click(function() { + exportProjectsSubmit.off('click').click(function() { $.ajax({ url: exportProjectsSubmit.data('export-projects-submit-url'), type: 'POST', @@ -388,7 +388,7 @@ initEditProjectButton($('.panel-project')); initArchiveRestoreButton($('.panel-project')); - $('.project-card-selector').click(function() { + $('.project-card-selector').off('click').click(function() { var projectId = $(this).closest('.panel-project').data('id'); // Determine whether ID is in the list of selected project IDs var index = $.inArray(projectId, selectedProjects);