lint compliance

pull/1/head
yflory 5 years ago
parent 1b31d8f7c6
commit 222ea650d1

@ -997,7 +997,7 @@ define([
// If we've just accepted ownership for a pad stored in a shared folder, // If we've just accepted ownership for a pad stored in a shared folder,
// we need to make a copy of this pad in our drive. We're going to check // we need to make a copy of this pad in our drive. We're going to check
// the pad is owned by us BUT is not stored in our main drive // the pad is owned by us BUT is not stored in our main drive
var inMyDrive = datas.some(function (obj) { var inMyDrive = allData.some(function (obj) {
return !obj.fId; return !obj.fId;
}); });
// XXX owned by one of our teams? // XXX owned by one of our teams?

@ -77,7 +77,6 @@ define([
var pin = function (data, cb) { return void cb({error: 'EFORBIDDEN'}); }; var pin = function (data, cb) { return void cb({error: 'EFORBIDDEN'}); };
var unpin = function (data, cb) { return void cb({error: 'EFORBIDDEN'}); }; var unpin = function (data, cb) { return void cb({error: 'EFORBIDDEN'}); };
var removeOwnedChannel = function (data, cb) {};
nThen(function (waitFor) { nThen(function (waitFor) {
if (!keys.edPrivate) { return; } if (!keys.edPrivate) { return; }
initRpc(ctx, team, keys, waitFor(function (err) { initRpc(ctx, team, keys, waitFor(function (err) {
@ -101,7 +100,7 @@ define([
}); });
}; };
})); }));
}).nThen(function (waitFor) { }).nThen(function () {
var loadSharedFolder = function (id, data, cb) { var loadSharedFolder = function (id, data, cb) {
SF.load({ SF.load({
network: ctx.store.network, network: ctx.store.network,
@ -145,7 +144,7 @@ define([
// XXX // XXX
// Load shared folders // Load shared folders
// Load members pad // Load members pad
console.log('ok'); console.log('ok', waitFor);
}).nThen(function () { }).nThen(function () {
ctx.teams[id] = team; ctx.teams[id] = team;
if (ctx.onReadyHandlers[id]) { if (ctx.onReadyHandlers[id]) {
@ -195,7 +194,6 @@ define([
console.log(data); console.log(data);
var teams = ctx.store.teams;
var password = Hash.createChannelId(); var password = Hash.createChannelId();
var hash = Hash.createRandomHash('team', password); var hash = Hash.createRandomHash('team', password);
var secret = Hash.getSecrets('team', hash, password); var secret = Hash.getSecrets('team', hash, password);

@ -31,7 +31,7 @@ define([
{ {
var APP = {}; var APP = {};
var driveAPP = {}; var driveAPP = {};
var SHARED_FOLDER_NAME = Messages.fm_sharedFolderName; //var SHARED_FOLDER_NAME = Messages.fm_sharedFolderName;
var copyObjectValue = function (objRef, objToCopy) { var copyObjectValue = function (objRef, objToCopy) {
for (var k in objRef) { delete objRef[k]; } for (var k in objRef) { delete objRef[k]; }
@ -135,7 +135,7 @@ define([
return content; return content;
}; };
makeBlock('list', function (common, cb) { makeBlock('list', function (common, cb) {
refreshList(common, cb) refreshList(common, cb);
}); });
makeBlock('create', function (common, cb) { makeBlock('create', function (common, cb) {
@ -243,11 +243,13 @@ define([
var loadTeam = function (common) { var loadTeam = function (common) {
var sframeChan = common.getSframeChannel(); var sframeChan = common.getSframeChannel();
var proxy = {};
var folders = {};
nThen(function (waitFor) { nThen(function (waitFor) {
updateObject(sframeChan, proxy, waitFor(function () { updateObject(sframeChan, proxy, waitFor(function () {
updateSharedFolders(sframeChan, null, proxy.drive, folders, waitFor()); updateSharedFolders(sframeChan, null, proxy.drive, folders, waitFor());
})); }));
}).nThen(function (waitFor) { }).nThen(function () {
if (!proxy.drive || typeof(proxy.drive) !== 'object') { if (!proxy.drive || typeof(proxy.drive) !== 'object') {
throw new Error("Corrupted drive"); throw new Error("Corrupted drive");
} }
@ -272,6 +274,7 @@ define([
var ev = obj.ev; var ev = obj.ev;
var data = obj.data; var data = obj.data;
if (ev === 'PEWPEW') { if (ev === 'PEWPEW') {
data = data;
// Do something // Do something
return; return;
} }
@ -279,8 +282,6 @@ define([
var main = function () { var main = function () {
var common; var common;
var proxy = {};
var folders = {};
var readOnly; var readOnly;
nThen(function (waitFor) { nThen(function (waitFor) {
@ -295,9 +296,9 @@ define([
APP.$container = $('#cp-sidebarlayout-container'); APP.$container = $('#cp-sidebarlayout-container');
APP.$leftside = $('<div>', {id: 'cp-sidebarlayout-leftside'}).appendTo(APP.$container); APP.$leftside = $('<div>', {id: 'cp-sidebarlayout-leftside'}).appendTo(APP.$container);
APP.$rightside = $('<div>', {id: 'cp-sidebarlayout-rightside'}).appendTo(APP.$container); APP.$rightside = $('<div>', {id: 'cp-sidebarlayout-rightside'}).appendTo(APP.$container);
sFrameChan = common.getSframeChannel(); var sFrameChan = common.getSframeChannel();
sFrameChan.onReady(waitFor()); sFrameChan.onReady(waitFor());
}).nThen(function (waitFor) { }).nThen(function () {
var sframeChan = common.getSframeChannel(); var sframeChan = common.getSframeChannel();
var metadataMgr = common.getMetadataMgr(); var metadataMgr = common.getMetadataMgr();
var privateData = metadataMgr.getPrivateData(); var privateData = metadataMgr.getPrivateData();
@ -309,8 +310,6 @@ define([
common.setTabTitle('TEAMS'); // XXX common.setTabTitle('TEAMS'); // XXX
// Drive data // Drive data
var metadataMgr = common.getMetadataMgr();
var privateData = metadataMgr.getPrivateData();
if (privateData.newSharedFolder) { if (privateData.newSharedFolder) {
driveAPP.newSharedFolder = privateData.newSharedFolder; driveAPP.newSharedFolder = privateData.newSharedFolder;
} }

Loading…
Cancel
Save