Split journal order type from entry reason and fix review edit toggle in embed shell.
Adds order_type to journal uploads, removes legacy swing/trend labels from entry reason options, and ensures review-edit buttons sync when the records tab loads dynamically. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -290,7 +290,7 @@
|
||||
apply(data.theme, { skipStore: true });
|
||||
}
|
||||
|
||||
/** 交易记录页:核对开关与按钮 disabled 保持同步(iframe 软导航/表单恢复后不触发 change) */
|
||||
/** 交易记录页:核对开关与按钮 disabled 保持同步(含 iframe 软导航后动态挂载的 toggle) */
|
||||
function syncReviewEditButtons() {
|
||||
const toggle = document.getElementById("review-mode-toggle");
|
||||
if (!toggle) return;
|
||||
@@ -301,13 +301,17 @@
|
||||
}
|
||||
|
||||
function initReviewEditModeSync() {
|
||||
const toggle = document.getElementById("review-mode-toggle");
|
||||
if (!toggle) return;
|
||||
if (toggle.dataset.instReviewModeBound !== "1") {
|
||||
toggle.dataset.instReviewModeBound = "1";
|
||||
toggle.addEventListener("input", () => {
|
||||
if (!global.__instReviewModeBound) {
|
||||
global.__instReviewModeBound = true;
|
||||
const onToggle = () => {
|
||||
if (typeof global.toggleReviewMode === "function") global.toggleReviewMode();
|
||||
else syncReviewEditButtons();
|
||||
};
|
||||
document.addEventListener("change", (ev) => {
|
||||
if (ev.target && ev.target.id === "review-mode-toggle") onToggle();
|
||||
});
|
||||
document.addEventListener("input", (ev) => {
|
||||
if (ev.target && ev.target.id === "review-mode-toggle") onToggle();
|
||||
});
|
||||
}
|
||||
const run = () => {
|
||||
|
||||
Reference in New Issue
Block a user