Skip to content

Commit

Permalink
refactor (notebook): findings and feedback to the end
Browse files Browse the repository at this point in the history
  • Loading branch information
santanche committed Oct 5, 2023
1 parent 49f7db9 commit 2439ff1
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/adonisjs/public/author/js/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 += '<hr>' + this._blockToForm('', template, collection.comments)

document.querySelector('#comments-display').innerHTML =
Comments.html.form.replace(/{form}/gm, htmlForm)
Expand Down
16 changes: 13 additions & 3 deletions src/adonisjs/public/author/js/modifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,16 @@ class Modifier {
let replace = false
let includeContext = false
let c = 0

const insertionContext = 'closure' // <TODO> 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
Expand All @@ -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) {
Expand Down Expand Up @@ -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')
Expand All @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_abdomen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Abdomen for free liquid detection - POCUS Exam Videos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_aorta.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Aorta - POCUS Exam Videos and Photos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_articulate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Articulate - POCUS Exam Videos and Photos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_cava.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Cava - POCUS Exam Videos and Photos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_efast.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**E-FAST - POCUS Exam Videos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Extra Videos and Images:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_heart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Heart - POCUS Exam Videos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_llv.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Lower Limb Veins - POCUS Exam Videos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_lungs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Lungs - POCUS Exam Videos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_ocular.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Ocular - POCUS Exam Videos and Photos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_soft.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Soft Parts - POCUS Exam Videos and Photos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_urinary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Urinary - POCUS Exam Videos and Photos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down
2 changes: 2 additions & 0 deletions src/adonisjs/public/templates/simple/knot/pt_vesicle.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

**Vesicle and Portal Triad - POCUS Exam Videos and Photos:**

{{closure
**Findings**
}}

{{findings
Describe here your findings concerning the following videos.
Expand Down

0 comments on commit 2439ff1

Please sign in to comment.