diff --git a/src/adonisjs/public/author/js/comments.js b/src/adonisjs/public/author/js/comments.js
index ef42effc..b0da50c5 100644
--- a/src/adonisjs/public/author/js/comments.js
+++ b/src/adonisjs/public/author/js/comments.js
@@ -154,12 +154,13 @@ class Comments {
}
_generateForm (template, collection) {
- let htmlForm = this._blockToForm('', template, collection.comments)
+ let htmlForm = ''
for (const c in collection.contexts) {
const tmpl = template.contexts[collection.contexts[c].context]
if (tmpl != null)
htmlForm += this._blockToForm(c, tmpl, collection.contexts[c].comments)
}
+ htmlForm += '
' + this._blockToForm('', template, collection.comments)
document.querySelector('#comments-display').innerHTML =
Comments.html.form.replace(/{form}/gm, htmlForm)
diff --git a/src/adonisjs/public/author/js/modifier.js b/src/adonisjs/public/author/js/modifier.js
index 2a837a36..5c2ef404 100644
--- a/src/adonisjs/public/author/js/modifier.js
+++ b/src/adonisjs/public/author/js/modifier.js
@@ -174,9 +174,16 @@ class Modifier {
let replace = false
let includeContext = false
let c = 0
+
+ const insertionContext = 'closure' // make it configurable
+ let insertionPoint = content.length
+
const artifactType = Translator.instance.classifyArtifactType(artifact)
const artifactSuperType = (artifactType == 'image') ? 'image' : 'media'
while (c < content.length && targetEl < 0) {
+ if (content[c].type == 'context-open' &&
+ content[c].context == insertionContext)
+ insertionPoint = c
if (content[c].type == 'context-open' &&
content[c].context == target)
targetEl = -1
@@ -191,7 +198,10 @@ class Modifier {
c++
}
if (targetEl < 0 && includeMissing) {
- targetEl = content.length
+ targetEl = insertionPoint
+ console.log('=== insertion point')
+ console.log(targetEl)
+ console.log((targetEl == content.length) ? '--- length' : content[targetEl])
includeContext = true
}
if (targetEl >= 0) {
@@ -388,7 +398,7 @@ class Modifier {
}
elementReplace (knot, position, element) {
- status = false
+ let status = false
if (this._checkKnotContentPosition(knot, position, true)) {
if (element == null)
this._reportError('element.replace.missing')
@@ -410,7 +420,7 @@ class Modifier {
}
elementDelete (knot, position) {
- status = false
+ let status = false
if (this._checkKnotContentPosition(knot, position, true)) {
this._compiledCase.knots[knot].content.splice(position, 1)
this._recordOperation('element', 'delete',
diff --git a/src/adonisjs/public/templates/simple/knot/pt_abdomen.md b/src/adonisjs/public/templates/simple/knot/pt_abdomen.md
index ab50cba0..24e2b48c 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_abdomen.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_abdomen.md
@@ -2,7 +2,9 @@
**Abdomen for free liquid detection - POCUS Exam Videos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_aorta.md b/src/adonisjs/public/templates/simple/knot/pt_aorta.md
index c6ac8f5f..65618d6a 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_aorta.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_aorta.md
@@ -2,7 +2,9 @@
**Aorta - POCUS Exam Videos and Photos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_articulate.md b/src/adonisjs/public/templates/simple/knot/pt_articulate.md
index e0a1e96e..c73b3084 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_articulate.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_articulate.md
@@ -2,7 +2,9 @@
**Articulate - POCUS Exam Videos and Photos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_cava.md b/src/adonisjs/public/templates/simple/knot/pt_cava.md
index 75cc6c48..48f265fe 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_cava.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_cava.md
@@ -2,7 +2,9 @@
**Cava - POCUS Exam Videos and Photos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_efast.md b/src/adonisjs/public/templates/simple/knot/pt_efast.md
index aaf4751f..102933f8 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_efast.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_efast.md
@@ -2,7 +2,9 @@
**E-FAST - POCUS Exam Videos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_extra.md b/src/adonisjs/public/templates/simple/knot/pt_extra.md
index 4b6d2c70..f8bfb887 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_extra.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_extra.md
@@ -2,7 +2,9 @@
**Extra Videos and Images:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_heart.md b/src/adonisjs/public/templates/simple/knot/pt_heart.md
index 2cb13dda..2718a8e5 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_heart.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_heart.md
@@ -2,7 +2,9 @@
**Heart - POCUS Exam Videos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_llv.md b/src/adonisjs/public/templates/simple/knot/pt_llv.md
index 1f594705..2fc84d2c 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_llv.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_llv.md
@@ -2,7 +2,9 @@
**Lower Limb Veins - POCUS Exam Videos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_lungs.md b/src/adonisjs/public/templates/simple/knot/pt_lungs.md
index b4d9d010..cbeffdec 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_lungs.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_lungs.md
@@ -2,7 +2,9 @@
**Lungs - POCUS Exam Videos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_ocular.md b/src/adonisjs/public/templates/simple/knot/pt_ocular.md
index b90db6c6..1af9b82c 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_ocular.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_ocular.md
@@ -2,7 +2,9 @@
**Ocular - POCUS Exam Videos and Photos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_soft.md b/src/adonisjs/public/templates/simple/knot/pt_soft.md
index f0bee75a..b1047267 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_soft.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_soft.md
@@ -2,7 +2,9 @@
**Soft Parts - POCUS Exam Videos and Photos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_urinary.md b/src/adonisjs/public/templates/simple/knot/pt_urinary.md
index 309b6641..3dbd1344 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_urinary.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_urinary.md
@@ -2,7 +2,9 @@
**Urinary - POCUS Exam Videos and Photos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.
diff --git a/src/adonisjs/public/templates/simple/knot/pt_vesicle.md b/src/adonisjs/public/templates/simple/knot/pt_vesicle.md
index bf9f2523..874f1531 100644
--- a/src/adonisjs/public/templates/simple/knot/pt_vesicle.md
+++ b/src/adonisjs/public/templates/simple/knot/pt_vesicle.md
@@ -2,7 +2,9 @@
**Vesicle and Portal Triad - POCUS Exam Videos and Photos:**
+{{closure
**Findings**
+}}
{{findings
Describe here your findings concerning the following videos.