diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 653596c23..3ab4e406f 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1883,6 +1883,7 @@ define([ If changes are made to your drive in the interim, they will trigger an update. */ + // NOTE: The callback must stay SYNCHRONOUS var LIMIT_REFRESH_RATE = 30000; // milliseconds UIElements.createUsageBar = function (common, cb) { if (AppConfig.hideUsageBar) { return cb('USAGE_BAR_HIDDEN'); } diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 147f0c05c..1d6b8850c 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -535,7 +535,6 @@ define([ // manager config.loggedIn = APP.loggedIn; config.sframeChan = sframeChan; - // XXX Teams. provide team id var manager = ProxyManager.createInner(files, sframeChan, edPublic, config); var LS = makeLS(teamId); @@ -585,7 +584,6 @@ define([ var virtualCategories = [SEARCH, RECENT, OWNED, TAGS]; - // XXX Teams. not logged in should not be allowe din the team APP if (!APP.loggedIn) { $tree.hide(); if (APP.newSharedFolder) { @@ -4318,7 +4316,6 @@ define([ refresh(); UI.removeLoadingScreen(); - // XXX Teams. should provide a team ID (or null for main drive) sframeChan.query('Q_DRIVE_GETDELETED', null, function (err, data) { var ids = manager.findChannels(data); var titles = []; @@ -4331,6 +4328,10 @@ define([ if (!titles.length) { return; } UI.log(Messages._getKey('fm_deletedPads', [titles.join(', ')])); }); + + return { + refresh: refresh + }; }; return { diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 86551c4eb..2c3d59e1d 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -145,11 +145,10 @@ define([ })); Object.keys(teams).forEach(function (id) { - // XXX waitFor? // only if we want to make sure teams are loaded before remore the loading screen - openChannel(ctx, teams[id], id, function () { + openChannel(ctx, teams[id], id, waitFor(function () { console.error('team '+id+' ready'); - }); + })); }); team.getTeam = function (id) { @@ -169,6 +168,9 @@ define([ // Only the team app will subscribe to events? return void subscribe(ctx, data, clientId, cb); } + if (cmd === 'LIST_TEAMS') { + return void cb(ctx.teams); + } }; return team; diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index 6b4fc96aa..2ac9bb07f 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -692,9 +692,10 @@ define([ }); ctx.sframeChan.ready(); - cb(funcs); Mailbox.create(funcs); + + cb(funcs); }); } }; }); diff --git a/www/drive/inner.js b/www/drive/inner.js index 99ce01f56..fd0101154 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -217,7 +217,7 @@ define([ if (!proxy.drive || typeof(proxy.drive) !== 'object') { throw new Error("Corrupted drive"); } - DriveUI.create(common, { + var drive = DriveUI.create(common, { proxy: proxy, folders: folders, updateObject: updateObject, @@ -228,13 +228,13 @@ define([ var onDisconnect = function (noAlert) { setEditable(false); - if (APP.refresh) { APP.refresh(); } + if (drive.refresh) { drive.refresh(); } APP.toolbar.failed(); if (!noAlert) { UI.alert(Messages.common_connectionLost, undefined, true); } }; var onReconnect = function (info) { setEditable(true); - if (APP.refresh) { APP.refresh(); } + if (drive.refresh) { drive.refresh(); } APP.toolbar.reconnecting(info.myId); UI.findOKButton().click(); }; diff --git a/www/team/app-team.less b/www/team/app-team.less index e2cf57fae..00f3e3b38 100644 --- a/www/team/app-team.less +++ b/www/team/app-team.less @@ -1,5 +1,6 @@ @import (reference) '../../customize/src/less2/include/framework.less'; @import (reference) '../../customize/src/less2/include/drive.less'; +@import (reference) '../../customize/src/less2/include/sidebar-layout.less'; &.cp-app-team { .framework_min_main( @@ -9,5 +10,21 @@ ); .drive_main(); + .sidebar-layout_main(); + + .cp-app-team-container { + flex: 1; + display: flex; + width: 100%; + flex-flow: row; + .cp-app-team-drive { + flex: 1; + display: flex; + &.hidden { + display: none; + } + } + + } } diff --git a/www/team/inner.html b/www/team/inner.html index 1c5e2b0bf..cd965c3c2 100644 --- a/www/team/inner.html +++ b/www/team/inner.html @@ -10,14 +10,19 @@
- -