From 6faaec5042f8442463f481b1267212022eafc94e Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 22 Jul 2021 12:06:48 +0200 Subject: [PATCH] lint compliance --- www/code/inner.js | 2 +- www/common/drive-ui.js | 16 ++++++++-------- www/common/outer/userObject.js | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/www/code/inner.js b/www/code/inner.js index 19ffdb285..4f6c0308e 100644 --- a/www/code/inner.js +++ b/www/code/inner.js @@ -369,7 +369,7 @@ define([ evModeChange.reg(function (mode) { if (MEDIA_TAG_MODES.indexOf(mode) !== -1) { // Embedding is enabled - framework.setMediaTagEmbedder(function (mt, data) { + framework.setMediaTagEmbedder(function (mt) { editor.focus(); editor.replaceSelection($(mt)[0].outerHTML); }); diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 28ac531e2..9c0a37f42 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1113,6 +1113,10 @@ define([ common.getMediaTagPreview(mts, idx); }; + var refresh = APP.refresh = function () { + APP.displayDirectory(currentPath); + }; + // `app`: true (force open wiht the app), false (force open in preview), // falsy (open in preview if default is not using the app) var defaultInApp = ['application/pdf']; @@ -1163,10 +1167,6 @@ define([ common.openURL(Hash.getNewPadURL(href, obj)); }; - var refresh = APP.refresh = function () { - APP.displayDirectory(currentPath); - }; - var pickFolderColor = function ($element, currentColor, cb) { var colors = ["", "#f23c38", "#ff0073", "#da0eba", "#9d00ac", "#6c19b3", "#4a42b1", "#3d8af0", "#30a0f1", "#1fb9d1", "#009686", "#45b354", "#84c750", "#c6e144", "#faf147", "#fbc423", "#fc9819", "#fd5227", "#775549", "#9c9c9c", "#607a89"]; @@ -1938,7 +1938,7 @@ define([ 'class': 'cp-app-drive-element-ctime cp-app-drive-element-list' }).text(getDate(data.ctime)); $element.append($type).append($adate).append($cdate); - } + }; var _addOwnership = function ($span, $state, data) { if (data && Array.isArray(data.owners) && data.owners.indexOf(edPublic) !== -1) { var $owned = $ownedIcon.clone().appendTo($state); @@ -2504,7 +2504,7 @@ define([ setViewMode(viewMode || 'grid'); showMode(viewMode); - $button.click(function (e) { + $button.click(function () { var viewMode = getViewMode(); var newViewMode = getOppositeViewMode(viewMode); setViewMode(newViewMode); @@ -3182,11 +3182,11 @@ define([ .text(Messages.uploadFolderButton)); } // Link - var $elementFileUpload = $('
  • ', { + var $elementLink = $('
  • ', { 'class': 'cp-app-drive-new-link cp-app-drive-element-row ' + 'cp-app-drive-element-grid' }).prepend(getIcon('link')).appendTo($container); - $elementFileUpload.append($('', {'class': 'cp-app-drive-new-name'}) + $elementLink.append($('', {'class': 'cp-app-drive-new-name'}) .text(Messages.fm_link)); } // Pads diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index 257fa5001..97c2207e0 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -864,15 +864,15 @@ define([ }); var sd = files[STATIC_DATA]; var toCleanSD = []; - for (var id in sd) { - id = Number(id); - var el2 = sd[id]; + for (var id2 in sd) { + id2 = Number(id2); + var el2 = sd[id2]; if (!el2 || typeof(el2) !== "object" || !el2.href) { - toCleanSD.push(id); + toCleanSD.push(id2); continue; } - if ((loggedIn || config.testMode) && rootFiles.indexOf(id) === -1) { - toCleanSD.push(id); + if ((loggedIn || config.testMode) && rootFiles.indexOf(id2) === -1) { + toCleanSD.push(id2); continue; } }