diff --git a/app/assets/javascripts/reports/new.js b/app/assets/javascripts/reports/new.js index ecebfd444..6f5c4918d 100644 --- a/app/assets/javascripts/reports/new.js +++ b/app/assets/javascripts/reports/new.js @@ -979,6 +979,10 @@ function addElements(newElToBeReplaced, elements) { // Initialize everything on all elements _.each(newElements, function(element) { initializeReportElements($(element)); + + // Update previous and next element controls + updateElementControls(element.prev()) + updateElementControls(element.next()) }); } diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 0e161ac37..897cd968d 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -482,6 +482,7 @@ class ReportsController < ApplicationController ) el[:children] = generate_module_contents_json(my_module) res << el + res << generate_new_el(false) end end res