Add an error message when trying to tag a deleted pad

This commit is contained in:
yflory
2017-10-12 15:06:29 +02:00
parent 69dd3a60ab
commit 62bc72847f
4 changed files with 8 additions and 13 deletions

View File

@@ -31,7 +31,12 @@ define([
UI.updateTags = function (common, href) {
var sframeChan = common.getSframeChannel();
sframeChan.query('Q_TAGS_GET', href || null, function (err, res) {
if (err || res.error) { return void console.error(err || res.error); }
if (err || res.error) {
if (res.error === 'NO_ENTRY') {
Cryptpad.alert(Messages.tags_noentry);
}
return void console.error(err || res.error);
}
Cryptpad.dialog.tagPrompt(res.data, function (tags) {
if (!Array.isArray(tags)) { return; }
sframeChan.event('EV_TAGS_SET', {