mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 19:51:01 +08:00
Merge pull request #435 from ZmagoD/zd_SCI_907
fixes checklist item user popover bug [fixes SCI-907]
This commit is contained in:
commit
386c379602
3 changed files with 25 additions and 3 deletions
|
@ -79,6 +79,7 @@ function applyCancelCallBack() {
|
|||
|
||||
setTimeout(function() {
|
||||
initStepsComments();
|
||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||
TinyMCE.destroyAll();
|
||||
}, 1000);
|
||||
|
||||
|
@ -182,6 +183,7 @@ function formCallback($form) {
|
|||
|
||||
setTimeout(function() {
|
||||
initStepsComments();
|
||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||
}, 1000);
|
||||
return true;
|
||||
});
|
||||
|
@ -205,6 +207,7 @@ function formEditAjax($form) {
|
|||
toggleButtons(true);
|
||||
|
||||
TinyMCE.destroyAll();
|
||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||
// Show the edited step
|
||||
$new_step.find(".panel-collapse:first").addClass("collapse in");
|
||||
|
||||
|
@ -221,6 +224,8 @@ function formEditAjax($form) {
|
|||
applyCancelCallBack();
|
||||
|
||||
TinyMCE.refresh();
|
||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||
|
||||
//Rerender tables
|
||||
$form.find("[data-role='step-hot-table']").each(function() {
|
||||
renderTable($(this));
|
||||
|
@ -247,6 +252,8 @@ function formNewAjax($form) {
|
|||
|
||||
TinyMCE.init();
|
||||
TinyMCE.highlight();
|
||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||
|
||||
//Rerender tables
|
||||
$new_step.find("div.step-result-hot-table").each(function() {
|
||||
$(this).handsontable("render");
|
||||
|
@ -264,6 +271,7 @@ function formNewAjax($form) {
|
|||
formNewAjax($form);
|
||||
applyCancelOnNew();
|
||||
TinyMCE.destroyAll();
|
||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -576,6 +584,7 @@ $(document).ready(function() {
|
|||
setupAssetsLoading();
|
||||
initStepsComments();
|
||||
TinyMCE.highlight();
|
||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||
|
||||
$(function () {
|
||||
|
||||
|
|
|
@ -21,6 +21,14 @@ var SmartAnnotation = (function() {
|
|||
return publicApi;
|
||||
})();
|
||||
|
||||
// stop the user annotation popover on click propagation
|
||||
function atwhoStopPropagation(element) {
|
||||
$(element).on('click', function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
function setAtWho(field) {
|
||||
var FilterTypeEnum = Object.freeze({
|
||||
USER: {tag: "users",
|
||||
|
@ -422,9 +430,10 @@ var SmartAnnotation = (function() {
|
|||
atWho.init();
|
||||
}
|
||||
|
||||
var publicApi = {
|
||||
init: initialize
|
||||
};
|
||||
var publicApi = Object.freeze({
|
||||
init: initialize,
|
||||
preventPropagation: atwhoStopPropagation
|
||||
});
|
||||
|
||||
return publicApi;
|
||||
|
||||
|
|
|
@ -1916,3 +1916,7 @@ th.custom-field .modal-tooltiptext {
|
|||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
.popover-remove {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue