Show options review upload form always on page.
Keep the multi-timeframe journal card visible like contract review instead of hiding it until a row is selected. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -371,17 +371,41 @@
|
||||
function hideJournalForm() {
|
||||
currentTradeId = null;
|
||||
var card = $("or-journal-card");
|
||||
if (card) card.hidden = true;
|
||||
if (card) card.classList.add("or-journal-idle");
|
||||
document.querySelectorAll(".or-trade-row").forEach(function (tr) {
|
||||
tr.classList.remove("or-row-active");
|
||||
});
|
||||
($("or-trade-id") || {}).value = "";
|
||||
($("or-f-open") || {}).value = "";
|
||||
($("or-f-close") || {}).value = "";
|
||||
($("or-f-coin") || {}).value = "";
|
||||
($("or-f-inst") || {}).value = "";
|
||||
($("or-f-pnl") || {}).value = "";
|
||||
($("or-f-hold") || {}).value = "";
|
||||
($("or-f-strategy") || {}).value = "";
|
||||
($("or-f-direction") || {}).value = "";
|
||||
($("or-f-exit") || {}).value = "";
|
||||
($("or-f-followed") || {}).value = "";
|
||||
($("or-f-result") || {}).value = "";
|
||||
($("or-f-entry") || {}).value = "";
|
||||
($("or-f-note") || {}).value = "";
|
||||
setMoodTags("");
|
||||
resetUploadSlots();
|
||||
var summary = $("or-journal-summary");
|
||||
if (summary) {
|
||||
summary.textContent =
|
||||
"先点「同步」拉记录,再在下方列表点选一笔填入;截图槽位 5m/15m/1h/4h 可先传.";
|
||||
}
|
||||
var legsHost = $("or-legs-host");
|
||||
if (legsHost) legsHost.innerHTML = "";
|
||||
($("or-save-status") || {}).textContent = "";
|
||||
}
|
||||
|
||||
function openJournalForm(tradeId) {
|
||||
currentTradeId = tradeId;
|
||||
var card = $("or-journal-card");
|
||||
if (!card) return;
|
||||
card.hidden = false;
|
||||
card.classList.remove("or-journal-idle");
|
||||
card.scrollIntoView({ behavior: "smooth", block: "start" });
|
||||
document.querySelectorAll(".or-trade-row").forEach(function (tr) {
|
||||
tr.classList.toggle("or-row-active", Number(tr.getAttribute("data-id")) === tradeId);
|
||||
@@ -400,7 +424,7 @@
|
||||
return;
|
||||
}
|
||||
fillForm(data.trade);
|
||||
($("or-save-status") || {}).textContent = "";
|
||||
($("or-save-status") || {}).textContent = "已选中 #" + tradeId;
|
||||
})
|
||||
.catch(function () {
|
||||
($("or-save-status") || {}).textContent = "加载失败";
|
||||
@@ -484,7 +508,10 @@
|
||||
|
||||
function saveEntry() {
|
||||
var tradeId = Number(($("or-trade-id") || {}).value || 0);
|
||||
if (!tradeId) return;
|
||||
if (!tradeId) {
|
||||
alert("请先在下方列表点选一笔记录(若无记录请先点同步)");
|
||||
return;
|
||||
}
|
||||
var strategy = (($("or-f-strategy") || {}).value || "").trim();
|
||||
if (!strategy) {
|
||||
alert("请填写策略标签");
|
||||
@@ -566,6 +593,7 @@
|
||||
}
|
||||
);
|
||||
bindUploadSlots();
|
||||
hideJournalForm();
|
||||
setActiveTab("option_spot");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user