Changes for page LiveTable View Sheet

Last modified by Martin Výlet on 19.03.2025 21:26

From version 2.1
edited by superadmin
on 06.01.2023 13:11
Change comment: Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/14.10.2]
To version 1.1
edited by XWiki Admin
on 26.05.2017 08:18
Change comment: Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui-9.3.1]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.superadmin
1 +XWiki.Admin
Content
... ... @@ -1,15 +1,99 @@
1 -{{template name="locationPicker_macros.vm" /}}
2 -
3 -{{velocity output="false"}}
4 -#macro (displayApp)
5 - #set ($discard = $xwiki.ssx.use('AppWithinMinutes.LiveTableViewSheet'))
6 - #set ($discard = $xwiki.jsx.use('AppWithinMinutes.LiveTableViewSheet', {'currentApp': $doc.getDocumentReference()}))
1 +{{velocity}}
2 +#set($liveTableObj = $doc.getObject('AppWithinMinutes.LiveTableClass'))
3 +#if($liveTableObj)
4 + #set($discard = $doc.use($liveTableObj))
5 + #set($discard = $xwiki.ssx.use('AppWithinMinutes.LiveTableViewSheet'))
6 + #set($discard = $xwiki.jsx.use('AppWithinMinutes.LiveTableViewSheet'))
7 7   #if (!$isReadOnly)
8 - #displayAppActions
8 + ## Determine the user's rights
9 + #set($classFullName = $liveTableObj.getProperty('class').value)
10 + #set($className = $stringtool.removeEnd($classFullName, 'Class'))
11 + #set ($templateProviderReference = $services.model.resolveDocument("${className}TemplateProvider"))
12 + #set ($creationRestrictions = $xwiki.getDocument($templateProviderReference).getValue('creationRestrictions'))
13 + #if ($creationRestrictions)
14 + #if ($creationRestrictions.size() > 0)
15 + #set ($dataSpaceRef = $services.model.resolveSpace($creationRestrictions.get(0)))
16 + #else
17 + ## There is no data space as the user can create application entries anywhere. Let's use the application space
18 + ## when the user clicks on the Add New Entry link from the home page.
19 + #set ($dataSpaceRef = $doc.documentReference.parent)
20 + #end
21 + #else
22 + ## The template provider is missing. Fall-back on the old 'dataSpace' property.
23 + #set ($dataSpaceRef = $services.model.resolveSpace($liveTableObj.getValue('dataSpace'), 'explicit',
24 + $doc.documentReference))
25 + #end
26 + #set($hasCreateData = $services.security.authorization.hasAccess('edit', $dataSpaceRef))
27 + #set($hasDeleteData = $services.security.authorization.hasAccess('admin', $dataSpaceRef))
28 + #set($classRef = $services.model.resolveDocument($classFullName))
29 + #set($hasEditApplication = $services.security.authorization.hasAccess('edit', $classRef))
30 + #set($translationsRef = $services.model.resolveDocument("${className}Translations"))
31 + #set($hasEditTranslations = $xwiki.isMultiLingual() && $xwiki.exists($translationsRef)
32 + && $services.security.authorization.hasAccess('edit', $translationsRef))
33 + #set($hasDeleteApplication = $hasDeleteData
34 + && $services.security.authorization.hasAccess('admin', $doc.documentReference.parent)
35 + && $services.security.authorization.hasAccess('admin', $classRef.parent))
36 + ## Display the application actions based on the user's rights
37 + #if($hasCreateData || $hasDeleteData || $hasEditApplication || $hasEditTranslations || $hasDeleteApplication)
38 + (% id="actionBox" class="floatinginfobox" %)
39 + (((
40 + = $services.localization.render('platform.appwithinminutes.appHomePageActionsHeading') =
41 + #if($hasCreateData)
42 + * [[$services.localization.render('platform.appwithinminutes.appHomePageAddEntryHint')>>||anchor="AddNewEntry" class="action add"]]##
43 + #set($entryDoc = $services.model.resolveDocument('__entryName__', 'explicit', $dataSpaceRef))
44 + ## We need to set the title if we want to be able to sort or filter the doc.title live table column.
45 + #set ($params = {
46 + 'template': "${className}Template",
47 + 'title': '__entryName__',
48 + 'parent': $services.model.serialize($doc.documentReference, 'local')
49 + })
50 + #if ($xwiki.getDocument($classRef).xWikiClass.properties.size() > 0)
51 + ## The entry has properties so go in edit mode to edit them.
52 + #set ($action = 'edit')
53 + #set ($params.editor = 'inline')
54 + #else
55 + ## There are no properties to edit so create the new entry and get back to the home page.
56 + #set ($action = 'save')
57 + #set ($discard = $params.putAll({
58 + 'xredirect': $doc.getURL(),
59 + 'form_token': $services.csrf.token
60 + }))
61 + #end
62 + {{html}}<input type="hidden" value="$xwiki.getURL($entryDoc, $action, $escapetool.url($params))" />{{/html}}
63 + #end
64 + #if($hasEditApplication)
65 + #set ($queryString = $escapetool.url({
66 + 'appName': $doc.space,
67 + 'resolve': true
68 + }))
69 + * [[$services.localization.render('platform.appwithinminutes.appHomePageEditAppLabel')>>AppWithinMinutes.CreateApplication||queryString="$queryString" class="action edit"]]
70 + #end
71 + #if($hasEditTranslations)
72 + * [[$services.localization.render('platform.appwithinminutes.appHomePageTranslateAppLabel')>>path:$xwiki.getURL($translationsRef, 'edit', 'editor=wiki')||class="action translate"]]
73 + #end
74 + #if($hasDeleteData)
75 + #set ($deleteDataURL = $xwiki.getURL('AppWithinMinutes.DeleteApplication', 'view', $escapetool.url({
76 + 'appName': $doc.space,
77 + 'resolve': true,
78 + 'scope': 'entries',
79 + 'xredirect': $doc.getURL()
80 + })))
81 + * [[$services.localization.render('platform.appwithinminutes.appHomePageDeleteEntriesLabel')>>path:$deleteDataURL||class="action deleteData"]]
82 + #end
83 + #if($hasDeleteApplication)
84 + #set ($deleteAppURL = $xwiki.getURL('AppWithinMinutes.DeleteApplication', 'view', $escapetool.url({
85 + 'appName': $doc.space,
86 + 'resolve': true,
87 + 'xredirect': $doc.getURL()
88 + })))
89 + * [[$services.localization.render('platform.appwithinminutes.appHomePageDeleteAppLabel')>>path:$deleteAppURL||class="action delete"]]
90 + #end
91 + )))
92 + #end
9 9   #end
10 10   $doc.display('description')
11 11   ## Display the live table only if it was generated.
12 - #if ($doc.content.length() > 0)
96 + #if($doc.content.length() > 0)
13 13   = $services.localization.render('platform.appwithinminutes.appLiveTableHeading') =
14 14   ## We don't use the Include macro (with empty reference) because we want the content to be executed with the rights
15 15   ## of the current document rather than the rights of the sheet. This is important because the user can modify the
... ... @@ -23,202 +23,4 @@
23 23   $doc.syntax.toIdString()).replace('{{', '&amp;#123;&amp;#123;'){{/html}}
24 24   #end
25 25  #end
26 -
27 -#macro (displayAppActions)
28 - ## Determine the user's rights
29 - #set ($className = $stringtool.removeEnd($classFullName, 'Class'))
30 - #set ($templateProviderReference = $services.model.resolveDocument("${className}TemplateProvider"))
31 - #set ($templateProvider = $xwiki.getDocument($templateProviderReference))
32 - #set ($creationRestrictions = $templateProvider.getValue('creationRestrictions'))
33 - #if ($creationRestrictions)
34 - #if ($creationRestrictions.size() > 0)
35 - #set ($dataSpaceRef = $services.model.resolveSpace($creationRestrictions.get(0)))
36 - #else
37 - ## There is no data space as the user can create application entries anywhere. Let's use the application space
38 - ## when the user clicks on the Add New Entry link from the home page.
39 - #set ($dataSpaceRef = $doc.documentReference.parent)
40 - #end
41 - #else
42 - ## The template provider is missing. Fall-back on the old 'dataSpace' property.
43 - #set ($dataSpaceRef = $services.model.resolveSpace($doc.getValue('dataSpace'), 'explicit',
44 - $doc.documentReference))
45 - #end
46 - #set ($hasCreateData = $services.security.authorization.hasAccess('edit', $dataSpaceRef))
47 - #set ($hasDeleteData = $services.security.authorization.hasAccess('admin', $dataSpaceRef))
48 - #set ($translationsRef = $services.model.resolveDocument("${className}Translations"))
49 - #set ($hasEditTranslations = $xwiki.isMultiLingual() && $xwiki.exists($translationsRef)
50 - && $services.security.authorization.hasAccess('edit', $translationsRef))
51 - #set ($classRef = $services.model.resolveDocument($classFullName))
52 - #set ($hasEditApplication = $services.security.authorization.hasAccess('edit', $classRef))
53 - #set ($hasDeleteApplication = $hasDeleteData
54 - && $services.security.authorization.hasAccess('admin', $doc.documentReference.parent)
55 - && $services.security.authorization.hasAccess('admin', $classRef.parent))
56 - ## Display the application actions based on the user's rights
57 - #if ($hasCreateData || $hasDeleteData || $hasEditApplication || $hasEditTranslations || $hasDeleteApplication)
58 - (% id="actionBox" class="floatinginfobox" %)
59 - (((
60 - = $services.localization.render('platform.appwithinminutes.appHomePageActionsHeading') =
61 - #if ($hasCreateData)
62 - * [[$services.localization.render('platform.appwithinminutes.appHomePageAddEntryHint')>>||anchor="AddNewEntry" class="action add"]]##
63 - #if ("$!templateProvider.getValue('terminal')" == '1')
64 - #set ($entryReference = $services.model.createDocumentReference('__entryName__', $dataSpaceRef))
65 - #else
66 - #set ($entryReference = $services.model.resolveDocument('', 'default',
67 - $services.model.createSpaceReference('__entryName__', $dataSpaceRef)))
68 - #end
69 - ## We need to set the title if we want to be able to sort or filter the doc.title live table column.
70 - #set ($params = {
71 - 'template': "${className}Template",
72 - 'title': '__entryName__',
73 - 'parent': $services.model.serialize($doc.documentReference, 'local')
74 - })
75 - #if ($xwiki.getDocument($classRef).xWikiClass.properties.size() > 0)
76 - ## The entry has properties so go in edit mode to edit them.
77 - #set ($action = 'edit')
78 - #set ($params.editor = 'inline')
79 - #else
80 - ## There are no properties to edit so create the new entry and get back to the home page.
81 - #set ($action = 'save')
82 - #set ($discard = $params.putAll({
83 - 'xredirect': $doc.getURL(),
84 - 'form_token': $services.csrf.token
85 - }))
86 - #end
87 - {{html}}<input type="hidden" value="$xwiki.getURL($entryReference, $action, $escapetool.url($params))" />{{/html}}
88 - #end
89 - #if ($hasEditApplication)
90 - #set ($queryString = $escapetool.url({
91 - 'appName': $doc.space,
92 - 'resolve': true
93 - }))
94 - * [[$services.localization.render('platform.appwithinminutes.appHomePageEditAppLabel')>>AppWithinMinutes.CreateApplication||queryString="$queryString" class="action edit"]]
95 - #end
96 - #if ($hasEditTranslations)
97 - * [[$services.localization.render('platform.appwithinminutes.appHomePageTranslateAppLabel')>>path:${xwiki.getURL($translationsRef, 'edit', 'editor=wiki')}||class="action translate"]]
98 - #end
99 - #if ($hasDeleteData)
100 - #set ($deleteDataURL = $xwiki.getURL('AppWithinMinutes.DeleteApplication', 'view', $escapetool.url({
101 - 'appName': $doc.space,
102 - 'resolve': true,
103 - 'scope': 'entries',
104 - 'xredirect': $doc.getURL()
105 - })))
106 - * [[$services.localization.render('platform.appwithinminutes.appHomePageDeleteEntriesLabel')>>path:${deleteDataURL}||class="action deleteData"]]
107 - #end
108 - #if ($hasDeleteApplication)
109 - #set ($deleteAppURL = $xwiki.getURL('AppWithinMinutes.DeleteApplication', 'view', $escapetool.url({
110 - 'appName': $doc.space,
111 - 'resolve': true,
112 - 'xredirect': $doc.getURL()
113 - })))
114 - * [[$services.localization.render('platform.appwithinminutes.appHomePageDeleteAppLabel')>>path:${deleteAppURL}||class="action delete"]]
115 - #end
116 - )))
117 - #end
118 -#end
119 -
120 -#macro (renameAppModal)
121 - <div class="modal" id="renameAppModal" tabindex="-1" role="dialog" aria-labelledby="renameAppModal-label"
122 - data-backdrop="static" data-keyboard="false">
123 - <div class="modal-dialog" role="document">
124 - <form class="modal-content xform">
125 - ## The fieldset allows us to disable and enable the entire form quickly and easy.
126 - <fieldset>
127 - <div class="modal-header">
128 - <button type="button" class="close" data-dismiss="modal"
129 - title="$escapetool.xml($services.localization.render('appWithinMinutes.renameApp.close'))"
130 - aria-label="$escapetool.xml($services.localization.render('appWithinMinutes.renameApp.close'))">
131 - <span aria-hidden="true">&times;</span>
132 - </button>
133 - <span class="modal-title" id="renameAppModal-label">
134 - $escapetool.xml($services.localization.render('appWithinMinutes.renameApp.label'))
135 - </span>
136 - </div>
137 - <div class="modal-body">
138 - #renameAppModalBody
139 - </div>
140 - <div class="modal-footer">
141 - <button type="button" class="btn btn-default" data-dismiss="modal">
142 - $escapetool.xml($services.localization.render('cancel'))
143 - </button>
144 - <button type="submit" class="btn btn-primary" disabled="disabled">
145 - $escapetool.xml($services.localization.render('core.rename.submit'))
146 - </button>
147 - </div>
148 - </fieldset>
149 - </form>
150 - </div>
151 - </div>
152 -#end
153 -
154 -#macro (renameAppModalBody)
155 - <div class="box infomessage">
156 - $services.icon.renderHTML('info')
157 - $services.localization.render('appWithinMinutes.renameApp.changeAppTitleInfo')
158 - </div>
159 - <div class="box warningmessage">
160 - $services.icon.renderHTML('warning')
161 - $services.localization.render('appWithinMinutes.renameApp.regenerateAppCodeWarning')
162 - </div>
163 - <div class="hidden">
164 - <input type="hidden" name="form_token" value="$!escapetool.xml($services.csrf.token)" />
165 - <input type="hidden" name="oldAppReference" value="$escapetool.xml(
166 - $services.model.serialize($doc.documentReference.parent, 'local'))"/>
167 - <span class="appNameEmptyError xErrorMsg">
168 - $services.localization.render("platform.appwithinminutes.appNameEmptyError")
169 - </span>
170 - <span class="pageExistsError xErrorMsg">
171 - $services.localization.render("appWithinMinutes.renameApp.pageExistsError")
172 - </span>
173 - <span class="locationForbiddenError xErrorMsg">
174 - $services.localization.render("appWithinMinutes.renameApp.locationForbiddenError")
175 - </span>
176 - </div>
177 - #set ($appName = $doc.pageReference.name)
178 - #set ($isNestedPage = $doc.documentReference.name == $services.model.getEntityReference('DOCUMENT', 'default').name)
179 - #set ($parentReference = $doc.documentReference.parent)
180 - #if ($isNestedPage)
181 - #set ($parentReference = $parentReference.parent)
182 - #end
183 - #locationPicker({
184 - 'id': 'renameApp',
185 - 'title': {
186 - 'label': 'appWithinMinutes.renameApp.newName.label',
187 - 'hint': 'platform.appwithinminutes.appNameHint',
188 - 'name': 'newAppName',
189 - 'value': $appName,
190 - 'placeholder': 'appWithinMinutes.renameApp.newName.label'
191 - },
192 - 'preview': {
193 - 'label': 'appWithinMinutes.renameApp.location.label',
194 - 'hint': 'appWithinMinutes.renameApp.location.hint'
195 - },
196 - 'parent': {
197 - 'label': 'appWithinMinutes.renameApp.parent.label',
198 - 'hint': 'appWithinMinutes.renameApp.parent.hint',
199 - 'name': 'newAppParentReference',
200 - 'reference': $parentReference,
201 - 'placeholder': 'appWithinMinutes.createApp.parent.placeholder'
202 - }
203 - })
204 -#end
205 205  {{/velocity}}
206 -
207 -{{velocity}}
208 -#set ($liveTableObj = $doc.getObject('AppWithinMinutes.LiveTableClass'))
209 -#if ($liveTableObj)
210 - #set ($discard = $doc.use($liveTableObj))
211 - #set ($classFullName = $doc.getValue('class'))
212 - #if ("$!classFullName" == '' || !$xwiki.exists($classFullName))
213 - {{warning}}
214 - $services.icon.render('warning') {{translation key="platform.appwithinminutes.appHomePageMovedWarning"/}}
215 - {{/warning}}
216 -
217 - #end
218 - #displayApp()
219 -
220 - {{html clean="false"}}
221 - #renameAppModal()
222 - {{/html}}
223 -#end
224 -{{/velocity}}
XWiki.JavaScriptExtension[0]
Code
... ... @@ -6,11 +6,7 @@
6 6   this.urlTemplate = trigger.up().next('input[type=hidden]').value;
7 7  
8 8   this.input = new Element('input', {type: 'text'});
9 - this.addButton = new Element('input', {
10 - type: 'image',
11 - src: '$xwiki.getSkinFile('icons/silk/add.png')',
12 - alt: '$escapetool.javascript($services.localization.render('platform.appwithinminutes.appHomePageAddEntryLabel'))'
13 - });
9 + this.addButton = new Element('input', {type: 'image', src: '$xwiki.getSkinFile('icons/silk/add.png')', alt: '$escapetool.javascript($services.localization.render('platform.appwithinminutes.appHomePageAddEntryLabel'))'});
14 14  
15 15   var container = new Element('div', {id: 'entryNamePopup'});
16 16   container.insert(this.input);
... ... @@ -54,176 +54,3 @@
54 54  
55 55  return XWiki;
56 56  }(XWiki || {}));
57 -
58 -/**
59 - * Rename Application
60 - */
61 -require(['jquery', 'bootstrap', 'xwiki-form-validation-async'], function($) {
62 - #set ($currentDocReference = $xwiki.getDocument($request.currentApp).getDocumentReference())
63 - // if we cannot find any extension related to this page app, it's not part of an extension.
64 - var isNotAnExtension = $services.extension.xar.getInstalledExtensions($currentDocReference).isEmpty();
65 -
66 - // double negation! if it's an extension, we stop there: we don't want to add custom AWM rename capabilities
67 - if (!isNotAnExtension) {
68 - return;
69 - }
70 - // Hijack the rename page action.
71 - var renameAppModal = $('#renameAppModal');
72 - $('#tmActionRename').on('click', function(event) {
73 - event.preventDefault();
74 - renameAppModal.modal();
75 - });
76 -
77 - // Form validation.
78 - var appNameInput = $('#renameAppTitle');
79 - var appParentInput = $('#renameAppParentReference');
80 -
81 - var appNameEmptyError = renameAppModal.find('.appNameEmptyError');
82 - var pageExistsError = renameAppModal.find('.pageExistsError');
83 - var locationForbiddenError = renameAppModal.find('.locationForbiddenError');
84 - appNameEmptyError.add(pageExistsError).add(locationForbiddenError).hide().insertAfter(appNameInput);
85 -
86 - var getNewAppReference = function(local) {
87 - var appParentReference = local ? null : new XWiki.WikiReference(XWiki.currentWiki);
88 - if (appParentInput.val() !== '') {
89 - appParentReference = XWiki.Model.resolve(appParentInput.val(), XWiki.EntityType.SPACE, appParentReference);
90 - }
91 - return new XWiki.EntityReference(appNameInput.val(), XWiki.EntityType.SPACE, appParentReference);
92 - };
93 -
94 - var getNewAppHomePage = function() {
95 - var newAppReference = getNewAppReference();
96 - var newAppHomePageReference = new XWiki.EntityReference('WebHome', XWiki.EntityType.DOCUMENT, newAppReference);
97 - return new XWiki.Document(newAppHomePageReference);
98 - };
99 -
100 - var startValidation = function() {
101 - if (appNameInput.val() === '') {
102 - return Promise.reject(appNameEmptyError);
103 - } else {
104 - var newAppHomePage = getNewAppHomePage();
105 - if (newAppHomePage.documentReference.equals(XWiki.currentDocument.documentReference)) {
106 - return Promise.reject(pageExistsError);
107 - } else {
108 - return new Promise((resolve, reject) => {
109 - $.ajax({
110 - type: 'HEAD',
111 - url: newAppHomePage.getURL()
112 - }).then(reject.bind(null, pageExistsError), response => {
113 - if (response.status === 404) {
114 - $.ajax({
115 - type: 'HEAD',
116 - url: newAppHomePage.getURL('edit')
117 - }).then(
118 - () => resolve(),
119 - () => reject(locationForbiddenError)
120 - );
121 - } else if (response.status === 403) {
122 - reject(locationForbiddenError);
123 - } else {
124 - resolve();
125 - }
126 - });
127 - });
128 - }
129 - }
130 - };
131 -
132 - var scheduleValidation = function() {
133 - // Hide all error messages before starting the asynchronous validation.
134 - renameAppModal.find('.xErrorMsg').hide();
135 - appNameInput.addClass('loading').validateAsync(startValidation, 500, 'awm').catch((error) => {
136 - error.show();
137 - }).finally(() => {
138 - appNameInput.removeClass('loading');
139 - });
140 - };
141 -
142 - appNameInput.add(appParentInput).on('input', scheduleValidation);
143 -
144 - var locationPickerModal = renameAppModal.find('.location-picker .modal');
145 - renameAppModal.on('shown.bs.modal', function(event) {
146 - // Nested modals are not supported so we have to move the location picker modal outside, but we shouldn't do this
147 - // before the location picker has been initialized. That's why we wait for the rename application modal to be shown
148 - // first.
149 - renameAppModal.after(locationPickerModal);
150 - appNameInput.focus();
151 - });
152 -
153 - // Hide the rename application modal when the location picker modal is shown.
154 - locationPickerModal.removeClass('fade').on('show.bs.modal', function(event) {
155 - renameAppModal.modal('hide');
156 - // Show the rename application modal when the location picker modal is hidden.
157 - }).on('hidden.bs.modal', function(event) {
158 - renameAppModal.modal('show');
159 - });
160 -
161 - renameAppModal.find('form').on('submit', function(event) {
162 - event.preventDefault();
163 - renameApp(getRenameData($(this)));
164 - });
165 -
166 - var getRenameData = function(form) {
167 - var data = getFormData(form);
168 - data.newAppReference = XWiki.Model.serialize(getNewAppReference(true));
169 - delete data.newAppName;
170 - delete data.newAppParentReference;
171 - data.outputSyntax = 'plain';
172 - return data;
173 - };
174 -
175 - var getFormData = function(form) {
176 - var data = {};
177 - form.serializeArray().forEach(function(parameter) {
178 - // Keep the first value;
179 - if (!data.hasOwnProperty(parameter.name)) {
180 - data[parameter.name] = parameter.value;
181 - }
182 - });
183 - return data;
184 - };
185 -
186 - var renameApp = function(data) {
187 - // Disable the form to prevent it from being submitted twice.
188 - renameAppModal.find('fieldset').prop('disabled', true);
189 - var notification = new XWiki.widgets.Notification(
190 - $jsontool.serialize($services.localization.render('appWithinMinutes.renameApp.inProgress')),
191 - 'inprogress'
192 - );
193 - var renameAppURL = new XWiki.Document('RenameApplication', 'AppWithinMinutes').getURL('get');
194 - Promise.resolve($.post(renameAppURL, data)).then(updateAppHomePage).then(function() {
195 - renameAppModal.modal('hide');
196 - notification.replace(new XWiki.widgets.Notification(
197 - $jsontool.serialize($services.localization.render('appWithinMinutes.renameApp.done')),
198 - 'done'
199 - ));
200 - // Delay a bit the redirect so that the user notices the success message.
201 - setTimeout(function() {
202 - window.location.href = getNewAppHomePage().getURL();
203 - }, 0);
204 - }).catch(function() {
205 - notification.replace(new XWiki.widgets.Notification(
206 - $jsontool.serialize($services.localization.render('appWithinMinutes.renameApp.failed')),
207 - 'error'
208 - ));
209 - }).finally(function() {
210 - // Re-enable the form.
211 - renameAppModal.find('fieldset').prop('disabled', false);
212 - });
213 - };
214 -
215 - var updateAppHomePage = function() {
216 - return new Promise((resolve, reject) => {
217 - var newAppHomePageEditURL = getNewAppHomePage().getURL('edit');
218 - $('<div/>').load(newAppHomePageEditURL + ' #inline', function() {
219 - var formData = $(this).children('form#inline').serializeArray();
220 - if (formData.length) {
221 - formData.push({name: 'xaction_save', value: true});
222 - $.post(newAppHomePageEditURL, formData).then(resolve, reject);
223 - } else {
224 - reject();
225 - }
226 - });
227 - });
228 - }
229 -});
XWiki.StyleSheetExtension[0]
Code
... ... @@ -58,12 +58,3 @@
58 58   /* Make sure the live table doesn't overflow the action panel. */
59 59   clear: right;
60 60  }
61 -
62 -/**
63 - * Rename Application
64 - */
65 -#renameAppTitle.loading {
66 - background-position: right .3em center;
67 - padding-left: 12px;
68 - padding-right: 2em;
69 -}