Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Fz = {
- 0: {
- 0: "LFTLF",
- 1: "LF/TLF",
- },
- 1: {
- 0: "LF",
- 1: "LF",
- },
- 2: {
- 0: "TLF",
- 1: "TLF",
- },
- 3: {
- 0: "ELW1",
- 1: "ELW 1",
- },
- 4: {
- 0: "ELW2",
- 1: "ELW 2",
- },
- 5: {
- 0: "DLK",
- 1: "DLK",
- },
- 6: {
- 0: "HLF",
- 1: "HLF",
- },
- 7: {
- 0: "RWHLF",
- 1: "RW/HLF",
- },
- 8: {
- 0: "RW",
- 1: "RW",
- },
- 9: {
- 0: "ABR",
- 1: "AB-Rüst",
- },
- 10: {
- 0: "ABRRWHLF",
- 1: "AB-Rüst/RW/HLF",
- },
- 11: {
- 0: "GWAABA",
- 1: "GW-Atem/AB-Atem",
- },
- 12: {
- 0: "ABA",
- 1: "AB-Atem",
- },
- 13: {
- 0: "GWA",
- 1: "GW-Atem",
- },
- 14: {
- 0: "GWOELABOEL",
- 1: "GW-Öl/AB-Öl",
- },
- 15: {
- 0: "ABOEL",
- 1: "AB-Öl",
- },
- 16: {
- 0: "GWOEL",
- 1: "GW-Öl",
- },
- 17: {
- 0: "SCHABSCH",
- 1: "Schlauchwagen/Ab-Schlauch",
- },
- 18: {
- 0: "SCH",
- 1: "Schlauchwagen",
- },
- 19: {
- 0: "ABSCH",
- 1: "AB-Schlauch",
- },
- 20: {
- 0: "GWMESS",
- 1: "GW-Messtechnik",
- },
- 21: {
- 0: "GWG",
- 1: "GW-Gefahrgut",
- },
- 22: {
- 0: "GWH",
- 1: "GW-Höhenrettung",
- },
- 23: {
- 0: "DEKONABDEKON",
- 1: "Dekon-P/AB-Dekon-P",
- },
- 24: {
- 0: "DEKON",
- 1: "Dekon-P",
- },
- 25: {
- 0: "ABDEKON",
- 1: "AB-Dekn-P",
- },
- 26: {
- 0: "MTW",
- 1: "MTW",
- },
- 27: {
- 0: "FWK",
- 1: "Feuerwehrkran",
- },
- 28: {
- 0: "FUSTW",
- 1: "Funkstreifenwagen",
- }
- }
- var aaos = {
- feuerwehr: {
- LFTLF1: 1,
- LFTLF2: 2,
- LFTLF4: 4,
- LFTLF8: 8,
- LFTLF16: 16,
- LF1: 1,
- LF2: 2,
- LF4: 4,
- LF8: 8,
- LF16: 16,
- TLF1: 1,
- TLF2: 2,
- TLF4: 4,
- TLF8: 8,
- TLF16: 16,
- },
- polizei: {
- FUSTW1: 1,
- FUSTW2: 2,
- FUSTW4: 4,
- FUSTW8: 8,
- FUSTW16: 16,
- }
- };
- $("label.string.required").append(`
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- .modal{
- display: none;
- position: fixed;
- z-index: 1;
- padding-top: 50px;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- overflow: scroll;
- background-color: rgb(0,0,0);
- background-color: rgba(0,0,0,0.4);
- }
- .in_modal{
- text-align: left;
- }
- .modal-content{
- background-color: #fefefe;
- margin: auto;
- padding: 20px;
- border: 1px solid #888;
- width: 80%;
- }
- .close{
- color: #aaaaaa;
- float: right;
- font-size: 28px;
- font-weight: bold;
- }
- .close:hover,.close:focus{
- color: #000;
- text-decoration: none;
- cursor: pointer;
- }
- option.feuerwehr{
- background-color: rgb(255,0,0);
- }
- option.polizei{
- background-color: rgb(0,255,0);
- }
- option.thw{
- background-color: rgb(0,0,255);
- }
- </style>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- </head>
- <body>
- <input class="btn btn btn-success" name="fill" value="Vorgefertigte Wählen" id="fill">
- <div id="myModal" class="modal">
- <div class="modal-content">
- <span class="close">×</span>
- <p class="in_modal">Bitte gewünschte AAO wählen</p>
- <p class="in_modal">
- <select id="selection">
- <option class="feuerwehr" value="LFTLF1" id="LFTLF1">LF/TLF (1)</option>
- <option class="feuerwehr" value="LFTLF2" id="LFTLF2">LF/TLF (2)</option>
- <option class="feuerwehr" value="LFTLF4" id="LFTLF4">LF/TLF (4)</option>
- <option class="feuerwehr" value="LFTLF8" id="LFTLF8">LF/TLF (8)</option>
- <option class="feuerwehr" value="LFTLF16" id="LFTLF16">LF/TLF (16)</option>
- <option class="feuerwehr" value="LF1" id="LF1">LF (1)</option>
- <option class="feuerwehr" value="LF2" id="LF2">LF (2)</option>
- <option class="feuerwehr" value="LF4" id="LF4">LF (4)</option>
- <option class="feuerwehr" value="LF8" id="LF8">LF (8)</option>
- <option class="feuerwehr" value="LF16" id="LF16">LF (16)</option>
- <option class="feuerwehr" value="TLF1" id="TLF1">TLF (1)</option>
- <option class="feuerwehr" value="TLF2" id="TLF2">TLF (2)</option>
- <option class="feuerwehr" value="TLF4" id="TLF4">TLF (4)</option>
- <option class="feuerwehr" value="TLF8" id="TLF8">TLF (8)</option>
- <option class="feuerwehr" value="TLF16" id="TLF16">TLF (16)</option>
- <option class="polizei" value="Funkstreifenwagen1" id="Funkstreifenwagen1">Funkstreifenwagen (1)</option>
- <option class="polizei" value="Funkstreifenwagen2" id="Funkstreifenwagen2">Funkstreifenwagen (2)</option>
- <option class="polizei" value="Funkstreifenwagen4" id="Funkstreifenwagen4">Funkstreifenwagen (4)</option>
- <option class="polizei" value="Funkstreifenwagen8" id="Funkstreifenwagen8">Funkstreifenwagen (8)</option>
- <option class="polizei" value="Funkstreifenwagen16" id="Funkstreifenwagen16">Funkstreifenwagen (16)</option>
- </select>
- <input class="btn btn btn-success" name="show_selection" value="gewählte Fz anschauen" id="show_selection">
- </p>
- <div id="Ansicht"></div>
- <p class="in_modal">
- <input class="btn btn btn-success" name="fuellen" value="Eintragen" id="fuellen" style="visibility: hidden;">
- </p>
- </div>
- </div>
- <script>
- try{
- var modal = document.getElementById('myModal');
- var btn_fill = document.getElementById("fill");
- var span = document.getElementsByClassName("close")[0];
- btn_fill.onclick = function(){
- modal.style.display = "block";
- };
- span.onclick = function(){
- modal.style.display = "none";
- };
- window.onclick = function(event){
- if (event.target == modal){
- modal.style.display = "none";
- }
- };
- var btn_show = document.getElementById("show_selection");
- btn_show.onclick = function(){
- var aao = document.getElementById("selection").value;
- var hiorg = document.getElementById(aao).className;
- var Fzs = "";
- if (hiorg!="sonstige"){
- for (var i=0; i<countInObject(Fz); i++){
- if (aao.substr(0,Fz[i][0].length)==Fz[i][0]){
- Fzs+=Fz[i][1]+": "+aaos[hiorg][aao]+"<br>";
- }
- }
- };
- document.getElementById("Ansicht").innerHTML = Fzs;
- document.getElementById("fuellen").style="visibility: visible;";
- };
- function countInObject(obj){
- var count = 0;
- for(var key in obj) if(obj.hasOwnProperty(key)) count++;return count;
- };
- }
- catch(error){
- console.log(error);
- }
- </script>
- </body>
- </html>
- `);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement