mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 04:03:45 +08:00
fix export projects getting fired miltiple times
This commit is contained in:
parent
022d0d9512
commit
55cab34eb4
1 changed files with 3 additions and 3 deletions
|
@ -220,7 +220,7 @@
|
||||||
* Initialize the JS for export projects modal to work.
|
* Initialize the JS for export projects modal to work.
|
||||||
*/
|
*/
|
||||||
function initExportProjectsModal() {
|
function initExportProjectsModal() {
|
||||||
exportProjectsBtn.click(function() {
|
exportProjectsBtn.off('click').click(function() {
|
||||||
// Load HTML to refresh users list
|
// Load HTML to refresh users list
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: exportProjectsBtn.data('export-projects-modal-url'),
|
url: exportProjectsBtn.data('export-projects-modal-url'),
|
||||||
|
@ -264,7 +264,7 @@
|
||||||
|
|
||||||
function initExportProjects() {
|
function initExportProjects() {
|
||||||
// Submit the export projects
|
// Submit the export projects
|
||||||
exportProjectsSubmit.click(function() {
|
exportProjectsSubmit.off('click').click(function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: exportProjectsSubmit.data('export-projects-submit-url'),
|
url: exportProjectsSubmit.data('export-projects-submit-url'),
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
@ -388,7 +388,7 @@
|
||||||
initEditProjectButton($('.panel-project'));
|
initEditProjectButton($('.panel-project'));
|
||||||
initArchiveRestoreButton($('.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');
|
var projectId = $(this).closest('.panel-project').data('id');
|
||||||
// Determine whether ID is in the list of selected project IDs
|
// Determine whether ID is in the list of selected project IDs
|
||||||
var index = $.inArray(projectId, selectedProjects);
|
var index = $.inArray(projectId, selectedProjects);
|
||||||
|
|
Loading…
Reference in a new issue