diff --git a/index.html b/index.html index 861febf..8e1018d 100644 --- a/index.html +++ b/index.html @@ -343,11 +343,11 @@ function renderAnalytics(){ } // ===== EDIT MODAL ===== -var editSubIdx = -1; // -1 = main event, 0+ = sub-item +var editSubIdx = -1; // -1=none, click 📎 to expand function openEdit(id, mi, si){ if(typeof mi==="number")curMonth=mi; - if(typeof si==="number")editSubIdx=si; + editSubIdx = (typeof si==="number") ? si : -1; // reset to -1 if not specified var e=null;for(var i=0;i'+M(i)+''});mh+=''; - // Sub-items with file sections + // Sub-items with file sections (shown first for clarity) var sh=''; if(hasSub){ - sh+='
Подпункты
'; + sh+='
📋 Подпункты мероприятия

Нажмите 📎 на подпункте для управления его файлами

'; sh+=mh; e.sub.forEach(function(s,i){ var ch=sc.indexOf(i)>=0; var sd=getMD(e.id,i), scd=sd[cm]||{report:"",files:[]}, scfs=scd.files||[]; var isActive = editSubIdx === i; - sh+='
'; - sh+=''+s.l+')'+esc(s.t)+''; + sh+='
'; + sh+=''+s.l+')'+esc(s.t)+''; sh+='Файлов: '+(scfs.length)+''; - sh+=''; + sh+=''; sh+='
'; if(isActive){ - sh+='
'; - sh+='
'+s.l+') '+esc(s.t.slice(0,60))+'...
'; - sh+='
'; + sh+='
'; + sh+='
'+s.l+') '+esc(s.t)+'
'; + sh+='
Файлы этого подпункта за '+M(curMonth)+'
'; + sh+='
'; + if(scfs.length){sh+='
Прикреплённые файлы ('+scfs.length+'):
'} scfs.forEach(function(f,fi){sh+='
📄 '+esc(f.name)+''+(f.desc?''+esc(f.desc)+'':'')+''+(f.size/1024).toFixed(0)+' КБ · '+f.date+'
'}); - sh+='
'; + sh+='
'; sh+='
'; } }); @@ -396,15 +398,14 @@ function openEdit(id, mi, si){ } // Main event files section - html+='
📎 Общие материалыФайлов: '+cfs.length+'
'; + html+=sh; + html+='
📎 Общие материалы мероприятия

Файлы, не привязанные к конкретному подпункту

'; html+=mh; html+='
'; cfs.forEach(function(f,i){html+='
📄 '+esc(f.name)+''+(f.desc?''+esc(f.desc)+'':'')+''+(f.size/1024).toFixed(0)+' КБ · '+f.date+'
'}); - html+='
'; + html+='
'; html+='

Формы завершения: '+esc(e.dname)+'

'; - html+=sh; - html+='

🤖 Вывод ИИ-агента

'+esc(e.ai)+'
'; html+='
История:
';e.h.forEach(function(h){html+='
'+esc(h)+'
'});html+='
'; html+='
';