mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +08:00
Merge pull request #437 from mz3944/mz-sci-913
Added smart annotations when adding new sample in samples table [SCI-913]
This commit is contained in:
commit
34f832d123
1 changed files with 8 additions and 0 deletions
|
@ -215,6 +215,8 @@ function dataTableInit() {
|
|||
// Handle table draw event
|
||||
table.on('draw', function() {
|
||||
updateDataTableSelectAllCtrl(table);
|
||||
// Prevent sample row toggling when selecting user smart annotation link
|
||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||
});
|
||||
|
||||
return table;
|
||||
|
@ -678,6 +680,12 @@ function onClickAddSample() {
|
|||
$("select[name=sample_group_id]").selectpicker();
|
||||
$("select[name=sample_type_id]").selectpicker();
|
||||
|
||||
// initialize smart annotation
|
||||
_.each($('[data-object="custom_fields"]'), function(el) {
|
||||
if(_.isUndefined($(el).data('atwho'))) {
|
||||
SmartAnnotation.init(el);
|
||||
}
|
||||
});
|
||||
// Adjust columns width in table header
|
||||
table.columns.adjust();
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue