Bug hunt V7:

DB:
- Aggressive je_klub=false flag for programs/treninzi/totals (>100K€ no klub_id)
- 53 ne-klubovi flagged false (RSS Rijeka ukupni, Stručni rad, Potpora loptačkim, etc)

Frontend (sport2.html):
- Panel back button (← Natrag) + history stack
- window._panelHistory + pushPanelState + panelBack functions
- closePanel resets history
This commit is contained in:
2026-05-05 14:56:53 +02:00
parent 1e611d59f1
commit 007825acee
214 changed files with 15117 additions and 565 deletions
+42 -2
View File
@@ -362,8 +362,11 @@ a.tag:hover,.tag[onclick]:hover{transform:translateY(-1px);filter:brightness(1.1
<div id="panel-overlay" onclick="closePanel()"></div>
<div id="panel">
<div id="panel-hdr">
<div id="panel-hdr-t">Detalji</div>
<div id="panel-x" onclick="closePanel()">×</div>
<div style="display:flex;align-items:center;gap:8px">
<button id="panel-back" onclick="panelBack()" style="background:var(--bg3);border:1px solid var(--rim);color:var(--t1);padding:5px 10px;border-radius:4px;cursor:pointer;display:none" title="Nazad">← Natrag</button>
<div id="panel-hdr-t">Detalji</div>
</div>
<div id="panel-x" onclick="closePanel()" title="Zatvori">×</div>
</div>
<div id="panel-body"></div>
</div>
@@ -3451,6 +3454,43 @@ window.toggleSportasHNS = function(){
window._sportas_only_hns = !window._sportas_only_hns;
if(typeof loadSportasi === 'function') loadSportasi();
};
// PANEL HISTORY STACK + NATRAG (CRISIS V7)
window._panelHistory = [];
window.pushPanelState = function(title, htmlContent, callback){
// callback may be null — to render this state again later
window._panelHistory.push({title, htmlContent, callback});
const back = document.getElementById('panel-back');
if(back) back.style.display = window._panelHistory.length > 1 ? 'inline-flex' : 'none';
};
window.panelBack = function(){
if(window._panelHistory.length <= 1){ closePanel(); return; }
// Remove current state
window._panelHistory.pop();
// Restore previous
const prev = window._panelHistory[window._panelHistory.length - 1];
const t = document.getElementById('panel-hdr-t');
const b = document.getElementById('panel-body');
if(t) t.textContent = prev.title;
if(b) b.innerHTML = prev.htmlContent;
if(typeof prev.callback === 'function') prev.callback();
const back = document.getElementById('panel-back');
if(back) back.style.display = window._panelHistory.length > 1 ? 'inline-flex' : 'none';
};
// Override closePanel — clear history
window._origClosePanel = window.closePanel;
window.closePanel = function(){
window._panelHistory = [];
const back = document.getElementById('panel-back');
if(back) back.style.display = 'none';
const p = document.getElementById('panel');
if(p) p.classList.remove('open');
const ov = document.getElementById('panel-overlay');
if(ov) ov.style.display = 'none';
};
</script>
</body>
</html>