"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 treeEl = $("#tree");

View file

@ -1,3 +1,5 @@
"use strict";
const addLink = (function() {
const dialogEl = $("#insert-link-dialog");
const formEl = $("#insert-link-form");

View file

@ -1,3 +1,5 @@
"use strict";
const eventLog = (function() {
const dialogEl = $("#event-log-dialog");
const listEl = $("#event-log-list");

View file

@ -1,3 +1,5 @@
"use strict";
const jumpToNote = (function() {
const dialogEl = $("#jump-to-note-dialog");
const autoCompleteEl = $("#jump-to-note-autocomplete");

View file

@ -1,3 +1,5 @@
"use strict";
const noteHistory = (function() {
const dialogEl = $("#note-history-dialog");
const listEl = $("#note-history-list");

View file

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

View file

@ -1,3 +1,5 @@
"use strict";
const recentNotes = (function() {
const dialogEl = $("#recent-notes-dialog");
const selectBoxEl = $('#recent-notes-select-box');

View file

@ -1,3 +1,5 @@
"use strict";
const settings = (function() {
const dialogEl = $("#settings-dialog");
const tabsEl = $("#settings-tabs");

View file

@ -1,3 +1,5 @@
"use strict";
const dragAndDropSetup = {
autoExpandMS: 600,
draggable: { // modify default jQuery draggable options

View file

@ -1,3 +1,5 @@
"use strict";
const encryption = (function() {
const dialogEl = $("#encryption-password-dialog");
const encryptionPasswordFormEl = $("#encryption-password-form");

View file

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

View file

@ -1,3 +1,5 @@
"use strict";
const link = (function() {
function getNoteIdFromLink(url) {
const noteIdMatch = /app#([A-Za-z0-9]{12})/.exec(url);

View file

@ -1,3 +1,5 @@
"use strict";
$(document).ready(() => {
$.get(baseApiUrl + 'migration').then(result => {
const appDbVersion = result.app_db_version;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,5 @@
"use strict";
function moveBeforeNode(node, beforeNode) {
$.ajax({
url: baseApiUrl + 'notes/' + node.key + '/moveBefore/' + beforeNode.key,

View file

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

View file

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