Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesread committed Jan 28, 2024
1 parent 7672f96 commit 036d3b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/js/modules/DBAL.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export class DBAL {
this.remote = new DatabaseRemoteServer()
}

open (readyCallback) {
this.local.open(readyCallback)
open (readyCallback, errorCallback) {
const req = this.local.open(readyCallback)

}
}
2 changes: 2 additions & 0 deletions src/js/modules/DatabaseIndexedDB.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export class DatabaseIndexedDB {
open (onReadyCallback) {
const req = window.indexedDB.open('db', this.version)

window.dbreq = req

req.onsuccess = () => {
this.db = req.result
onReadyCallback()
Expand Down
7 changes: 4 additions & 3 deletions src/js/modules/webcomponents/TaskContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ export class TaskContent extends HTMLElement {
}
}

refreshSubtasks() {
for (let child of this.domSubTasks.children) {
refreshSubtasks () {
for (const child of this.domSubTasks.children) {
child.remove()
}

window.dbal.local.getTasks((x) => { this.renderSubtasks(x) })
window.dbal.remote.getTasks(this.fields.id)
window.dbal.local.getTasks((x) => { this.renderSubtasks(x) }, this.fields.id)
}

renderSubtasks(subtasks) {
Expand Down

0 comments on commit 036d3b1

Please sign in to comment.