Skip to content

Commit

Permalink
Don't save annotations when no changes are made.
Browse files Browse the repository at this point in the history
  • Loading branch information
Desktop Sal committed Sep 11, 2024
1 parent 94f415d commit a75c64d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions webtool/static/js/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function init() {
*/
const annotations = {


init: function() {

let editor = $("#annotation-fields-editor");
Expand Down Expand Up @@ -99,7 +98,7 @@ const annotations = {

// Keep track of whether the annotations are edited or not.
let post_annotations = $(".post-annotations");
post_annotations.on("keydown click change",
post_annotations.on("keydown keyup change",
".post-annotation-input, input[type=checkbox], label, option",
function(){

Expand All @@ -109,7 +108,6 @@ const annotations = {
parent = parent.parent();
}
annotations.markChanges(parent);
annotations.startSaveTimer();
});

// Save the annotations to the database
Expand Down Expand Up @@ -648,6 +646,7 @@ const annotations = {
$(el).find(".annotation-author").html(current_username);
$(el).find(".epoch-timestamp-edited").html(current_date);
$(el).find(".timestamp-edited").html(getLocalTimeStr(current_date));
annotations.startSaveTimer();
}
};

Expand Down

0 comments on commit a75c64d

Please sign in to comment.