Closed slauriere closed 3 years ago
Handling a possible fail
of the promise returned by saveFilesAsImageAttachments
in DiagramEditSheet
would fire the display of the expected error:
saveFilesAsImageAttachments().fail(function(e) {
new XWiki.widgets.Notification(
$jsontool.serialize($services.localization.render('diagram.editor.saveAsImageAttachmentError')), 'error');
}).always(function() {
saveButton.prop('disabled', false).click();
});
Ready to push this small change to master upon approval unless a pull request is more appropriate.
@slauriere please create a PR. Thanks.
Steps to reproduce
XWiki.XWikiPreferences
, edit objectXWiki.XWikiPreferences
Maximum Upload Size
field value to1
Save
buttonExpected result
This expected result assumes that all diagram pages should have either a SVG or a PNG attachment - as an application feature - which seems to be the case indeed since
DiagramViewSheet
expects such an attachment on export.Actual result