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