|
|
|
|
@ -19,7 +19,6 @@ export default class extends ApplicationController {
|
|
|
|
|
var $this = this, annotation_id = $this.element.dataset["annotationId"], doctrine_id = $this.element.dataset["doctrineId"],
|
|
|
|
|
document_title = "", document_ref_no = "", document_date_or_year = "", $modal = $("#annotationModal") |
|
|
|
|
|
|
|
|
|
console.log($this.element.dataset["currentDocumentId"]) |
|
|
|
|
$modal.find("#current_document_id").val($this.element.dataset["currentDocumentId"]) |
|
|
|
|
if(annotation_id !== null && annotation_id !== undefined && annotation_id !== "") { |
|
|
|
|
$modal.find(".modal-title").text("Edit Annotation") |
|
|
|
|
@ -74,7 +73,7 @@ export default class extends ApplicationController {
|
|
|
|
|
current_document_id = $this.current_document_idTarget.value, doctrine_id = $this.doctrine_idTarget.value |
|
|
|
|
const params = { annomark_ids: $modal.find("select[name='annomark_ids[]']").val(), document_id: $this.document_idTarget.value, |
|
|
|
|
document_ids: $this.document_idsTarget.value || "", phil_rep: $this.phil_repTarget.value || "",
|
|
|
|
|
editor_notes: $this.editor_notesTarget.value || "" } |
|
|
|
|
editor_notes: $this.editor_notesTarget.value || "", content: $modal.find("#document_title").val() } |
|
|
|
|
|
|
|
|
|
if (annotation_id !== null && annotation_id !== undefined && annotation_id !== "") { |
|
|
|
|
$.ajax({ |
|
|
|
|
|