diff --git a/app/modules/project/templates/project/help.html b/app/modules/project/templates/project/help.html
index 7a0548d..ad9124f 100644
--- a/app/modules/project/templates/project/help.html
+++ b/app/modules/project/templates/project/help.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
{% endblock %}
diff --git a/app/modules/project/templates/project/inbox.html b/app/modules/project/templates/project/inbox.html
index d319ae2..62aa012 100644
--- a/app/modules/project/templates/project/inbox.html
+++ b/app/modules/project/templates/project/inbox.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
{% endblock %}
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
-
+
{% endblock %}
diff --git a/app/modules/project/templates/project/mytasks.html b/app/modules/project/templates/project/mytasks.html
index 071d5ca..fa8b751 100644
--- a/app/modules/project/templates/project/mytasks.html
+++ b/app/modules/project/templates/project/mytasks.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
-
+
{% endblock %}
diff --git a/app/modules/project/templates/project/project.html b/app/modules/project/templates/project/project.html
index 31edfb1..1f16c2a 100644
--- a/app/modules/project/templates/project/project.html
+++ b/app/modules/project/templates/project/project.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
@@ -491,5 +491,5 @@
-
+
{% endblock %}
diff --git a/app/modules/project/templates/project/trash.html b/app/modules/project/templates/project/trash.html
index 171e8e7..0c94b37 100644
--- a/app/modules/project/templates/project/trash.html
+++ b/app/modules/project/templates/project/trash.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
-
+
{% endblock %}
diff --git a/app/static/project.js b/app/static/project.js
index 67bbb9a..117c225 100644
--- a/app/static/project.js
+++ b/app/static/project.js
@@ -1613,7 +1613,8 @@
window.addEventListener("resize", closeMentionMenu);
return mentionMenuEl;
}
- function renderMentionMenu(users, rect, onPick) {
+ // opts.above — 기준(rect) 위쪽에 우선 띄우고 오른쪽 끝을 기준에 맞춘다(댓글칸 @ 버튼).
+ function renderMentionMenu(users, rect, onPick, opts) {
const menu = ensureMentionMenu();
menu.innerHTML = "";
if (!users.length) {
@@ -1633,12 +1634,16 @@
});
}
menu.hidden = false;
- // 커서/입력칸 바로 아래. 화면 밖으로 나가면 위쪽으로 뒤집는다.
+ // 기본: 커서/입력칸 바로 아래, 화면 밖으로 나가면 위쪽으로 뒤집는다.
+ // opts.above: 기준 위쪽(아이콘 윗부분), 위 공간이 없으면 아래로.
+ const above = !!(opts && opts.above);
let top = window.scrollY + rect.bottom + 4;
- let left = window.scrollX + rect.left;
+ let left = window.scrollX + (above ? rect.right - menu.offsetWidth : rect.left);
left = Math.min(left, window.scrollX + document.documentElement.clientWidth - menu.offsetWidth - 8);
- if (rect.bottom + menu.offsetHeight + 8 > document.documentElement.clientHeight) {
- top = window.scrollY + rect.top - menu.offsetHeight - 4;
+ if (above
+ ? rect.top - menu.offsetHeight - 6 >= 8
+ : rect.bottom + menu.offsetHeight + 8 > document.documentElement.clientHeight) {
+ top = window.scrollY + rect.top - menu.offsetHeight - (above ? 6 : 4);
}
menu.style.left = Math.max(8, left) + "px";
menu.style.top = Math.max(8, top) + "px";
@@ -1705,7 +1710,10 @@
const ctx = caretQuery();
if (!ctx) { closeMentionMenu(); return; }
const users = filterMentionUsers(await mentionUsers(), ctx.query);
- renderMentionMenu(users, input.getBoundingClientRect(), function (u) {
+ // 옆에 @ 버튼이 있는 댓글칸이면 멤버 목록은 그 아이콘 윗부분에 띄운다.
+ const atBtn = input.parentNode && input.parentNode.querySelector(".pj-mention-btn");
+ const anchorRect = atBtn ? atBtn.getBoundingClientRect() : input.getBoundingClientRect();
+ renderMentionMenu(users, anchorRect, function (u) {
const token = "@" + capName(u.id || u.email.split("@")[0]);
input.value = input.value.slice(0, ctx.start) + token + " " + input.value.slice(ctx.end);
input._pjMentions[token] = u.email;
@@ -1713,7 +1721,7 @@
input.focus();
input.setSelectionRange(caret, caret);
closeMentionMenu();
- });
+ }, { above: !!atBtn });
}
input.addEventListener("input", maybeOpen);
input.addEventListener("blur", function () { setTimeout(closeMentionMenu, 120); });