Skip to content
Snippets Groups Projects
Commit c2110b73 authored by anisa kusumadewi's avatar anisa kusumadewi
Browse files

Fix Error in editing annotation and

remove overlay after canceling a comment
parent 15d834e5
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ style2 = strike, subscript, superscript ...@@ -68,7 +68,7 @@ style2 = strike, subscript, superscript
font = fontfamily, fontsize font = fontfamily, fontsize
indent = indent, align indent = indent, align
extra = equation, matrix, chemistry, charmap extra = equation, matrix, chemistry, charmap
undo = undo, images undo = undo, image
screen = fullscreen'; screen = fullscreen';
$setting = new admin_setting_configtextarea('mod_pdfannotator/attobuttons', $name, $desc, $default); $setting = new admin_setting_configtextarea('mod_pdfannotator/attobuttons', $name, $desc, $default);
$settings->add($setting); $settings->add($setting);
......
...@@ -1791,6 +1791,7 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to ...@@ -1791,6 +1791,7 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
var handleClickIfEditorExists = function() { // If there is no editor in the comment already, we will insert it and than call this function. var handleClickIfEditorExists = function() { // If there is no editor in the comment already, we will insert it and than call this function.
editForm = document.getElementById("edit"+comment.uuid); editForm = document.getElementById("edit"+comment.uuid);
editArea = document.getElementById("editarea"+comment.uuid); editArea = document.getElementById("editarea"+comment.uuid);
var editAreaEditable = document.getElementById("editarea"+comment.uuid+"editable");
var text = document.getElementById("chatmessage"+comment.uuid); var text = document.getElementById("chatmessage"+comment.uuid);
if (editForm.style.display === "none") { if (editForm.style.display === "none") {
editForm.style.display = "block"; editForm.style.display = "block";
...@@ -1864,6 +1865,10 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to ...@@ -1864,6 +1865,10 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
$('#comment_' + comment.uuid + ' #commentCancel').click(function(e){ $('#comment_' + comment.uuid + ' #commentCancel').click(function(e){
editForm.style.display = "none"; editForm.style.display = "none";
editArea.innerHTML = '';
editArea.innerHTML = comment.displaycontent;
editAreaEditable.innerHTML = '';
editAreaEditable.innerHTML = comment.displaycontent;
text.innerHTML = comment.displaycontent; text.innerHTML = comment.displaycontent;
renderMathJax(text); renderMathJax(text);
}); });
...@@ -6247,7 +6252,7 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to ...@@ -6247,7 +6252,7 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
function handleCancelClick(e){ function handleCancelClick(e){
//delete Overlay //delete Overlay
if(_type==='input'&&overlay){ if(_type==='area'&&overlay){
overlay.parentNode.removeChild(overlay); overlay.parentNode.removeChild(overlay);
overlay=null; overlay=null;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment