From b4199b28e4cef9138da53f20d5b8a62f5ee755d2 Mon Sep 17 00:00:00 2001 From: Jure Grabnar Date: Fri, 22 Feb 2019 19:46:42 +0100 Subject: [PATCH] Remove turbolinks:load from the project show page Also rename Demo project experiment back to PCR. Closes SCI-3081. --- .../experiments/dropdown_actions.js | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/app/assets/javascripts/experiments/dropdown_actions.js b/app/assets/javascripts/experiments/dropdown_actions.js index 652525707..b223626e0 100644 --- a/app/assets/javascripts/experiments/dropdown_actions.js +++ b/app/assets/javascripts/experiments/dropdown_actions.js @@ -119,27 +119,25 @@ }); } - $(document).on('turbolinks:load', function() { - // Bind modal to new-experiment action - initializeModal($('#new-experiment'), '#new-experiment-modal'); + // Bind modal to new-experiment action + initializeModal($('#new-experiment'), '#new-experiment-modal'); - // Bind modal to big-plus new experiment actions - initializeModal('.big-plus', '#new-experiment-modal'); + // Bind modal to big-plus new experiment actions + initializeModal('.big-plus', '#new-experiment-modal'); - // Bind modal to new-exp-title action - initializeModal('.new-exp-title', '#new-experiment-modal'); + // Bind modal to new-exp-title action + initializeModal('.new-exp-title', '#new-experiment-modal'); - // Bind modals to all clone-experiment actions - $.each($('.clone-experiment'), function() { - var id = $(this).closest('.experiment-panel').data('id'); - initializeModal($(this), '#clone-experiment-modal-' + id); - }); - - // Bind modal to all actions listed on dropdown accesible from experiment - // panel - initializeDropdownActions(); - - // init - initEditNoDescription(); + // Bind modals to all clone-experiment actions + $.each($('.clone-experiment'), function() { + var id = $(this).closest('.experiment-panel').data('id'); + initializeModal($(this), '#clone-experiment-modal-' + id); }); + + // Bind modal to all actions listed on dropdown accesible from experiment + // panel + initializeDropdownActions(); + + // init + initEditNoDescription(); })();