Added max list size circumvention for file transfers between sites.
This commit is contained in:
@@ -52,17 +52,62 @@ a:hover { text-decoration: underline; }
|
||||
.risk-card .rlabel { font-size: .8rem; margin-top: 2px; }
|
||||
.risk-card .users { font-size: .7rem; margin-top: 2px; opacity: 0.8; }
|
||||
.risk-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .75rem; font-weight: 600; border: 1px solid; }
|
||||
.section-header td { background: #edf2f7; font-weight: 600; cursor: pointer; padding: 8px 14px; border-bottom: 2px solid #cbd5e0; user-select: none; }
|
||||
.section-header:hover td { background: #e2e8f0; }
|
||||
.section-header .chevron { margin-right: 8px; display: inline-block; transition: transform 0.15s; }
|
||||
.section-header.collapsed .chevron { transform: rotate(-90deg); }
|
||||
.entry-badge { display: inline-block; background: #e2e8f0; color: #4a5568; border-radius: 10px; padding: 1px 8px; font-size: .75rem; font-weight: 600; margin-left: 8px; }
|
||||
";
|
||||
|
||||
internal const string InlineJs = @"function filterTable() {
|
||||
var input = document.getElementById('filter').value.toLowerCase();
|
||||
var rows = document.querySelectorAll('#permTable tbody tr');
|
||||
rows.forEach(function(row) {
|
||||
if (row.hasAttribute('data-group')) return;
|
||||
row.style.display = row.textContent.toLowerCase().indexOf(input) > -1 ? '' : 'none';
|
||||
var sections = document.querySelectorAll('#permTable tbody tr.section-header');
|
||||
if (sections.length === 0) {
|
||||
document.querySelectorAll('#permTable tbody tr').forEach(function(row) {
|
||||
if (row.hasAttribute('data-group')) return;
|
||||
row.style.display = row.textContent.toLowerCase().indexOf(input) > -1 ? '' : 'none';
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!input) {
|
||||
sections.forEach(function(hdr) {
|
||||
hdr.style.display = '';
|
||||
var sid = hdr.getAttribute('data-section');
|
||||
var collapsed = hdr.classList.contains('collapsed');
|
||||
document.querySelectorAll('[data-section-member=' + sid + ']:not([data-group])').forEach(function(r) {
|
||||
r.style.display = collapsed ? 'none' : '';
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
sections.forEach(function(hdr) {
|
||||
var sid = hdr.getAttribute('data-section');
|
||||
var members = document.querySelectorAll('[data-section-member=' + sid + ']:not([data-group])');
|
||||
var anyMatch = false;
|
||||
members.forEach(function(r) {
|
||||
var match = r.textContent.toLowerCase().indexOf(input) > -1;
|
||||
r.style.display = match ? '' : 'none';
|
||||
if (match) anyMatch = true;
|
||||
});
|
||||
if (!anyMatch && hdr.textContent.toLowerCase().indexOf(input) > -1) {
|
||||
anyMatch = true;
|
||||
members.forEach(function(r) { r.style.display = ''; });
|
||||
}
|
||||
hdr.style.display = anyMatch ? '' : 'none';
|
||||
});
|
||||
}
|
||||
document.addEventListener('click', function(ev) {
|
||||
var hdr = ev.target.closest('.section-header');
|
||||
if (hdr) {
|
||||
var sid = hdr.getAttribute('data-section');
|
||||
hdr.classList.toggle('collapsed');
|
||||
var collapsed = hdr.classList.contains('collapsed');
|
||||
document.querySelectorAll('[data-section-member=' + sid + ']').forEach(function(r) {
|
||||
if (r.hasAttribute('data-group')) { r.style.display = 'none'; return; }
|
||||
r.style.display = collapsed ? 'none' : '';
|
||||
});
|
||||
return;
|
||||
}
|
||||
var trigger = ev.target.closest('.group-expandable');
|
||||
if (!trigger) return;
|
||||
var id = trigger.getAttribute('data-group-target');
|
||||
@@ -141,7 +186,8 @@ document.addEventListener('click', function(ev) {
|
||||
ref int grpMemIdx,
|
||||
string? targetLabel = null,
|
||||
string? sharingLinkType = null,
|
||||
bool hideSystemGroupRaw = false)
|
||||
bool hideSystemGroupRaw = false,
|
||||
string? sectionId = null)
|
||||
{
|
||||
var T = TranslationSource.Instance;
|
||||
var logins = userLogins.Split(';', StringSplitOptions.RemoveEmptyEntries);
|
||||
@@ -173,35 +219,48 @@ document.addEventListener('click', function(ev) {
|
||||
|
||||
if (hasResolvedMembers && groupMembers!.TryGetValue(name, out var resolved))
|
||||
{
|
||||
var grpId = $"grpmem{grpMemIdx}";
|
||||
pills.Append("<span class=\"user-pill group-expandable\"");
|
||||
if (isResolvedSystemGroup)
|
||||
pills.Append(" data-system-group=\"1\"");
|
||||
pills.Append($" data-group-target=\"{HtmlEncode(grpId)}\" data-email=\"{HtmlEncode(login)}\">");
|
||||
if (isResolvedSystemGroup)
|
||||
if (resolved.Count == 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(sharingLinkType))
|
||||
pills.Append(BuildSharingLinkBadge(sharingLinkType!));
|
||||
pills.Append(HtmlEncode(targetLabel!));
|
||||
// Members unavailable — render plain pill, skip expandable sub-row.
|
||||
var cls2 = isResolvedSystemGroup ? "user-pill\" data-system-group=\"1" : "user-pill";
|
||||
pills.Append($"<span class=\"{cls2}\" title=\"{HtmlEncode(T["report.text.empty_group"])}\" data-email=\"{HtmlEncode(login)}\">");
|
||||
if (isResolvedSystemGroup)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(sharingLinkType))
|
||||
pills.Append(BuildSharingLinkBadge(sharingLinkType!));
|
||||
pills.Append(HtmlEncode(targetLabel!));
|
||||
}
|
||||
else
|
||||
{
|
||||
pills.Append(HtmlEncode(name));
|
||||
}
|
||||
pills.Append("</span>");
|
||||
}
|
||||
else
|
||||
{
|
||||
pills.Append(HtmlEncode(name));
|
||||
}
|
||||
pills.Append(" ▼</span>");
|
||||
var grpId = $"grpmem{grpMemIdx}";
|
||||
pills.Append("<span class=\"user-pill group-expandable\"");
|
||||
if (isResolvedSystemGroup)
|
||||
pills.Append(" data-system-group=\"1\"");
|
||||
pills.Append($" data-group-target=\"{HtmlEncode(grpId)}\" data-email=\"{HtmlEncode(login)}\">");
|
||||
if (isResolvedSystemGroup)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(sharingLinkType))
|
||||
pills.Append(BuildSharingLinkBadge(sharingLinkType!));
|
||||
pills.Append(HtmlEncode(targetLabel!));
|
||||
}
|
||||
else
|
||||
{
|
||||
pills.Append(HtmlEncode(name));
|
||||
}
|
||||
pills.Append(" ▼</span>");
|
||||
|
||||
string memberContent;
|
||||
if (resolved.Count > 0)
|
||||
{
|
||||
var parts = resolved.Select(m => $"{HtmlEncode(m.DisplayName)} <{HtmlEncode(m.Login)}>");
|
||||
memberContent = string.Join(" • ", parts);
|
||||
var memberContent = string.Join(" • ", parts);
|
||||
var sectionAttr = sectionId != null ? $" data-section-member=\"{HtmlEncode(sectionId)}\"" : "";
|
||||
subRows.AppendLine($"<tr data-group=\"{HtmlEncode(grpId)}\"{sectionAttr} style=\"display:none\"><td colspan=\"{colSpan}\" style=\"padding-left:2em;font-size:.8rem;color:#555\">{memberContent}</td></tr>");
|
||||
grpMemIdx++;
|
||||
}
|
||||
else
|
||||
{
|
||||
memberContent = $"<em style=\"color:#888\">{T["report.text.members_unavailable"]}</em>";
|
||||
}
|
||||
subRows.AppendLine($"<tr data-group=\"{HtmlEncode(grpId)}\" style=\"display:none\"><td colspan=\"{colSpan}\" style=\"padding-left:2em;font-size:.8rem;color:#555\">{memberContent}</td></tr>");
|
||||
grpMemIdx++;
|
||||
}
|
||||
else if (isResolvedSystemGroup)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user