Skip to content

Commit 0233434

Browse files
committed
Merge remote-tracking branch 'origin/6.2' into 6.2-box-list-to-grid-view
# Conflicts: # wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php
2 parents c4dd0cd + 35c5ec4 commit 0233434

File tree

69 files changed

+2667
-1298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2667
-1298
lines changed

com.woltlab.wcf/clipboardAction.xml

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,43 @@
137137
</pages>
138138
</action>
139139
<!-- /com.woltlab.wcf.media -->
140+
<action name="assignUserByClipboard">
141+
<actionclassname>wcf\system\clipboard\action\ModerationQueueClipboardAction</actionclassname>
142+
<showorder>1</showorder>
143+
<pages>
144+
<page>wcf\page\ModerationListPage</page>
145+
</pages>
146+
</action>
147+
<action name="enableContent">
148+
<actionclassname>wcf\system\clipboard\action\ModerationQueueActivationClipboardAction</actionclassname>
149+
<showorder>2</showorder>
150+
<pages>
151+
<page>wcf\page\ModerationListPage</page>
152+
</pages>
153+
</action>
154+
<action name="removeActivationContent">
155+
<actionclassname>wcf\system\clipboard\action\ModerationQueueActivationClipboardAction</actionclassname>
156+
<showorder>3</showorder>
157+
<pages>
158+
<page>wcf\page\ModerationListPage</page>
159+
</pages>
160+
</action>
161+
<action name="removeReport">
162+
<actionclassname>wcf\system\clipboard\action\ModerationQueueReportClipboardAction</actionclassname>
163+
<showorder>4</showorder>
164+
<pages>
165+
<page>wcf\page\ModerationListPage</page>
166+
</pages>
167+
</action>
168+
<action name="removeReportContent">
169+
<actionclassname>wcf\system\clipboard\action\ModerationQueueReportClipboardAction</actionclassname>
170+
<showorder>5</showorder>
171+
<pages>
172+
<page>wcf\page\ModerationListPage</page>
173+
</pages>
174+
</action>
175+
</import>
176+
<delete>
140177
<!-- com.woltlab.wcf.article -->
141178
<action name="trash">
142179
<actionclassname>wcf\system\clipboard\action\ArticleClipboardAction</actionclassname>
@@ -180,40 +217,5 @@
180217
<page>wcf\acp\page\ArticleListPage</page>
181218
</pages>
182219
</action>
183-
<action name="assignUserByClipboard">
184-
<actionclassname>wcf\system\clipboard\action\ModerationQueueClipboardAction</actionclassname>
185-
<showorder>1</showorder>
186-
<pages>
187-
<page>wcf\page\ModerationListPage</page>
188-
</pages>
189-
</action>
190-
<action name="enableContent">
191-
<actionclassname>wcf\system\clipboard\action\ModerationQueueActivationClipboardAction</actionclassname>
192-
<showorder>2</showorder>
193-
<pages>
194-
<page>wcf\page\ModerationListPage</page>
195-
</pages>
196-
</action>
197-
<action name="removeActivationContent">
198-
<actionclassname>wcf\system\clipboard\action\ModerationQueueActivationClipboardAction</actionclassname>
199-
<showorder>3</showorder>
200-
<pages>
201-
<page>wcf\page\ModerationListPage</page>
202-
</pages>
203-
</action>
204-
<action name="removeReport">
205-
<actionclassname>wcf\system\clipboard\action\ModerationQueueReportClipboardAction</actionclassname>
206-
<showorder>4</showorder>
207-
<pages>
208-
<page>wcf\page\ModerationListPage</page>
209-
</pages>
210-
</action>
211-
<action name="removeReportContent">
212-
<actionclassname>wcf\system\clipboard\action\ModerationQueueReportClipboardAction</actionclassname>
213-
<showorder>5</showorder>
214-
<pages>
215-
<page>wcf\page\ModerationListPage</page>
216-
</pages>
217-
</action>
218-
</import>
220+
</delete>
219221
</data>

com.woltlab.wcf/fileDelete.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2720,6 +2720,7 @@
27202720
<file>lib/system/cli/command/PackageCommand.class.php</file>
27212721
<file>lib/system/cli/command/WorkerCommand.class.php</file>
27222722
<file>lib/system/clipboard/action/UserExtendedClipboardAction.class.php</file>
2723+
<file>lib/system/clipboard/action/ArticleClipboardAction.class.php</file>
27232724
<file>lib/system/condition/INoticeCondition.class.php</file>
27242725
<file>lib/system/condition/UserReputationCondition.class.php</file>
27252726
<file>lib/system/cronjob/CleanUpCronjobLogCronjob.class.php</file>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Handles bulk interactions that open a form builder dialog.
3+
*
4+
* @author Olaf Braun
5+
* @copyright 2001-2025 WoltLab GmbH
6+
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
7+
* @since 6.2
8+
*/
9+
10+
import { show as showNotification } from "WoltLabSuite/Core/Ui/Notification";
11+
import { dialogFactory } from "WoltLabSuite/Core/Component/Dialog";
12+
13+
async function handleFormBuilderDialogAction(
14+
container: HTMLElement,
15+
objectIds: number[],
16+
endpoint: string,
17+
): Promise<void> {
18+
const { ok } = await dialogFactory().usingFormBuilder().fromEndpoint(endpoint);
19+
20+
if (!ok) {
21+
return;
22+
}
23+
24+
for (let i = 0; i < objectIds.length; i++) {
25+
const element = container.querySelector(`[data-object-id="${objectIds[i]}"]`);
26+
if (!element) {
27+
continue;
28+
}
29+
30+
element.dispatchEvent(
31+
new CustomEvent("refresh", {
32+
bubbles: true,
33+
}),
34+
);
35+
}
36+
37+
// TODO: This shows a generic success message and should be replaced with a more specific message.
38+
showNotification();
39+
40+
container.dispatchEvent(new CustomEvent("reset-selection"));
41+
}
42+
43+
export function setup(identifier: string, container: HTMLElement): void {
44+
container.addEventListener("bulk-interaction", (event: CustomEvent) => {
45+
if (event.detail.bulkInteraction === identifier) {
46+
void handleFormBuilderDialogAction(container, JSON.parse(event.detail.objectIds), event.detail.endpoint);
47+
}
48+
});
49+
}

wcfsetup/install/files/acp/js/WCF.ACP.js

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -16,110 +16,6 @@ WCF.ACP = { };
1616
*/
1717
WCF.ACP.Application = { };
1818

19-
/**
20-
* Namespace for ACP cronjob management.
21-
*/
22-
WCF.ACP.Cronjob = { };
23-
24-
/**
25-
* Handles the manual execution of cronjobs.
26-
*/
27-
WCF.ACP.Cronjob.ExecutionHandler = Class.extend({
28-
/**
29-
* notification object
30-
* @var WCF.System.Notification
31-
*/
32-
_notification: null,
33-
34-
/**
35-
* action proxy
36-
* @var WCF.Action.Proxy
37-
*/
38-
_proxy: null,
39-
40-
/**
41-
* Initializes WCF.ACP.Cronjob.ExecutionHandler object.
42-
*/
43-
init: function() {
44-
this._proxy = new WCF.Action.Proxy({
45-
success: $.proxy(this._success, this)
46-
});
47-
48-
$('.jsCronjobRow .jsExecuteButton').click($.proxy(this._click, this));
49-
50-
this._notification = new WCF.System.Notification(WCF.Language.get('wcf.global.success'), 'success');
51-
},
52-
53-
/**
54-
* Handles a click on an execute button.
55-
*
56-
* @param object event
57-
*/
58-
_click: function(event) {
59-
this._proxy.setOption('data', {
60-
actionName: 'execute',
61-
className: 'wcf\\data\\cronjob\\CronjobAction',
62-
objectIDs: [ $(event.target).data('objectID') ]
63-
});
64-
65-
this._proxy.sendRequest();
66-
},
67-
68-
/**
69-
* Handles successful cronjob execution.
70-
*
71-
* @param object data
72-
* @param string textStatus
73-
* @param jQuery jqXHR
74-
*/
75-
_success: function(data, textStatus, jqXHR) {
76-
$('.jsCronjobRow').each($.proxy(function(index, row) {
77-
var $button = $(row).find('.jsExecuteButton');
78-
var $objectID = ($button).data('objectID');
79-
80-
if (WCF.inArray($objectID, data.objectIDs)) {
81-
if (data.returnValues[$objectID]) {
82-
// insert feedback here
83-
$(row).find('td.columnNextExec').html(data.returnValues[$objectID].formatted);
84-
$(row).wcfHighlight();
85-
}
86-
87-
this._notification.show();
88-
89-
return false;
90-
}
91-
}, this));
92-
}
93-
});
94-
95-
/**
96-
* Handles the cronjob log list.
97-
*/
98-
WCF.ACP.Cronjob.LogList = Class.extend({
99-
/**
100-
* Initializes WCF.ACP.Cronjob.LogList object.
101-
*/
102-
init: function() {
103-
// bind event listener to delete cronjob log button
104-
$('.jsCronjobLogDelete').click(function() {
105-
WCF.System.Confirmation.show(WCF.Language.get('wcf.acp.cronjob.log.clear.confirm'), function(action) {
106-
if (action == 'confirm') {
107-
new WCF.Action.Proxy({
108-
autoSend: true,
109-
data: {
110-
actionName: 'clearAll',
111-
className: 'wcf\\data\\cronjob\\log\\CronjobLogAction'
112-
},
113-
success: function() {
114-
window.location.reload();
115-
}
116-
});
117-
}
118-
});
119-
});
120-
}
121-
});
122-
12319
/**
12420
* Namespace for ACP package management.
12521
*/

0 commit comments

Comments
 (0)