Fix controls on experiment contents

Also fix bug with adjencent elements not updating controls.

Fixes SCI-35.
This commit is contained in:
Jure Grabnar 2016-08-04 16:05:03 +02:00
parent 8b2b134614
commit cafec6a1b4
2 changed files with 5 additions and 0 deletions

View file

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

View file

@ -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