mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 14:55:50 +01:00
moved services into the service directory
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
import treeService from '../note_tree.js';
|
||||
import cloning from '../cloning.js';
|
||||
import link from '../link.js';
|
||||
import noteEditor from '../note_editor.js';
|
||||
import treeUtils from '../tree_utils.js';
|
||||
import treeService from '../services/tree_service.js';
|
||||
import cloning from '../services/cloning.js';
|
||||
import link from '../services/link.js';
|
||||
import noteDetail from '../services/note_detail.js';
|
||||
import treeUtils from '../services/tree_utils.js';
|
||||
|
||||
const $dialog = $("#add-link-dialog");
|
||||
const $form = $("#add-link-form");
|
||||
@@ -27,7 +27,7 @@ function setLinkType(linkType) {
|
||||
async function showDialog() {
|
||||
glob.activeDialog = $dialog;
|
||||
|
||||
if (noteEditor.getCurrentNoteType() === 'text') {
|
||||
if (noteDetail.getCurrentNoteType() === 'text') {
|
||||
$linkTypeHtml.prop('disabled', false);
|
||||
|
||||
setLinkType('html');
|
||||
@@ -99,14 +99,14 @@ $form.submit(() => {
|
||||
else if (linkType === 'selected-to-current') {
|
||||
const prefix = $clonePrefix.val();
|
||||
|
||||
cloning.cloneNoteTo(noteId, noteEditor.getCurrentNoteId(), prefix);
|
||||
cloning.cloneNoteTo(noteId, noteDetail.getCurrentNoteId(), prefix);
|
||||
|
||||
$dialog.dialog("close");
|
||||
}
|
||||
else if (linkType === 'current-to-selected') {
|
||||
const prefix = $clonePrefix.val();
|
||||
|
||||
cloning.cloneNoteTo(noteEditor.getCurrentNoteId(), noteId, prefix);
|
||||
cloning.cloneNoteTo(noteDetail.getCurrentNoteId(), noteId, prefix);
|
||||
|
||||
$dialog.dialog("close");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
import treeService from '../note_tree.js';
|
||||
import treeService from '../services/tree_service.js';
|
||||
|
||||
const $dialog = $("#edit-tree-prefix-dialog");
|
||||
const $form = $("#edit-tree-prefix-form");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
import link from '../link.js';
|
||||
import utils from '../utils.js';
|
||||
import link from '../services/link.js';
|
||||
import utils from '../services/utils.js';
|
||||
|
||||
const $dialog = $("#event-log-dialog");
|
||||
const $list = $("#event-log-list");
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
import treeService from '../note_tree.js';
|
||||
import link from '../link.js';
|
||||
import utils from '../utils.js';
|
||||
import treeService from '../services/tree_service.js';
|
||||
import link from '../services/link.js';
|
||||
import utils from '../services/utils.js';
|
||||
|
||||
const $showDialogButton = $("#jump-to-note-button");
|
||||
const $dialog = $("#jump-to-note-dialog");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
import noteEditor from '../note_editor.js';
|
||||
import utils from '../utils.js';
|
||||
import noteDetail from '../services/note_detail.js';
|
||||
import utils from '../services/utils.js';
|
||||
|
||||
const $showDialogButton = $(".show-labels-button");
|
||||
const $dialog = $("#labels-dialog");
|
||||
@@ -17,7 +17,7 @@ function LabelsModel() {
|
||||
this.labels = ko.observableArray();
|
||||
|
||||
this.loadLabels = async function() {
|
||||
const noteId = noteEditor.getCurrentNoteId();
|
||||
const noteId = noteDetail.getCurrentNoteId();
|
||||
|
||||
const labels = await server.get('notes/' + noteId + '/labels');
|
||||
|
||||
@@ -81,7 +81,7 @@ function LabelsModel() {
|
||||
return;
|
||||
}
|
||||
|
||||
const noteId = noteEditor.getCurrentNoteId();
|
||||
const noteId = noteDetail.getCurrentNoteId();
|
||||
|
||||
const labelsToSave = self.labels()
|
||||
.map(attr => attr())
|
||||
@@ -95,7 +95,7 @@ function LabelsModel() {
|
||||
|
||||
utils.showMessage("Labels have been saved.");
|
||||
|
||||
noteEditor.loadLabelList();
|
||||
noteDetail.loadLabelList();
|
||||
};
|
||||
|
||||
function addLastEmptyRow() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
import noteEditor from '../note_editor.js';
|
||||
import utils from '../utils.js';
|
||||
import noteDetail from '../services/note_detail.js';
|
||||
import utils from '../services/utils.js';
|
||||
|
||||
const $showDialogButton = $("#show-history-button");
|
||||
const $dialog = $("#note-history-dialog");
|
||||
@@ -12,7 +12,7 @@ const $title = $("#note-history-title");
|
||||
let historyItems = [];
|
||||
|
||||
async function showCurrentNoteHistory() {
|
||||
await showNoteHistoryDialog(noteEditor.getCurrentNoteId());
|
||||
await showNoteHistoryDialog(noteDetail.getCurrentNoteId());
|
||||
}
|
||||
|
||||
async function showNoteHistoryDialog(noteId, noteRevisionId) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
import noteEditor from '../note_editor.js';
|
||||
import noteDetail from '../services/note_detail.js';
|
||||
|
||||
const $showDialogButton = $("#show-source-button");
|
||||
const $dialog = $("#note-source-dialog");
|
||||
@@ -15,7 +15,7 @@ function showDialog() {
|
||||
height: 500
|
||||
});
|
||||
|
||||
const noteText = noteEditor.getCurrentNote().detail.content;
|
||||
const noteText = noteDetail.getCurrentNote().detail.content;
|
||||
|
||||
$noteSource.text(formatHtml(noteText));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
import link from '../link.js';
|
||||
import utils from '../utils.js';
|
||||
import link from '../services/link.js';
|
||||
import utils from '../services/utils.js';
|
||||
|
||||
const $showDialogButton = $("#recent-changes-button");
|
||||
const $dialog = $("#recent-changes-dialog");
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
import treeService from '../note_tree.js';
|
||||
import server from '../server.js';
|
||||
import messaging from '../messaging.js';
|
||||
import treeService from '../services/tree_service.js';
|
||||
import server from '../services/server.js';
|
||||
import messaging from '../services/messaging.js';
|
||||
|
||||
const $showDialogButton = $("#recent-notes-button");
|
||||
const $dialog = $("#recent-notes-dialog");
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
import protected_session from '../protected_session.js';
|
||||
import utils from '../utils.js';
|
||||
import server from '../server.js';
|
||||
import protected_session from '../services/protected_session.js';
|
||||
import utils from '../services/utils.js';
|
||||
import server from '../services/server.js';
|
||||
|
||||
const $showDialogButton = $("#settings-button");
|
||||
const $dialog = $("#settings-dialog");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
import utils from '../utils.js';
|
||||
import utils from '../services/utils.js';
|
||||
|
||||
const $dialog = $("#sql-console-dialog");
|
||||
const $query = $('#sql-console-query');
|
||||
|
||||
Reference in New Issue
Block a user