lint compliance
This commit is contained in:
parent
9787f5304a
commit
8516587ece
@ -33,7 +33,6 @@ define([
|
|||||||
var onMigrated = function () {
|
var onMigrated = function () {
|
||||||
oldFo.fixFiles(true);
|
oldFo.fixFiles(true);
|
||||||
var manager = proxyData.manager;
|
var manager = proxyData.manager;
|
||||||
var oldRecentPads = parsed.drive[oldFo.FILES_DATA];
|
|
||||||
var oldFiles = oldFo.getFiles([oldFo.FILES_DATA]);
|
var oldFiles = oldFo.getFiles([oldFo.FILES_DATA]);
|
||||||
oldFiles.forEach(function (id) {
|
oldFiles.forEach(function (id) {
|
||||||
var data = oldFo.getFileData(id);
|
var data = oldFo.getFileData(id);
|
||||||
|
|||||||
@ -1185,12 +1185,11 @@ define([
|
|||||||
}));
|
}));
|
||||||
}).nThen(function (waitFor) {
|
}).nThen(function (waitFor) {
|
||||||
// 2a. add the shared folder to the path in our drive
|
// 2a. add the shared folder to the path in our drive
|
||||||
console.log('adding');
|
|
||||||
store.userObject.add(id, path);
|
store.userObject.add(id, path);
|
||||||
onSync(waitFor());
|
onSync(waitFor());
|
||||||
|
|
||||||
// 2b. load the proxy
|
// 2b. load the proxy
|
||||||
rt = loadSharedFolder(id, data.folderData, waitFor(function () {
|
loadSharedFolder(id, data.folderData, waitFor(function (rt) {
|
||||||
if (data.metadata) { // Creating a new shared folder
|
if (data.metadata) { // Creating a new shared folder
|
||||||
rt.proxy.metadata = data.metadata;
|
rt.proxy.metadata = data.metadata;
|
||||||
onSync(waitFor());
|
onSync(waitFor());
|
||||||
|
|||||||
@ -92,7 +92,7 @@ define([
|
|||||||
var fd = exp.getFileData(id);
|
var fd = exp.getFileData(id);
|
||||||
var channelId = fd.channel;
|
var channelId = fd.channel;
|
||||||
// If trying to remove an owned pad, remove it from server also
|
// If trying to remove an owned pad, remove it from server also
|
||||||
if (!isOwnPadRemoved &&
|
if (!isOwnPadRemoved && !sharedFolder &&
|
||||||
fd.owners && fd.owners.indexOf(edPublic) !== -1 && channelId) {
|
fd.owners && fd.owners.indexOf(edPublic) !== -1 && channelId) {
|
||||||
removeOwnedChannel(channelId, function (obj) {
|
removeOwnedChannel(channelId, function (obj) {
|
||||||
if (obj && obj.error) {
|
if (obj && obj.error) {
|
||||||
@ -113,10 +113,6 @@ define([
|
|||||||
});
|
});
|
||||||
if (!toClean.length) { return; }
|
if (!toClean.length) { return; }
|
||||||
cb(null, toClean);
|
cb(null, toClean);
|
||||||
unpinPads(toClean, function (response) {
|
|
||||||
if (response && response.error) { return console.error(response.error); }
|
|
||||||
// console.error(response);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
var deleteHrefs = function (ids) {
|
var deleteHrefs = function (ids) {
|
||||||
ids.forEach(function (obj) {
|
ids.forEach(function (obj) {
|
||||||
|
|||||||
@ -17,7 +17,6 @@ define([
|
|||||||
|
|
||||||
module.init = function (files, config) {
|
module.init = function (files, config) {
|
||||||
var exp = {};
|
var exp = {};
|
||||||
var pinPads = config.pinPads;
|
|
||||||
var sframeChan = config.sframeChan;
|
var sframeChan = config.sframeChan;
|
||||||
|
|
||||||
var FILES_DATA = module.FILES_DATA = exp.FILES_DATA = Constants.storageKey;
|
var FILES_DATA = module.FILES_DATA = exp.FILES_DATA = Constants.storageKey;
|
||||||
|
|||||||
@ -90,7 +90,7 @@ define([
|
|||||||
//var $folderOpenedIcon = $('<img>', {src: "/customize/images/icons/folderOpen.svg", "class": "folder icon"});
|
//var $folderOpenedIcon = $('<img>', {src: "/customize/images/icons/folderOpen.svg", "class": "folder icon"});
|
||||||
var $folderOpenedEmptyIcon = $folderOpenedIcon.clone();
|
var $folderOpenedEmptyIcon = $folderOpenedIcon.clone();
|
||||||
var $sharedFolderIcon = $('<span>', {"class": faSharedFolder + " fa cp-app-drive-icon-folder"});
|
var $sharedFolderIcon = $('<span>', {"class": faSharedFolder + " fa cp-app-drive-icon-folder"});
|
||||||
var $sharedFolderOpenedIcon = $sharedFolderIcon.clone();
|
//var $sharedFolderOpenedIcon = $sharedFolderIcon.clone();
|
||||||
//var $upIcon = $('<span>', {"class": "fa fa-arrow-circle-up"});
|
//var $upIcon = $('<span>', {"class": "fa fa-arrow-circle-up"});
|
||||||
var $unsortedIcon = $('<span>', {"class": "fa fa-files-o"});
|
var $unsortedIcon = $('<span>', {"class": "fa fa-files-o"});
|
||||||
var $templateIcon = $('<span>', {"class": "fa fa-cubes"});
|
var $templateIcon = $('<span>', {"class": "fa fa-cubes"});
|
||||||
@ -1518,14 +1518,14 @@ define([
|
|||||||
|
|
||||||
var skipNext = false; // When encountering a shared folder, skip a key in the path
|
var skipNext = false; // When encountering a shared folder, skip a key in the path
|
||||||
path.forEach(function (p, idx) {
|
path.forEach(function (p, idx) {
|
||||||
if (skipNext) { return skipNext = false; }
|
if (skipNext) { skipNext = false; return; }
|
||||||
if (isTrash && [2,3].indexOf(idx) !== -1) { return; }
|
if (isTrash && [2,3].indexOf(idx) !== -1) { return; }
|
||||||
|
|
||||||
var name = p;
|
var name = p;
|
||||||
|
|
||||||
var el = manager.find(path.slice(0, idx+1));
|
var currentEl = manager.find(path.slice(0, idx+1));
|
||||||
if (manager.isSharedFolder(el)) {
|
if (manager.isSharedFolder(currentEl)) {
|
||||||
name = manager.getSharedFolderData(el).title;
|
name = manager.getSharedFolderData(currentEl).title;
|
||||||
skipNext = true;
|
skipNext = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ define([
|
|||||||
if (hash) {
|
if (hash) {
|
||||||
// Add a shared folder!
|
// Add a shared folder!
|
||||||
// XXX password?
|
// XXX password?
|
||||||
Cryptpad.addSharedFolder(secret, function (obj) {
|
Cryptpad.addSharedFolder(secret, function () {
|
||||||
window.location.hash = "";
|
window.location.hash = "";
|
||||||
cb(null, secret);
|
cb(null, secret);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user