Don't open access or share modals for deleted pads

pull/1/head
yflory 4 years ago
parent 79fcd0f6c7
commit e3db9dc59a

@ -213,10 +213,6 @@ define([
evStart.reg(function () { toolbar.forgotten(); });
break;
}
case STATE.FORBIDDEN: {
evStart.reg(function () { toolbar.deleted(); });
break;
}
case STATE.DELETED: {
evStart.reg(function () { toolbar.deleted(); });
break;

@ -546,6 +546,9 @@ MessengerUI, Messages) {
hidden: true
});
$shareBlock.click(function () {
if (toolbar.isDeleted) {
return void UI.warn(Messages.deletedFromServer);
}
var title = (config.title && config.title.getTitle && config.title.getTitle())
|| (config.title && config.title.defaultName)
|| "";
@ -569,6 +572,9 @@ MessengerUI, Messages) {
h('span.cp-button-name', Messages.accessButton)
]));
$accessBlock.click(function () {
if (toolbar.isDeleted) {
return void UI.warn(Messages.deletedFromServer);
}
var title = (config.title && config.title.getTitle && config.title.getTitle())
|| (config.title && config.title.defaultName)
|| "";

Loading…
Cancel
Save