mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-02 21:51:51 +08:00
Merge pull request #311 from ZmagoD/zd_SCI_716
load comments after edit step [fixes SCI-716]
This commit is contained in:
commit
0f3db56a74
1 changed files with 17 additions and 5 deletions
|
@ -77,6 +77,11 @@ function applyCancelCallBack() {
|
||||||
initCallBacks();
|
initCallBacks();
|
||||||
initHandsOnTable($new_step);
|
initHandsOnTable($new_step);
|
||||||
toggleButtons(true);
|
toggleButtons(true);
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
initStepsComments();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
})
|
})
|
||||||
.on("ajax:error", function(e, xhr, status, error) {
|
.on("ajax:error", function(e, xhr, status, error) {
|
||||||
// TODO: error handling
|
// TODO: error handling
|
||||||
|
@ -173,6 +178,10 @@ function formCallback($form) {
|
||||||
contents.attr("value", data);
|
contents.attr("value", data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
initStepsComments();
|
||||||
|
}, 1000);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -545,17 +554,20 @@ function renderTable(table) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function initStepsComments() {
|
||||||
|
Comments.initialize();
|
||||||
|
Comments.initCommentOptions("ul.content-comments");
|
||||||
|
Comments.initEditComments("#steps");
|
||||||
|
Comments.initDeleteComments("#steps");
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// On init
|
// On init
|
||||||
initCallBacks();
|
initCallBacks();
|
||||||
initHandsOnTable($(document));
|
initHandsOnTable($(document));
|
||||||
expandAllSteps();
|
expandAllSteps();
|
||||||
setupAssetsLoading();
|
setupAssetsLoading();
|
||||||
|
initStepsComments();
|
||||||
// Init comments edit/delete
|
|
||||||
Comments.initCommentOptions("ul.content-comments");
|
|
||||||
Comments.initEditComments("#steps");
|
|
||||||
Comments.initDeleteComments("#steps");
|
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue