Advertisement
Guest User

Untitled

a guest
Jul 14th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 62.43 KB | None | 0 0
  1. Hauptseite HTML:
  2. <html>
  3.  
  4. <head>
  5. <link href="css/lato.css" rel="stylesheet" type="text/css">
  6. <link href="css/base.css" rel="stylesheet" type="text/css">
  7. <link href="font-awesome-4.5.0/css/font-awesome.min.css" type="text/css" rel="stylesheet">
  8.  
  9. <script src="lib/jquery-2.2.0.min.js"></script>
  10. <script src="js/formular.js?v=3"></script>
  11.  
  12. <meta charset="utf-8">
  13. </head>
  14.  
  15. <body>
  16.  
  17. <div class = "Sitebody">
  18.  
  19.  
  20. <div class="Formularbox">
  21. <div class="alertBox" id="Alertbox">
  22. <div class="alertBoxFront" id="alertBoxFront">
  23. <div class="alertTop" id="alertTop">
  24. <div class="closealert" id="closealert" onclick="window.formular.service.closealertError()"><i class="fa fa-times-circle" ></i></div>
  25. <div class="alertType" id="alertType"></div>
  26. </div>
  27. <div class="alertBot" id="alertBot">
  28. <i class="" id="alertTypeIcon"></i>
  29. <div class="alertText" id="alertText"></div>
  30. </div>
  31. </div>
  32. </div>
  33.  
  34. <div class="Formularsite" id="Formularsite1">
  35. <div class="Formularsiteheader"><span class="Headertitle">Anmeldung</span><div class="Schulbanner"></div><div class="Schullogo"></div></div>
  36.  
  37. <p class="InputTag" id="TagVorname">Vorname</p>
  38. <input type="text" class="ForminputSite1" id="Vorname">
  39. <p class="InputTag">Nachname</p>
  40. <input type="text" class="ForminputSite1" id="Nachname">
  41. <p class="InputTag">Passwort</p>
  42. <input type="password" class="ForminputSite1" id="Passwort">
  43.  
  44. <p class="InputTag">Klasse</p>
  45. <select class="ClassSelect" id="ClassSelect1">
  46. <option value="1">TGM 11/1</option>
  47. <option value="2">TGM 11/2</option>
  48. <option value="3">TGTM 11/3</option>
  49. <option value="4">TGG 11/4</option>
  50. <option value="5">TGI 11/5</option>
  51. </select>
  52.  
  53. <p class="InputTag">Geburtsdatum</p>
  54. <input type="text" class="date" placeholder="DD" onfocus="this.placeholder = &#39;&#39;" onblur="this.placeholder = &#39;DD&#39;" maxlength="2">
  55. <input type="text" class="date" placeholder="MM" onfocus="this.placeholder = &#39;&#39;" onblur="this.placeholder = &#39;MM&#39;" maxlength="2">
  56. <input type="text" class="date" placeholder="JJJJ" onfocus="this.placeholder = &#39;&#39;" onblur="this.placeholder = &#39;JJJJ&#39;" maxlength="4">
  57.  
  58. <p class="InputTag">Religionsuntericht 11.Klasse</p>
  59. <select class="ClassSelect" id="ClassSelect2" onchange="window.formular.Onload.Fillselect('ClassSelect3')">
  60. <option value="7">Religion Katholisch</option>
  61. <option value="8">Religion Evangelisch</option>
  62. <option value="9">Ethik</option>
  63. </select>
  64. <select class="ClassSelect" id="ClassSelect3">
  65. </select>
  66. <p class="InputTag">Fremdsprache</p>
  67. <select class="ClassSelect" id="ClassSelect4">
  68. <option value="1">keine 2.Fremdsprache</option>
  69. <option value="2">Franzoesisch B</option>
  70. <option value="3">Spanisch B</option>
  71.  
  72. </select>
  73. <select class="ClassSelect" id="ClassSelect5">
  74. <option value="1">keine Franzoesisch A</option>
  75. <option value="2">Franzoesisch A</option>
  76. </select>
  77.  
  78. <button class="NextButton" onclick="window.formular.communication.authorizeUser();">Anmelden</button>
  79. </div>
  80.  
  81. <div class="Formularsite" id="Formularsite2">
  82. <div class="Formularsiteheader"><span class="Headertitle">Pflichtfächer</span><div class="Schulbanner"></div><div class="Schullogo"></div></div>
  83. <table class="Fachbox" id="Pflichtfachbox">
  84. <tr id="tablehead1">
  85. <td>Fach</td>
  86. <td>Wochenstunden</td>
  87. <td>JGS 1.1</td>
  88. <td>JGS 1.2</td>
  89. <td>JGS 2.1</td>
  90. <td>JGS 2.2</td>
  91. </tr>
  92. </table>
  93. <i class="infoButton fa fa-info-circle fa-4x" onclick="window.formular.service.alertInfo(2)"></i>
  94. <button class="NextButton" onclick="window.formular.buttons.onSave(2);">Weiter</button>
  95. </div>
  96.  
  97. <div class="Formularsite" id="Formularsite3">
  98. <div class="Formularsiteheader"><span class="Headertitle">Pflichtwahlfächer</span><div class="Schulbanner"></div><div class="Schullogo"></div></div>
  99. <table class="Fachbox" id="Pflichtwahlfachbox">
  100. <tr id="tablehead2">
  101. <td>Fach</td>
  102. <td>Wochenstunden</td>
  103. <td>JGS 1.1</td>
  104. <td>JGS 1.2</td>
  105. <td>JGS 2.1</td>
  106. <td>JGS 2.2</td>
  107. </tr>
  108. </table>
  109. <i class="infoButton fa fa-info-circle fa-4x" onclick="window.formular.service.alertInfo(3)"></i>
  110. <button class="NextButton" onclick="window.formular.buttons.onSave(3);">Weiter</button>
  111. </div>
  112.  
  113. <div class="Formularsite" id="Formularsite4">
  114. <div class="Formularsiteheader"><span class="Headertitle">Wahlfächer</span><div class="Schulbanner"></div><div class="Schullogo"></div></div>
  115. <table class="Fachbox" id="Wahlfachbox">
  116. <tr id="tablehead2">
  117. <td>Fach</td>
  118. <td>Wochenstunden</td>
  119. <td>JGS 1.1</td>
  120. <td>JGS 1.2</td>
  121. <td>JGS 2.1</td>
  122. <td>JGS 2.2</td>
  123. </tr>
  124. </table>
  125. <i class="infoButton fa fa-info-circle fa-4x" onclick="window.formular.service.alertInfo(4)"></i>
  126. <button class="NextButton" onclick="window.formular.buttons.onSave(4);">Speichern &amp; Weiter</button>
  127. </div>
  128.  
  129. <div class="Formularsite" id="Formularsite5">
  130. <div class="Formularsiteheader"><span class="Headertitle">Übersicht</span><div class="Schulbanner"></div><div class="Schullogo"></div></div>
  131. <table class="Fachbox" id="Tablecopy">
  132.  
  133. </table>
  134. <i class="infoButton fa fa-info-circle fa-4x" onclick="window.formular.service.alertInfo(5)"></i>
  135. <button class="NextButton" onclick="window.formular.buttons.onSave(5);">Exceltabelle downloaden</button>
  136.  
  137.  
  138. </div>
  139.  
  140. <div class="Formulartrack">
  141. <button class="TrackButton" id="TrackButton1" onclick="window.formular.navigation.nextSiteTrack(1)">1.Anmeldung</button>
  142. <button class="TrackButton" id="TrackButton2" onclick="window.formular.navigation.nextSiteTrack(2)">2.Pflichtfächer</button>
  143. <button class="TrackButton" id="TrackButton3" onclick="window.formular.navigation.nextSiteTrack(3)">3.Pflichtwahlfächer</button>
  144. <button class="TrackButton" id="TrackButton4" onclick="window.formular.navigation.nextSiteTrack(4)">4.Wahlfächer</button>
  145. <button class="TrackButton" id="TrackButton5" onclick="window.formular.navigation.nextSiteTrack(5)">5.Übersicht</button>
  146. </div>
  147.  
  148. </div>
  149.  
  150. </div>
  151. </body>
  152. </html>
  153.  
  154. Hauptseite CSS:
  155. html{font-family: 'Lato', sans-serif !important}
  156.  
  157. /* HTML5 display-role reset for older browsers */
  158. article, aside, details, figcaption, figure,
  159. footer, header, hgroup, menu, nav, section {display: block;}
  160. body {line-height: 1;padding:0;margin:0;width:100%;height:100%;background-image:url(../background.jpg);display:table;}
  161. .Formularbox{}
  162. ol, ul {list-style: none;}
  163. blockquote, q {quotes: none;}
  164. blockquote:before, blockquote:after,q:before, q:after {content: '';content: none;}
  165. table {border-collapse: collapse;border-spacing: 0;}
  166.  
  167. input:focus{box-shadow:0 0 5px #BD271D;outline: none !important;border:1px solid #BD271D;}
  168. /*Sitemarkup*/
  169.  
  170. .Siteheader{width:1200px;height:10px;margin-bottom:40px; margin-left: auto;margin-right: auto;background-color:#2D3945;}
  171.  
  172. /* Formular */
  173. .Formularbox{background-color:transparent; width:1200px;height:900px;position:relative;padding:0;bottom:0;margin-left: auto;margin-right: auto;margin-top:30px;border:solid 8px #2D3945;border-radius:5px;}
  174. .Formulartrack{background-color:#2D3945;width:1200px; height:80px;border-top: 8px solid #2D3945; position: absolute;bottom: 0;vertical-align: middle;line-height:80px;text-align: center;box-sizing: border-box;z-index:5;}
  175.  
  176. .Formularsite{background-color:#F8F8F8;width:1200px;height:820px;position:absolute;text-align: center;border:none;padding:0;overflow: hidden;}
  177. .Formularsite input{display:block;margin-left: auto;margin-right: auto;}
  178. .Formularsite .date{display: inline-block;width:60px; height: 40px;text-align:center;padding: 0px;}
  179. .Formularsiteheader{width:100%;height:70px;background-color: #2D3945; position:relative;border-bottom: 8px solid #2D3945;line-height: 70px; text-align: center;}
  180. .Headertitle{font-size:40px;color:white;margin-left:270px;}
  181. .Schullogo{height:50px;width:50px;background-image:url(../images/photo.jpg);background-size: 50px 50px;float:right;margin-top:10px;}
  182. .Schulbanner{height:50px;width:205px;background-image:url(../images/logoalternativ.jpg);background-size:205px 50px;float:right;margin-top:10px;}
  183.  
  184. .InputTag{font-size:15px;margin-top:15px;color:#8c8c8c;}
  185. .ForminputSite1 {background-color:white; border:1px solid black;height:50px;width:180px;text-align: center;border-radius:2px;font-size:20px;}
  186. .ForminputSite1:focus{border:1px solid #BD271D;box-shadow:0 0 5px #BD271D; outline: none !important;}
  187.  
  188. #Formularsite1{z-index:5;}
  189. #Formularsite2{z-index:4;}
  190. #Formularsite3{z-index:3;}
  191. #Formularsite4{z-index:2;}
  192. #Formularsite5{z-index:1;overflow-y:scroll;}
  193. .checkBox{color:red;}
  194.  
  195.  
  196. #TagVorname{margin-top:50px;}
  197. .ClassSelect{width:180px;height:30px;font-size:15px;border:1px solid black;display: block;text-align: center; margin-right: auto;margin-left: auto;padding: 0px;}
  198.  
  199. .Fachbox{ margin-left:200px; margin-top:30px;width:800px; min-height:20px;font-size:16px;}
  200. .Fachbox td{padding:8px;}
  201. .TableRow{background-color:#f8f8f8;}
  202.  
  203. #tablefoot1{color:black;}
  204. #tablehead1{background-color:#2D3945;color:white;height:50px;font-size:18px;}
  205. #tablehead2{background-color:#2D3945;color:white;height:50px;font-size:18px;}
  206.  
  207.  
  208. table{border-collapse:collapse;border:5px solid #2D3945;}
  209. table tr{border-bottom:2px solid #2D3945}
  210.  
  211. /* Buttons */
  212.  
  213. button:active{padding:0;}
  214. button:hover{cursor:pointer;}
  215.  
  216. #TrackLine4{border-bottom-right-radius: 20px; border-top-right-radius: 20px;}
  217.  
  218. .NextButton{background-color:#DF392E;height:60px;width:150px;border:0;color:white;border-radius:3px;font-size:15px;position:absolute;bottom:0;right:0;margin-right:20px;margin-bottom:20px;}
  219. .NextButton:hover{background-color:#BD271D}
  220. .TrackButton{background-color:#DF392E;height:40px;width:150px;margin:0;border-radius:0%;color:white;border:0;box-sizing:border-box;text-align: center; vertical-align: middle;color: white;line-height:25px;padding:0;transition:.6s;margin-left:-5px;position:relative;z-index:2;}
  221. .TrackButton:hover{background-color:#BD271D;}
  222. #TrackButton1{}
  223. .infoButton{position:absolute;left:0;bottom:0;margin-left:50px;margin-bottom:10px;color:#DF392E;}
  224. .infoButton:hover{cursor:pointer;color:#BD271D;}
  225.  
  226. /*AlertBox*/
  227. .alertBox{height:900px;width:1200px;opacity:0;z-index:0;position:absolute;background-color:rgba(150,150,150,0.4);transition:.1s;}
  228. .alertBoxFront{height:200px;width:350px;margin-left:425px;margin-top:350px;border:6px solid #28333e;border-radius:3px; box-shadow:0 5px 5px rgba(0,0,0,0.7)}
  229. .alertTop{height:60px;width:350px;text-align:center;background-color:#28333e;box-sizing:border-box;}
  230. .closealert{position:absolute;right:0;margin-right:435px;margin-top:10px;height:20px;width:20px; color:rgb(155,155,155);font-size:20px;text-shadow:0px 3px 5px rgba(0,0,0,0.4);}
  231. .closealert:hover{cursor:pointer;}
  232. .alertType{color:#DF392E;font-size:24px;padding-top:25px;text-align: center;text-shadow:0px 3px 5px rgba(0,0,0,0.4)}
  233. .alertBot{background-color:#2D3945;;height:140px;width:350px;}
  234. .falert{color:#778fa6;margin-left:15px;font-size:30px;position:absolute;margin-top:35px;}
  235. .alertText{padding-top:25px;width:250px;height:100px;margin-left:90px;line-height:25px;color:#778fa6;}
  236.  
  237. Hauptseite Javascript:
  238. var v = 3; //Versions Nummer
  239. var Pflicht = "Pflichtfachbox";
  240. var Pflichtwahl = "Pflichtwahlfachbox";
  241. var Wahl = "Wahlfachbox";
  242. var totalHoursview = 0;
  243. var totalHours = new Array();
  244. var minTotalHours = 36;
  245. var Hours = false;
  246. var alertBox;
  247. var Pflichtfaecher = new Array("ReligionKa","ReligionEv","Ethik","Physik5","Chemie5","Schwimmen","Gymnastik","Geraeteturnen","LeichtathletikVolley","LeichtathletikFuss","LeichtathletikBasket");
  248.  
  249. $(document).ready(function(){
  250. window.formular.Onload.Fillselect("ClassSelect3");
  251. });
  252.  
  253. window.formular = {
  254.  
  255. Onload: {
  256. ReligionsLehrer:{
  257. 1 : {Name: "Frau Eckstein", Fach:"Religion Katholisch"},
  258. 2 : {Name: "Herr Vollmer", Fach:"Religion Katholisch"},
  259. 3 : {Name: "Herr Derlin", Fach:"Religion Evangelisch" },
  260. 4 : {Name: "Herr Dr.Strasser", Fach:"Ethik"},
  261. 5 : {Name: "Frau Vogel", Fach:"Ethik"},
  262. 6 : {Name: "Herr Weiss", Fach:"Religion Evangelisch"},
  263. 7 : {Name: "Herr Weißinger", Fach:"Religion Evangelisch"},
  264. 8 : {Name: "Frau Üstünel", Fach:"Ethik"},
  265. 9 : {Name: "Herr Härringer", Fach:"Religion Katholisch"},
  266. },
  267.  
  268. Fillselect : function(selectinput){
  269.  
  270. var Lehrerselectinput = document.getElementById(selectinput);
  271. var Lehrerselect = window.formular.Onload.ReligionsLehrer;
  272. var length = Object.keys(Lehrerselect).length;
  273.  
  274. document.getElementById("ClassSelect3").innerHTML = "";
  275.  
  276. for(var i = 1; i <= length; i++){
  277.  
  278. if(Lehrerselect[i].Fach == document.getElementById('ClassSelect2').selectedOptions[0].text){
  279. var option = document.createElement("option");
  280. option.text = Lehrerselect[i].Name;
  281. option.value = option.text;
  282. Lehrerselectinput.add(option);
  283. }
  284. }
  285. },
  286.  
  287. Excludecheckbox: function(){
  288. for(var i = 2; i < 4; i++){
  289. document.getElementsByName("Kunst")[i].disabled = true;
  290. document.getElementsByName("Seminarkurs")[i].disabled = true;
  291. document.getElementsByName("Literatur")[i].disabled = true;
  292. document.getElementsByName("Physik2")[i].disabled = true;
  293. document.getElementsByName("Biologie2")[i].disabled = true;
  294. document.getElementsByName("Chemie2")[i].disabled = true;
  295. document.getElementsByName("ComputerTechnik")[i].disabled = true;
  296.  
  297. }
  298. },
  299.  
  300. },
  301.  
  302. subjects: {
  303. /*Pflichtfächer*/
  304. Deutsch: { hours: 4, display: 'Deutsch', key: 'Deutsch', duty: Pflicht },
  305. Englisch: { hours: 4, display: 'Englisch', key: 'Englisch', duty: Pflicht },
  306. Mathematik: { hours: 4, display: 'Mathematik', key: 'Mathematik', duty: Pflicht },
  307. GGK: { hours: 2, display: 'GGK', key: 'GGK', duty: Pflicht },
  308. Projektmanagement: { hours: 2, display: 'Projektmanagement', key: 'Projektmanagement', duty: Pflicht },
  309. Mechatronik: { hours: 6, display: 'Mechatronik', key: 'Mechatronik', duty: Pflicht },
  310. TuM: { hours: 6, display: 'Technik und Management', key: 'TuM', duty: Pflicht },
  311. GmT: { hours: 6, display: 'Gestaltungs und Medientechnik', key: 'GmT', duty: Pflicht },
  312. IT: { hours: 6, display: 'Informationstechnik', key: 'IT', duty: Pflicht },
  313. Wirtschaftslehre: { hours: 2, display: 'Wirtschaftslehre', key: 'Wirtschaftslehre', duty: Pflicht },
  314.  
  315. /*Pflichtwahlfächer*/
  316. FranzoesischA: { hours: 4, display: 'Französisch Niv.A', key: 'FranzoesischA', duty: Pflicht, ruleMask: 1 | 4, toExclude:['FranzoesischB'] ,toWatchOut:['SpanischB']},
  317. FranzoesischB: { hours: 4, display: 'Französisch Niv.B', key: 'FranzoesischB', duty: Pflicht, ruleMask: 1 | 4, toExclude:['FranzoesischA', 'SpanischB']},
  318. SpanischB: { hours: 4, display: 'Spanisch Niv.B', key: 'SpanischB', duty: Pflicht, ruleMask: 1 | 4, toExclude:['FranzoesischB'] , toWatchOut:['FranzoesischA']},
  319. Physik5: { hours: 5, display: 'Physik (5 stündig)', key: 'Physik5', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Chemie5','Physik2'], toWatchOut:['Chemie2'] },
  320. Chemie5: { hours: 5, display: 'Chemie (5 stündig)', key: 'Chemie5', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Physik5','Chemie2'], toWatchOut:['Physik2']},
  321. ReligionKa: { hours: 2, display: 'Religion Katholisch', key: 'ReligionKa', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Ethik','ReligionEv']},
  322. ReligionEv: { hours: 2, display: 'Religion Evangelisch', key: 'ReligionEv', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Ethik','ReligionKa']},
  323. Ethik: { hours: 2, display: 'Ethik', key: 'Ethik', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['ReligionKa','ReligionEv'] },
  324.  
  325. /*Sportfächer*/
  326. Gymnastik: { hours: 2, display: 'Gymnastik', key: 'Gymnastik', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Schwimmen','Geraeteturnen','LeichtathletikVolley','LeichtathletikFuss','LeichtathletikBasket']},
  327. Schwimmen: { hours: 2, display: 'Schwimmen', key: 'Schwimmen', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Gymnastik','Geraeteturnen','LeichtathletikVolley','LeichtathletikFuss','LeichtathletikBasket']},
  328. Geraeteturnen: { hours: 2, display: 'Geräteturnen', key: 'Geraeteturnen', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Schwimmen','Gymnastik','LeichtathletikVolley','LeichtathletikFuss','LeichtathletikBasket']},
  329. LeichtathletikVolley: { hours: 2, display: 'Leichtathletik (+VolleyBall)', key: 'LeichtathletikVolley', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Schwimmen','Geraeteturnen','Gymnastik','LeichtathletikFuss','LeichtathletikBasket']},
  330. LeichtathletikFuss: { hours: 2, display: 'Leichtathletik (+Fußball)', key: 'LeichtathletikFuss', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Schwimmen','Geraeteturnen','LeichtathletikVolley','Gymnastik','LeichtathletikBasket']},
  331. LeichtathletikBasket: { hours: 2, display: 'Leichtathletik (+Basketball)', key: 'LeichtathletikBasket', duty: Pflichtwahl, ruleMask: 1 | 4, toExclude:['Schwimmen','Geraeteturnen','LeichtathletikVolley','Gymnastik','LeichtathletikFuss']},
  332. Attest: { hours: 2, display: 'Attest', key: 'Attest', duty: Pflichtwahl},
  333.  
  334. /*Wahlfächer*/
  335. Physik2: { hours: 2, display: 'Physik (2 stündig)', key: 'Physik2', duty: Wahl, ruleMask: 2 | 4 | 8, toExclude:['Chemie2', 'Physik5'] , toWatchOut:['Chemie5']},
  336. Chemie2: { hours: 2, display: 'Chemie (2 stündig)', key: 'Chemie2', duty: Wahl, ruleMask: 2 | 4 | 8, toExclude:['Chemie5', 'Physik2'] , toWatchOut:['Physik5']},
  337. Biologie2: { hours: 2, display: 'Biologie (2 stündig)', key: 'Biologie2', duty: Wahl, ruleMask: 2 | 8},
  338. Kunst: { hours: 2, display: 'Kunst', key: 'Kunst', duty: Wahl, ruleMask: 2},
  339. Seminarkurs: { hours: 2, display: 'Seminarkurs', key: 'Seminarkurs', duty: Wahl, ruleMask: 2},
  340. Literatur: { hours: 2, display: 'Literatur', key: 'Literatur', duty: Wahl, ruleMask: 2},
  341. ComputerTechnik: { hours: 2, display: 'Computertechnik', key: 'ComputerTechnik', duty: Wahl, ruleMask: 2 | 8},
  342.  
  343. /*Fachseperater*/
  344.  
  345. LanguageSeperater: {display:'Sprache',duty:Pflicht,seperate:1},
  346. ReligionSeperater: {display:'Religion',duty:Pflichtwahl,seperate:1},
  347. NaturSeperater: {display:'Naturwissenschaft',duty:Pflichtwahl,seperate:1},
  348. NaturwahlSeperater: {display:'Naturwissenschaft',duty:Wahl,seperate:1},
  349. SportSeperater: {display:'Sport',duty:Pflichtwahl,seperate:1},
  350. StandardSeperater: {display:'Standard',duty:Pflicht,seperate:1},
  351. FachSeperater: {display:'Fachspezifisch',duty:Pflicht,seperate:1},
  352. SonstigesSeperater: {display:'Sonstiges',duty:Wahl,seperate:1},
  353.  
  354. /*Totalhoursrows*/
  355.  
  356. TotalhoursPflicht : {display:'Kurse Gewählt/Minimal',duty:Pflicht,seperate:2},
  357. TotalhoursPflichtwahl : {display:'Kurse Gewählt/Minimal',duty:Pflichtwahl,seperate:2},
  358. TotalhoursWahl : {display:'Kurse Gewählt/Minimal',duty:Wahl,seperate:2},
  359. },
  360. buttons: {
  361. onSave: function (site) {
  362. switch (site) {
  363. case 1:
  364.  
  365. window.formular.service.setupClass();
  366. window.formular.service.setupLanguage();
  367. window.formular.service.getTotalHours("Pflichtfachbox");
  368. window.formular.Onload.Excludecheckbox();
  369.  
  370.  
  371.  
  372. break;
  373. case 2:
  374. window.formular.navigation.nextSite(site);
  375. break;
  376. case 3:
  377. window.formular.service.Pflichtwahl();
  378. break;
  379. case 4:
  380. if(totalHoursview >= minTotalHours){
  381. window.formular.navigation.nextSite(site);
  382. window.formular.communication.sendFormularData();
  383. window.formular.factory.createSubjectRowClone();
  384.  
  385. }
  386. break;
  387. case 5:
  388. var toSend = window.formular.communication.createBasicRequest();
  389. toSend.Passkey = document.getElementById("Passwort").value;
  390. $.post("authorize.php", toSend, function (data){
  391. if(data == "updaten"){
  392. window.open("http://www.wms-hn.de/kurswahl/studentTable.php?Nachname=" + toSend.Nachname + "&Vorname=" + toSend.Vorname + "&Klasse="+ toSend.Klasse+ "&GebDatum=" + toSend.GebDatum+ "&Religion=" + toSend.Religion + "&ReligionsLehrer="+ toSend.ReligionLehrer + "&Passkey=" + toSend.Passkey,'_blank');
  393. }
  394. });
  395.  
  396. break;
  397. default:
  398. break;
  399. }
  400.  
  401. },
  402. },
  403. navigation: {
  404. next: 1,
  405. nextSite: function (site) {
  406.  
  407. if (this.next <= site) {
  408. this.next = site + 1;
  409. }
  410.  
  411. var thisSite = site;
  412. var nextSite = thisSite + 1;
  413.  
  414. document.getElementById("Formularsite" + nextSite).style.zIndex = 5;
  415. document.getElementById("TrackButton" + nextSite).style.backgroundColor = "#BD271D";
  416. document.getElementById("TrackButton" + nextSite).style.color = "#ffffff";
  417. document.getElementById("TrackButton" + nextSite).style.textShadow = "0 2px 6px rgba(0,0,0,0.7)";
  418.  
  419. var SitePuffer = 1;
  420. while (SitePuffer < 6) {
  421. if (SitePuffer != nextSite) {
  422. document.getElementById("Formularsite" + SitePuffer).style.zIndex = 1;
  423. document.getElementById("TrackButton" + SitePuffer).style.backgroundColor = "#DF392E";
  424. document.getElementById("TrackButton" + SitePuffer).style.color = "#e0e0e0";
  425. document.getElementById("TrackButton" + SitePuffer).style.textShadow = "0 0 0 rgba(0,0,0,0.7)";
  426. }
  427. SitePuffer += 1;
  428. }
  429. },
  430. nextSiteTrack: function (SiteTrack) {
  431. if(window.formular.service.twoLanguages.bool)
  432. {
  433. if (SiteTrack <= this.next) {
  434.  
  435. var thisSite = SiteTrack;
  436.  
  437. document.getElementById("Formularsite" + thisSite).style.zIndex = 4;
  438. document.getElementById("TrackButton" + thisSite).style.backgroundColor = "#BD271D";
  439. document.getElementById("TrackButton" + thisSite).style.color = "#ffffff";
  440. document.getElementById("TrackButton" + thisSite).style.textShadow = "0 2px 6px rgba(0,0,0,0.7)";
  441.  
  442. var thisSiteTrack = 1;
  443. while (thisSiteTrack < 6) {
  444. if (thisSiteTrack != thisSite) {
  445. document.getElementById("Formularsite" + thisSiteTrack).style.zIndex = 1;
  446. document.getElementById("TrackButton" + thisSiteTrack).style.backgroundColor = "#DF392E";
  447. document.getElementById("TrackButton" + thisSiteTrack).style.color = "#e0e0e0";
  448. document.getElementById("TrackButton" + thisSiteTrack).style.textShadow = "0 0 0 rgba(0,0,0,0.7)";
  449. }
  450. thisSiteTrack += 1;
  451. }
  452. }
  453. }
  454. }
  455. },
  456. factory: {
  457. createSubjectRowClone: function(){
  458.  
  459.  
  460.  
  461.  
  462. var tabletocopyto = document.getElementById("Tablecopy");
  463. var tablelength = tabletocopyto.rows.length;
  464. for(var j = 0;j < tablelength; j++){
  465.  
  466. tabletocopyto.deleteRow(0);
  467. }
  468. var Tables = window.formular.service.tables;
  469. var thisTable;
  470. var thisRow
  471. var node;
  472. for(var n = 1;n < 4;n++){
  473. thisTable = document.getElementById(Tables[n].Art);
  474. for(var i = 1; i < thisTable.rows.length-1; i++){
  475. node = thisTable.rows[i].cloneNode(true);
  476. tabletocopyto.appendChild(node);
  477. }
  478. }
  479. var subjects = window.formular.subjects;
  480. Object.keys(subjects).map(function (key) {
  481. var inputFields = document.getElementsByName(subjects[key].key);
  482. for(var i = 4; i < 8; i++){
  483. if(inputFields.length > 0)
  484. {
  485. inputFields[i].disabled = true;
  486.  
  487. }
  488. }
  489. });
  490.  
  491.  
  492. },
  493.  
  494. createSubjectRow: function (subject, isChecked) {
  495.  
  496. var tableId = subject.duty;
  497.  
  498.  
  499. var tableElement = document.getElementById(tableId);
  500. var row = tableElement.insertRow(tableElement.rows.length);
  501.  
  502.  
  503. var cells = [row.insertCell(0)];
  504. for (var i = 1; i < 6; i++) {
  505. cells[i] = row.insertCell(i);
  506. cells[i].style.textAlign = "center";
  507. tableElement.rows[0].cells[i].style.textAlign = "center";
  508. }
  509.  
  510. cells[0].innerHTML = subject.display;
  511. cells[1].innerHTML = subject.seperate ? '' : subject.hours;
  512. for (var i = 2; i < 6; i++) {
  513. row.className = "TableRow";
  514. if(subject.seperate >= 1){
  515. cells[i].innerHTML = '';
  516. if(subject.seperate == 1){
  517. row.style.backgroundColor = "#405263";
  518. }
  519. else{
  520. row.style.backgroundColor = "#2D3945";
  521. }
  522. row.style.color = "white";
  523. }
  524. else{
  525. cells[i].innerHTML = "<input class='chechBox' type='checkbox' name='" + subject.key
  526. + "' value='" + subject.hours
  527. + "' onchange='window.formular.service.check(\"" + subject.key + "\",this);window.formular.service.getTotalHours(\"" + tableId + "\")'"
  528. + ((isChecked || subject.duty == Pflicht) ? ' disabled checked>' : '>');
  529. }
  530. }
  531. },
  532. },
  533. service: {
  534.  
  535. Pflichtwahl : function(){
  536. var FachArt = 0;
  537.  
  538. for(i = 0; i < Pflichtfaecher.length;i++)
  539. {
  540. var Checkboxes = document.getElementsByName(Pflichtfaecher[i]);
  541. if(Checkboxes[0].checked)
  542. {
  543. FachArt += 1;
  544. }
  545. }
  546. if(FachArt == 3)
  547. {
  548. window.formular.navigation.nextSite(3);
  549. }
  550. else
  551. {
  552. window.formular.service.alertError("profile");
  553. }
  554. },
  555. alertInfo : function(Cases){
  556. alertBox = document.getElementById("Alertbox");
  557. document.getElementById("alertType").innerHTML= "Information";
  558. document.getElementById("alertType").style.color="#28333e";
  559. document.getElementById("closealert").style.color="#28333e";
  560. document.getElementById("alertTypeIcon").className="fa fa-info-circle falert fa-4x";
  561. document.getElementById("alertTypeIcon").style.color="#28333e";
  562. document.getElementById("alertTop").style.backgroundColor="#e7bd00";
  563. document.getElementById("alertBoxFront").style.border ="6px solid #e7bd00";
  564. document.getElementById("alertBot").style.backgroundColor="#dddd55";
  565. document.getElementById("alertText").style.color="#28333e";
  566. alertBox.style.zIndex = "10";
  567. alertBox.style.opacity = "1";
  568.  
  569. switch(Cases){
  570. case 2:
  571. {
  572. document.getElementById("alertText").innerHTML = "Auf dieser Seite sehen Sie welche Fächer Ihnen automatisch durch Ihre Klassenzugehörigkeit zugewiesen sind.";
  573.  
  574. break;
  575. }
  576. case 3:
  577. {
  578. document.getElementById("alertText").innerHTML = "Auf dieser Seite müssen sie aus allen 3 Pflichtkategorien mindestens einen Kurs gewählt haben.";
  579. break;
  580. }
  581. case 4:
  582. {
  583. document.getElementById("alertText").innerHTML = "Auf dieser Seite dürfen Sie weitere Kurse nach Bedarf wählen.";
  584.  
  585. break;
  586. }
  587. case 5:
  588. {
  589. document.getElementById("alertText").innerHTML = "Auf dieser Seite sehen sie Ihre gesamte Wahl und können das entsprechende Exceldokument downloaden.";
  590. break;
  591. }
  592. case "Update":{
  593. document.getElementById("alertText").innerHTML = "Sie sind dabei Ihre Daten nochmals neu einzutragen.";
  594. break;
  595. }
  596. default: break;
  597. }
  598.  
  599. },
  600.  
  601. alertError : function(Cases){
  602. alertBox = document.getElementById("Alertbox");
  603. document.getElementById("alertType").innerHTML= "Warnung";
  604. document.getElementById("alertType").style.color="#DF392E";
  605. document.getElementById("closealert").style.color="rgb(155,155,155)";
  606. document.getElementById("alertTypeIcon").className="fa fa-exclamation-triangle falert fa-4x";
  607. document.getElementById("alertTypeIcon").style.color="#778fa6";
  608. document.getElementById("alertTop").style.backgroundColor="#28333e";
  609. document.getElementById("alertBoxFront").style.border ="6px solid #28333e";
  610. document.getElementById("alertBot").style.backgroundColor="#2D3945";
  611. document.getElementById("alertText").style.color="#778fa6";
  612. alertBox.style.zIndex = "10";
  613. alertBox.style.opacity = "1";
  614. switch(Cases){
  615. case "Language":
  616. {
  617. document.getElementById("alertText").innerHTML = "Französisch A und Französisch B können nicht gleichzeitig gewählt werden.";
  618.  
  619. break;
  620. }
  621. case "nomberofhours":
  622. {
  623. document.getElementById("alertText").innerHTML = "Die Mindestanzahl an Kursen wurde nicht erreicht.";
  624. document.getElementById("alertType").innerHTML= "Warnung";
  625. document.getElementById("alertTypeIcon").className="fa fa-exclamation-triangle falert fa-4x";
  626. break;
  627. }
  628. case "profile":
  629. {
  630. document.getElementById("alertText").innerHTML = "Aus jeder Kategorie muss mindestens ein Fach gewählt werden.";
  631. document.getElementById("alertType").innerHTML= "Warnung";
  632. document.getElementById("alertTypeIcon").className="fa fa-exclamation-triangle falert fa-4x";
  633. break;
  634. }
  635. case "Login":
  636. {
  637. document.getElementById("alertText").innerHTML = "Ihre Anmeldedaten sind inkorrekt. Versuchen Sie es bitte noch einmal.";
  638. document.getElementById("alertType").innerHTML= "Warnung";
  639. document.getElementById("alertTypeIcon").className="fa fa-exclamation-triangle falert fa-4x";
  640. break;
  641. }
  642. default: break;
  643. }
  644. },
  645.  
  646. closealertError : function(){
  647. alertBox = document.getElementById("Alertbox");
  648. alertBox.style.zIndex = "0";
  649. alertBox.style.opacity = "0";
  650. },
  651.  
  652.  
  653. forcheck: function(Name,checked){
  654. for(var i = 0; i<4; i++){
  655. document.getElementsByName(Name)[i].checked = checked;
  656. }
  657. },
  658. twoLanguages : {bool : true},
  659. setupLanguage : function(){
  660. var Language1 = document.getElementById("ClassSelect4").value;
  661. var Language2 = document.getElementById("ClassSelect5").value;
  662.  
  663. if(Language1 == 2 && Language2 == 2)
  664. {
  665. window.formular.service.twoLanguages.bool = false;
  666. window.formular.service.alertError("Language");
  667. }
  668. else
  669. {
  670. window.formular.service.twoLanguages.bool = true;
  671. if(Language1 == 1){
  672. window.formular.service.forcheck("SpanischB",false);
  673. window.formular.service.forcheck("FranzoesischB",false);
  674. window.formular.service.forcheck("FranzoesischA",false);
  675. }
  676. if(Language1 == 2)
  677. {
  678. window.formular.service.forcheck("SpanischB",false);
  679. window.formular.service.forcheck("FranzoesischB",true);
  680. }
  681. if(Language1 == 3)
  682. {
  683. window.formular.service.forcheck("SpanischB",true);
  684. window.formular.service.forcheck("FranzoesischB",false);
  685. }
  686. if(Language2 == 1)
  687. {
  688. window.formular.service.forcheck("FranzoesischA",false);
  689. }
  690. else
  691. {
  692. window.formular.service.forcheck("FranzoesischA",true);
  693. }
  694. }
  695. },
  696. tables:{
  697. 1:{Art:Pflicht},
  698. 2:{Art:Pflichtwahl},
  699. 3:{Art:Wahl},
  700. },
  701. getTotalHours: function(tableId) {
  702.  
  703. totalHoursview = 0;
  704. var subjects = window.formular.subjects;
  705. Object.keys(subjects).map(function (key) {
  706. var inputFields = document.getElementsByName(subjects[key].key);
  707. for(var i = 0; i < 4; i++){
  708. if(inputFields.length > 0 && inputFields[i].checked)
  709. {
  710. totalHoursview += 1;
  711.  
  712. }
  713. }
  714. var Tables = window.formular.service.tables;
  715. var thisTable;
  716. var Totalhoursposition;
  717.  
  718. for(var i = 1;i < 4;i++){
  719. thisTable = document.getElementById(Tables[i].Art);
  720. Totalhoursposition = thisTable.rows.length;
  721. thisTable.rows[Totalhoursposition-1].cells[5].innerHTML = String(totalHoursview) + "/" + String(minTotalHours);
  722.  
  723.  
  724. }
  725. });
  726. },
  727. check: function (subjectkey,checkbox) {
  728. var currentSubject = window.formular.subjects[subjectkey];
  729.  
  730. var checkboxes = document.getElementsByName(currentSubject.key);
  731.  
  732. /* Rule1, Alle 4 auf einmal Toggle */
  733. if(currentSubject.ruleMask & 1){
  734. window.formular.service.forcheck(currentSubject.key,checkbox.checked);
  735. }
  736.  
  737. /* Rule2, Zwei halbjahre gleichzeitig toggeln*/
  738. if(currentSubject.ruleMask & 2){
  739. for(i = 0; i<4; i++)
  740. {
  741. if(checkboxes[i] == checkbox)
  742. {
  743. var k = i%2;
  744. if(k == 0)
  745. {
  746. k = i + 1;
  747. checkboxes[k].checked = checkboxes[i].checked;
  748. }
  749. else
  750. {
  751. k = i - 1;
  752. checkboxes[k].checked = checkboxes[i].checked;
  753. }
  754. }
  755. }
  756. }
  757.  
  758. /* Rule3, Andere Fächer disablen */
  759. if(currentSubject.ruleMask & 4){
  760.  
  761. var watchout = true;
  762. var watchboxes;
  763. var excludeboxes;
  764. var toggle;
  765.  
  766. for(var i = 0; i < currentSubject.toExclude.length; ++i)
  767. {
  768. toggle = false;
  769. excludeboxes = document.getElementsByName(currentSubject.toExclude[i]);
  770. for(var g = 0; g < 4; g++)
  771. {
  772. if(checkboxes[g].checked)
  773. {
  774. toggle = true;
  775. }
  776. }
  777.  
  778. if(!toggle){
  779. if(currentSubject.toWatchOut != null){
  780. for(var n = 0; n < currentSubject.toWatchOut.length; ++n){
  781. watchboxes = document.getElementsByName(currentSubject.toWatchOut[n]);
  782. for(var l = 0; l < watchboxes.length; ++l){
  783. if(watchboxes[l].checked)
  784. {
  785. watchout = false;
  786. }
  787. }
  788. }
  789. }
  790. if(watchout){
  791. for(var p = 0; p < excludeboxes.length; ++p)
  792. {
  793. excludeboxes[p].disabled = false;
  794.  
  795. //New -----------------------------------------------------------------------------------------
  796. if(p == 1 && (excludeboxes[1].name == "Physik2" || excludeboxes[1].name == "Chemie2"))
  797. {
  798. p = excludeboxes.length;
  799. }
  800. //New -----------------------------------------------------------------------------------------
  801. }
  802. }
  803. }
  804. else
  805. {
  806. for(var m = 0; m < excludeboxes.length; ++m)
  807. {
  808. excludeboxes[m].checked = false;
  809. excludeboxes[m].disabled = true;
  810. }
  811. }
  812. }
  813. }
  814. //New ------------------------------------------------------------------
  815. if(currentSubject.ruleMask & 8){
  816. var checkboxes = document.getElementsByName(currentSubject.key);
  817. if(checkboxes[1].checked)
  818. {
  819. checkboxes[2].disabled = false;
  820. checkboxes[3].disabled = false;
  821. }
  822. else
  823. {
  824. checkboxes[2].checked = false;
  825. checkboxes[3].checked = false;
  826. checkboxes[2].disabled = true;
  827. checkboxes[3].disabled = true;
  828. }
  829. }
  830. //New ------------------------------------------------------------------
  831.  
  832. },
  833.  
  834. isClassSetuped: false,
  835. setupClass: function () {
  836.  
  837. if (this.isClassSetuped)
  838. return;
  839. this.isClassSetuped = true;
  840.  
  841. var toInsert = [];
  842. var subjects = window.formular.subjects;
  843.  
  844. var classVal = document.getElementById("ClassSelect1").value;
  845. switch (classVal) {
  846. case "1":
  847. toInsert = [
  848. subjects.StandardSeperater,
  849. subjects.Deutsch,
  850. subjects.Englisch,
  851. subjects.Mathematik,
  852. subjects.GGK,
  853. subjects.LanguageSeperater,
  854. subjects.FranzoesischA,
  855. subjects.FranzoesischB,
  856. subjects.SpanischB,
  857. subjects.FachSeperater,
  858. subjects.Wirtschaftslehre,
  859. subjects.Mechatronik,
  860. subjects.TotalhoursPflicht,
  861. subjects.ReligionSeperater,
  862. subjects.ReligionKa,
  863. subjects.ReligionEv,
  864. subjects.Ethik,
  865. subjects.NaturSeperater,
  866. subjects.Physik5,
  867. subjects.Chemie5,
  868. subjects.SportSeperater,
  869. subjects.Gymnastik,
  870. subjects.Schwimmen,
  871. subjects.Geraeteturnen,
  872. subjects.LeichtathletikVolley,
  873. subjects.LeichtathletikFuss,
  874. subjects.LeichtathletikBasket,
  875. subjects.Attest,
  876. subjects.TotalhoursPflichtwahl,
  877. subjects.NaturwahlSeperater,
  878. subjects.Physik2,
  879. subjects.Chemie2,
  880. subjects.Biologie2,
  881. subjects.SonstigesSeperater,
  882. subjects.Kunst,
  883. subjects.Seminarkurs,
  884. subjects.Literatur,
  885. subjects.ComputerTechnik,
  886. subjects.TotalhoursWahl,
  887. ];
  888. break;
  889. case "2":
  890. toInsert = [
  891. subjects.StandardSeperater,
  892. subjects.Deutsch,
  893. subjects.Englisch,
  894. subjects.Mathematik,
  895. subjects.GGK,
  896. subjects.LanguageSeperater,
  897. subjects.FranzoesischA,
  898. subjects.FranzoesischB,
  899. subjects.SpanischB,
  900. subjects.FachSeperater,
  901. subjects.Wirtschaftslehre,
  902. subjects.Mechatronik,
  903. subjects.TotalhoursPflicht,
  904. subjects.ReligionSeperater,
  905. subjects.ReligionKa,
  906. subjects.ReligionEv,
  907. subjects.Ethik,
  908. subjects.NaturSeperater,
  909. subjects.Physik5,
  910. subjects.Chemie5,
  911. subjects.SportSeperater,
  912. subjects.Gymnastik,
  913. subjects.Schwimmen,
  914. subjects.Geraeteturnen,
  915. subjects.LeichtathletikVolley,
  916. subjects.LeichtathletikFuss,
  917. subjects.LeichtathletikBasket,
  918. subjects.Attest,
  919. subjects.TotalhoursPflichtwahl,
  920. subjects.NaturwahlSeperater,
  921. subjects.Physik2,
  922. subjects.Chemie2,
  923. subjects.Biologie2,
  924. subjects.SonstigesSeperater,
  925. subjects.Kunst,
  926. subjects.Seminarkurs,
  927. subjects.Literatur,
  928. subjects.ComputerTechnik,
  929. subjects.TotalhoursWahl,
  930.  
  931. ];
  932. break;
  933. case "3":
  934. toInsert = [
  935. subjects.StandardSeperater,
  936. subjects.Deutsch,
  937. subjects.Englisch,
  938. subjects.Mathematik,
  939. subjects.GGK,
  940. subjects.LanguageSeperater,
  941. subjects.FranzoesischA,
  942. subjects.FranzoesischB,
  943. subjects.SpanischB,
  944. subjects.FachSeperater,
  945. subjects.TuM,
  946. subjects.Projektmanagement,
  947. subjects.TotalhoursPflicht,
  948. subjects.ReligionSeperater,
  949. subjects.ReligionKa,
  950. subjects.ReligionEv,
  951. subjects.Ethik,
  952. subjects.NaturSeperater,
  953. subjects.Physik5,
  954. subjects.Chemie5,
  955. subjects.SportSeperater,
  956. subjects.Gymnastik,
  957. subjects.Schwimmen,
  958. subjects.Geraeteturnen,
  959. subjects.LeichtathletikVolley,
  960. subjects.LeichtathletikFuss,
  961. subjects.LeichtathletikBasket,
  962. subjects.Attest,
  963. subjects.TotalhoursPflichtwahl,
  964. subjects.NaturwahlSeperater,
  965. subjects.Physik2,
  966. subjects.Chemie2,
  967. subjects.Biologie2,
  968. subjects.SonstigesSeperater,
  969. subjects.Kunst,
  970. subjects.Seminarkurs,
  971. subjects.Literatur,
  972. subjects.ComputerTechnik,
  973. subjects.TotalhoursWahl,
  974. ];
  975. break;
  976. case "4":
  977. subjects.ComputerTechnik.duty = Pflicht;
  978. toInsert = [
  979. subjects.StandardSeperater,
  980. subjects.Deutsch,
  981. subjects.Englisch,
  982. subjects.Mathematik,
  983. subjects.GGK,
  984. subjects.LanguageSeperater,
  985. subjects.FranzoesischA,
  986. subjects.FranzoesischB,
  987. subjects.SpanischB,
  988. subjects.FachSeperater,
  989. subjects.GmT,
  990. subjects.Wirtschaftslehre,
  991. subjects.ComputerTechnik,
  992. subjects.TotalhoursPflicht,
  993. subjects.ReligionSeperater,
  994. subjects.ReligionKa,
  995. subjects.ReligionEv,
  996. subjects.Ethik,
  997. subjects.NaturSeperater,
  998. subjects.Physik5,
  999. subjects.Chemie5,
  1000. subjects.SportSeperater,
  1001. subjects.Gymnastik,
  1002. subjects.Schwimmen,
  1003. subjects.Geraeteturnen,
  1004. subjects.LeichtathletikVolley,
  1005. subjects.LeichtathletikFuss,
  1006. subjects.LeichtathletikBasket,
  1007. subjects.Attest,
  1008. subjects.TotalhoursPflichtwahl,
  1009. subjects.NaturwahlSeperater,
  1010. subjects.Physik2,
  1011. subjects.Chemie2,
  1012. subjects.Biologie2,
  1013. subjects.SonstigesSeperater,
  1014. subjects.Kunst,
  1015. subjects.Seminarkurs,
  1016. subjects.Literatur,
  1017. subjects.TotalhoursWahl,
  1018. ];
  1019. break;
  1020. case "5":
  1021. subjects.ComputerTechnik.duty = Pflicht;
  1022. toInsert = [
  1023. subjects.StandardSeperater,
  1024. subjects.Deutsch,
  1025. subjects.Englisch,
  1026. subjects.Mathematik,
  1027. subjects.GGK,
  1028. subjects.LanguageSeperater,
  1029. subjects.FranzoesischA,
  1030. subjects.FranzoesischB,
  1031. subjects.SpanischB,
  1032. subjects.FachSeperater,
  1033. subjects.IT,
  1034. subjects.Wirtschaftslehre,
  1035. subjects.ComputerTechnik,
  1036. subjects.TotalhoursPflicht,
  1037. subjects.ReligionSeperater,
  1038. subjects.ReligionKa,
  1039. subjects.ReligionEv,
  1040. subjects.Ethik,
  1041. subjects.NaturSeperater,
  1042. subjects.Physik5,
  1043. subjects.Chemie5,
  1044. subjects.SportSeperater,
  1045. subjects.Gymnastik,
  1046. subjects.Schwimmen,
  1047. subjects.Geraeteturnen,
  1048. subjects.LeichtathletikVolley,
  1049. subjects.LeichtathletikFuss,
  1050. subjects.LeichtathletikBasket,
  1051. subjects.Attest,
  1052. subjects.TotalhoursPflichtwahl,
  1053. subjects.NaturwahlSeperater,
  1054. subjects.Physik2,
  1055. subjects.Chemie2,
  1056. subjects.Biologie2,
  1057. subjects.SonstigesSeperater,
  1058. subjects.Kunst,
  1059. subjects.Seminarkurs,
  1060. subjects.Literatur,
  1061. subjects.TotalhoursWahl,
  1062. ];
  1063. break;
  1064. default:
  1065. break;
  1066. }
  1067.  
  1068. for (var i = 0; i < toInsert.length; ++i) {
  1069. window.formular.factory.createSubjectRow(toInsert[i]);
  1070. }
  1071. for(var i=1; i<4;i++){document.getElementsByName("Attest")[i].disabled = true;}
  1072. },
  1073. },
  1074. communication: {
  1075. createBasicRequest: function () {
  1076. var year = document.getElementsByClassName("date")[2].value;
  1077. var month = document.getElementsByClassName("date")[1].value;
  1078. var day = document.getElementsByClassName("date")[0].value;
  1079. if(month < 10 && month.length < 2){
  1080. month = "0"+month;
  1081. }
  1082. if(day < 10 && day.length < 2){
  1083. day = "0"+day;
  1084. }
  1085. var lastname = document.getElementById("Nachname").value;
  1086. var firstname = document.getElementById("Vorname").value;
  1087. var classVal = document.getElementById("ClassSelect1").value;
  1088. var birthdate = year
  1089. + "-" + month
  1090. + "-" + day;
  1091. var religion = document.getElementById("ClassSelect2").value;
  1092. var religionLehrer = document.getElementById("ClassSelect3").value;
  1093.  
  1094.  
  1095. return {
  1096. Nachname: String(lastname),
  1097. Vorname: String(firstname),
  1098. Klasse: String(classVal),
  1099. GebDatum: String(birthdate),
  1100. Religion: String(religion),
  1101. ReligionLehrer : String(religionLehrer),
  1102. };
  1103. },
  1104. authorizeReturnValue :0,
  1105. authorizeUser: function () {
  1106. var password = document.getElementById("Passwort").value;
  1107.  
  1108. var toSend = this.createBasicRequest();
  1109. toSend.Passkey = String(password);
  1110.  
  1111.  
  1112. $.post("authorize.php", toSend, function (data) {
  1113.  
  1114. if(data == "nichtgewaehlt" && window.formular.service.twoLanguages.bool){
  1115. window.formular.buttons.onSave(1);
  1116. window.formular.navigation.nextSite(1);
  1117. }
  1118. if(data == "falscherlogin"){
  1119. window.formular.service.alertError("Login");
  1120. }
  1121. if(data == "updaten" && window.formular.service.twoLanguages.bool){
  1122. window.formular.buttons.onSave(1);
  1123. window.formular.navigation.nextSite(1);
  1124. window.formular.service.alertInfo("Update");
  1125.  
  1126. }
  1127.  
  1128.  
  1129. });
  1130. toSend.Authoback = window.formular.communication.authorizeReturnValue;
  1131. }, sendFormularData: function () {
  1132.  
  1133. var toSend = this.createBasicRequest();
  1134.  
  1135. toSend.Passkey = document.getElementById("Passwort").value;
  1136. var subjects = window.formular.subjects;
  1137. Object.keys(subjects).map(function (key) {
  1138.  
  1139. if(!subjects[key].key)
  1140. return;
  1141.  
  1142. var inputFields = document.getElementsByName(subjects[key].key);
  1143. var bf = 1;
  1144. var val = 0;
  1145. for (var i = 0; i < inputFields.length; ++i) {
  1146.  
  1147. if(i <= 3)
  1148. {
  1149. if (inputFields[i].checked){
  1150. val += bf;
  1151. }
  1152. bf *= 2;
  1153. }
  1154. }
  1155.  
  1156. toSend[subjects[key].key] = val;
  1157.  
  1158. });
  1159. $.post("insertchoice.php", toSend, function (data) {
  1160.  
  1161. });
  1162.  
  1163. }
  1164. }
  1165.  
  1166. };
  1167.  
  1168.  
  1169. Adminseite HTML:
  1170. <html>
  1171.  
  1172. <head>
  1173. <link href="../css/lato.css" rel="stylesheet" type="text/css">
  1174. <link href="../css/Admin.css" rel="stylesheet" type="text/css">
  1175. <link href="../font-awesome-4.5.0/css/font-awesome.min.css" type="text/css" rel="stylesheet">
  1176.  
  1177. <script src="../lib/jquery-2.2.0.min.js"></script>
  1178. <script src="../js/Admin.js"></script>
  1179.  
  1180. <meta charset="utf-8">
  1181. </head>
  1182.  
  1183. <body onload="window.formular.Onload.Fillselect('ClassSelect3');">
  1184.  
  1185. <div class = "Sitebody">
  1186.  
  1187.  
  1188. <div class="Formularbox">
  1189. <div class="alertBox" id="Alertbox">
  1190. <div class="alertBoxFront" id="alertBoxFront">
  1191. <div class="alertTop" id="alertTop">
  1192. <div class="closealert" id="closealert" onclick="window.formular.service.closealertError()"><i class="fa fa-times-circle" ></i></div>
  1193. <div class="alertType" id="alertType"></div>
  1194. </div>
  1195. <div class="alertBot" id="alertBot">
  1196. <i class="" id="alertTypeIcon"></i>
  1197. <div class="alertText" id="alertText"></div>
  1198. </div>
  1199. </div>
  1200. </div>
  1201.  
  1202. <div class="Formularsite" id="Formularsite1">
  1203. <select id="SelectClass">
  1204. <option value="0">Alle Klassen</option>
  1205. <option value="1">TGM 11/1</option>
  1206. <option value="2">TGM 11/2</option>
  1207. <option value="3">TGTM 11/3</option>
  1208. <option value="4">TGG 11/4</option>
  1209. <option value="5">TGI 11/5</option>
  1210. </select>
  1211. <button onclick="DownloadTable();">Übersicht</button>
  1212. <button onclick="DownloadMissingPupil();">Fehlende Schüler</button>
  1213. <input type="Password" id="Password" placeholder="Passwort">
  1214. </div>
  1215.  
  1216. </div>
  1217.  
  1218. </div>
  1219. </body>
  1220. </html>
  1221.  
  1222. Adminseite CSS:
  1223. html{font-family: 'Lato', sans-serif !important}
  1224.  
  1225. /* HTML5 display-role reset for older browsers */
  1226. article, aside, details, figcaption, figure,
  1227. footer, header, hgroup, menu, nav, section {display: block;}
  1228. body {line-height: 1;padding:0;margin:0;width:100%;height:100%;background-image:url(../background.jpg);display:table;}
  1229. .Formularbox{}
  1230. ol, ul {list-style: none;}
  1231. blockquote, q {quotes: none;}
  1232. blockquote:before, blockquote:after,q:before, q:after {content: '';content: none;}
  1233. table {border-collapse: collapse;border-spacing: 0;}
  1234.  
  1235. input:focus{box-shadow:0 0 5px #BD271D;outline: none !important;border:1px solid #BD271D;}
  1236. /*Sitemarkup*/
  1237.  
  1238. .Siteheader{width:1200px;height:10px;margin-bottom:40px; margin-left: auto;margin-right: auto;background-color:#2D3945;}
  1239.  
  1240. /* Formular */
  1241. .Formularbox{background-color:transparent; width:400px;height:100px;position:relative;padding:0;bottom:0;margin-left: auto;margin-right: auto;margin-top:300px;border:solid 8px #2D3945;border-radius:5px;}
  1242. .Formulartrack{background-color:#2D3945;width:1200px; height:80px;border-top: 8px solid #2D3945; position: absolute;bottom: 0;vertical-align: middle;line-height:80px;text-align: center;box-sizing: border-box;z-index:5;}
  1243.  
  1244. #SelectClass{margin-top:40px;}
  1245. #Password{margin-top:10px;}
  1246.  
  1247. .Formularsite{background-color:#F8F8F8;width:400px;height:100px;position:absolute;text-align: center;border:none;padding:0;overflow: hidden;}
  1248. .Formularsite input{display:block;margin-left: auto;margin-right: auto;}
  1249. .Formularsite .date{display: inline-block;width:60px; height: 40px;text-align:center;padding: 0px;}
  1250. .Formularsiteheader{width:100%;height:70px;background-color: #2D3945; position:relative;border-bottom: 8px solid #2D3945;line-height: 70px; text-align: center;}
  1251. .Headertitle{font-size:40px;color:white;margin-left:270px;}
  1252. .Schullogo{height:50px;width:50px;background-image:url(../images/photo.jpg);background-size: 50px 50px;float:right;margin-top:10px;}
  1253. .Schulbanner{height:50px;width:205px;background-image:url(../images/logoalternativ.jpg);background-size:205px 50px;float:right;margin-top:10px;}
  1254.  
  1255. .InputTag{font-size:15px;margin-top:15px;color:#8c8c8c;}
  1256. .ForminputSite1 {background-color:white; border:1px solid black;height:50px;width:180px;text-align: center;border-radius:2px;font-size:20px;}
  1257. .ForminputSite1:focus{border:1px solid #BD271D;box-shadow:0 0 5px #BD271D; outline: none !important;}
  1258.  
  1259. #Formularsite1{z-index:5;}
  1260. #Formularsite2{z-index:4;}
  1261. #Formularsite3{z-index:3;}
  1262. #Formularsite4{z-index:2;}
  1263. #Formularsite5{z-index:1;overflow-y:scroll;}
  1264. .checkBox{color:red;}
  1265.  
  1266.  
  1267. #TagVorname{margin-top:50px;}
  1268. .ClassSelect{width:180px;height:30px;font-size:15px;border:1px solid black;display: block;text-align: center; margin-right: auto;margin-left: auto;padding: 0px;}
  1269.  
  1270. .Fachbox{ margin-left:200px; margin-top:30px;width:800px; min-height:20px;font-size:16px;}
  1271. .Fachbox td{padding:8px;}
  1272. .TableRow{background-color:#f8f8f8;}
  1273.  
  1274. #tablefoot1{color:black;}
  1275. #tablehead1{background-color:#2D3945;color:white;height:50px;font-size:18px;}
  1276. #tablehead2{background-color:#2D3945;color:white;height:50px;font-size:18px;}
  1277.  
  1278.  
  1279.  
  1280. table{border-collapse:collapse;border:5px solid #2D3945;}
  1281. table tr{border-bottom:2px solid #2D3945}
  1282.  
  1283. /* Buttons */
  1284.  
  1285. button:active{padding:0;}
  1286. button:hover{cursor:pointer;}
  1287.  
  1288. #TrackLine4{border-bottom-right-radius: 20px; border-top-right-radius: 20px;}
  1289.  
  1290. .NextButton{background-color:#DF392E;height:60px;width:150px;border:0;color:white;border-radius:3px;font-size:15px;position:absolute;bottom:0;right:0;margin-right:20px;margin-bottom:20px;}
  1291. .NextButton:hover{background-color:#BD271D}
  1292. .TrackButton{background-color:#DF392E;height:40px;width:150px;margin:0;border-radius:0%;color:white;border:0;box-sizing:border-box;text-align: center; vertical-align: middle;color: white;line-height:25px;padding:0;transition:.6s;margin-left:-5px;position:relative;z-index:2;}
  1293. .TrackButton:hover{background-color:#BD271D;}
  1294. #TrackButton1{}
  1295. .infoButton{position:absolute;left:0;bottom:0;margin-left:50px;margin-bottom:10px;color:#DF392E;}
  1296. .infoButton:hover{cursor:pointer;color:#BD271D;}
  1297.  
  1298. /*AlertBox*/
  1299. .alertBox{height:900px;width:1200px;opacity:0;z-index:0;position:absolute;background-color:rgba(150,150,150,0.4);transition:.1s;}
  1300. .alertBoxFront{height:200px;width:350px;margin-left:425px;margin-top:350px;border:6px solid #28333e;border-radius:3px; box-shadow:0 5px 5px rgba(0,0,0,0.7)}
  1301. .alertTop{height:60px;width:350px;text-align:center;background-color:#28333e;box-sizing:border-box;}
  1302. .closealert{position:absolute;right:0;margin-right:435px;margin-top:10px;height:20px;width:20px; color:rgb(155,155,155);font-size:20px;text-shadow:0px 3px 5px rgba(0,0,0,0.4);}
  1303. .closealert:hover{cursor:pointer;}
  1304. .alertType{color:#DF392E;font-size:24px;padding-top:25px;text-align: center;text-shadow:0px 3px 5px rgba(0,0,0,0.4)}
  1305. .alertBot{background-color:#2D3945;;height:140px;width:350px;}
  1306. .falert{color:#778fa6;margin-left:15px;font-size:30px;position:absolute;margin-top:35px;}
  1307. .alertText{padding-top:25px;width:250px;height:100px;margin-left:90px;line-height:25px;color:#778fa6;}
  1308.  
  1309. Adminseite Javascript:
  1310. function DownloadTable(){
  1311. console.log("falsches Passwort");
  1312. var passwort = document.getElementById("Password").value;
  1313. if(passwort == "adminLenczak")
  1314. {
  1315. var Klasse = document.getElementById("SelectClass").value;
  1316. window.open("http://www.wms-hn.de/kurswahl/AdminTables.php?Klassen=" + Klasse,'_blank');
  1317. }
  1318. }
  1319. function DownloadMissingPupil()
  1320. {
  1321. var passwort = document.getElementById("Password").value;
  1322. if(passwort == "adminLenczak")
  1323. {
  1324. window.open("http://www.wms-hn.de/kurswahl/getMissingStudents.php?Klassen=", 'blank');
  1325. }
  1326. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement