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(); })();