Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to use dropzone native methods upload files #20263

Closed
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
15aab4d
Refactor to use dropzone native methods upload files
tyroneyeh Jul 6, 2022
9926ecd
minor modification
tyroneyeh Jul 6, 2022
41c49c1
Adjust inline const
tyroneyeh Jul 14, 2022
30bc993
Update web_src/js/features/comp/ImagePaste.js
tyroneyeh Jul 18, 2022
8a137c3
Update web_src/js/features/comp/ImagePaste.js
tyroneyeh Jul 18, 2022
f31eb8e
Fix cannot edit on review
tyroneyeh Jul 18, 2022
ad444d3
Use closest find textarea
tyroneyeh Jul 19, 2022
6576760
Merge branch 'main' into 20130_add_paste_image_legend_new
tyroneyeh Jul 19, 2022
16085be
Edit comment cannot use closeset find to textarea
tyroneyeh Jul 27, 2022
349ee1f
Adjust pasting additional filename to textarea position below message
tyroneyeh Jul 28, 2022
7569d10
Fix lint build failed
tyroneyeh Jul 28, 2022
3af5672
Fix in edit upload file error
tyroneyeh Aug 1, 2022
ae14b46
Fix paste upload file in one line issue
tyroneyeh Aug 1, 2022
786411b
Merge branch 'main' into 20130_add_paste_image_legend_new
tyroneyeh Aug 4, 2022
c2a587c
Refactor again and add upload placeholder
tyroneyeh Aug 4, 2022
795b75d
Fix normal file link issue
tyroneyeh Aug 4, 2022
9a7496b
Merge branch 'main'
wxiaoguang Aug 5, 2022
fa958fe
Fix in repo upload file with js error
tyroneyeh Aug 8, 2022
5fde703
Fix repo upload file again
tyroneyeh Aug 8, 2022
649e2c6
Fix in repos upload file js error
tyroneyeh Sep 5, 2022
4c3d432
Merge branch 'main' into 20130_add_paste_image_legend_new
tyroneyeh Sep 5, 2022
ee64beb
Merge branch 'main' into 20130_add_paste_image_legend_new
tyroneyeh Sep 14, 2022
3aeb946
Fix lint check issue
tyroneyeh Sep 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix normal file link issue
tyroneyeh committed Aug 4, 2022

Verified

This commit was signed with the committer’s verified signature.
tyroneyeh Tyrone Yeh
commit 795b75d9ed637155328208b73184fab67c36a7f0
3 changes: 2 additions & 1 deletion web_src/js/features/common-global.js
Original file line number Diff line number Diff line change
@@ -193,7 +193,8 @@ export function initGlobalDropzone() {
$dropzone.find('.files').append(input);
const name = file.name.slice(0, file.name.lastIndexOf('.'));
const placeholder = `![${name}](uploading ...)`;
file.editor.replacePlaceholder(placeholder, `![${name}](/attachments/${data.uuid})`);
const isImage = file.type.includes('image') ? '!' : '';
file.editor.replacePlaceholder(placeholder, `${isImage}[${name}](/attachments/${data.uuid})`);
});
this.on('removedfile', (file) => {
$(`#${file.uuid}`).remove();
3 changes: 2 additions & 1 deletion web_src/js/features/repo-legacy.js
Original file line number Diff line number Diff line change
@@ -309,7 +309,8 @@ async function onEditContent(event) {
fileUuidDict[file.uuid] = {submitted: false};
const name = file.name.slice(0, file.name.lastIndexOf('.'));
const placeholder = `![${name}](uploading ...)`;
file.editor.replacePlaceholder(placeholder, `![${name}](/attachments/${data.uuid})`);
const isImage = file.type.includes('image') ? '!' : '';
file.editor.replacePlaceholder(placeholder, `${isImage}[${name}](/attachments/${data.uuid})`);
});
this.on('removedfile', (file) => {
if (disableRemovedfileEvent) return;