Permalink
Browse files

Added LAPD phonetic alphabet

  • Loading branch information...
1 parent edb989d commit 69d82ef0278b1e3ef49e25a16696395cd3506540 @g13n committed Oct 15, 2012
View
@@ -0,0 +1 @@
+.DS_Store
@@ -4,12 +4,14 @@
<dict>
<key>Breakpoints</key>
<dict>
- <key>widget.wdgt/main.js:158</key>
+ <key>widget.wdgt/main.js:198</key>
<string>-fullNameBtnClick</string>
- <key>widget.wdgt/main.js:175</key>
+ <key>widget.wdgt/main.js:215</key>
<string>-inputTextSearch</string>
- <key>widget.wdgt/main.js:183</key>
+ <key>widget.wdgt/main.js:223</key>
<string>-</string>
+ <key>widget.wdgt/main.js:242</key>
+ <string>-makePhonetic</string>
</dict>
<key>CYLastWindowPosition</key>
<string>{642, 297}</string>
@@ -23,8 +25,8 @@
<integer>0</integer>
<key>sizes</key>
<array>
- <string>{{0, 0}, {1191, 483}}</string>
- <string>{{0, 493}, {1191, 284}}</string>
+ <string>{{0, 0}, {1035, 326}}</string>
+ <string>{{0, 336}, {1035, 284}}</string>
</array>
</dict>
<key>ContentViewType</key>
@@ -38,7 +40,7 @@
<key>Save</key>
<true/>
<key>SavePath</key>
- <string>/Users/gopal_v/Documents/Projects/Phonetic</string>
+ <string>/Users/gopal_v/src/Phonetic</string>
<key>enableSimulation</key>
<true/>
<key>simulatedHost</key>
@@ -52,12 +54,12 @@
<integer>0</integer>
<key>sizes</key>
<array>
- <string>{{0, 0}, {244, 798}}</string>
- <string>{{245, 0}, {1192, 798}}</string>
+ <string>{{0, 0}, {244, 641}}</string>
+ <string>{{245, 0}, {1036, 641}}</string>
</array>
</dict>
<key>MainWindowFrame</key>
- <string>4 59 1436 819 0 0 1440 878 </string>
+ <string>0 116 1280 662 0 0 1280 778 </string>
<key>NavigatorSplitViewGeometry</key>
<dict>
<key>ContentSplitViewConfig</key>
@@ -68,8 +70,8 @@
<integer>0</integer>
<key>sizes</key>
<array>
- <string>{{0, 0}, {246, 404}}</string>
- <string>{{0, 414}, {246, 363}}</string>
+ <string>{{0, 0}, {246, 320}}</string>
+ <string>{{0, 330}, {246, 290}}</string>
</array>
</dict>
<key>Widget</key>
@@ -131,7 +133,7 @@
</array>
<key>Visible StackLayout Views</key>
<array>
- <string>front</string>
+ <string>back</string>
</array>
</dict>
</dict>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -13,8 +13,10 @@ var dashcodePartSpecs = {
"orText": { "text": "OR", "view": "DC.Text" },
"phoneticList": { "autoHideScrollbars": true, "creationFunction": "CreateScrollArea", "hasVerticalScrollbar": true, "scrollbarDivSize": 18, "scrollbarMargin": 6, "spacing": 4 },
"rights": { "text": "All rights reserved.", "view": "DC.Text" },
+ "text": { "text": "Phonetic:", "view": "DC.Text" },
"whatsthis": { "text": "What's this?", "view": "DC.Text" }
};
+
@@ -95,10 +95,10 @@ body {
margin-top: 0px;
top: 148px;
height: 201px;
- border-top-left-radius: 0px 0px;
- border-top-right-radius: 0px 0px;
- border-bottom-left-radius: 0px 0px;
- border-bottom-right-radius: 0px 0px;
+ border-top-left-radius: 0px;
+ border-top-right-radius: 0px;
+ border-bottom-left-radius: 0px;
+ border-bottom-right-radius: 0px;
border-width: 1px !important;
border-style: inset;
font-size: 14pt;
@@ -164,11 +164,11 @@ body {
margin-top: 0px;
font-size: 8pt;
color: rgb(255, 255, 255);
- left: 277px;
- top: 47px;
- right: 37px;
+ top: 39px;
+ left: 264px;
+ right: 50px;
width: auto;
- bottom: 317px;
+ bottom: 325px;
height: auto;
}
@@ -185,9 +185,9 @@ body {
bottom: auto;
margin-top: 0px;
width: 276px;
- top: 124px;
left: 58px;
- height: 157px;
+ height: 95px;
+ top: 121px;
}
#infobutton {
@@ -219,3 +219,32 @@ body {
.selected #rights {
color: white;
}
+
+#phoneticOption {
+ height: 18px;
+ position: absolute;
+ right: auto;
+ bottom: auto;
+ margin-top: 0px;
+ top: 252px;
+ left: 124px;
+ width: 217px;
+}
+
+#text {
+ font-size: 13px;
+ font-family: 'Lucida Grande', Arial, sans-serif;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ position: absolute;
+ margin-top: 0px;
+ top: 252px;
+ left: 58px;
+ width: auto;
+ height: auto;
+ color: rgb(255, 255, 255);
+}
+
+.selected #text {
+ color: white;
+}
@@ -35,6 +35,11 @@
You should have received a copy of the GNU General Public License along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</textarea>
<div id="rights" apple-part="com.apple.Dashcode.part.text" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" apple-style="part-height-dependent: true;"></div>
+ <select id="phoneticOption" apple-part="com.apple.Dashcode.part.backpopupbutton" apple-group="popup">
+ <option class="apple-hidden" id="option2" value="nato">NATO Phonetic</option>
+ <option class="apple-hidden" value="lapd">LAPD Phonetic</option>
+ </select>
+ <div id="text" apple-part="com.apple.Dashcode.part.text" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" apple-style="part-height-dependent: true;part-width-dependent: true;"></div>
</div>
</body>
</html>
@@ -19,42 +19,82 @@
*/
var phoneticList = {
- a: "Alpha (AL-FAH)",
- b: "Bravo (BRAH-VOH)",
- c: "Charlie (CHAR-LEE)",
- d: "Delta (DELL-TAH)",
- e: "Echo (ECK-OH)",
- f: "Foxtrot (FOKS-TROT)",
- g: "Golf (GOLF)",
- h: "Hotel (HOH-TEL)",
- i: "India (IN-DEE-AH)",
- j: "Juliet (JEW-LEE-ETT)",
- k: "Kilo (KEY-LOH)",
- l: "Lima (LEE-MAH)",
- m: "Mike (MIKE)",
- n: "November (NO-VEM-BER)",
- o: "Oscar (OSS-CAR)",
- p: "Papa (PAH-PAH)",
- q: "Quebec (KEH-BECK)",
- r: "Romeo (ROW-ME-OH)",
- s: "Sierra (SEE-AIR-RAH)",
- t: "Tango (TANG-GO)",
- u: "Uniform (YOU-NEE-FORM)",
- v: "Victor (VIK-TAH)",
- w: "Whiskey (WISS-KEY)",
- x: "X-Ray (ECKS-RAY)",
- y: "Yankee (YAN-KEE)",
- z: "Zulu (ZOO-LOO)",
- 1: "One (WON)",
- 2: "Two (TOO)",
- 3: "Three (TREE)",
- 4: "Four (FOW-ER)",
- 5: "Five (FIFE)",
- 6: "Six (SIX)",
- 7: "Seven (SEV-EN)",
- 8: "Eight (AIT)",
- 9: "Nine (NI-NEH)",
- 0: "Zero (ZEE-ROW)"
+ nato: {
+ a: "Alpha (AL-FAH)",
+ b: "Bravo (BRAH-VOH)",
+ c: "Charlie (CHAR-LEE)",
+ d: "Delta (DELL-TAH)",
+ e: "Echo (ECK-OH)",
+ f: "Foxtrot (FOKS-TROT)",
+ g: "Golf (GOLF)",
+ h: "Hotel (HOH-TEL)",
+ i: "India (IN-DEE-AH)",
+ j: "Juliet (JEW-LEE-ETT)",
+ k: "Kilo (KEY-LOH)",
+ l: "Lima (LEE-MAH)",
+ m: "Mike (MIKE)",
+ n: "November (NO-VEM-BER)",
+ o: "Oscar (OSS-CAR)",
+ p: "Papa (PAH-PAH)",
+ q: "Quebec (KEH-BECK)",
+ r: "Romeo (ROW-ME-OH)",
+ s: "Sierra (SEE-AIR-RAH)",
+ t: "Tango (TANG-GO)",
+ u: "Uniform (YOU-NEE-FORM)",
+ v: "Victor (VIK-TAH)",
+ w: "Whiskey (WISS-KEY)",
+ x: "X-Ray (ECKS-RAY)",
+ y: "Yankee (YAN-KEE)",
+ z: "Zulu (ZOO-LOO)",
+ 1: "One (WON)",
+ 2: "Two (TOO)",
+ 3: "Three (TREE)",
+ 4: "Four (FOW-ER)",
+ 5: "Five (FIFE)",
+ 6: "Six (SIX)",
+ 7: "Seven (SEV-EN)",
+ 8: "Eight (AIT)",
+ 9: "Nine (NI-NEH)",
+ 0: "Zero (ZEE-ROW)"
+ },
+ lapd: {
+ a: "Adam (ADAM)",
+ b: "Boy (BOY)",
+ c: "Charles (CHARLES)",
+ d: "David (DAVID)",
+ e: "Edward (ED-WARD)",
+ f: "Frank (FRANK)",
+ g: "George (GEORGE)",
+ h: "Henry (HEN-RY)",
+ i: "Ida (I-DAH)",
+ j: "John (JOHN)",
+ k: "King (KING)",
+ l: "Lincoln (LIN-KUN)",
+ m: "Mary (MAY-REE)",
+ n: "Norah (NO-RAH)",
+ o: "Ocean (O-SHAN)",
+ p: "Paul (PAOL)",
+ q: "Queen (KWEEN)",
+ r: "Robert (ROB-ERT)",
+ s: "Sam (SAAM)",
+ t: "Tom (TOM)",
+ u: "Union (YOU-NEE-AN)",
+ v: "Victor (VIK-TAH)",
+ w: "William (WIL-I-AM)",
+ x: "X-Ray (ECKS-RAY)",
+ y: "Young (YAN-G)",
+ z: "Zebra (ZEE-BRA)",
+ 1: "One (WON)",
+ 2: "Two (TOO)",
+ 3: "Three (TREE)",
+ 4: "Four (FOW-ER)",
+ 5: "Five (FIFE)",
+ 6: "Six (SIX)",
+ 7: "Seven (SEV-EN)",
+ 8: "Eight (AIT)",
+ 9: "Nine (NI-NEH)",
+ 0: "Zero (ZEE-ROW)"
+ }
};
/*
@@ -195,14 +235,17 @@ function openWhatsThis(event) {
*/
function makePhonetic(input) {
var list = document.getElementById("phoneticList"),
+ phonetic = document.getElementById("phoneticOption"),
text = [],
- c, i, n;
+ c, i, n, phonetic;
+ phonetic = phonetic.value;
+
// How to handle non-ASCII?
for (i = 0, n = input.length; i < n; ++i) {
c = input.charAt(i).toLowerCase();
- if (c in phoneticList) {
- text.push(phoneticList[c]);
+ if (c in phoneticList[phonetic]) {
+ text.push(phoneticList[phonetic][c]);
} else {
text.push(c);
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -95,10 +95,10 @@ body {
margin-top: 0px;
top: 148px;
height: 201px;
- border-top-left-radius: 0px 0px;
- border-top-right-radius: 0px 0px;
- border-bottom-left-radius: 0px 0px;
- border-bottom-right-radius: 0px 0px;
+ border-top-left-radius: 0px;
+ border-top-right-radius: 0px;
+ border-bottom-left-radius: 0px;
+ border-bottom-right-radius: 0px;
border-width: 1px !important;
border-style: inset;
font-size: 14pt;
@@ -164,11 +164,11 @@ body {
margin-top: 0px;
font-size: 8pt;
color: rgb(255, 255, 255);
- left: 277px;
- top: 47px;
- right: 37px;
+ top: 39px;
+ left: 264px;
+ right: 50px;
width: auto;
- bottom: 317px;
+ bottom: 325px;
height: auto;
}
@@ -185,9 +185,9 @@ body {
bottom: auto;
margin-top: 0px;
width: 276px;
- top: 124px;
left: 58px;
- height: 157px;
+ height: 95px;
+ top: 121px;
}
#infobutton {
@@ -219,3 +219,32 @@ body {
.selected #rights {
color: white;
}
+
+#phoneticOption {
+ height: 18px;
+ position: absolute;
+ right: auto;
+ bottom: auto;
+ margin-top: 0px;
+ top: 252px;
+ left: 124px;
+ width: 217px;
+}
+
+#text {
+ font-size: 13px;
+ font-family: 'Lucida Grande', Arial, sans-serif;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ position: absolute;
+ margin-top: 0px;
+ top: 252px;
+ left: 58px;
+ width: auto;
+ height: auto;
+ color: rgb(255, 255, 255);
+}
+
+.selected #text {
+ color: white;
+}
Oops, something went wrong. Retry.

0 comments on commit 69d82ef

Please sign in to comment.