Save and open oo docs

This commit is contained in:
yflory
2018-03-28 19:35:49 +02:00
parent d5dce6ac22
commit fd1b4189be
5 changed files with 148 additions and 33 deletions

File diff suppressed because one or more lines are too long

View File

@@ -39,9 +39,19 @@ define([
var addData = function (obj) {
obj.ooType = window.location.pathname.replace(/^\//, '').replace(/\/$/, '');
};
var addRpc = function (sframeChan, Cryptpad, Utils) {
sframeChan.on('Q_OO_SAVE', function (data, cb) {
var chanId = Utils.Hash.hrefToHexChannelId(data.url);
Cryptpad.pinPads([chanId], function (e) {
if (e) { return void cb(e); }
Cryptpad.setPadAttribute('lastVersion', data.url, cb);
});
});
};
SFCommonO.start({
type: 'oo',
addData: addData
addData: addData,
addRpc: addRpc
});
});
});