Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 8 years ago
commit a50805545d

@ -407,7 +407,7 @@ var updateLimits = function (config, publicKey, cb) {
if (publicKey) {
var limit = limits[publicKey];
l = limit && typeof limit.limit === "number" ?
[limit.limit, limit.plan] : [defaultLimit, ''];
[limit.limit, limit.plan, limit.note] : [defaultLimit, '', ''];
}
cb(void 0, l);
} catch (e) {
@ -431,7 +431,7 @@ var getLimit = function (Env, publicKey, cb) {
Env.defaultStorageLimit: DEFAULT_LIMIT;
var toSend = limit && typeof(limit.limit) === "number"?
[limit.limit, limit.plan] : [defaultLimit, ''];
[limit.limit, limit.plan, limit.note] : [defaultLimit, '', ''];
cb(void 0, toSend);
};

@ -112,6 +112,11 @@ define([
};
var fetchDecryptedMetadata = function (src, key, cb) {
if (typeof(src) !== 'string') {
return window.setTimeout(function () {
cb('NO_SOURCE');
});
}
fetchMetadata(src, function (e, buffer) {
if (e) { return cb(e); }
cb(void 0, decryptMetadata(buffer, key));

@ -41,16 +41,9 @@ define([
};
var updateTitle = function (newTitle) {
Cryptpad.renamePad(newTitle, function (err, data) {
if (err) {
console.log("Couldn't set pad title");
console.error(err);
return;
}
document.title = newTitle;
$bar.find('.' + Toolbar.constants.title).find('span.title').text(data);
$bar.find('.' + Toolbar.constants.title).find('input').val(data);
});
var title = document.title = newTitle;
$bar.find('.' + Toolbar.constants.title).find('span.title').text(title);
$bar.find('.' + Toolbar.constants.title).find('input').val(title);
};
var suggestName = function () {

Loading…
Cancel
Save