Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor (notebook): findings and feedback to the end #454

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading