|
|
@ -89,7 +89,7 @@ define([
|
|
|
|
var defaultName = Cryptpad.getDefaultName(Cryptpad.parsePadUrl(window.location.href));
|
|
|
|
var defaultName = Cryptpad.getDefaultName(Cryptpad.parsePadUrl(window.location.href));
|
|
|
|
Title.updateTitle(title || defaultName);
|
|
|
|
Title.updateTitle(title || defaultName);
|
|
|
|
APP.toolbar.title.show();
|
|
|
|
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) {
|
|
|
|
Cryptpad.rpc.send('UPLOAD_STATUS', estimate, function (e, pending) {
|
|
|
|
if (e) {
|
|
|
|
if (e) {
|
|
|
|
console.error(e);
|
|
|
|
console.error(e);
|
|
|
|
return void Cryptpad.alert("something went wrong"); // TODO translate
|
|
|
|
return void Cryptpad.alert(Messages.upload_serverError);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (pending[0]) {
|
|
|
|
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; }
|
|
|
|
if (!yes) { return; }
|
|
|
|
Cryptpad.rpc.send('UPLOAD_CANCEL', '', function (e, res) {
|
|
|
|
Cryptpad.rpc.send('UPLOAD_CANCEL', '', function (e, res) {
|
|
|
|
if (e) { return void console.error(e); }
|
|
|
|
if (e) { return void console.error(e); }
|
|
|
|
console.log(res);
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
next(again);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|