Merge branch 'anonsf' into staging

This commit is contained in:
yflory
2018-10-01 16:21:53 +02:00
9 changed files with 144 additions and 22 deletions

View File

@@ -89,6 +89,12 @@ define([
cb(obj);
});
};
common.loadSharedFolder = function (id, data, cb) {
postMessage("LOAD_SHARED_FOLDER", {
id: id,
data: data
}, cb);
};
// Settings and ready
common.mergeAnonDrive = function (cb) {
var data = {

View File

@@ -1239,6 +1239,11 @@ define([
}
return rt;
};
Store.loadSharedFolderAnon = function (clientId, data, cb) {
loadSharedFolder(data.id, data.data, function () {
cb();
});
};
Store.addSharedFolder = function (clientId, data, cb) {
Store.userObjectCommand(clientId, {
cmd: 'addSharedFolder',

View File

@@ -56,6 +56,7 @@ define([
INCREMENT_TEMPLATE_USE: Store.incrementTemplateUse,
GET_SHARED_FOLDER: Store.getSharedFolder,
ADD_SHARED_FOLDER: Store.addSharedFolder,
LOAD_SHARED_FOLDER: Store.loadSharedFolderAnon,
// Messaging
INVITE_FROM_USERLIST: Store.inviteFromUserlist,
ADD_DIRECT_MESSAGE_HANDLERS: Store.addDirectMessageHandlers,

View File

@@ -838,7 +838,8 @@ define([
var getFileData = _getFileData;
var getUserObjectPath = _getUserObjectPath;
var find = function (Env, path) {
var find = function (Env, path, fId) {
if (fId) { return Env.folders[fId].userObject.find(path); }
var resolved = _resolvePath(Env, path);
return resolved.userObject.find(resolved.path);
};

View File

@@ -23,7 +23,6 @@ define([
var $title;
exp.setToolbar = function (toolbar) {
$title = toolbar && (toolbar.title || toolbar.pageTitle);
console.log('SET TOOLBAR');
};
exp.getTitle = function () { return exp.title; };