Delete directory 'ICS'

This commit is contained in:
2026-09-05 10:15:51 -04:00
parent 91b7f645e8
commit 00a0e3dff3
5 changed files with 0 additions and 2063 deletions
-444
View File
@@ -1,444 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Initial Damage Assessment / Windshield Survey (Packet Radio)</title>
<style>
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace; background: #eef2f7; color: #222; padding: 20px; margin: 0; }
.container { max-width: 980px; margin: 0 auto; background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.header { background: #b71c1c; color: white; padding: 12px; border-radius: 6px; text-align: center; margin-bottom: 18px; }
.header h2 { margin: 0; font-size: 1.3rem; letter-spacing: 1px; }
.header p { margin: 4px 0 0 0; font-size: 0.85rem; opacity: 0.9; }
fieldset { border: 1px solid #ef9a9a; border-radius: 6px; padding: 14px; margin-bottom: 14px; background: #fffbfb; }
legend { font-weight: bold; padding: 0 8px; font-size: 0.85rem; color: #b71c1c; }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.col { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
label { font-size: 0.8rem; font-weight: 600; color: #333; }
input[type="text"], select, textarea { padding: 7px 8px; font-size: 0.88rem; border: 1px solid #999; border-radius: 4px; font-family: inherit; width: 100%; }
.btn-now { background: #4a5568; color: #fff; padding: 4px 8px; font-size: 0.72rem; border-radius: 4px; border: none; cursor: pointer; }
.btn-now:hover { background: #2d3748; }
table.grid-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.82rem; }
table.grid-table th, table.grid-table td { border: 1px solid #ccc; padding: 6px; text-align: center; }
table.grid-table th { background: #f0f0f0; }
table.grid-table input { font-size: 0.82rem; padding: 4px; text-align: center; }
.actions { display: flex; gap: 10px; margin: 18px 0; }
button.main-btn { flex: 1; padding: 12px; font-size: 0.95rem; font-weight: bold; border: none; border-radius: 6px; cursor: pointer; }
.btn-generate { background: #b71c1c; color: #fff; }
.btn-generate:hover { background: #7f0000; }
.btn-save { background: #5c6bc0; color: #fff; }
.btn-save:hover { background: #3f51b5; }
.btn-copy { background: #2e7d32; color: #fff; }
.btn-copy:hover { background: #1b5e20; }
.btn-clear { background: #555; color: #fff; flex: 0.35; }
.btn-clear:hover { background: #333; }
pre { background: #181c20; color: #39ff14; padding: 14px; border-radius: 6px; overflow-x: auto; font-family: "Courier New", Courier, monospace; font-size: 0.82rem; line-height: 1.32; min-height: 150px; }
.nav-bar { margin-bottom: 12px; font-size: 0.85rem; }
.nav-bar a { color: #b71c1c; text-decoration: none; font-weight: bold; }
/* Modal Save Dialog Window */
.save-modal-backdrop {
display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0,0,0,0.55); z-index: 99999; justify-content: center; align-items: center;
}
.save-modal-backdrop.active { display: flex; }
.save-modal-window {
background: #ffffff; padding: 24px 28px; border-radius: 10px; width: 92%; max-width: 480px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3); border: 1px solid #cbd5e1; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.save-modal-window h3 { margin: 0 0 8px 0; font-size: 1.25rem; color: #1e293b; font-weight: bold; }
.save-modal-window p { margin: 0 0 16px 0; font-size: 0.88rem; color: #64748b; line-height: 1.4; }
.save-modal-window input[type="text"] {
width: 100%; padding: 10px 12px; font-size: 0.95rem; border: 2px solid #94a3b8; border-radius: 6px;
margin-bottom: 20px; font-family: inherit; box-sizing: border-box; text-transform: none;
}
.save-modal-window input[type="text"]:focus { border-color: #2563eb; outline: none; }
.save-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.save-modal-btn { padding: 9px 18px; font-size: 0.9rem; font-weight: bold; border-radius: 6px; border: none; cursor: pointer; }
.save-modal-btn-confirm { background: #2563eb; color: #ffffff; }
.save-modal-btn-confirm:hover { background: #1d4ed8; }
.save-modal-btn-cancel { background: #e2e8f0; color: #334155; }
.save-modal-btn-cancel:hover { background: #cbd5e1; }
</style>
</head>
<body>
<div class="container">
<div class="nav-bar"><a href="../index.html">&larr; Back to Packet Forms Hub</a></div>
<div class="header">
<h2>INITIAL DAMAGE ASSESSMENT / WINDSHIELD SURVEY</h2>
<p>Winlink / Packet Radio Rapid Field Damage & Loss Tally</p>
</div>
<form id="damageForm" onsubmit="event.preventDefault(); return false;">
<fieldset>
<legend>INCIDENT & SURVEY HEADER</legend>
<div class="row">
<div class="col" style="flex: 2;"><label for="jur">Jurisdiction</label><input type="text" id="jur" placeholder="e.g. Travis County OEM"></div>
<div class="col"><label for="misNum">Mission / Incident #</label><input type="text" id="misNum" placeholder="e.g. 2026-FLOOD-01"></div>
<div class="col"><label for="status">Exercise / Real</label>
<select id="status">
<option value="EXERCISE">EXERCISE</option>
<option value="REAL EVENT">REAL EVENT</option>
</select>
</div>
</div>
<div class="row">
<div class="col"><label for="event">Event Type</label>
<select id="event">
<option value="Hurricane">Hurricane</option>
<option value="Tropical Storm">Tropical Storm</option>
<option value="Tornado/Winds">Tornado/Winds</option>
<option value="Flood">Flood</option>
<option value="Earthquake">Earthquake</option>
<option value="Fire">Fire</option>
<option value="Haz Mat">Haz Mat</option>
<option value="OTHER">OTHER</option>
</select>
</div>
<div class="col"><label for="eventOther">If Other, Describe</label><input type="text" id="eventOther" placeholder="Describe other event"></div>
<div class="col"><label for="surArea">Survey Area</label><input type="text" id="surArea" placeholder="e.g. Sector 4 / North River Rd"></div>
<div class="col"><label for="surTeam">Survey Team / Calls</label><input type="text" id="surTeam" placeholder="Team Alpha / Callsigns"></div>
</div>
<div class="row">
<div class="col"><label for="eventDate">Start Date of Event</label><input type="text" id="eventDate" placeholder="YYYY-MM-DD"></div>
<div class="col">
<div class="label-row">
<label for="surDate">Date of this Survey</label>
<button type="button" class="btn-now" id="btnDateNow">Current UTC</button>
</div>
<input type="text" id="surDate" placeholder="YYYY-MM-DD">
</div>
</div>
</fieldset>
<fieldset>
<legend>DAMAGE CATEGORIES & COUNTS</legend>
<table class="grid-table" id="dmgTable">
<thead>
<tr>
<th style="text-align:left;">Category</th>
<th style="background:#c8e6c9;">Affected<br>(10%)</th>
<th style="background:#fff9c4;">Minor<br>(25%)</th>
<th style="background:#ffcdd2;">Major<br>(50%)</th>
<th style="background:#e0e0e0;">Totaled<br>(100%)</th>
<th>Count</th>
<th>Est. $ Loss</th>
</tr>
</thead>
<tbody id="dmgBody">
<!-- Populated by script -->
</tbody>
<tfoot>
<tr style="font-weight:bold; background:#f5f5f5;">
<td colspan="5" style="text-align:right;">Total Estimated Dollar Amount:</td>
<td id="grandCount">0</td>
<td><input type="text" id="grandLoss" readonly style="font-weight:bold; text-align:right;" value="$ 0"></td>
</tr>
</tfoot>
</table>
</fieldset>
<fieldset>
<legend>COMMENTS</legend>
<textarea id="comments" rows="3" placeholder="Brief summary of damages, access problems, or high-density destruction zones..."></textarea>
</fieldset>
<div class="actions">
<button type="button" class="main-btn btn-generate" id="btnGen">Generate Packet ASCII</button>
<button type="button" class="main-btn btn-save" id="btnSaveHtml">Save as HTML</button>
<button type="button" class="main-btn btn-copy" id="btnCopy">Copy ASCII</button>
<button type="button" class="main-btn btn-clear" id="btnClear">Reset</button>
</div>
</form>
<label style="font-weight:bold;">Formatted ASCII for Packet / Winlink / BBS Transmission:</label>
<pre id="outputPre">Fill in the fields above and click "Generate Packet ASCII"...</pre>
</div>
<script>
const categories = [
"HOUSES",
"APARTMENT COMPLEX",
"MOBILE HOMES",
"RESIDENTIAL HIGH RISE",
"COMMERCIAL HIGH RISE",
"PUBLIC BUILDINGS",
"SMALL BUSINESS",
"FACTORIES / INDUSTRIAL",
"ROADS",
"BRIDGES",
"ELECTRICAL DISTRIBUTION",
"SCHOOLS"
];
const tbody = document.getElementById('dmgBody');
categories.forEach(function(cat, idx) {
const tr = document.createElement('tr');
tr.innerHTML = '<td style="text-align:left; font-weight:600;">' + cat + '</td>' +
'<td><input type="text" class="c-aff" data-row="' + idx + '" value="0" oninput="calcRow(' + idx + ')"></td>' +
'<td><input type="text" class="c-min" data-row="' + idx + '" value="0" oninput="calcRow(' + idx + ')"></td>' +
'<td><input type="text" class="c-maj" data-row="' + idx + '" value="0" oninput="calcRow(' + idx + ')"></td>' +
'<td><input type="text" class="c-des" data-row="' + idx + '" value="0" oninput="calcRow(' + idx + ')"></td>' +
'<td><input type="text" class="c-tot" data-row="' + idx + '" value="0" readonly style="background:#eee;"></td>' +
'<td><input type="text" class="c-loss" data-row="' + idx + '" placeholder="0" oninput="calcTotalLoss()"></td>';
tbody.appendChild(tr);
});
function setUTC() {
const now = new Date();
const y = now.getUTCFullYear();
const m = String(now.getUTCMonth()+1).padStart(2,'0');
const d = String(now.getUTCDate()).padStart(2,'0');
document.getElementById('surDate').value = y + '-' + m + '-' + d;
if (!document.getElementById('eventDate').value) {
document.getElementById('eventDate').value = y + '-' + m + '-' + d;
}
}
function calcRow(idx) {
const row = tbody.children[idx];
const aff = parseInt(row.querySelector('.c-aff').value) || 0;
const min = parseInt(row.querySelector('.c-min').value) || 0;
const maj = parseInt(row.querySelector('.c-maj').value) || 0;
const des = parseInt(row.querySelector('.c-des').value) || 0;
row.querySelector('.c-tot').value = aff + min + maj + des;
calcTotalLoss();
}
function calcTotalLoss() {
let totCount = 0;
let totLoss = 0;
for (let i = 0; i < tbody.children.length; i++) {
const r = tbody.children[i];
totCount += parseInt(r.querySelector('.c-tot').value) || 0;
const rawLoss = (r.querySelector('.c-loss').value || '').replace(/[^0-9]/g, '');
totLoss += parseInt(rawLoss) || 0;
}
document.getElementById('grandCount').textContent = totCount;
document.getElementById('grandLoss').value = '$ ' + totLoss.toLocaleString();
}
function clean(id) {
const el = document.getElementById(id);
return el ? (el.value || '').trim() : '';
}
function pad(str, len) {
str = (str || '').toString();
return str + ' '.repeat(Math.max(0, len - str.length));
}
function generateASCII() {
try {
calcTotalLoss();
const div = '='.repeat(78);
const sub = '-'.repeat(78);
const jur = clean('jur').toUpperCase() || 'N/A';
const mis = clean('misNum').toUpperCase() || 'N/A';
const stat = clean('status').toUpperCase();
const evt = clean('event').toUpperCase();
const other = clean('eventOther').toUpperCase();
const area = clean('surArea').toUpperCase() || 'N/A';
const team = clean('surTeam').toUpperCase() || 'N/A';
const evDate = clean('eventDate') || 'N/A';
const surDate = clean('surDate') || 'N/A';
const cmt = clean('comments').toUpperCase() || 'NONE REPORTED';
let gridLines = [];
for (let i = 0; i < categories.length; i++) {
const r = tbody.children[i];
const cat = pad(categories[i], 24);
const aff = pad(r.querySelector('.c-aff').value || '0', 5);
const min = pad(r.querySelector('.c-min').value || '0', 5);
const maj = pad(r.querySelector('.c-maj').value || '0', 5);
const des = pad(r.querySelector('.c-des').value || '0', 5);
const tot = pad(r.querySelector('.c-tot').value || '0', 6);
const loss = pad(r.querySelector('.c-loss').value || '0', 12);
if (parseInt(tot.trim()) > 0 || loss.trim() !== '0') {
gridLines.push(cat + '| ' + aff + '| ' + min + '| ' + maj + '| ' + des + '| ' + tot + '| ' + loss);
}
}
if (gridLines.length === 0) {
gridLines.push(' NO REPORTED STRUCTURE OR INFRASTRUCTURE DAMAGE AT THIS TIME');
}
const out = div + '\n' +
'INITIAL DAMAGE ASSESSMENT / WINDSHIELD SURVEY (PACKET ASCII)\n' +
div + '\n' +
'JURISDICTION: ' + jur + ' MISSION #: ' + mis + '\n' +
'STATUS : ' + stat + ' EVENT : ' + evt + (other ? ' (' + other + ')' : '') + '\n' +
'SURVEY AREA : ' + area + '\n' +
'SURVEY TEAM : ' + team + '\n' +
'EVENT DATE : ' + evDate + ' SURVEY DATE: ' + surDate + '\n' +
sub + '\n' +
'CATEGORY | AFF | MIN | MAJ | TOTAL| COUNT | EST. $ LOSS\n' +
sub + '\n' +
gridLines.join('\n') + '\n' +
sub + '\n' +
'TOTAL DAMAGED STRUCTURES: ' + pad(document.getElementById('grandCount').textContent, 8) +
'ESTIMATED TOTAL LOSS: ' + document.getElementById('grandLoss').value + '\n' +
sub + '\n' +
'COMMENTS:\n ' + cmt + '\n' +
div;
document.getElementById('outputPre').textContent = out;
} catch(err) {
alert("Error generating text: " + err.message);
}
}
function copyASCII() {
const txt = document.getElementById('outputPre').textContent;
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(txt).then(function() {
alert("Damage assessment copied to clipboard!");
}).catch(function() {
fallbackCopy();
});
} else {
fallbackCopy();
}
}
function fallbackCopy() {
const pre = document.getElementById('outputPre');
const range = document.createRange();
range.selectNode(pre);
window.getSelection().removeAllRanges();
window.getSelection().addRange(range);
document.execCommand('copy');
alert("Copied to clipboard!");
}
function clearForm() {
if(confirm("Reset Damage Assessment form?")) {
document.getElementById('damageForm').reset();
document.querySelectorAll('.c-tot').forEach(function(el){ el.value = '0'; });
document.getElementById('grandCount').textContent = '0';
document.getElementById('grandLoss').value = '$ 0';
document.getElementById('outputPre').textContent = 'Fill in the fields above and click "Generate Packet ASCII"...';
}
}
document.getElementById('btnDateNow').addEventListener('click', setUTC);
document.getElementById('btnGen').addEventListener('click', generateASCII);
document.getElementById('btnSaveHtml').addEventListener('click', openSaveModal);
document.getElementById('btnCopy').addEventListener('click', copyASCII);
document.getElementById('btnClear').addEventListener('click', clearForm);
// File Name Modal Window & HTML Exporter
function openSaveModal() {
var now = new Date();
var dStr = now.toISOString().slice(0, 10);
var defName = 'damage_assessment_' + dStr + '.html';
var modal = document.getElementById('saveModalBackdrop');
var input = document.getElementById('saveModalFileName');
if (input) input.value = defName;
if (modal) modal.classList.add('active');
setTimeout(function() {
if (input) { input.focus(); input.select(); }
}, 50);
}
function closeSaveModal() {
var modal = document.getElementById('saveModalBackdrop');
if (modal) modal.classList.remove('active');
}
function executeSaveHTML() {
var input = document.getElementById('saveModalFileName');
var chosenName = input ? input.value.trim() : '';
if (!chosenName) return;
if (!chosenName.toLowerCase().endsWith('.html') && !chosenName.toLowerCase().endsWith('.htm')) {
chosenName += '.html';
}
closeSaveModal();
document.querySelectorAll('input[type="text"]').forEach(function(el) { el.setAttribute('value', el.value); });
document.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(function(el) {
if (el.checked) el.setAttribute('checked', 'checked');
else el.removeAttribute('checked');
});
document.querySelectorAll('textarea').forEach(function(el) { el.textContent = el.value; });
document.querySelectorAll('select').forEach(function(el) {
Array.from(el.options).forEach(function(opt) {
if (opt.value === el.value) opt.setAttribute('selected', 'selected');
else opt.removeAttribute('selected');
});
});
var pre = document.getElementById('ascii-report') || document.getElementById('outputPre') || document.getElementById('preview') || document.getElementById('outputArea');
if (pre) pre.textContent = pre.textContent;
var clonedDoc = document.documentElement.cloneNode(true);
var modalInClone = clonedDoc.querySelector('#saveModalBackdrop');
if (modalInClone) modalInClone.classList.remove('active');
var htmlContent = '<!DOCTYPE html>\n' + clonedDoc.outerHTML;
var blob = new Blob([htmlContent], { type: 'text/html;charset=utf-8' });
var url = URL.createObjectURL(blob);
var a = document.createElement('a');
a.href = url;
a.download = chosenName;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
}
window.addEventListener('DOMContentLoaded', function() {
var cancelBtn = document.getElementById('saveModalCancelBtn');
var confirmBtn = document.getElementById('saveModalSaveBtn');
var modalInput = document.getElementById('saveModalFileName');
var modalBackdrop = document.getElementById('saveModalBackdrop');
if (cancelBtn) cancelBtn.addEventListener('click', closeSaveModal);
if (confirmBtn) confirmBtn.addEventListener('click', executeSaveHTML);
if (modalInput) {
modalInput.addEventListener('keydown', function(e) {
if (e.key === 'Enter') { e.preventDefault(); executeSaveHTML(); }
if (e.key === 'Escape') { e.preventDefault(); closeSaveModal(); }
});
}
if (modalBackdrop) {
modalBackdrop.addEventListener('click', function(e) {
if (e.target === modalBackdrop) closeSaveModal();
});
}
var btnSaveMain = document.getElementById('btnSaveHtml');
if (btnSaveMain) {
// Clear existing inline handlers just in case
btnSaveMain.onclick = null;
btnSaveMain.addEventListener('click', openSaveModal);
}
});
</script>
<!-- Custom File Name Modal Window -->
<div id="saveModalBackdrop" class="save-modal-backdrop">
<div class="save-modal-window">
<h3>Save Form as HTML</h3>
<p>Enter a name for the saved offline HTML file:</p>
<input type="text" id="saveModalFileName" spellcheck="false">
<div class="save-modal-actions">
<button type="button" class="save-modal-btn save-modal-btn-cancel" id="saveModalCancelBtn">Cancel</button>
<button type="button" class="save-modal-btn save-modal-btn-confirm" id="saveModalSaveBtn">Save File</button>
</div>
</div>
</div>
</body>
</html>