From 26ee5d4356e2a11ec1b9a4fbfa252b0aab2a63c9 Mon Sep 17 00:00:00 2001 From: Dauren777 Date: Thu, 4 Jun 2026 12:37:43 +0000 Subject: [PATCH] =?UTF-8?q?v16:=20=D0=BF=D0=BE=D0=B4=D0=BF=D1=83=D0=BD?= =?UTF-8?q?=D0=BA=D1=82=D1=8B=20=D1=81=20=D1=87=D0=B5=D0=BA=D0=B1=D0=BE?= =?UTF-8?q?=D0=BA=D1=81=D0=B0=D0=BC=D0=B8=20=D0=BF=D1=80=D1=8F=D0=BC=D0=BE?= =?UTF-8?q?=20=D0=B2=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B5,=20?= =?UTF-8?q?=D1=80=D0=B0=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=20=E2=96=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 10aec1f..78fdda5 100644 --- a/index.html +++ b/index.html @@ -254,17 +254,62 @@ function downloadHTML(){ } // ===== MY EVENTS ===== +var expandedEvents = {}; +function toggleExpand(eid) { expandedEvents[eid] = !expandedEvents[eid]; renderMyEvents(); } + function renderMyEvents(){ var my=getMy(),h='
'; h+='
'; var sf=document.getElementById("mySF");sf=sf?sf.value:""; var list=my;if(sf)list=list.filter(function(e){return e.s===sf}); - h+=''; - list.forEach(function(e){h+=''}); + h+='
МероприятиеРазделСрокПрогрессСтатус
'+e.id+''+esc(e.t)+''+["I","II","III","IV","V"][e.sec]+''+e.due+''+pct(e.p)+''+sb(e.s)+'
'; + list.forEach(function(e){ + var hasSub = e.sub && e.sub.length; + var sc = getSC(e.id); + var subDone = hasSub ? sc.length : 0; + var subTotal = hasSub ? e.sub.length : 0; + h+=''; + h+=''; + h+=''; + h+=''; + h+=''; + + // Sub-items + if(hasSub && expandedEvents[e.id]){ + e.sub.forEach(function(s,i){ + var ch = sc.indexOf(i) >= 0; + h+=''; + h+=''; + h+=''; + }); + } + }); h+='
Мероприятие / ПодпунктыРазделСрокПрогрессСтатус
'+e.id+''; + if(hasSub) h+=''+(expandedEvents[e.id]?'▼':'▶')+''; + h+=''+esc(e.t)+''; + if(hasSub) h+=' ('+subDone+'/'+subTotal+')'; + h+=''+["I","II","III","IV","V"][e.sec]+''+e.due+''+pct(e.p)+''+sb(e.s)+'
'+s.l+') '+esc(s.t)+'
'; document.getElementById("tab-myevents").innerHTML=h; } +function toggleSubItem(eid, subIdx, checked) { + var sc = getSC(eid); + if(checked) { if(sc.indexOf(subIdx) < 0) sc.push(subIdx); } + else { sc = sc.filter(function(x){ return x !== subIdx; }); } + setSC(eid, sc); + // Update event progress based on sub-items + var e = null; for(var i=0;i