script API changes for task management #140

This commit is contained in:
azivner
2018-08-13 13:53:08 +02:00
parent ce5c385c15
commit 3424406ff1
4 changed files with 63 additions and 12 deletions

View File

@@ -59,6 +59,8 @@ function ScriptApi(startNote, currentNote, originEntity) {
this.ensureNoteIsPresentInParent = cloningService.ensureNoteIsPresentInParent;
this.ensureNoteIsAbsentFromParent = cloningService.ensureNoteIsAbsentFromParent;
this.toggleNoteInParent = cloningService.toggleNoteInParent;
this.createNote = noteService.createNote;
this.log = message => log.info(`Script ${currentNote.noteId}: ${message}`);
@@ -68,6 +70,8 @@ function ScriptApi(startNote, currentNote, originEntity) {
this.sortNotesAlphabetically = treeService.sortNotesAlphabetically;
this.setNoteToParent = treeService.setNoteToParent;
this.transactional = sql.transactional;
this.refreshTree = () => messagingService.sendMessageToAllClients({ type: 'refresh-tree' });