Changes for page Main
Last modified by Administrator on 2023/03/27 10:53
From version
8.1

edited by Administrator
on 2023/03/27 10:53
on 2023/03/27 10:53
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/14.10.7]
To version
4.1


edited by Administrator
on 2020/04/11 15:02
on 2020/04/11 15:02
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/11.10.4]
Summary
Details
- Page properties
-
- Content
-
... ... @@ -66,7 +66,7 @@ 66 66 #foreach ($category in $services.query.xwql($categoryListStatement).execute()) 67 67 #set ($categoryDoc = $xwiki.getDocument($category)) 68 68 <li> 69 - <div class="category">$ escapetool.xml($categoryDoc.plainTitle)</div>69 + <div class="category">$categoryDoc.plainTitle</div> 70 70 #set ($formFieldsForCategoryStatement = "from doc.object($formFieldClassName) as field where field.category = :category order by field.priority") 71 71 #set ($formFieldsForCategoryQuery = $services.query.xwql($formFieldsForCategoryStatement).bindValue('category', $category)) 72 72 <ul> ... ... @@ -81,7 +81,7 @@ 81 81 #else 82 82 #set ($formFieldIconURL = $formFieldDoc.getAttachmentURL($formFieldIcon)) 83 83 #end 84 - #set ($formFieldIconRendered = "<img src='$ escapetool.xml($formFieldIconURL)' alt='$escapetool.xml($formFieldDoc.plainTitle)' class='icon' />")84 + #set ($formFieldIconRendered = "<img src='$formFieldIconURL' alt='$escapetool.xml($formFieldDoc.plainTitle)' class='icon' />") 85 85 #end 86 86 <li class="field"> 87 87 $formFieldIconRendered ... ... @@ -97,12 +97,10 @@ 97 97 #set ($fieldURL = $doc.getURL('edit', $escapetool.url({ 98 98 'xpage': 'plain', 99 99 'sheet': 'AppWithinMinutes.ClassEditSheet', 100 - 'form_token': $services.csrf.getToken(), 101 - 'template': 'AppWithinMinutes.ClassTemplate', 102 102 'field': $formFieldDoc.fullName, 103 103 'xeditmode': 'text' 104 104 }))) 105 - <input type="hidden" value="$ escapetool.xml($fieldURL)" class="data"/>103 + <input type="hidden" value="$fieldURL" class="data"/> 106 106 </li> 107 107 #end 108 108 </ul> ... ... @@ -389,6 +389,7 @@ 389 389 * Display the edit class form. 390 390 *# 391 391 #macro (displayEditForm) 390 + #set ($discard = $xwiki.jsfx.use('js/scriptaculous/dragdrop.js')) 392 392 #set ($discard = $xwiki.jsx.use('AppWithinMinutes.ClassEditSheet')) 393 393 #set ($discard = $xwiki.ssx.use('AppWithinMinutes.ClassEditSheet')) 394 394 #set ($discard = $xwiki.ssx.use('AppWithinMinutes.ClassSheetGenerator')) ... ... @@ -618,10 +618,6 @@ 618 618 #set($discard = $sheetDoc.setParent($doc.documentReference.name)) 619 619 #set($discard = $sheetDoc.setContent($doc.getRenderedContent($sheetGeneratorDoc.content, 620 620 $sheetGeneratorDoc.syntax.toIdString(), 'plain/1.0'))) 621 - ## We assume for now that the output produced by the sheet generator uses the same syntax as the code of the sheet 622 - ## generator. We have to set the syntax because the default wiki syntax (used when creating new wiki pages) could 623 - ## be different than the one used by the sheet generator. 624 - #set($discard = $sheetDoc.setSyntax($sheetGeneratorDoc.syntax)) 625 625 #set($discard = $sheetDoc.setHidden(true)) 626 626 #set($discard = $sheetDoc.save($services.localization.render('platform.appwithinminutes.classEditorSheetSaveComment'), 627 627 $minorEdit)) ... ... @@ -647,7 +647,6 @@ 647 647 #set($translationsGeneratorDoc = $xwiki.getDocument('AppWithinMinutes.ClassTranslationsGenerator')) 648 648 #set($discard = $translationsDoc.setContent($doc.getRenderedContent($translationsGeneratorDoc.content, 649 649 $translationsGeneratorDoc.syntax.toIdString(), 'plain/1.0'))) 650 - #set($discard = $translationsDoc.setSyntaxId('plain/1.0')) 651 651 #set($discard = $translationsDoc.setHidden(true)) 652 652 #set($discard = $translationsDoc.save( 653 653 $services.localization.render('platform.appwithinminutes.classEditorTranslationsSaveComment'), ... ... @@ -678,7 +678,6 @@ 678 678 }) 679 679 #if (!$xwiki.exists($templateProviderReference)) 680 680 #set ($discard = $queryString.putAll({ 681 - 'form_token': $services.csrf.getToken(), 682 682 'template': 'XWiki.TemplateProviderTemplate', 683 683 'parent': $doc.fullName 684 684 }))
- XWiki.JavaScriptExtension[2]
-
- Code
-
... ... @@ -515,7 +515,11 @@ 515 515 }(XWiki || {})); 516 516 517 517 (function() { 518 - function initForm(form) { 518 + function init() { 519 + var form = $('inline'); 520 + if (!form) { 521 + return false; 522 + } 519 519 // Let the sheet handle the form submit. The form is submitted by default to the preview action which dispatches the 520 520 // request to the save action if the save button is detected on the request parameters. By submitting to the edit 521 521 // action the edit sheet is evaluated and thus it can handle the save by itself. ... ... @@ -553,18 +553,9 @@ 553 553 // Make the palette and the canvas live. 554 554 new XWiki.FormFieldPalette('palette'); 555 555 new XWiki.FormCanvas('canvas'); 556 - } 557 557 558 - function init() { 559 - var form = $('inline'); 560 - if (form) { 561 - require(['scriptaculous/dragdrop'], function() { 562 - initForm(form); 563 - }); 564 - } 565 - return form; 561 + return true; 566 566 } 567 - 568 568 (XWiki.domIsLoaded && init()) || document.observe('xwiki:dom:loaded', init); 569 569 }).call(); 570 570