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:
mz3944 2017-01-24 11:03:00 +01:00 committed by GitHub
commit 34f832d123

View file

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