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+='| '+e.id+' | '+esc(e.t)+' | '+["I","II","III","IV","V"][e.sec]+' | '+e.due+' | '+pct(e.p)+' | '+sb(e.s)+' | |
'});
+ h+='';
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