Découvrez les nouveautés de cette version : Fonctionnalités, améliorations et évolutions vous attendent ! 👉 Cliquez ici pour en savoir plus

Modifications pour le document DiagramEditSheet

Modifié par Admin le 19/03/2025 - 19:24

Depuis la version 2.1
modifié par Admin
sur 15/03/2024 - 13:08
Commentaire de modification : Install extension [com.xwiki.diagram:application-diagram/1.20.1]
À la version 1.1
modifié par Admin
sur 08/11/2023 - 08:34
Commentaire de modification : Install extension [com.xwiki.diagram:application-diagram/1.19.1]

Résumé

Détails

XWiki.JavaScriptExtension[1]
Code
... ... @@ -78,8 +78,7 @@
78 78  
79 79   var saveBlobAsImageAttachment = function(blob, fileName, documentReference) {
80 80   var attachmentReference = new XWiki.AttachmentReference(fileName, documentReference);
81 - var uploadMethod = (diagramConfig.isTemporaryUploadSupported) ? xutils.temporaryUploadAttachment : xutils.uploadAttachment;
82 - var uploadAttachment = $.proxy(uploadMethod, null, blob, attachmentReference);
81 + var uploadAttachment = $.proxy(xutils.uploadAttachment, null, blob, attachmentReference);
83 83   // Avoid creating too many versions of the attachment. Upload the attachment even if we failed to delete it first.
84 84   return xutils.deleteAttachment(attachmentReference).then(uploadAttachment, uploadAttachment);
85 85   };
... ... @@ -147,8 +147,8 @@
147 147   $(document).on('xwiki:actions:beforeSave', function(event, data) {
148 148   if (!uploadInProgress) {
149 149   uploadInProgress = true;
150 - event.stopPropagation();
151 - var saveButton = $(event.target);
149 + event.preventDefault();
150 + var saveButton = $('input[name=action_save' + (data && data['continue'] ? 'andcontinue' : '') + ']');
152 152   saveButton.prop('disabled', true);
153 153   saveFilesAsImageAttachments().fail(function(e) {
154 154   new XWiki.widgets.Notification(