lint compliance

pull/1/head
yflory 3 years ago
parent 667bef2a84
commit 6faaec5042

@ -369,7 +369,7 @@ define([
evModeChange.reg(function (mode) { evModeChange.reg(function (mode) {
if (MEDIA_TAG_MODES.indexOf(mode) !== -1) { if (MEDIA_TAG_MODES.indexOf(mode) !== -1) {
// Embedding is enabled // Embedding is enabled
framework.setMediaTagEmbedder(function (mt, data) { framework.setMediaTagEmbedder(function (mt) {
editor.focus(); editor.focus();
editor.replaceSelection($(mt)[0].outerHTML); editor.replaceSelection($(mt)[0].outerHTML);
}); });

@ -1113,6 +1113,10 @@ define([
common.getMediaTagPreview(mts, idx); common.getMediaTagPreview(mts, idx);
}; };
var refresh = APP.refresh = function () {
APP.displayDirectory(currentPath);
};
// `app`: true (force open wiht the app), false (force open in preview), // `app`: true (force open wiht the app), false (force open in preview),
// falsy (open in preview if default is not using the app) // falsy (open in preview if default is not using the app)
var defaultInApp = ['application/pdf']; var defaultInApp = ['application/pdf'];
@ -1163,10 +1167,6 @@ define([
common.openURL(Hash.getNewPadURL(href, obj)); common.openURL(Hash.getNewPadURL(href, obj));
}; };
var refresh = APP.refresh = function () {
APP.displayDirectory(currentPath);
};
var pickFolderColor = function ($element, currentColor, cb) { 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"]; 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' 'class': 'cp-app-drive-element-ctime cp-app-drive-element-list'
}).text(getDate(data.ctime)); }).text(getDate(data.ctime));
$element.append($type).append($adate).append($cdate); $element.append($type).append($adate).append($cdate);
} };
var _addOwnership = function ($span, $state, data) { var _addOwnership = function ($span, $state, data) {
if (data && Array.isArray(data.owners) && data.owners.indexOf(edPublic) !== -1) { if (data && Array.isArray(data.owners) && data.owners.indexOf(edPublic) !== -1) {
var $owned = $ownedIcon.clone().appendTo($state); var $owned = $ownedIcon.clone().appendTo($state);
@ -2504,7 +2504,7 @@ define([
setViewMode(viewMode || 'grid'); setViewMode(viewMode || 'grid');
showMode(viewMode); showMode(viewMode);
$button.click(function (e) { $button.click(function () {
var viewMode = getViewMode(); var viewMode = getViewMode();
var newViewMode = getOppositeViewMode(viewMode); var newViewMode = getOppositeViewMode(viewMode);
setViewMode(newViewMode); setViewMode(newViewMode);
@ -3182,11 +3182,11 @@ define([
.text(Messages.uploadFolderButton)); .text(Messages.uploadFolderButton));
} }
// Link // Link
var $elementFileUpload = $('<li>', { var $elementLink = $('<li>', {
'class': 'cp-app-drive-new-link cp-app-drive-element-row ' + 'class': 'cp-app-drive-new-link cp-app-drive-element-row ' +
'cp-app-drive-element-grid' 'cp-app-drive-element-grid'
}).prepend(getIcon('link')).appendTo($container); }).prepend(getIcon('link')).appendTo($container);
$elementFileUpload.append($('<span>', {'class': 'cp-app-drive-new-name'}) $elementLink.append($('<span>', {'class': 'cp-app-drive-new-name'})
.text(Messages.fm_link)); .text(Messages.fm_link));
} }
// Pads // Pads

@ -864,15 +864,15 @@ define([
}); });
var sd = files[STATIC_DATA]; var sd = files[STATIC_DATA];
var toCleanSD = []; var toCleanSD = [];
for (var id in sd) { for (var id2 in sd) {
id = Number(id); id2 = Number(id2);
var el2 = sd[id]; var el2 = sd[id2];
if (!el2 || typeof(el2) !== "object" || !el2.href) { if (!el2 || typeof(el2) !== "object" || !el2.href) {
toCleanSD.push(id); toCleanSD.push(id2);
continue; continue;
} }
if ((loggedIn || config.testMode) && rootFiles.indexOf(id) === -1) { if ((loggedIn || config.testMode) && rootFiles.indexOf(id2) === -1) {
toCleanSD.push(id); toCleanSD.push(id2);
continue; continue;
} }
} }

Loading…
Cancel
Save