Create and store pads in a team

This commit is contained in:
yflory
2019-09-12 17:54:50 +02:00
parent 79ac44de7e
commit 306fc6cdb9
10 changed files with 139 additions and 13 deletions

View File

@@ -660,6 +660,16 @@ define([
if (typeof (data.title) !== "string") { return cb('Missing title'); }
if (common.initialTeam) {
// If the value is -1, it means the user drive was selected from the pad creation screen
// If the value is a positive Integer, force save in the team with the selected ID
if (common.initialTeam !== -1) {
// Team selected from the PCS or pad created from a team drive
data.teamId = common.initialTeam;
}
data.forceSave = 1;
delete common.initialTeam;
}
if (common.initialPath) {
if (!data.path) {
data.path = Array.isArray(common.initialPath) ? common.initialPath
@@ -1410,6 +1420,11 @@ define([
delete sessionStorage[Constants.newPadPathKey];
}
if (sessionStorage[Constants.newPadTeamKey]) {
common.initialTeam = sessionStorage[Constants.newPadTeamKey];
delete sessionStorage[Constants.newPadTeamKey];
}
var channelIsReady = waitFor();
var msgEv = Util.mkEvent();