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

This commit is contained in:
yflory
2017-05-16 14:41:51 +02:00
7 changed files with 390 additions and 10 deletions

View File

@@ -785,7 +785,7 @@ define([
var $container = $('<span>', {'class':'limit-container'});
if (!data) {
return void window.setTimeout(function () {
Cryptpad.isOverPinLimit(todo);
common.isOverPinLimit(todo);
}, LIMIT_REFRESH_RATE);
}
var usage = data.usage;
@@ -816,11 +816,11 @@ define([
$text.text(usage + ' / ' + limit + ' ' + unit);
$limit.append($usage).append($text);
window.setTimeout(function () {
Cryptpad.isOverPinLimit(todo);
common.isOverPinLimit(todo);
}, LIMIT_REFRESH_RATE);
cb(err, $container);
};
Cryptpad.isOverPinLimit(todo);
common.isOverPinLimit(todo);
};
common.createButton = function (type, rightside, data, callback) {

View File

@@ -89,7 +89,7 @@ define([
var defaultName = Cryptpad.getDefaultName(Cryptpad.parsePadUrl(window.location.href));
Title.updateTitle(title || defaultName);
APP.toolbar.title.show();
Cryptpad.alert("successfully uploaded: " + title);
Cryptpad.alert(Messages._getKey('upload_success', [title]));
});
});
};
@@ -97,15 +97,16 @@ define([
Cryptpad.rpc.send('UPLOAD_STATUS', estimate, function (e, pending) {
if (e) {
console.error(e);
return void Cryptpad.alert("something went wrong"); // TODO translate
return void Cryptpad.alert(Messages.upload_serverError);
}
if (pending[0]) {
return void Cryptpad.confirm('upload pending, abort?', function (yes) { // TODO translate
return void Cryptpad.confirm(Messages.upload_uploadPending, function (yes) {
if (!yes) { return; }
Cryptpad.rpc.send('UPLOAD_CANCEL', '', function (e, res) {
if (e) { return void console.error(e); }
console.log(res);
next(again);
});
});
}

View File

@@ -222,9 +222,7 @@ define([
return $div;
};
var createUsageButton = function (obj) {
var proxy = obj.proxy;
var createUsageButton = function () {
var $div = $('<div>', { 'class': 'pinned-usage' })
.text(Messages.settings_usageTitle)
.append('<br>');