mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-09 21:56:32 +08:00
Fix controls on experiment contents
Also fix bug with adjencent elements not updating controls. Fixes SCI-35.
This commit is contained in:
parent
8b2b134614
commit
cafec6a1b4
2 changed files with 5 additions and 0 deletions
|
|
@ -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())
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue