Skip to content

Commit

Permalink
Merge pull request #841 from NASA-IMPACT/123-comment-scroll
Browse files Browse the repository at this point in the history
123-comment-scroll
  • Loading branch information
Jmok19927 authored Jun 12, 2024
2 parents 3f36c3e + 8c0c10f commit cf719a8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sde_indexing_helper/static/js/collection_detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,15 @@ function postDocTypeChange(collection_id, docType) {
$(document).ready(function() {
if (localStorage.getItem("WorkflowStatusChange")) {
toastr.success("Workflow Status Updated!");
localStorage.removeItem("WorkflowStatusChange")
localStorage.removeItem("WorkflowStatusChange");
}
})

//Scroll position for comments
$(document).ready(function() {
if (localStorage.getItem("commentScroll")) {
$(window).scrollTop(localStorage.getItem("commentScroll"));
localStorage.removeItem("commentScroll");
}
})

Expand Down Expand Up @@ -401,4 +408,7 @@ function handleWorkflowStatusSelect() {

$(document).ready(function () {
handleWorkflowStatusSelect();
$("button[name='comment_button']").click(function() {
localStorage.setItem("commentScroll", $(window).scrollTop());
})
});

0 comments on commit cf719a8

Please sign in to comment.