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(); }); evStart.reg(function () { toolbar.forgotten(); });
break; break;
} }
case STATE.FORBIDDEN: {
evStart.reg(function () { toolbar.deleted(); });
break;
}
case STATE.DELETED: { case STATE.DELETED: {
evStart.reg(function () { toolbar.deleted(); }); evStart.reg(function () { toolbar.deleted(); });
break; break;

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

Loading…
Cancel
Save