mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Issue with scrollbar in smart annotation pop-up [SCI-8420] (#5479)
* Fix issues in smart annotation pop-up - Initialize perfectScrollBar on the current atWho container. - Close AtWho pop-up when tinyMCE editor is closed. Co-authored-by: Sboursen <dev.sboursen@gmail.com> * Fix hound [SCI-8420] Co-authored-by: Sboursen <dev.sboursen@gmail.com> * Close smart annotation pop-up after tinyMCE save [SCI-8420] Co-authored-by: Sboursen <dev.sboursen@gmail.com> --------- Co-authored-by: Sboursen <dev.sboursen@gmail.com>
This commit is contained in:
parent
b1a891e310
commit
fc1ce332de
2 changed files with 5 additions and 6 deletions
|
@ -82,9 +82,9 @@ var SmartAnnotation = (function() {
|
|||
$currentAtWho.find(`.repository-object[data-object-id="${data.repository}"]`)
|
||||
.addClass('btn-primary').removeClass('btn-light');
|
||||
}
|
||||
if ($('.atwho-scroll-container')[0]) {
|
||||
if ($('.atwho-scroll-container').last()[0]) {
|
||||
// eslint-disable-next-line no-new
|
||||
new PerfectScrollbar($('.atwho-scroll-container')[0]);
|
||||
new PerfectScrollbar($('.atwho-scroll-container').last()[0]);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
@ -220,10 +220,6 @@ var SmartAnnotation = (function() {
|
|||
displayTimeout: 120000
|
||||
})
|
||||
.atwho(atWhoSettings('#'));
|
||||
// .atwho(atWhoSettings('task#', FilterTypeEnum.TASK)) Waiting for better times
|
||||
// .atwho(atWhoSettings('project#', FilterTypeEnum.PROJECT))
|
||||
// .atwho(atWhoSettings('experiment#', FilterTypeEnum.EXPERIMENT))
|
||||
// .atwho(atWhoSettings('sample#', FilterTypeEnum.REPOSITORY));
|
||||
|
||||
$(this).data('atwho-initialized', true);
|
||||
}
|
||||
|
|
3
app/javascript/packs/tiny_mce.js
vendored
3
app/javascript/packs/tiny_mce.js
vendored
|
@ -323,6 +323,7 @@ window.TinyMCE = (() => {
|
|||
.on('click', (event) => {
|
||||
event.preventDefault();
|
||||
saveAction(editor);
|
||||
SmartAnnotation.closePopup();
|
||||
});
|
||||
|
||||
// After save action
|
||||
|
@ -371,6 +372,8 @@ window.TinyMCE = (() => {
|
|||
|
||||
updateScrollPosition(editorForm);
|
||||
if (options.onSaveCallback) { options.onSaveCallback($(selector).val()); }
|
||||
|
||||
SmartAnnotation.closePopup();
|
||||
})
|
||||
.removeClass('hidden');
|
||||
|
||||
|
|
Loading…
Reference in a new issue