Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of loco.media.mit.edu:git/afgexplorer

  • Loading branch information...
commit 4b086570d2c4f5b6ab56186c441a30b7ca59f1b8 2 parents eef3296 + 0bb4849
@yourcelf authored
Showing with 43 additions and 23 deletions.
  1. +4 −0 afg/templates/afg/entry.html
  2. +39 −23 media/js/script.js
View
4 afg/templates/afg/entry.html
@@ -171,6 +171,10 @@
<div class='main'>
<h1>{{ entry.title }}</h1>
{{ entry.date }}
+ <span class='toggle-acronyms' style='color: #555'>
+ <label for='toggleAcronyms'>Toggle acronyms:</label>
+ <input id='toggleAcronyms' type='checkbox' onclick='toggleAcronyms();' />
+ </span>
<noscript>
<h2>Javascript required for full view</h2>
<h3>Limited script-free view:</h3>
View
62 media/js/script.js
@@ -138,8 +138,8 @@ var ACRONYMS = [
[/\b(\d+IN)\b/g, "Infantry group"],
[/\b(\d+US)\b/g, "Number of US personnel"],
[/\b(\d+V)\b/g, "Vehicles"],
- [/\b(\d+L)\b/g, "Local time"],
- [/\b(\d+Z)/g, "Zulu time - GMT"],
+ [/\b((\d\d)(\d\d)L)\b/gi, "$2:$3 Local time"],
+ [/\b((\d\d)(\d\d)Z)/gi, "$2:$3 GMT"],
[/\b(42 CDO RM)\b/g, "42 Commando Royal Marines"],
[/\b(508 STB)\b/g, "508th special troops battalion"],
[/\b(81)\b/g, "81mm mortar round"],
@@ -189,6 +189,7 @@ var ACRONYMS = [
[/\b(buzz saw)\b/g, "Signalling method by waving light stick in circle"],
[/\b(C\/\/NF)\b/g, "Confidential, no foreign nationals"],
[/\b(C\/S)\b/g, "Call sign"],
+ [/\b(CAN)\b/g, "Canadian"],
[/\b(CAS)\b/g, "Close air support"],
[/\b(CAT C)\b/g, "Category C patient - priority"],
[/\b(CCA)\b/g, "carrier-controlled approach"],
@@ -205,7 +206,7 @@ var ACRONYMS = [
[/\b(CIVCAS)\b/g, "Civilian casualties"],
[/\b(CJ2)\b/g, "US intelligence and security command, afghanistan"],
[/\b(CJ3)\b/g, "Joint special ops"],
- [/\b(CJSOTF)\b/g, "Combined Joint Special Operations Task Force"],
+ [/\b(CJSOTF)/g, "Combined Joint Special Operations Task Force"],
[/\b(CJTF)/g, "Combined Joint Task Force"],
[/\b(CJTF-82)\b/g, "Combined Joint Task Force-82: HQ of US Forces in ISAF and Regional Command East, March 2007-April 2008"],
[/\b(CLP)\b/g, "Combat logistics patrol [supply convoy]"],
@@ -215,18 +216,19 @@ var ACRONYMS = [
[/\b(Coy)\b/gi, "Company"],
[/\b(CP)\b/g, "Check point"],
[/\b(cpt)\b/g, "Captain"],
- [/\b(Csh)\b/g, "combat support hospital"],
- [/\b(CTC)\b/g, "? counterterrorist center"],
+ [/\b(Csh)\b/gi, "Combat support hospital"],
+ [/\b(CTC)\b/g, "? Counterterrorist Center"],
[/\b(CWIED)\b/g, "Command Wire Improvised Explosive Device"],
- [/\b(DBC)\b/g, "database code"],
+ [/\b(DBC)\b/g, "Database Code"],
[/\b(DC)\b/g, "District Centre"],
[/\b(DF)\b/g, "Direct fire"],
[/\b(DOI)\b/g, "Date of incident"],
[/\b(DoS)\b/g, "Department of State"],
[/\b(DSHKA)\b/g, "Soviet-origin heavy machine gun"],
- [/\b(ECP)\b/g, "entry control point"],
+ [/\b(ECP)\b/g, "Entry Control Point"],
+ [/\b(EWIA)\b/g, "Enemy wounded in action"],
[/\b(EKIA)\b/g, "Enemy killed in action"],
- [/\b(Element)\b/gi, "Part of a task force e.g. 'Puma element' = part of Task Force Puma"],
+ //[/\b(Element)\b/gi, "task force part"],
[/\b(ENG BDE)\b/g, "Engineer Brigade"],
[/\b(EOC)\b/g, "Emergency Operation Centre"],
[/\b(EOD)\b/g, "Explosive Ordnance Disposal [bomb defuser]"],
@@ -327,7 +329,7 @@ var ACRONYMS = [
[/\b(M-4)\b/g, "Type of gun"],
[/\b(MAJ)\b/g, "Major"],
[/\b(MAR)\b/g, "Marine"],
- [/\b(MEDEVAC)\b/g, "Medical Evacuation"],
+ [/\b(MEDEVACD?)\b/gi, "Medical Evacuation"],
[/\b(MED OPS)\b/g, "Medical Operations"],
[/\b(MED TM)\b/g, "Medical Team"],
[/\b(medevac)\b/g, "Medical evacuation"],
@@ -340,9 +342,10 @@ var ACRONYMS = [
[/\b(MP)\b/g, "Military Police"],
[/\b(MS)\b/g, "Military support"],
[/\b(MSN)\b/g, "Nurse (with a masters)"],
- [/\b(Msr)\b/g, "main supply route"],
+ [/\b(Msr)\b/g, "Main Supply Route"],
[/\b(MTF)\b/g, "More to follow"],
- [/\b(MTT)\b/g, "military training team"],
+ [/\b(MTT)\b/g, "Military Training Team"],
+ [/\b(MWE)\b/g, "Men, Weapons and Equipment"],
[/\b(N\/I C)\b/g, "Nato/ISAF Confidential"],
[/\b(NAI)\b/g, "Named areas of interest"],
[/\b(NC)\b/g, "non-combatant"],
@@ -350,12 +353,12 @@ var ACRONYMS = [
[/\b(NDS)\b/g, "Afghan intelligence [national directorate of security]"],
[/\b(NFI)\b/g, "Not Further Identified"],
[/\b(NFTR)\b/g, "Nothing further to report"],
- [/\b(NMC)\b/g, "non mission-capable"],
- [/\b(NOFORN)\b/g, "no foreigners [secrecy classification]"],
+ [/\b(NMC)\b/g, "Non mission-capable"],
+ [/\b(NOFORN)\b/g, "No foreigners [secrecy classification]"],
[/\b(NSTR)\b/g, "Nothing significant to report"],
[/\b(OBJ)\b/g, "Objective"],
[/\b(OC)\b/g, "Outcome"],
- [/\b(OCC- P)\b/g, "operational command centre - provincial"],
+ [/\b(OCC- P)\b/g, "Operational Command Centre - Provincial"],
[/\b(OCCD)\b/g, "Operational Coordination Center District"],
[/\b(ODA)\b/g, "Operational Detachment (Alpha) - special forces"],
[/\b(OGA)\b/g, "Other Government Agency (usually CIA)"],
@@ -393,6 +396,7 @@ var ACRONYMS = [
[/\b(PSO)\b/g, "Post Security Officer"],
[/\b(PT)\b/g, "Patient"],
[/\b(PTS)\b/g, "Peace Through Strength (PTS) reconciliation process"],
+ [/\b(PZ)\b/g, "Pickup Zone"],
[/\b(QRF)\b/g, "Quick Response Force"],
[/\b(RB)\b/g, "Road block"],
[/\b(RC \(N\))\b/g, "Regional Command North"],
@@ -405,6 +409,7 @@ var ACRONYMS = [
[/\b(RCAG)\b/g, "Regional Corps Assistance Group"],
[/\b(RCC)\b/g, "Regional Command Capital"],
[/\b(RC\(C\))\b/g, "Regional Command Capital"],
+ [/\b(RCIED)\b/g, "Remote Control Improvised Explosive Device"],
[/\b(RCP)\b/g, "Route clearance Patrol"],
[/\b(rds)\b/g, "Rounds"],
[/\b(RDS)\b/g, "Rounds"],
@@ -421,12 +426,14 @@ var ACRONYMS = [
[/\b(RTF)\b/g, "Reconstruction Task Force [Australian at TF Uruzgan]"],
[/\b(S-2)\b/g, "Intelligence staff officer"],
[/\b(S-5)\b/g, "Staff member responsible for civil-military operations"],
- [/\b(S[-:])/g, "Size (in relation to Size, Activity, Location, Time - military report)"],
- [/\b(A[-:])/g, "Activity (in relation to Size, Activity, Location, Time - military report)"],
- [/\b(L[-:])/g, "Location (in relation to Size, Activity, Location, Time - military report)"],
- [/\b(T[-:])/g, "Time (in relation to Size, Activity, Location, Time - military report)"],
- [/\b(U[-:])/g, "Unit (in relation to Size, Activity, Location, Time, Unit, Result - military report)"],
- [/\b(R[-:])/g, "Result (in relation to Size, Activity, Location, Time, Unit, Result - military report)"],
+ [/\b(SALUTE)\b/g, "Size/Activity/Location/Time/Unit/Equipment"],
+ [/\b(S[-:])/g, "Size "],
+ [/\b(A[-:])/g, "Activity "],
+ [/\b(L[-:])/g, "Location "],
+ [/\b(T[-:])/g, "Time "],
+ [/\b(U[-:])/g, "Unit "],
+ [/\b(E[-:])/g, "Equipment "],
+ [/\b(R[-:])/g, "Result "],
[/\b(S\/\/REL)\b/g, "Secret or Selective release?"],
[/\b(SAF)\b/g, "Small ams fire/Surface to air fire"],
[/\b(Safire)\b/g, "Small ams fire/Surface to air fire"],
@@ -476,11 +483,11 @@ var ACRONYMS = [
[/\b(UNK)\b/g, "Unknown"],
[/\b(usfor-a|USFOR-A)\b/g, "United States Forces Afghanistan"],
[/\b(UXO)\b/g, "unexploded ordnance [or unfired]"],
- [/\b(VBIED)\b/g, "VBIED vehicle-borne improvised explosive device"],
+ [/\b(VBIED)\b/g, "Vehicle-Borne Improvised Explosive Device"],
[/\b(VCP)\b/g, "Vehicle Check Point"],
[/\b(vic)\b/g, "vicinity"],
- [/\b(VIC)\b/g, "Vehicle?"],
- [/\b(vitals)\b/g, "Vital signs (for example blood pressure)"],
+ [/\b(VIC)\b/g, "Vehicle"],
+ [/\b(vitals)\b/g, "Vital signs"],
[/\b(VP)\b/g, "Vulnerable point"],
[/\b(VPB)\b/g, "Vehicle patrol base"],
[/\b(VSA)\b/g, "vital signs absent [i.e. dead]"],
@@ -497,3 +504,12 @@ function acronyms(string) {
}
return string;
}
+function toggleAcronyms() {
+ $("acronym").each(function(index, acr) {
+ var a = $(acr);
+ var html = a.html();
+ var title = a.attr("title");
+ a.attr("title", html);
+ a.html(title);
+ });
+}
Please sign in to comment.
Something went wrong with that request. Please try again.