Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-mod_pdfannotator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-mod_pdfannotator
Commits
c2110b73
Commit
c2110b73
authored
2 years ago
by
anisa kusumadewi
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
settings.php
+1
-1
1 addition, 1 deletion
settings.php
shared/index.js
+12
-7
12 additions, 7 deletions
shared/index.js
with
13 additions
and
8 deletions
settings.php
+
1
−
1
View file @
c2110b73
...
@@ -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, image
s
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
);
...
...
This diff is collapsed.
Click to expand it.
shared/index.js
+
12
−
7
View file @
c2110b73
...
@@ -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;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment