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

This commit is contained in:
yflory 2017-05-23 18:09:42 +02:00
commit f5f8e148ca
5 changed files with 22 additions and 7 deletions

View File

@ -42,6 +42,11 @@ define([
sig: sig
};
}
} else if (data.cmd === 'UPDATE_LIMIT') {
return Cryptpad.updatePinLimit(function (e, limit, plan, note) {
ret.res = [limit, plan, note];
srcWindow.postMessage(JSON.stringify(ret), domain);
});
} else {
ret.error = "UNKNOWN_CMD";
}

View File

@ -86,6 +86,13 @@
max-width: 40vw;
margin: auto;
}
#preview table tr td, #preview table tr th {
border: 1px solid black;
padding: 15px;
}
#preview table tr th {
border: 3px solid black;
}
</style>
</head>
<body>

View File

@ -304,7 +304,10 @@ define([
onLocal(); // push local state to avoid parse errors later.
if (readOnly) { return; }
if (readOnly) {
config.onRemote();
return;
}
UserList.getLastName(toolbar.$userNameButton, isNew);
};

View File

@ -744,17 +744,17 @@ define([
common.updatePinLimit = function (cb) {
if (!pinsReady()) { return void cb('[RPC_NOT_READY]'); }
rpc.updatePinLimits(function (e, limit, plan) {
rpc.updatePinLimits(function (e, limit, plan, note) {
if (e) { return cb(e); }
cb(e, limit, plan);
cb(e, limit, plan, note);
});
};
common.getPinLimit = function (cb) {
if (!pinsReady()) { return void cb('[RPC_NOT_READY]'); }
rpc.getLimit(function (e, limit, plan) {
rpc.getLimit(function (e, limit, plan, note) {
if (e) { return cb(e); }
cb(void 0, limit, plan);
cb(void 0, limit, plan, note);
});
};

View File

@ -133,7 +133,7 @@ define([
rpc.send('UPDATE_LIMITS', undefined, function (e, response) {
if (e) { return void cb(e); }
if (response && response.length && typeof(response[0]) === "number") {
cb (void 0, response[0], response[1]);
cb (void 0, response[0], response[1], response[2]);
} else {
cb('INVALID_RESPONSE');
}
@ -144,7 +144,7 @@ define([
rpc.send('GET_LIMIT', undefined, function (e, response) {
if (e) { return void cb(e); }
if (response && response.length && typeof(response[0]) === "number") {
cb (void 0, response[0], response[1]);
cb (void 0, response[0], response[1], response[2]);
} else {
cb('INVALID_RESPONSE');
}