lint errors

pull/1/head
yflory 7 years ago
parent 92ea3593cd
commit a78b597ebb

@ -1777,10 +1777,10 @@ define([
draggable: draggable draggable: draggable
}); });
if (Array.isArray(APP.selectedFiles)) { if (Array.isArray(APP.selectedFiles)) {
var idx = APP.selectedFiles.indexOf(id); var sidx = APP.selectedFiles.indexOf(id);
if (idx !== -1) { if (sidx !== -1) {
$element.addClass('selected'); $element.addClass('selected');
APP.selectedFiles.splice(idx, 1); APP.selectedFiles.splice(sidx, 1);
} }
} }
addFileData(id, $element); addFileData(id, $element);

@ -678,13 +678,13 @@ define([
onSelect: function (data) { onSelect: function (data) {
if (data.type === 'file') { if (data.type === 'file') {
var mt = '<media-tag contenteditable="false" src="' + data.src + '" data-crypto-key="cryptpad:' + data.key + '" tabindex="1"></media-tag>'; var mt = '<media-tag contenteditable="false" src="' + data.src + '" data-crypto-key="cryptpad:' + data.key + '" tabindex="1"></media-tag>';
editor.insertElement(CKEDITOR.dom.element.createFromHtml(mt)); editor.insertElement(window.CKEDITOR.dom.element.createFromHtml(mt));
return; return;
} }
} }
}; };
common.initFilePicker(fileDialogCfg); common.initFilePicker(fileDialogCfg);
APP.$mediaTagButton = $('<button>', { window.APP.$mediaTagButton = $('<button>', {
title: Messages.filePickerButton, title: Messages.filePickerButton,
'class': 'cp-toolbar-rightside-button fa fa-picture-o', 'class': 'cp-toolbar-rightside-button fa fa-picture-o',
style: 'font-size: 17px' style: 'font-size: 17px'
@ -771,10 +771,10 @@ define([
var hexFileName = Cryptpad.base64ToHex(parsed.hashData.channel); var hexFileName = Cryptpad.base64ToHex(parsed.hashData.channel);
var src = '/blob/' + hexFileName.slice(0,2) + '/' + hexFileName; var src = '/blob/' + hexFileName.slice(0,2) + '/' + hexFileName;
var mt = '<media-tag contenteditable="false" src="' + src + '" data-crypto-key="cryptpad:' + parsed.hashData.key + '" tabindex="1"></media-tag>'; var mt = '<media-tag contenteditable="false" src="' + src + '" data-crypto-key="cryptpad:' + parsed.hashData.key + '" tabindex="1"></media-tag>';
editor.insertElement(CKEDITOR.dom.element.createFromHtml(mt)); editor.insertElement(window.CKEDITOR.dom.element.createFromHtml(mt));
} }
}; };
APP.FM = common.createFileManager(fmConfig); window.APP.FM = common.createFileManager(fmConfig);
editor.focus(); editor.focus();
if (newPad) { if (newPad) {

Loading…
Cancel
Save