<commit_before>// This JavaScript is executed when the #create controller method finishes

// compose new list item
<% annotationText = render :partial => "annotations/single_annotation_table_row", :locals => { :annotation => @annotation } %>
var response = "<%= escape_javascript(annotationText)%>";
$("#annotations-header").fadeIn("slow");
$(response).hide().prependTo("#annotation-table").fadeIn("slow");

// re-enable new tooltips
$(".tooltip").tooltip();
$("a[rel=tooltip]").tooltip();

// first clear the editing layer, then load the newly created annotation
$("#viewer").empty();
initOpenLayers();

// slide down the panel
$("#modal-annotation").modal('hide');

// confirmation / error dialog, disabled
// $("#modal-annotation-confirm").modal();
//  $("#modal-annotation-confirm-close").click(function(){
//    $("#modal-annotation-confirm").modal('hide');
// });

//reset the tags
window.tagging_view.reset();<commit_msg>Refresh drawing mode after creating annotation - Closed #39<commit_after>// This JavaScript is executed when the #create controller method finishes

// compose new list item
<% annotationText = render :partial => "annotations/single_annotation_table_row", :locals => { :annotation => @annotation } %>
var response = "<%= escape_javascript(annotationText)%>";
$("#annotations-header").fadeIn("slow");
$(response).hide().prependTo("#annotation-table").fadeIn("slow");

// re-enable new tooltips
$(".tooltip").tooltip();
$("a[rel=tooltip]").tooltip();

// first clear the editing layer, then load the newly created annotation
$("#viewer").empty();
initOpenLayers();

// slide down the panel
$("#modal-annotation").modal('hide');

// confirmation / error dialog, disabled
// $("#modal-annotation-confirm").modal();
//  $("#modal-annotation-confirm-close").click(function(){
//    $("#modal-annotation-confirm").modal('hide');
// });

//reset the tags
window.tagging_view.reset();
$("#control-toggle-annotation-types button.active").click();
{'fraction_non_alphanumeric': 0.2015267175572519, 'fraction_numerical': 0.0010178117048346056, 'mean_word_length': 5.619528619528619, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2869157', 'n_tokens_mistral': 546, 'n_tokens_neox': 530, 'n_words': 130}