Skip to content

Commit 542480a

Browse files
yardenshohamwxiaoguangGiteaBotsilverwind
authored
Remove jQuery from the comment task list (#29170)
- Switched to plain JavaScript - Tested the task list functionality and it works as before --------- Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: Giteabot <[email protected]> Co-authored-by: silverwind <[email protected]>
1 parent 78c48d8 commit 542480a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

web_src/js/markup/tasklist.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import $ from 'jquery';
1+
import {POST} from '../modules/fetch.js';
22

33
const preventListener = (e) => e.preventDefault();
44

@@ -55,12 +55,11 @@ export function initMarkupTasklist() {
5555
const updateUrl = editContentZone.getAttribute('data-update-url');
5656
const context = editContentZone.getAttribute('data-context');
5757

58-
await $.post(updateUrl, {
59-
ignore_attachments: true,
60-
_csrf: window.config.csrfToken,
61-
content: newContent,
62-
context
63-
});
58+
const requestBody = new FormData();
59+
requestBody.append('ignore_attachments', 'true');
60+
requestBody.append('content', newContent);
61+
requestBody.append('context', context);
62+
await POST(updateUrl, {data: requestBody});
6463

6564
rawContent.textContent = newContent;
6665
} catch (err) {

0 commit comments

Comments
 (0)