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

fix min0char

parent cbfa1556
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ function pdfannotator_display_embed($pdfannotator, $cm, $course, $file, $page =
// Load and execute the javascript files.
$PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/pdf.js?ver=00002"));
$PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/textclipper.js"));
$PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/index.js?ver=00031"));
$PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/index.js?ver=00032"));
$PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/locallib.js?ver=00005"));
// Pass parameters from PHP to JavaScript.
......
......@@ -1777,7 +1777,7 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
let defaultPTag = editAreaEditable.querySelector('p');
if(defaultPTag) {
// No text and no images in default p tag of editor.
if (defaultPTag.innerText.replace('/\n/g', '').trim() === '' && imgContents.length === 0) {
if (defaultPTag.innerText.replace('/\n/g', '').trim() === '' && imgContents.length === 0 && editAreaEditable.childNodes.length === 0) {
isEmptyContent = true;
}
}
......@@ -1956,7 +1956,7 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
var innerContent = commentContentElements.innerText.replace('/\n/g', '').trim();
var temp = commentContentElements.querySelectorAll('p')[0];
if(temp) {
if ((temp.innerText.replace('/\n/g', '').trim() === '' && imgContents.length === 0) || innerContent === '') {
if ((temp.innerText.replace('/\n/g', '').trim() === '' && imgContents.length === 0) && innerContent === '') {
isEmptyContent = true;
}
}
......
......@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'mod_pdfannotator';
$plugin->version = 2022102601;
$plugin->version = 2022102602;
$plugin->release = 'PDF Annotator v1.4 release 11';
$plugin->requires = 2021051700;
$plugin->maturity = MATURITY_STABLE;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment