// 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 everything, then reload OpenLayers
$("#viewer").empty();
$("#layerswitcher").empty();
initOpenLayers();

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

//reset the tags
window.tagging_view.reset();

// re-enable annotation mode
$("#control-toggle-annotation-types button.active").click();
// 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 everything, then reload OpenLayers
$("#viewer").empty();
$("#layerswitcher").empty();
initOpenLayers();

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

//reset the tags
window.tagging_view.reset();

// enable this if we want to stay in annotation edit mode
// $("#control-toggle-annotation-types button.active").click();
$("#control-toggle-navigate").click();
Switch back to navigate mode after adding annotation
Switch back to navigate mode after adding annotation
