mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
"use strict" for all frontend files (backend was done earlier)
This commit is contained in:
parent
60a3abdea9
commit
19c5404d02
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const contextMenu = (function() {
|
const contextMenu = (function() {
|
||||||
const treeEl = $("#tree");
|
const treeEl = $("#tree");
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const addLink = (function() {
|
const addLink = (function() {
|
||||||
const dialogEl = $("#insert-link-dialog");
|
const dialogEl = $("#insert-link-dialog");
|
||||||
const formEl = $("#insert-link-form");
|
const formEl = $("#insert-link-form");
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const eventLog = (function() {
|
const eventLog = (function() {
|
||||||
const dialogEl = $("#event-log-dialog");
|
const dialogEl = $("#event-log-dialog");
|
||||||
const listEl = $("#event-log-list");
|
const listEl = $("#event-log-list");
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const jumpToNote = (function() {
|
const jumpToNote = (function() {
|
||||||
const dialogEl = $("#jump-to-note-dialog");
|
const dialogEl = $("#jump-to-note-dialog");
|
||||||
const autoCompleteEl = $("#jump-to-note-autocomplete");
|
const autoCompleteEl = $("#jump-to-note-autocomplete");
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const noteHistory = (function() {
|
const noteHistory = (function() {
|
||||||
const dialogEl = $("#note-history-dialog");
|
const dialogEl = $("#note-history-dialog");
|
||||||
const listEl = $("#note-history-list");
|
const listEl = $("#note-history-list");
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const recentChanges = (function() {
|
const recentChanges = (function() {
|
||||||
const dialogEl = $("#recent-changes-dialog");
|
const dialogEl = $("#recent-changes-dialog");
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const recentNotes = (function() {
|
const recentNotes = (function() {
|
||||||
const dialogEl = $("#recent-notes-dialog");
|
const dialogEl = $("#recent-notes-dialog");
|
||||||
const selectBoxEl = $('#recent-notes-select-box');
|
const selectBoxEl = $('#recent-notes-select-box');
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const settings = (function() {
|
const settings = (function() {
|
||||||
const dialogEl = $("#settings-dialog");
|
const dialogEl = $("#settings-dialog");
|
||||||
const tabsEl = $("#settings-tabs");
|
const tabsEl = $("#settings-tabs");
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const dragAndDropSetup = {
|
const dragAndDropSetup = {
|
||||||
autoExpandMS: 600,
|
autoExpandMS: 600,
|
||||||
draggable: { // modify default jQuery draggable options
|
draggable: { // modify default jQuery draggable options
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const encryption = (function() {
|
const encryption = (function() {
|
||||||
const dialogEl = $("#encryption-password-dialog");
|
const dialogEl = $("#encryption-password-dialog");
|
||||||
const encryptionPasswordFormEl = $("#encryption-password-form");
|
const encryptionPasswordFormEl = $("#encryption-password-form");
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
glob = {
|
"use strict";
|
||||||
|
|
||||||
|
const glob = {
|
||||||
activeDialog: null
|
activeDialog: null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const link = (function() {
|
const link = (function() {
|
||||||
function getNoteIdFromLink(url) {
|
function getNoteIdFromLink(url) {
|
||||||
const noteIdMatch = /app#([A-Za-z0-9]{12})/.exec(url);
|
const noteIdMatch = /app#([A-Za-z0-9]{12})/.exec(url);
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
$.get(baseApiUrl + 'migration').then(result => {
|
$.get(baseApiUrl + 'migration').then(result => {
|
||||||
const appDbVersion = result.app_db_version;
|
const appDbVersion = result.app_db_version;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const noteEditor = (function() {
|
const noteEditor = (function() {
|
||||||
const treeEl = $("#tree");
|
const treeEl = $("#tree");
|
||||||
const noteTitleEl = $("#note-title");
|
const noteTitleEl = $("#note-title");
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const noteTree = (function() {
|
const noteTree = (function() {
|
||||||
const noteDetailEl = $('#note-detail');
|
const noteDetailEl = $('#note-detail');
|
||||||
const treeEl = $("#tree");
|
const treeEl = $("#tree");
|
||||||
@ -37,10 +39,10 @@ const noteTree = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setExpandedToServer(note_id, is_expanded) {
|
function setExpandedToServer(note_id, is_expanded) {
|
||||||
expanded_num = is_expanded ? 1 : 0;
|
const expandedNum = is_expanded ? 1 : 0;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseApiUrl + 'notes/' + note_id + '/expanded/' + expanded_num,
|
url: baseApiUrl + 'notes/' + note_id + '/expanded/' + expandedNum,
|
||||||
type: 'PUT',
|
type: 'PUT',
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
success: result => {}
|
success: result => {}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const status = (function() {
|
const status = (function() {
|
||||||
const treeEl = $("#tree");
|
const treeEl = $("#tree");
|
||||||
const $changesToPushCountEl = $("#changesToPushCount");
|
const $changesToPushCountEl = $("#changesToPushCount");
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
function syncNow() {
|
function syncNow() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseApiUrl + 'sync/now',
|
url: baseApiUrl + 'sync/now',
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
function moveBeforeNode(node, beforeNode) {
|
function moveBeforeNode(node, beforeNode) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseApiUrl + 'notes/' + node.key + '/moveBefore/' + beforeNode.key,
|
url: baseApiUrl + 'notes/' + node.key + '/moveBefore/' + beforeNode.key,
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
const treeEl = $("#tree");
|
const treeEl = $("#tree");
|
||||||
|
|
||||||
function getParentKey(node) {
|
function getParentKey(node) {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
function message(str) {
|
function message(str) {
|
||||||
const top = $("#top-message");
|
const top = $("#top-message");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user