修复页面标题被confirm弹窗代码污染
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,98 +1,7 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}期权交易
|
{% block title %}期权交易{% endblock %}
|
||||||
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
{% block heading %}期权交易{% endblock %}
|
||||||
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
{% block breadcrumb %}期权开平仓记录{% endblock %}
|
||||||
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
|
||||||
<div style="display:flex;gap:10px;justify-content:center;">
|
|
||||||
<button class="btn" style="background:var(--th-bg);color:var(--fg);" onclick="hideConfirm()">取消</button>
|
|
||||||
<button class="btn" style="background:var(--danger);color:#fff;" id="confirmBtn">确认删除</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var confirmTarget = '';
|
|
||||||
function confirmDelete(e, msg, url) {
|
|
||||||
e.preventDefault();
|
|
||||||
document.getElementById('confirmMsg').textContent = msg;
|
|
||||||
document.getElementById('confirmBtn').onclick = function() {
|
|
||||||
var f = document.createElement('form');
|
|
||||||
f.method = 'POST';
|
|
||||||
f.action = url;
|
|
||||||
document.body.appendChild(f);
|
|
||||||
f.submit();
|
|
||||||
};
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'block';
|
|
||||||
document.getElementById('confirmBox').style.display = 'block';
|
|
||||||
}
|
|
||||||
function hideConfirm() {
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'none';
|
|
||||||
document.getElementById('confirmBox').style.display = 'none';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
{% block heading %}期权交易
|
|
||||||
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
|
||||||
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
|
||||||
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
|
||||||
<div style="display:flex;gap:10px;justify-content:center;">
|
|
||||||
<button class="btn" style="background:var(--th-bg);color:var(--fg);" onclick="hideConfirm()">取消</button>
|
|
||||||
<button class="btn" style="background:var(--danger);color:#fff;" id="confirmBtn">确认删除</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var confirmTarget = '';
|
|
||||||
function confirmDelete(e, msg, url) {
|
|
||||||
e.preventDefault();
|
|
||||||
document.getElementById('confirmMsg').textContent = msg;
|
|
||||||
document.getElementById('confirmBtn').onclick = function() {
|
|
||||||
var f = document.createElement('form');
|
|
||||||
f.method = 'POST';
|
|
||||||
f.action = url;
|
|
||||||
document.body.appendChild(f);
|
|
||||||
f.submit();
|
|
||||||
};
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'block';
|
|
||||||
document.getElementById('confirmBox').style.display = 'block';
|
|
||||||
}
|
|
||||||
function hideConfirm() {
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'none';
|
|
||||||
document.getElementById('confirmBox').style.display = 'none';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
{% block breadcrumb %}期权开平仓记录
|
|
||||||
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
|
||||||
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
|
||||||
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
|
||||||
<div style="display:flex;gap:10px;justify-content:center;">
|
|
||||||
<button class="btn" style="background:var(--th-bg);color:var(--fg);" onclick="hideConfirm()">取消</button>
|
|
||||||
<button class="btn" style="background:var(--danger);color:#fff;" id="confirmBtn">确认删除</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var confirmTarget = '';
|
|
||||||
function confirmDelete(e, msg, url) {
|
|
||||||
e.preventDefault();
|
|
||||||
document.getElementById('confirmMsg').textContent = msg;
|
|
||||||
document.getElementById('confirmBtn').onclick = function() {
|
|
||||||
var f = document.createElement('form');
|
|
||||||
f.method = 'POST';
|
|
||||||
f.action = url;
|
|
||||||
document.body.appendChild(f);
|
|
||||||
f.submit();
|
|
||||||
};
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'block';
|
|
||||||
document.getElementById('confirmBox').style.display = 'block';
|
|
||||||
}
|
|
||||||
function hideConfirm() {
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'none';
|
|
||||||
document.getElementById('confirmBox').style.display = 'none';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% set view = request.query_params.get('view', '') %}
|
{% set view = request.query_params.get('view', '') %}
|
||||||
@@ -471,6 +380,10 @@ function hidePnlDrawer() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
||||||
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
||||||
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
||||||
@@ -480,7 +393,6 @@ function hidePnlDrawer() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var confirmTarget = '';
|
|
||||||
function confirmDelete(e, msg, url) {
|
function confirmDelete(e, msg, url) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
document.getElementById('confirmMsg').textContent = msg;
|
document.getElementById('confirmMsg').textContent = msg;
|
||||||
@@ -500,4 +412,4 @@ function hideConfirm() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -1,98 +1,7 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}交易记录
|
{% block title %}交易记录{% endblock %}
|
||||||
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
{% block heading %}交易记录{% endblock %}
|
||||||
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
{% block breadcrumb %}开平仓记录{% endblock %}
|
||||||
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
|
||||||
<div style="display:flex;gap:10px;justify-content:center;">
|
|
||||||
<button class="btn" style="background:var(--th-bg);color:var(--fg);" onclick="hideConfirm()">取消</button>
|
|
||||||
<button class="btn" style="background:var(--danger);color:#fff;" id="confirmBtn">确认删除</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var confirmTarget = '';
|
|
||||||
function confirmDelete(e, msg, url) {
|
|
||||||
e.preventDefault();
|
|
||||||
document.getElementById('confirmMsg').textContent = msg;
|
|
||||||
document.getElementById('confirmBtn').onclick = function() {
|
|
||||||
var f = document.createElement('form');
|
|
||||||
f.method = 'POST';
|
|
||||||
f.action = url;
|
|
||||||
document.body.appendChild(f);
|
|
||||||
f.submit();
|
|
||||||
};
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'block';
|
|
||||||
document.getElementById('confirmBox').style.display = 'block';
|
|
||||||
}
|
|
||||||
function hideConfirm() {
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'none';
|
|
||||||
document.getElementById('confirmBox').style.display = 'none';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
{% block heading %}交易记录
|
|
||||||
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
|
||||||
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
|
||||||
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
|
||||||
<div style="display:flex;gap:10px;justify-content:center;">
|
|
||||||
<button class="btn" style="background:var(--th-bg);color:var(--fg);" onclick="hideConfirm()">取消</button>
|
|
||||||
<button class="btn" style="background:var(--danger);color:#fff;" id="confirmBtn">确认删除</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var confirmTarget = '';
|
|
||||||
function confirmDelete(e, msg, url) {
|
|
||||||
e.preventDefault();
|
|
||||||
document.getElementById('confirmMsg').textContent = msg;
|
|
||||||
document.getElementById('confirmBtn').onclick = function() {
|
|
||||||
var f = document.createElement('form');
|
|
||||||
f.method = 'POST';
|
|
||||||
f.action = url;
|
|
||||||
document.body.appendChild(f);
|
|
||||||
f.submit();
|
|
||||||
};
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'block';
|
|
||||||
document.getElementById('confirmBox').style.display = 'block';
|
|
||||||
}
|
|
||||||
function hideConfirm() {
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'none';
|
|
||||||
document.getElementById('confirmBox').style.display = 'none';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
{% block breadcrumb %}开平仓记录
|
|
||||||
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
|
||||||
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
|
||||||
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
|
||||||
<div style="display:flex;gap:10px;justify-content:center;">
|
|
||||||
<button class="btn" style="background:var(--th-bg);color:var(--fg);" onclick="hideConfirm()">取消</button>
|
|
||||||
<button class="btn" style="background:var(--danger);color:#fff;" id="confirmBtn">确认删除</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var confirmTarget = '';
|
|
||||||
function confirmDelete(e, msg, url) {
|
|
||||||
e.preventDefault();
|
|
||||||
document.getElementById('confirmMsg').textContent = msg;
|
|
||||||
document.getElementById('confirmBtn').onclick = function() {
|
|
||||||
var f = document.createElement('form');
|
|
||||||
f.method = 'POST';
|
|
||||||
f.action = url;
|
|
||||||
document.body.appendChild(f);
|
|
||||||
f.submit();
|
|
||||||
};
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'block';
|
|
||||||
document.getElementById('confirmBox').style.display = 'block';
|
|
||||||
}
|
|
||||||
function hideConfirm() {
|
|
||||||
document.getElementById('confirmOverlay').style.display = 'none';
|
|
||||||
document.getElementById('confirmBox').style.display = 'none';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% set view = request.query_params.get('view', '') %}
|
{% set view = request.query_params.get('view', '') %}
|
||||||
@@ -429,6 +338,10 @@ function hideEditForm() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
<div id="confirmOverlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:199;" onclick="hideConfirm()"></div>
|
||||||
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
<div id="confirmBox" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px 32px;z-index:200;text-align:center;max-width:90vw;">
|
||||||
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
<p id="confirmMsg" style="font-size:0.95rem;margin-bottom:20px;"></p>
|
||||||
@@ -438,7 +351,6 @@ function hideEditForm() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var confirmTarget = '';
|
|
||||||
function confirmDelete(e, msg, url) {
|
function confirmDelete(e, msg, url) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
document.getElementById('confirmMsg').textContent = msg;
|
document.getElementById('confirmMsg').textContent = msg;
|
||||||
@@ -458,4 +370,4 @@ function hideConfirm() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user