Changes for page LiveTableEditSheet

Last modified by editors on 2023/06/04 16:49

From version < 2.1
edited by editors
on 2023/06/04 16:49
To version 1.1 >
edited by superadmin
on 2021/12/30 07:42
Change comment: Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/13.10.2]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.Admin
1 +XWiki.superadmin
Content
... ... @@ -170,6 +170,8 @@
170 170   {{html clean="false"}}
171 171   #set ($liveTableObj = $doc.getObject('AppWithinMinutes.LiveTableClass', true))
172 172   #set ($discard = $doc.use($liveTableObj))
173 + #set ($discard = $xwiki.jsfx.use('js/scriptaculous/effects.js'))
174 + #set ($discard = $xwiki.jsfx.use('js/scriptaculous/dragdrop.js'))
173 173   #set ($discard = $xwiki.ssx.use('AppWithinMinutes.LiveTableEditSheet'))
174 174   #set ($discard = $xwiki.jsx.use('AppWithinMinutes.LiveTableEditSheet'))
175 175   #if ("$!request.wizard" == 'true')
... ... @@ -193,9 +193,7 @@
193 193   ## Grant space administration rights only if the space is new. Don't overwrite existing space preferences.
194 194   #set ($spaceHomeRef = $services.model.resolveDocument('', 'default', $spaceRef))
195 195   #set ($spacePrefsRef = $services.model.resolveDocument('WebPreferences', 'explicit', $spaceRef))
196 - ## Verify that the current user has script right on the current space home.
197 - #set ($hasScript = $services.security.authorization.hasAccess('script', $xcontext.userReference, $spaceHomeRef))
198 - #if ($hasScript && !$xwiki.exists($spaceHomeRef) && !$xwiki.exists($spacePrefsRef))
198 + #if (!$xwiki.exists($spaceHomeRef) && !$xwiki.exists($spacePrefsRef))
199 199   #set ($spacePrefsDoc = $xwiki.getDocument($spacePrefsRef))
200 200   #set ($discard = $spacePrefsDoc.use($spacePrefsDoc.getObject('XWiki.XWikiGlobalRights', true)))
201 201   #set ($discard = $spacePrefsDoc.set('allow', 1))
... ... @@ -317,10 +317,6 @@
317 317  {{/velocity}}
318 318  
319 319  {{velocity}}
320 -#if (!$services.security.authorization.hasAccess('script', $xcontext.userReference, $doc.documentReference))
321 - {{error}}{{translation key="platform.appwithinminutes.appHomePageNoScriptRight" /}}{{/error}}
322 -
323 -#end
324 324  #if ("$!request.wizard" == 'true')
325 325   {{include reference="AppWithinMinutes.WizardStep" /}}
326 326  #end
XWiki.JavaScriptExtension[0]
Code
... ... @@ -121,7 +121,11 @@
121 121   }
122 122  });
123 123  
124 -function initForm(form) {
124 +function init() {
125 + var form = $('inline');
126 + if (!form) {
127 + return false;
128 + }
125 125   // Let the sheet handle the form submit. The form is submitted by default to the preview action which dispatches the
126 126   // request to the save action if the save button is detected on the request parameters. By submitting to the edit
127 127   // action the edit sheet is evaluated and thus it can handle the save by itself.
... ... @@ -150,18 +150,9 @@
150 150   }.bindAsEventListener(window));
151 151  
152 152   new XWiki.LiveTableEditor();
153 -}
154 154  
155 -function init() {
156 - var form = $('inline');
157 - if (form) {
158 - require(['scriptaculous/dragdrop'], function() {
159 - initForm(form);
160 - });
161 - }
162 - return form;
158 + return true;
163 163  }
164 -
165 165  (XWiki.domIsLoaded && init()) || document.observe('xwiki:dom:loaded', init);
166 166  
167 167  // Allow widgets to catch the save event before the form is submitted when the 'Save & Continue' button is clicked. We

My Recent Modifications

Need help?

If you need help with XWiki you can contact: