diff --git a/img/exit-13B-halawaheights-stadium.png b/img/exit-13B-halawaheights-stadium.png new file mode 100644 index 0000000..b254860 Binary files /dev/null and b/img/exit-13B-halawaheights-stadium.png differ diff --git a/img/exit-172-priest-drive.png b/img/exit-172-priest-drive.png new file mode 100644 index 0000000..03df0b8 Binary files /dev/null and b/img/exit-172-priest-drive.png differ diff --git a/img/exit-19-ny25-woodhavenboulevard-queensboulevard.png b/img/exit-19-ny25-woodhavenboulevard-queensboulevard.png new file mode 100644 index 0000000..8e3bb02 Binary files /dev/null and b/img/exit-19-ny25-woodhavenboulevard-queensboulevard.png differ diff --git a/img/exit-3-d19-maisons-alfort-alfortville-stmaurice.png b/img/exit-3-d19-maisons-alfort-alfortville-stmaurice.png new file mode 100644 index 0000000..d4dfaaf Binary files /dev/null and b/img/exit-3-d19-maisons-alfort-alfortville-stmaurice.png differ diff --git a/img/exit-5-i280-i680.png b/img/exit-5-i280-i680.png new file mode 100644 index 0000000..cd83067 Binary files /dev/null and b/img/exit-5-i280-i680.png differ diff --git a/img/exit-h1-east-airport.png b/img/exit-h1-east-airport.png new file mode 100644 index 0000000..9a41c14 Binary files /dev/null and b/img/exit-h1-east-airport.png differ diff --git a/img/exit-i278-brooklynqueensexpressway,48street-brooklyn.png b/img/exit-i278-brooklynqueensexpressway,48street-brooklyn.png new file mode 100644 index 0000000..6595554 Binary files /dev/null and b/img/exit-i278-brooklynqueensexpressway,48street-brooklyn.png differ diff --git a/index.html b/index.html index 018c6d0..6cb74a4 100644 --- a/index.html +++ b/index.html @@ -36,6 +36,22 @@ background: transparent; color: white; } + .tranString span.stringTxt { + line-height: 1.49em; + font-weight: normal; + } + .tranString .contextPhoto { + height: 1.8em; + margin-right: 0.5em; + border: 1px solid RGBA(13,110,253,1); + cursor: help; + } + .tranString .contextPhoto.enlarged { + height: 150px; + float: left; + position: relative; + z-index: 999; + } .buttonwrapper { display: inline-block; width: 2em; @@ -118,8 +134,8 @@ -
+
@@ -390,18 +406,40 @@ out += ""+imageAlt+""; } - var valueEl = document.createElement("input"); - valueEl.setAttribute("type", "text"); - valueEl.setAttribute("class", classes); - valueEl.setAttribute("size", size); - valueEl.setAttribute("readonly", true); - valueEl.setAttribute("data-key", key); - valueEl.setAttribute("title", english); - valueEl.setAttribute("value", value); - out += valueEl.outerHTML; + if (value.includes("I 278")) { + out += ""; + } else if (value.includes("H1 East")) { + out += ""; + } else if (value.includes("3: D19")) { + out += ""; + } else if (value.includes("5: I 280")) { + out += ""; + } else if (value.includes("19: NY 25")) { + out += ""; + } else if (value.includes("13B: Halawa")) { + out += ""; + } else if (value.includes("172: Priest")) { + out += ""; + } if (editable) { + var valueEl = document.createElement("input"); + valueEl.setAttribute("type", "text"); + valueEl.setAttribute("class", classes); + valueEl.setAttribute("size", size); + valueEl.setAttribute("readonly", true); + valueEl.setAttribute("data-key", key); + valueEl.setAttribute("title", english); + valueEl.setAttribute("value", value); + out += valueEl.outerHTML; out += ""; + } else { + var valueEl = document.createElement("span"); + valueEl.setAttribute("class", classes); + valueEl.setAttribute("data-key", key); + valueEl.setAttribute("title", english); + valueEl.innerText = value; + out += valueEl.outerHTML; } out += ""; @@ -434,6 +472,12 @@ function loadEventHandlers(){ + $(".contextPhoto").hover(function(){ + $(this).addClass("enlarged"); + }, function(){ + $(this).removeClass("enlarged"); + }); + $(".tranString").hover(function(){ let editBtn = $(this).children(".buttonwrapper").find(".editbutton"); if (editBtn.prop("disabled") == false) { @@ -632,15 +676,17 @@ "Main Street", "Broadway Avenue", "3rd Street", - "Highway 99" + "Highway 99", + "H1 East, Airport", + "I 278 West, Brooklyn-Queens Expressway, 48th Street, Brooklyn" ]; const nextExits = [ - "35A: CA 1, Pacific Coast Highway, Los Angeles", - "13: CA 22, Los Angeles", - "243: I 10, Eisenhower Freeway", - "19: Downtown", - "15: M4, Queen's Expressway; London" + "3: D19, D6, Maisons Alfort, Alfortville, Saint Maurice", + "19: NY 25, Woodhaven Boulevard, Queens Boulevard", + "13B: Halawa Heights, Stadium", + "5: I 280, I 680", + "172: Priest Drive" ]; // dist_direction_onto_street @@ -715,7 +761,7 @@ var fmtObj = { dir: dir, dist: dist, - nextStr: ((i+1) % nextStreets.length) + nextStr: nextStreets[(i+1) % nextStreets.length] }; var fmtKey = btoa(JSON.stringify(fmtObj)); window.fmtSoundData[fmtKey] = fmtObj; @@ -736,7 +782,7 @@ streetFmt = streetFmt.replace("%1$s", buildTranStringInput(dist, data[dist], "text-bg-warning")); streetFmt = streetFmt.replace("%2$s", streetDir); streetFmt = streetFmt.replace("%3$s", buildTranStringInput('onto', data['onto'], "text-bg-info")); - streetFmt = streetFmt.replace("%4$s", buildTranStringInput("", nextStreets[(i+1) % nextStreets.length], "text-bg-secondary", false)); // non-editable + streetFmt = streetFmt.replace("%4$s", buildTranStringInput("", fmtObj.nextStr, "text-bg-secondary", false)); // non-editable streetFmt = streetFmt.replace("%5$s", buildTranStringInput(dir+"_street_verb", streetDirVerb, "text-bg-danger")); //optional $("#out-e").append(inputPre + @@ -756,7 +802,7 @@ // var fmtObj = { dir: dir, - dist: ((i+1) % distance.length), + dist: dist, nextStr: nextStr }; var fmtKey = btoa(JSON.stringify(fmtObj)); @@ -806,7 +852,7 @@ var fmtObj = { dir: dir, dist: dist, - nextStr: ((i+1) % nextStreets.length) + nextStr: nextStreets[(i+1) % nextStreets.length] }; var fmtKey = btoa(JSON.stringify(fmtObj)); window.fmtSoundData[fmtKey] = fmtObj; @@ -827,7 +873,7 @@ streetFmt = streetFmt.replace("%1$s", buildTranStringInput(dist, data[dist], "text-bg-warning")); streetFmt = streetFmt.replace("%2$s", streetDir); streetFmt = streetFmt.replace("%3$s", buildTranStringInput('onto', data['onto'], "text-bg-info")); - streetFmt = streetFmt.replace("%4$s", buildTranStringInput("", nextStreets[(i+1) % nextStreets.length], "text-bg-secondary", false)); // non-editable + streetFmt = streetFmt.replace("%4$s", buildTranStringInput("", fmtObj.nextStr, "text-bg-secondary", false)); // non-editable streetFmt = streetFmt.replace("%5$s", buildTranStringInput(dir+"_street_verb", streetDirVerb, "text-bg-danger")); //optional $("#out-g").append(inputPre + @@ -877,6 +923,7 @@ var dir = fmtObj.dir; var dist = fmtObj.dist; + var onto = fmtObj.onto; var nextStr = fmtObj.nextStr; // @@ -898,11 +945,14 @@ streetFmt = streetFmt.replace("%1$s", buildTranStringInput(dist, window.modifiedSoundData[dist], "text-bg-warning")); streetFmt = streetFmt.replace("%2$s", streetDir); - streetFmt = streetFmt.replace("%3$s", buildTranStringInput('onto', window.modifiedSoundData['onto'], "text-bg-info")); - streetFmt = streetFmt.replace("%4$s", buildTranStringInput("", nextStreets[nextStr], "text-bg-secondary", false)); // non-editable + streetFmt = streetFmt.replace("%3$s", buildTranStringInput('onto', window.modifiedSoundData[onto], "text-bg-info")); + streetFmt = streetFmt.replace("%4$s", buildTranStringInput("", nextStr, "text-bg-secondary", false)); // non-editable streetFmt = streetFmt.replace("%5$s", buildTranStringInput(dir+"_street_verb", streetDirVerb, "text-bg-danger")); //optional - $(o).parent().parent().html(streetFmt); + var oldEl = $(o).parent(); + var parent = $(oldEl).parent(); + oldEl.remove(); // remove ourselves + parent.prepend(streetFmt); // prepend new html }); $("#submitpopup textarea").text("Translation change request:\n```\n"+ @@ -920,7 +970,7 @@ } function loadLocale(){ - var commitHash = "1bf45f09395f67c9c5ebaa0c1d4ab7a52889bc50"; + var commitHash = "a8611eb2a09e04a37b9bfd245bf8394d0ab818ee"; var sourceUrl = "https://raw.githubusercontent.com/organicmaps/organicmaps/"+commitHash+"/data/strings/sound.txt"; $("#sourceUrl").attr("href", sourceUrl).text("sound.txt");