Add self-review popup functionality with success message and auto-refresh
This commit is contained in:
@@ -668,8 +668,9 @@
|
||||
});
|
||||
|
||||
window.openSelfReviewPopup = function (url) {
|
||||
var popupUrl = url + (url.indexOf('?') === -1 ? '?popup=1' : '&popup=1');
|
||||
var features = 'width=980,height=840,resizable=yes,scrollbars=yes';
|
||||
window.open(url, 'selfReviewPopup', features);
|
||||
window.open(popupUrl, 'selfReviewPopup', features);
|
||||
};
|
||||
|
||||
window.selfReviewCurrentEmbedUrl = null;
|
||||
@@ -704,7 +705,10 @@
|
||||
|
||||
if (resp.redirected) {
|
||||
root.innerHTML = '<div class="p-3"><div class="alert alert-success mb-0">Self review saved. You can continue reviewing this case.</div></div>';
|
||||
setTimeout(function () { window.closeSelfReviewSidebar(); }, 700);
|
||||
setTimeout(function () {
|
||||
window.closeSelfReviewSidebar();
|
||||
window.location.reload();
|
||||
}, 500);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Self Review Saved</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
|
||||
background: #111;
|
||||
color: #f0f0f0;
|
||||
}
|
||||
.wrap {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
.card {
|
||||
max-width: 460px;
|
||||
width: 100%;
|
||||
border: 1px solid #3a3a3a;
|
||||
border-radius: 10px;
|
||||
background: #1a1a1a;
|
||||
padding: 1rem 1.2rem;
|
||||
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
h1 {
|
||||
margin-top: 0;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
color: #d0d0d0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<div class="card">
|
||||
<h1>Self review saved</h1>
|
||||
<p>This window will close shortly and refresh the case page.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
try { window.alert('Self review saved. This popup will close and refresh the case page.'); } catch (e) {}
|
||||
|
||||
try {
|
||||
if (window.opener && !window.opener.closed) {
|
||||
var targetUrl = "{{ target_url|escapejs }}";
|
||||
try {
|
||||
window.opener.location.href = targetUrl || window.opener.location.href;
|
||||
} catch (e) {
|
||||
window.opener.location.reload();
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
setTimeout(function () {
|
||||
window.close();
|
||||
}, 700);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user