Fix 'store in cryptdrive'

pull/1/head
yflory 3 years ago
parent 5f757fd21f
commit 4019ec0880

@ -808,7 +808,9 @@ define([
h('span.cp-toolbar-name.cp-toolbar-drawer-element', Messages.toolbar_storeInDrive) h('span.cp-toolbar-name.cp-toolbar-drawer-element', Messages.toolbar_storeInDrive)
])).click(common.prepareFeedback(type)).click(function () { ])).click(common.prepareFeedback(type)).click(function () {
$(button).hide(); $(button).hide();
common.getSframeChannel().query("Q_AUTOSTORE_STORE", null, function (err, obj) { common.getSframeChannel().query("Q_AUTOSTORE_STORE", {
forceOwnDrive: true,
}, function (err, obj) {
var error = err || (obj && obj.error); var error = err || (obj && obj.error);
if (error) { if (error) {
$(button).show(); $(button).show();

@ -974,6 +974,9 @@ define([
data.forceSave = 1; data.forceSave = 1;
//delete common.initialTeam; //delete common.initialTeam;
} }
if (data.forceOwnDrive) {
data.teamId = -1;
}
if (common.initialPath) { if (common.initialPath) {
if (!data.path) { if (!data.path) {
data.path = Array.isArray(common.initialPath) ? common.initialPath data.path = Array.isArray(common.initialPath) ? common.initialPath

@ -1181,7 +1181,8 @@ define([
title: currentTitle, title: currentTitle,
channel: secret.channel, channel: secret.channel,
path: initialPathInDrive, // Where to store the pad if we don't have it in our drive path: initialPathInDrive, // Where to store the pad if we don't have it in our drive
forceSave: true forceSave: true,
forceOwnDrive: obj && obj.forceOwnDrive
}; };
setPadTitle(data, cb); setPadTitle(data, cb);
}); });

Loading…
Cancel
Save