"use strict" for all frontend files (backend was done earlier)

This commit is contained in:
azivner 2017-11-04 19:38:50 -04:00
parent 60a3abdea9
commit 19c5404d02
20 changed files with 43 additions and 3 deletions

View File

@ -1,3 +1,5 @@
"use strict";
const contextMenu = (function() { const contextMenu = (function() {
const treeEl = $("#tree"); const treeEl = $("#tree");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -1,3 +1,5 @@
"use strict";
const recentChanges = (function() { const recentChanges = (function() {
const dialogEl = $("#recent-changes-dialog"); const dialogEl = $("#recent-changes-dialog");

View File

@ -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');

View File

@ -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");

View File

@ -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

View File

@ -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");

View File

@ -1,4 +1,6 @@
glob = { "use strict";
const glob = {
activeDialog: null activeDialog: null
}; };

View File

@ -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);

View File

@ -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;

View File

@ -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");

View File

@ -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 => {}

View File

@ -1,3 +1,5 @@
"use strict";
const status = (function() { const status = (function() {
const treeEl = $("#tree"); const treeEl = $("#tree");
const $changesToPushCountEl = $("#changesToPushCount"); const $changesToPushCountEl = $("#changesToPushCount");

View File

@ -1,3 +1,5 @@
"use strict";
function syncNow() { function syncNow() {
$.ajax({ $.ajax({
url: baseApiUrl + 'sync/now', url: baseApiUrl + 'sync/now',

View File

@ -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,

View File

@ -1,3 +1,5 @@
"use strict";
const treeEl = $("#tree"); const treeEl = $("#tree");
function getParentKey(node) { function getParentKey(node) {

View File

@ -1,3 +1,5 @@
"use strict";
function message(str) { function message(str) {
const top = $("#top-message"); const top = $("#top-message");