Changed whole project structure (split client and server into separat projects)

This commit is contained in:
hydrant
2019-02-25 22:12:05 +01:00
parent d2181c4987
commit 33abb3d04f
185 changed files with 282 additions and 596 deletions

View File

@@ -0,0 +1,75 @@
body {
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
overflow: hidden;
}
.table {
background-color: rgba(255, 255, 255, .8);
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
width: 350px;
margin: auto;
margin-top: 5%;
padding: 0px 20px 20px 20px;
}
.rankDnD {
background-color: dimgrey;
cursor: move;
}
.save-btn {
display:inline-block;
margin-top: 10px;
width: 100%;
border-radius: 5px;
background-color: forestgreen;
color: white;
outline: 0;
padding: 5px 10px;
border: none;
}
.save-btn:active {
outline: 0;
}
#rank-table {
margin-left: 50%;
transform: translateX(-50%);
width: 100%;
}
#rank-table tr {
width: 100%;
}
.input-rankname {
display: inline-block;
margin-left: 50%;
transform: translateX(-50%);
}
.delete-rank {
background-color: orangered;
color: white;
padding: 3px;
}
.delete-rank:hover, .delete-rank:focus, .delete-rank:active {
background-color: #ff0223 !important;
}
#rank-table tr td {
border-bottom: 1px solid black;
padding: 5px 15px;
}
#rank-table tr:last-child td {
border-bottom: none;
}
#rank-table > tr:not(:first-child):hover {
background-color: dimgrey;
cursor: move;
}

View File

@@ -0,0 +1,49 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
#black {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
z-index: -1;
background-color: rgba(0, 0, 0, .3);
}
.input-main {
display: block;
width: 70%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgba(0, 0, 0, .8);
padding: 10px;
}
.input-main h1 {
color: white;
font-size: 24px;
font-family: "Arial";
font-weight: lighter;
margin-bottom: 5px;
}
.input-main input {
width: 100%;
background-color: black;
outline: 0;
border: grey 1px solid;
color: white;
padding: 5px;
font-size: 20px;
font-family: "Arial";
font-weight: lighter;
}

View File

@@ -0,0 +1,150 @@
/**
* @overview Life of German Reallife - Login CSS style.css
* @author Orangebox, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
.login-page {
width: 360px;
margin: auto;
}
.isa_info, .isa_success, .isa_warning, .isa_error {
margin: 10px 0px;
padding: 12px;
display: none;
}
.isa_info {
color: #00529B;
background-color: #BDE5F8;
}
.isa_success {
color: #4F8A10;
background-color: #DFF2BF;
}
.isa_warning {
color: #9F6000;
background-color: #FEEFB3;
}
.isa_error {
color: #D8000C;
background-color: #FFBABA;
}
.isa_info i, .isa_success i, .isa_warning i, .isa_error i {
margin: 10px 22px;
font-size: 2em;
vertical-align: middle;
}
.form {
position: relative;
z-index: 1;
background: rgba(255, 255, 255, .85);
max-width: 360px;
padding: 20px 45px 45px 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
input {
font-family: "Roboto", sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
button {
font-family: "Roboto", sans-serif;
text-transform: uppercase;
outline: 0;
background: #0035A5;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
cursor: pointer;
}
button:hover, .form button:active, .form button:focus {
background: #002574;
}
.quitBtn {
background-color: orangered;
}
.quitBtn:hover, .quitBtn:focus, .quitBtn:active {
background-color: #cc3700 !important;
}
.message {
margin: 15px 0 0;
font-size: 12px;
}
.message a {
color: #0035A5;
text-decoration: none;
}
.register-form {
display: none;
}
.container {
position: relative;
z-index: 1;
max-width: 300px;
margin: 0 auto;
}
.container:before, .container:after {
content: "";
display: block;
clear: both;
}
.container .info {
margin: 50px auto;
text-align: center;
}
.info h1 {
margin: 0 0 15px;
padding: 0;
font-size: 36px;
font-weight: 300;
color: #1a1a1a;
}
.info span {
color: #4d4d4d;
font-size: 12px;
}
.info span a {
color: #000000;
text-decoration: none;
}
.info span .fa {
color: #EF3B3A;
}
body {
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
}

View File

@@ -0,0 +1,443 @@
@font-face {
font-family: 'OSL';
src: url('package://assets/font/OpenSans-Bold.ttf') format('truetype');
}
*:focus {
outline: none;
}
body {
font-family:Arial, "Helvetica Neue", Helvetica, sans-serif;
font-size:14px;
font-style:normal;
font-variant:normal;
font-weight:400;
line-height:3;
}
span.arrow {
display:none!important;
}
* {
box-sizing:Border-box;
-webkit-touch-callout:none;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
color:#000!important;
font-family:OSL;
}
.circular-menu-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width:none;
width:auto;
}
.circular-menu {
width:600px;
height:600px;
position:relative;
overflow:hidden;
border-radius:50%;
z-index:1;
list-style:none;
box-shadow:0 0 15px #333;
}
.center-section {
width: 360px;
height: 360px;
position: absolute;
top: 50%;
left: 50%;
margin-top: -180px;
margin-left: -180px;
border-radius: 50%;
text-align: center;
background-color: white;
box-shadow: inset 0 0 15px #333;
display: none;
z-index: 2;
cursor: default;
padding: 55px;
}
.circular-menu li:hover ~ .center-section.section-intro,.touch .circular-menu li:focus ~ .center-section.section-intro {
display:none;
}
.touch .circular-menu li:focus {
outline:0;
}
.circular-menu li div.label {
position:absolute;
width:180px;
height:180px;
z-index:2;
}
.circular-menu li div.label p {
text-align:center;
max-width:145.8px;
color:#000;
font-size: 12px;
margin: 65px 20px 7px;
line-height: 1;
}
.circular-menu li span.arrow {
position:absolute;
width:30px;
height:30px;
display:block;
transition:all 300ms ease-out;
z-index:2;
}
.circular-menu li .bg {
width:350px;
height:300px;
position:absolute;
transform-origin:0 300px;
margin-top:-300px;
left:50%;
top:50%;
transition: background 300ms ease-out;
}
.circular-menu li {
position:absolute;
text-decoration:none;
top:50%;
left:50%;
display:none;
}
.circular-menu li:nth-child(1) .bg {
transform:rotate(-70deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(1) span.arrow {
transform:rotate(-45deg);
background:rgba(255,255,255,0.6);
margin:-225px 0 0 -15px;
}
.circular-menu li:nth-child(1) div.label {
margin:-330px 0 0 -90px;
}
.circular-menu li:nth-child(2) .bg {
transform:rotate(-30deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(2) span.arrow {
transform:rotate(-5deg);
background:rgba(255,255,255,0.6);
margin:-175.869333055px 0 0 119.9853980342px;
}
.circular-menu li:nth-child(2) div.label {
margin:-273.8506663486px 0 0 64.2690263248px;
}
.circular-menu li:nth-child(3) .bg {
transform:rotate(10deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(3) span.arrow {
transform:rotate(35deg);
background:rgba(255,255,255,0.6);
margin:-51.4661173101px 0 0 191.8096281326px;
}
.circular-menu li:nth-child(3) div.label {
margin:-131.6755626401px 0 0 146.3538607229px;
}
.circular-menu li:nth-child(4) .bg {
transform:rotate(50deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(4) span.arrow {
transform:rotate(75deg);
background:rgba(255,255,255,0.6);
margin:90px 0 0 166.8653347947px;
}
.circular-menu li:nth-child(4) div.label {
margin:30px 0 0 117.8460969083px;
}
.circular-menu li:nth-child(5) .bg {
transform:rotate(90deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(5) span.arrow {
transform:rotate(115deg);
background:rgba(255,255,255,0.6);
margin:182.335450365px 0 0 56.8242300984px;
}
.circular-menu li:nth-child(5) div.label {
margin:135.5262289886px 0 0 -7.9151656019px;
}
.circular-menu li:nth-child(6) .bg {
transform:rotate(130deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(6) span.arrow {
transform:rotate(155deg);
background:rgba(255,255,255,0.6);
margin:182.335450365px 0 0 -86.8242300984px;
}
.circular-menu li:nth-child(6) div.label {
margin:135.5262289886px 0 0 -172.0848343982px;
}
.circular-menu li:nth-child(7) .bg {
transform:rotate(170deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(7) span.arrow {
transform:rotate(195deg);
background:rgba(255,255,255,0.6);
margin:90px 0 0 -196.8653347945px;
}
.circular-menu li:nth-child(7) div.label {
margin:30px 0 0 -297.846096908px;
}
.circular-menu li:nth-child(8) .bg {
transform:rotate(210deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(8) span.arrow {
transform:rotate(235deg);
background:rgba(255,255,255,0.6);
margin:-51.4661173026px 0 0 -221.8096280805px;
}
.circular-menu li:nth-child(8) div.label {
margin:-131.6755626315px 0 0 -326.3538606634px;
}
.circular-menu li:nth-child(9) .bg {
transform:rotate(250deg) skew(-50deg);
background:rgba(255,255,255,0.6);
}
.circular-menu li:nth-child(9) span.arrow {
transform:rotate(275deg);
background:rgba(255,255,255,0.6);
margin:-175.8693324509px 0 0 -149.985394581px;
}
.circular-menu li:nth-child(9) div.label {
margin:-273.8506656582px 0 0 -244.2690223782px;
}
.m {
margin-left:58px;
margin-top: -8px;
}
.m1 {
margin-left:2.4vw;
margin-top:-.6vw;
}
.m2 {
margin-left:60px;
margin-top: -7px;
}
.m4 {
margin-left:68px;
margin-top: -6px;
transform: rotate(-0deg);
width: 70px;
}
.m5 {
margin-left:53px;
margin-top: -6px;
transform: rotate(1deg);
}
.m6 {
transform:scaleX(-1);
margin-top:-5px;
margin-bottom:20px;
margin-left:54px;
max-width:none;
width:60px;
}
.middletext {
z-index:20000;
text-align:center;
color:#000!important;
position:absolute;
top:13vw;
left:48vw;
font-size:13px;
}
.information {
background:rgba(255,255,255,0.6);
border-radius:2px;
max-width:none;
width: 41vw;
box-shadow:0 0 15px #333;
position: absolute;
top: 630px;
left: 30vw;
margin-top: 1vw;
display: none;
}
.information-title {
text-align:center;
}
.information-text {
height:174px;
margin: 1px 40px 35px;
}
.center-section.section-intro,.circular-menu li:nth-child(1):hover div.center-section.section-1,.touch .circular-menu li:nth-child(1):focus div.center-section.section-1,.circular-menu li:nth-child(2):hover div.center-section.section-2,.touch .circular-menu li:nth-child(2):focus div.center-section.section-2,.circular-menu li:nth-child(3):hover div.center-section.section-3,.touch .circular-menu li:nth-child(3):focus div.center-section.section-3,.circular-menu li:nth-child(4):hover div.center-section.section-4,.touch .circular-menu li:nth-child(4):focus div.center-section.section-4,.circular-menu li:nth-child(5):hover div.center-section.section-5,.touch .circular-menu li:nth-child(5):focus div.center-section.section-5,.circular-menu li:nth-child(6):hover div.center-section.section-6,.touch .circular-menu li:nth-child(6):focus div.center-section.section-6,.circular-menu li:nth-child(7):hover div.center-section.section-7,.touch .circular-menu li:nth-child(7):focus div.center-section.section-7,.circular-menu li:nth-child(8):hover div.center-section.section-8,.touch .circular-menu li:nth-child(8):focus div.center-section.section-8,.circular-menu li:nth-child(9):hover div.center-section.section-9,.touch .circular-menu li:nth-child(9):focus div.center-section.section-9 {
display:block;
}
.circular-menu li:nth-child(1),.circular-menu li:nth-child(2),.circular-menu li:nth-child(3),.circular-menu li:nth-child(4),.circular-menu li:nth-child(5),.circular-menu li:nth-child(6),.circular-menu li:nth-child(7),.circular-menu li:nth-child(8),.circular-menu li:nth-child(9) {
display:block;
cursor:pointer;
}
.circular-menu li:nth-child(1):hover .bg,.touch .circular-menu li:nth-child(1):focus .bg,.circular-menu li:nth-child(2):hover .bg,.touch .circular-menu li:nth-child(2):focus .bg,.circular-menu li:nth-child(3):hover .bg,.touch .circular-menu li:nth-child(3):focus .bg,.circular-menu li:nth-child(4):hover .bg,.touch .circular-menu li:nth-child(4):focus .bg,.circular-menu li:nth-child(5):hover .bg,.touch .circular-menu li:nth-child(5):focus .bg,.circular-menu li:nth-child(6):hover .bg,.touch .circular-menu li:nth-child(6):focus .bg,.circular-menu li:nth-child(7):hover .bg,.touch .circular-menu li:nth-child(7):focus .bg,.circular-menu li:nth-child(8):hover .bg,.touch .circular-menu li:nth-child(8):focus .bg,.circular-menu li:nth-child(9):hover .bg,.touch .circular-menu li:nth-child(9):focus .bg {
background:rgba(255,255,255,0.9);
}
img {
width:60px;
}
.options {
background:rgba(255,255,255,0.6);
border-radius:2px;
max-width:none;
width:auto;
box-shadow:0 0 15px #333;
margin: 20px 16vw 20px 65vw;
position: relative;
z-index: 200;
top: 3vw;
padding-bottom: 0vw;
height: 17vw;
left: 9vw;
}
.options {
text-align:center;
}
.options-buttons {
padding-top: 0.2vw;
padding-bottom: 0.2vw;
background: #81ff9d;
border: 1px solid rgba(0, 0, 0, 0.2);
margin-left: 3vw;
margin-right: 3vw;
border-radius: 20px 0px;
cursor: pointer;
font-size: 1vw;
transition: 0.1s;
box-shadow: 0 0 5px #333;
}
.options-buttons:hover {
background: #b2ffc3;
}
.price {
height: 1vw;
padding: 2vw;
background: rgba(0, 0, 0, 0.2);
border: 1px solid rgba(0, 0, 0, 0.3);
margin-left: 2vw;
margin-right: 2vw;
margin-top: 2vw;
/*box-shadow: 0 0 5px #333;*/
}
input:not([type]), input[type="email" i], input[type="number" i], input[type="password" i], input[type="tel" i], input[type="url" i], input[type="text" i] {
padding: 0px 0px;
}
input {
-webkit-appearance: textfield;
background-color: #cccccc;
cursor: text;
padding: 1px;
border-width: 0px;
border-style: inset;
border-color: initial;
border-image: initial;
}
input, textarea, select, button {
text-rendering: auto;
color: initial;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
display: inline-block;
text-align: start;
margin: 0em;
font: 400 13.3333px Arial;
width: 280px;
margin-left: 171px;
height: 41px;
position: relative;
top: -30px;
font-size: 21px;
z-index: 10000000;
}
.price-text {
position: relative;
top: -2.6vw;
z-index: 2000000;
font-size: 1vw;
}
.number-dollar {
position: relative;
font-size: 2vw;
top: -8vw;
left: 5vw;
font-family: 'OSL';
}

Binary file not shown.

View File

@@ -0,0 +1,29 @@
<!--
* @overview Life of German Reallife - Client Save.html
* @author hydrant
* @copyright (c) 2008 - 2018 Life of German
*-->
<!DOCTYPE html>
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="package://assets/css/factionmanagement/ranks/style.css" />
</head>
<body>
<div class="table">
<table id="rank-table"></table>
<div class="add-rank">
<input id="input-new-rank" placeholder="Neuer Rang"/>
<button id="btn-add-new-rank">Hinzufügen</button>
</div>
<button class="save-btn">Speichern</button>
</div>
<script src="package://assets/js/jquery-3.3.1.min.js"></script>
<script src="package://assets/js/jquery.tablednd.0.8.min.js"></script>
<script src="package://assets/js/jquery.gettable.js"></script>
<script src="package://assets/js/factionmanagement/ranks/script.js"></script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="package://assets/css/inputhelper/style.css" />
</head>
<body>
<div id="black"></div>
<div class="input-main">
<h1></h1>
<input id="input-value" autofocus>
</div>
<script type="text/javascript" src="package://assets/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
mp.trigger('cef_request_title');
$('#input-value').keydown(function (e) {
if (e.keyCode != 13) return;
var currentValue = $('#input-value').val();
if (currentValue) {
mp.trigger('cef_inputhelper_sendvalue', currentValue);
console.log("triggered event: " + currentValue);
}
});
});
function setTitle(title) {
$('.input-main h1').text(title);
}
</script>
</body>
</html>

View File

@@ -0,0 +1,51 @@
<!--
* @overview Life of German Reallife - Client Login login.html
* @author Orangebox, hydrant, VegaZ
* @copyright (c) 2008 - 2018 Life of German
*-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="package://assets/css/login/style.css" />
</head>
<body>
<div class="login-page" style="padding: 10% 0 0;">
<div class="form">
<div class="isa_error">
ERROR TEXT
</div>
<div class="register-form form-l">
<input type="password" placeholder="Passwort" id="passwordInputRegister" />
<input type="password" placeholder="Passwort wiederholen" id="passwordRepeatInputRegister" />
<button id="registerBtn" onclick="registerPlayer()";>Registrieren</button><br /><br />
<button class="quitBtn">Server verlassen</button>
<p class="message">Bereits registriert? <a href="#">Logg dich ein</a></p>
</div>
<div class="login-form form-l">
<input type="password" placeholder="Passwort" id="passwordInputLogin" />
<button id="loginBtn" onclick="loginPlayer()">Einloggen</button><br /><br />
<button class="quitBtn">Server verlassen</button>
<p class="message">Nicht registriert? <a href="#">Erstelle einen Account</a></p>
</div>
</div>
</div>
<script src="package://assets/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
$(".message a").click(() => {
$(".form-l").animate({ height: "toggle", opacity: "toggle" }, "slow");
});
$(".quitBtn").click(() => {
resourceCall("Quit");
});
function showError(error) {
$(".isa_error").html(error.toString());
$(".isa_error").slideDown();
}
</script>
<script src="package://assets/js/login/script.js" type="text/javascript"></script>
</body>
</html>

View File

@@ -0,0 +1,120 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="package://assets/css/vehiclemenu/style.css">
</head>
<body>
<div class="circular-menu-container">
<div class="center-section section-intro">
</div>
<ul class="circular-menu">
<li class="" tabindex="1">
<div class="center-section section-1">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<p>Schließen</p>
<img class="m" src="package://assets/img/vehiclemenu/exit.png">
</div>
</li>
<li class="" tabindex="2">
<div class="center-section section-2">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<!--<p>Geld Geben</p>
<img class="m4" src="package://assets/img/vehiclemenu/i9.png">-->
</div>
</li>
<li class="" tabindex="3">
<div class="center-section section-3">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<p>Türen öffnen / schließen</p>
<img class="m6" src="package://assets/img/vehiclemenu/door.png">
</div>
</li>
<li class="" tabindex="4">
<div class="center-section section-4">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<!--<p>Lizenzen zeigen</p>
<img class="m6" src="package://assets/img/vehiclemenu/i11.png">-->
</div>
</li>
<li class="" tabindex="5">
<div class="center-section section-5">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<p>Auf -/ Abschließen</p>
<img class="m" src="package://assets/img/vehiclemenu/lock.png">
</div>
</li>
<li class="" tabindex="6">
<div class="center-section section-6">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<p>Tanken</p>
<img class="m2" src="package://assets/img/vehiclemenu/fill.png">
</div>
</li>
<li class="" tabindex="7">
<div class="center-section section-7">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<!--<p>Personalausweis ansehen</p>
<img class="m" src="package://assets/img/vehiclemenu/i10.png">-->
</div>
</li>
<li class="" tabindex="8">
<div class="center-section section-8">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<p>Motor betätigen</p>
<img class="m" src="package://assets/img/vehiclemenu/power.png">
</div>
</li>
<li class="" tabindex="9">
<div class="center-section section-9">
</div>
<span class="arrow"></span>
<div class="bg"></div>
<div class="label">
<!--<p>Durchsuchen</p>
<img class="m5" src="package://assets/img/vehiclemenu/i14.png">-->
</div>
</li>
</ul>
</div>
<script src="package://assets/js/jquery-3.3.1.min.js"></script>
<!--<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>-->
<script>
$(document).ready(function () {
$("ul li").click(function () {
var action = parseInt($(this).attr("tabindex"));
console.log(action);
mp.trigger('doAction', action);
});
});
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,63 @@
/**
* @overview Life of German Reallife - Faction Manager Rank (script.js)
* @author hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
var dndConfig = {
onDragClass: "rankDnD"
};
$(document).ready(function () {
mp.trigger("onManageFactionRanksLoaded");
$("table#rank-table").on("click", "tr td span", function () {
$(this).parent().parent().remove();
$("table#rank-table").tableDnD(dndConfig);
});
$("#btn-add-new-rank").click(function () {
var toAdd = $("input#input-new-rank").val();
if (toAdd.length === 0) return;
$("input#input-new-rank").val("");
$("table#rank-table").append("<tr><td style='display:none;'><input disabled class='input-id' value='0' /></td><td><input class='input-rankname' value='" + toAdd + "' /><td><span class='delete-rank'>X</span></td></tr>");
$("table#rank-table").tableDnD(dndConfig);
});
$(".save-btn").click(function () {
var rows = $("table#rank-table tr");
rows = rows.slice(1);
if (rows.length === 0) {
alert("Es muss mindestens ein Rang angegeben werden!");
return;
}
var rankArray = new Array();
rows.each(function () {
var id = $(this).find("input.input-id")[0].value;
var name = $(this).find("input.input-rankname")[0].value;
var rank = new Object();
rank.Id = parseInt(id);
rank.Name = name;
rankArray.push(rank);
});
var json = JSON.stringify(rankArray);
mp.trigger('saveFactionRankData', json);
});
});
function loadData(rankData) {
$("table#rank-table tr").remove();
$("table#rank-table").append("<tr class='nodrop nodrag'><th style='display:none;'>ID</th><th>Fraktions-Ränge</th></tr>");
rankData.forEach(function (rank) {
$("table#rank-table").append("<tr><td style='display:none;'><input disabled class='input-id' value='" + rank.Id + "' /></td><td><input class='input-rankname' value='" + rank.Name + "' /><td><span class='delete-rank'>X</span></td></tr>");
});
$("table#rank-table").tableDnD(dndConfig);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
!function (n) { "use strict"; function e(e, t) { n.each(t, function (t, o) { n.inArray(o, e) < 0 && e.push(o) }) } function t(t, o) { function r(n) { var e; if (!c.rows[n]) for (e = 0; n >= e; e++)c.rows[e] = c.rows[e] || { cells: [], table: c }; return c.rows[n] } function l(n) { var e; if (!c.cols[n]) for (e = 0; n >= e; e++)c.cols[e] = c.cols[e] || { cells: [], table: c }; return c.cols[n] } var c = { rows: [], cols: [], cells: [] }, s = "number" == typeof o ? o : y.length, u = -1, a = {}, i = "table" === t.get(0).nodeName.toLowerCase() ? t.get(0) : function () { var n = t.closest("table"); return n.length ? n.get(0) : void 0 }(); return i ? (c.elm = i, n(i).data(N, "table:" + s), n.each(i.rows, function (e, t) { var o, i, f, h, w, v, g, m, b, d = 0; for (n(t).data(N, "table:" + s + ",row:" + e), function () { var e = 0; n.each(t.cells, function (n, t) { e += +t.colSpan || 1 }), e - 1 > u && (u = e - 1) }(), h = 0; u >= h; h++)if ((!a[e] || !a[e][h]) && (w = t.cells[d++])) { for (n(w).data(N, "table:" + s + ",cell:" + c.cells.length), f = { elm: w, rows: [], cols: [], table: c, iRow: e, iCol: h }, v = (+w.rowSpan || 1) - 1, g = (+w.colSpan || 1) - 1, m = 0; v >= m; m++)o = r(e + m), f.rows.push(o), o.cells.push(f); for (m = 0; g >= m; m++)i = l(h + m), f.cols.push(i), i.cells.push(f); for (m = 1; v >= m; m++)for (a[e + m] = a[e + m] || {}, b = 0; g >= b; b++)a[e + m][h + b] = !0; h += g, c.cells.push(f) } }), n.each(c.cells, function (t, o) { var r = [o]; n.each(o.rows.concat(o.cols), function (n, t) { e(r, t.cells) }), o.xCells = r }), n.each(c.rows, function (n, e) { e.cells.sort(function (n, e) { return n.iCol - e.iCol }) }), n.each(c.cols, function (n, e) { e.cells.sort(function (n, e) { return n.iRow - e.iRow }) }), y[s] = c, c) : null } function o(n) { for (var e, t = {}, o = n.data(N) || "", r = /\b(\w+):(\d+)/g; null !== (e = r.exec(o));)t[e[1]] = +e[2]; return t } function r(n, e) { var r = o(n).table; return e || "number" != typeof r || !y[r] ? t(n, r) : y[r] } function l(n) { return "table" === n } function c(n) { return "tr" === n } function s(n) { return "td" === n || "th" === n } function u(n) { return "thead" === n || "tfoot" === n || "tbody" === n } function a(n) { return l(n) || c(n) || s(n) || u(n) } function i(e) { return n.map(e, function (n) { return n.elm }) } function f(e) { return n(i(e)) } function h(t) { var a = []; return t.each(function () { var t, f = n(this), h = f.get(0).nodeName.toLowerCase(); l(h) && (t = r(f)) ? e(a, i(t.cells)) : c(h) && (t = r(f)) ? e(a, i(t.rows[o(f).row].cells)) : s(h) && (t = r(f)) ? e(a, [t.cells[o(f).cell].elm]) : u(h) && (t = r(f)) && n.each(f.get(0).rows, function (r, l) { e(a, i(t.rows[o(n(l)).row].cells)) }) }), n(a.length ? a : null) } function w(t) { var l = []; return t.each(function () { var t, c = n(this), u = c.get(0).nodeName.toLowerCase(); s(u) && (t = r(c)) && e(l, i(t.cells[o(c).cell].xCells)) }), n(l.length ? l : null) } function v(t) { var a = []; return t.each(function () { var t, i = n(this), f = i.get(0).nodeName.toLowerCase(); l(f) && (t = r(i)) ? e(a, t.rows) : c(f) && (t = r(i)) ? e(a, [t.rows[o(i).row]]) : s(f) && (t = r(i)) ? e(a, t.cells[o(i).cell].rows) : u(f) && (t = r(i)) && e(a, n.map(i.get(0).rows, function (e) { return t.rows[o(n(e)).row] })) }), a } function g(t) { var a = []; return t.each(function () { var t, i = n(this), f = i.get(0).nodeName.toLowerCase(); (l(f) || c(f) || u(f)) && (t = r(i)) ? e(a, t.cols) : s(f) && (t = r(i)) && e(a, t.cells[o(i).cell].cols) }), a } function m(e) { return n.map(v(e), function (n) { return f(n.cells) }) } function b(t) { var o = []; return n.each(v(t), function (n, t) { e(o, i(t.cells)) }), n(o.length ? o : null) } function d(e) { return n.map(g(e), function (n) { return f(n.cells) }) } function p(t) { var o = []; return n.each(g(t), function (n, t) { e(o, i(t.cells)) }), n(o.length ? o : null) } function C(t) { var o = []; return t.each(function () { var t, l = n(this), c = l.get(0).nodeName.toLowerCase(); a(c) && (t = r(l)) && e(o, [t.elm]) }), n(o.length ? o : null) } function L(e) { return e.each(function () { var e = n(this), t = e.get(0).nodeName.toLowerCase(); a(t) && r(e, !0) }) } var N = "getTable", y = []; n.fn[N] = function (n) { return "cells" === n ? h(this) : "xCells" === n ? w(this) : "rows" === n ? m(this) : "rowsCells" === n ? b(this) : "cols" === n ? d(this) : "colsCells" === n ? p(this) : "table" === n ? C(this) : L(this) } }(jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,40 @@
/**
* @overview Life of German Reallife - Login Login login.js
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
function registerPlayer() {
var password = document.getElementById("passwordInputRegister").value;
var passwordRepeat = document.getElementById("passwordRepeatInputRegister").value;
if(password === "" || passwordRepeat === "") {
showError("Mindestens ein Passwort Feld ist leer!");
return;
}
if (password !== passwordRepeat) {
showError("Die beiden Passwörter stimmen nicht überein!");
return;
}
if (password.length < 8) {
showError("Das Passwort muss mindestens 8 Zeichen lang sein");
return;
}
$('.isa_error').hide();
mp.trigger("registerInformationToServer", password);
}
function loginPlayer() {
let password = document.getElementById("passwordInputLogin").value;
if (password === "") {
showError("Du musst ein Passwort angeben!");
return;
}
$('.isa_error').hide();
mp.trigger("loginInformationToServer", password);
}