Changes for page Office Importer
From version 1.1
edited by N Pompei
on 08/06/2020 17:32
on 08/06/2020 17:32
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-office-ui/12.4]
To version 2.1
edited by Nazzareno Pompei
on 28/10/2022 08:43
on 28/10/2022 08:43
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-office-ui/14.9]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.NPompei 1 +XWiki.NazzarenoPompei
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -1,6 +1,6 @@ 1 1 require(['jquery'], function($) { 2 - $( document).ready(function() {3 - 2 + $(function() { 3 + 4 4 // Add a validator on the document input 5 5 var documentValidator = new LiveValidation($('#filepath')[0], { 6 6 validMessage: "$services.localization.render('core.validation.valid.message')" ... ... @@ -12,7 +12,7 @@ 12 12 return typeof value === 'string' && value.strip().length > 0; 13 13 } 14 14 }); 15 - 15 + 16 16 /** 17 17 * Enable/disable the split option depending of the value of the split document checkbox 18 18 */ ... ... @@ -21,17 +21,17 @@ 21 21 $('#headingLevelsToSplitInputId').prop('disabled', splitOptionsDisabled); 22 22 $('#childPagesNamingMethodInputId').prop('disabled', splitOptionsDisabled); 23 23 } 24 - 24 + 25 25 // Initalize the default state 26 26 maybeDisableSplitOptions(); 27 - 27 + 28 28 // Enable/disable the split options when the checkbox's value changes 29 - $('#splitDocumentInputId').change (maybeDisableSplitOptions);30 - 29 + $('#splitDocumentInputId').on('change', maybeDisableSplitOptions); 30 + 31 31 /** 32 32 * Event sent when the form is submitted 33 33 */ 34 - $('#officeImportForm').submit (function(event) {34 + $('#officeImportForm').on('submit', function(event) { 35 35 // Verify that the target document does not already exist 36 36 var appendContentCheckbox = $('#appendContentInputId'); 37 37 if (appendContentCheckbox.length == 0 || appendContentCheckbox.prop('checked')) { ... ... @@ -38,7 +38,7 @@ 38 38 // Except if the "append content" checkbox is enabled or if it is not present! 39 39 return true; 40 40 } 41 - 41 + 42 42 // The document exist 43 43 new XWiki.widgets.ConfirmationBox({ 44 44 onYes: function() { ... ... @@ -50,10 +50,10 @@ 50 50 }, { 51 51 confirmationText: "$escapetool.javascript($services.localization.render('platform.office.importDocumentOverwriteConfirmation'))" 52 52 }); 53 - 53 + 54 54 return false; 55 55 }); 56 - 56 + 57 57 }); 58 58 }); 59 59