mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
Enable @<user>
- completion popup on the release description textarea (#22359)
For some unknown reason, this was previously disabled. Additionally removed an unused return value.
This commit is contained in:
parent
6ba9ff7b48
commit
b6b8feb3de
2 changed files with 17 additions and 2 deletions
|
@ -328,6 +328,14 @@ func NewRelease(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled
|
ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled
|
||||||
|
var err error
|
||||||
|
// Get assignees.
|
||||||
|
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, ctx.Repo.Repository)
|
||||||
|
if err != nil {
|
||||||
|
ctx.ServerError("GetAssignees", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
upload.AddUploadContext(ctx, "release")
|
upload.AddUploadContext(ctx, "release")
|
||||||
ctx.HTML(http.StatusOK, tplReleaseNew)
|
ctx.HTML(http.StatusOK, tplReleaseNew)
|
||||||
}
|
}
|
||||||
|
@ -484,6 +492,13 @@ func EditRelease(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
ctx.Data["attachments"] = rel.Attachments
|
ctx.Data["attachments"] = rel.Attachments
|
||||||
|
|
||||||
|
// Get assignees.
|
||||||
|
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, rel.Repo)
|
||||||
|
if err != nil {
|
||||||
|
ctx.ServerError("GetAssignees", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ctx.HTML(http.StatusOK, tplReleaseNew)
|
ctx.HTML(http.StatusOK, tplReleaseNew)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,12 @@ export function initRepoRelease() {
|
||||||
export function initRepoReleaseEditor() {
|
export function initRepoReleaseEditor() {
|
||||||
const $editor = $('.repository.new.release .content-editor');
|
const $editor = $('.repository.new.release .content-editor');
|
||||||
if ($editor.length === 0) {
|
if ($editor.length === 0) {
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const $textarea = $editor.find('textarea');
|
const $textarea = $editor.find('textarea');
|
||||||
await attachTribute($textarea.get(), {mentions: false, emoji: true});
|
await attachTribute($textarea.get(), {mentions: true, emoji: true});
|
||||||
const easyMDE = await createCommentEasyMDE($textarea);
|
const easyMDE = await createCommentEasyMDE($textarea);
|
||||||
initCompMarkupContentPreviewTab($editor);
|
initCompMarkupContentPreviewTab($editor);
|
||||||
const $dropzone = $editor.parent().find('.dropzone');
|
const $dropzone = $editor.parent().find('.dropzone');
|
||||||
|
|
Loading…
Reference in a new issue