|
|
@ -241,7 +241,6 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$div.append(addCol.div);
|
|
|
|
$div.append(addCol.div);
|
|
|
|
|
|
|
|
|
|
|
|
if (priv.enableTeams) {
|
|
|
|
|
|
|
|
var teamsData = Util.tryParse(JSON.stringify(priv.teams)) || {};
|
|
|
|
var teamsData = Util.tryParse(JSON.stringify(priv.teams)) || {};
|
|
|
|
Object.keys(teamsData).forEach(function (id) {
|
|
|
|
Object.keys(teamsData).forEach(function (id) {
|
|
|
|
var t = teamsData[id];
|
|
|
|
var t = teamsData[id];
|
|
|
@ -256,7 +255,6 @@ define([
|
|
|
|
data: teamsData
|
|
|
|
data: teamsData
|
|
|
|
}, function () {});
|
|
|
|
}, function () {});
|
|
|
|
$div.append(teamsList.div);
|
|
|
|
$div.append(teamsList.div);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// When clicking on the add button, we get the selected users.
|
|
|
|
// When clicking on the add button, we get the selected users.
|
|
|
|
var addButton = h('button.no-margin', Messages.owner_addButton);
|
|
|
|
var addButton = h('button.no-margin', Messages.owner_addButton);
|
|
|
@ -865,7 +863,6 @@ define([
|
|
|
|
var privateData = common.getMetadataMgr().getPrivateData();
|
|
|
|
var privateData = common.getMetadataMgr().getPrivateData();
|
|
|
|
var teamsData = Util.tryParse(JSON.stringify(privateData.teams)) || {};
|
|
|
|
var teamsData = Util.tryParse(JSON.stringify(privateData.teams)) || {};
|
|
|
|
var teams = {};
|
|
|
|
var teams = {};
|
|
|
|
if (privateData.enableTeams) {
|
|
|
|
|
|
|
|
Object.keys(teamsData).forEach(function (id) {
|
|
|
|
Object.keys(teamsData).forEach(function (id) {
|
|
|
|
// config.teamId only exists when we're trying to share a pad from a team drive
|
|
|
|
// config.teamId only exists when we're trying to share a pad from a team drive
|
|
|
|
// In this case, we don't want to share the pad with the current team
|
|
|
|
// In this case, we don't want to share the pad with the current team
|
|
|
@ -885,7 +882,6 @@ define([
|
|
|
|
data: teams
|
|
|
|
data: teams
|
|
|
|
}, refreshButtons);
|
|
|
|
}, refreshButtons);
|
|
|
|
$div.append(teamsList.div);
|
|
|
|
$div.append(teamsList.div);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var shareButtons = [{
|
|
|
|
var shareButtons = [{
|
|
|
|
className: 'primary cp-share-with-friends',
|
|
|
|
className: 'primary cp-share-with-friends',
|
|
|
@ -3004,7 +3000,7 @@ define([
|
|
|
|
// * a team ID ==> store in the team drive, and the team will be the owner
|
|
|
|
// * a team ID ==> store in the team drive, and the team will be the owner
|
|
|
|
// * -1 ==> store in the user drive, and the user will be the owner
|
|
|
|
// * -1 ==> store in the user drive, and the user will be the owner
|
|
|
|
// * undefined ==> ask
|
|
|
|
// * undefined ==> ask
|
|
|
|
if (teamExists && privateData.enableTeams) {
|
|
|
|
if (teamExists) {
|
|
|
|
var teams = Object.keys(privateData.teams).map(function (id) {
|
|
|
|
var teams = Object.keys(privateData.teams).map(function (id) {
|
|
|
|
var data = privateData.teams[id];
|
|
|
|
var data = privateData.teams[id];
|
|
|
|
var avatar = h('span.cp-creation-team-avatar.cp-avatar');
|
|
|
|
var avatar = h('span.cp-creation-team-avatar.cp-avatar');
|
|
|
|