Browse Source

Merge branch 'morejson' of git.someserver.de:k4ever into morejson

Sebastian Lohff 9 years ago
parent
commit
cadeffec3a

+ 15
- 0
k4ever/main/templates/403.html View File

@@ -0,0 +1,15 @@
1
+{% extends "base.html" %}
2
+
3
+{% comment %}
4
+# This file is part of k4ever, a point-of-sale system
5
+#   Contact............  <k4ever@lists.someserver.de>
6
+#   Website............  http://k4ever.someserver.de/
7
+#   Bug tracker........  http://k4ever.someserver.de/report
8
+#
9
+# Licensed under GNU Affero General Public License v3 or later
10
+{% endcomment %}
11
+
12
+{% block "content" %}
13
+	<h2>Whoops! Wir glauben du gehörst hier nicht hin...</h2>
14
+	<p>...zumindest sagt uns das dein Ausweis. Wie dem auch sei: Bis hierhin und nicht weiter</p>
15
+{% endblock %}

+ 17
- 0
k4ever/main/templates/404.html View File

@@ -0,0 +1,17 @@
1
+{% extends "base.html" %}
2
+
3
+{% comment %}
4
+# This file is part of k4ever, a point-of-sale system
5
+#   Contact............  <k4ever@lists.someserver.de>
6
+#   Website............  http://k4ever.someserver.de/
7
+#   Bug tracker........  http://k4ever.someserver.de/report
8
+#
9
+# Licensed under GNU Affero General Public License v3 or later
10
+{% endcomment %}
11
+
12
+{% block "content" %}
13
+	<h2>Whoops! Da ist was schiefgegangen</h2>
14
+	<p>Die Seite, die du angefordert hast, konnte nicht gefunden werden.</p>
15
+
16
+	<p>Zahllose Ponies sind bereits auf der Suche nach ihr.</p>
17
+{% endblock %}

+ 31
- 0
k4ever/main/templates/500.html View File

@@ -0,0 +1,31 @@
1
+{% extends "base.html" %}
2
+
3
+{% comment %}
4
+# This file is part of k4ever, a point-of-sale system
5
+#   Contact............  <k4ever@lists.someserver.de>
6
+#   Website............  http://k4ever.someserver.de/
7
+#   Bug tracker........  http://k4ever.someserver.de/report
8
+#
9
+# Licensed under GNU Affero General Public License v3 or later
10
+{% endcomment %}
11
+
12
+{% block head %}
13
+	<link rel="stylesheet" media="screen" type="text/css"
14
+		href="/media/css/style.css" />
15
+	{% block extrastyle %}{% endblock %}
16
+	<script type="text/javascript">
17
+		var MEDIA_URL = "/media/";
18
+	</script>
19
+	<script type='text/javascript' src="/media/js/jquery-1.5.1.js"></script>
20
+	<script type='text/javascript' src="/media/js/jquery-ui-1.8.10.custom.min.js"></script>
21
+	<script type='text/javascript' src="/media/js/jquery.ui.autocomplete.html.js"></script>
22
+	<script type='text/javascript' src="/media/js/jquery.gritter.min.js"></script>
23
+	<script type='text/javascript' src="/media/js/k4ever.js"></script>
24
+{% endblock head %}
25
+
26
+{% block "content" %}
27
+	<h2>Whoops! Da ist was schiefgegangen</h2>
28
+	<p>Bei der Bearbeitung deiner Anfrage ist ein Fehler aufgetreten für den du nichts kannst. Sorry!</p>
29
+
30
+	<p>Bitte nutze den Zurück-Button deines Browsers um zurückzufahren.</p>
31
+{% endblock %}

+ 3
- 1
k4ever/main/templates/base.html View File

@@ -11,11 +11,12 @@
11 11
 <html {% if user.is_authenticated %}class="loggedIn"{% endif %}>
12 12
 	<head>
13 13
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
14
+		{% block head %}
14 15
 		<link rel="stylesheet" media="screen" type="text/css"
15 16
 			href="{{ MEDIA_URL }}css/style.css" />
16 17
 		{% block extrastyle %}{% endblock %}
17 18
 		<script type="text/javascript">
18
-			var MEDIA_URL = "{{MEDIA_URL}}";
19
+			var MEDIA_URL = "{{ MEDIA_URL }}";
19 20
 		</script>
20 21
 		<script type='text/javascript' src="{{ MEDIA_URL }}js/jquery-1.5.1.js"></script>
21 22
 		<script type='text/javascript' src="{{ MEDIA_URL }}js/jquery-ui-1.8.10.custom.min.js"></script>
@@ -23,6 +24,7 @@
23 24
 		<script type='text/javascript' src="{{ MEDIA_URL }}js/jquery.gritter.min.js"></script>
24 25
 		<script type='text/javascript' src="{{ MEDIA_URL }}js/k4ever.js"></script>
25 26
 		{% block extrahead %}{% endblock %}
27
+		{% endblock head %}
26 28
 		<title>Freitagsrundenkasse{% block "title" %}{% endblock %}</title>
27 29
 	</head>
28 30
 	<body{%block bodyargs %}{%endblock%}>

+ 0
- 5
k4ever/main/templates/registration/loginForm.html View File

@@ -29,8 +29,3 @@
29 29
 	<input type="hidden" name="next" value="{{ next }}" />
30 30
 </form>
31 31
 
32
-
33
-<div class="notice">
34
-	<h2>Das Kassensystem ist 'Aktiv' - nutzt euren Frunden-Account</h2>
35
-</div>
36
-

+ 9
- 1
k4ever/media/js/k4ever.js View File

@@ -25,6 +25,13 @@ jQuery(document).ready(function($) {
25 25
 		}, options), callback);
26 26
 	};
27 27
 
28
+	var updateBalance = function(newBalance) {
29
+		var balanceString = $("span.balance").text().split(": ");
30
+		balanceString[1] = parseFloat(newBalance).toFixed(2).replace(".", ",") + " €";
31
+
32
+		$("span.balance").text(balanceString.join(": "));
33
+	}
34
+
28 35
 	$.extend($.gritter.options, {
29 36
 		position: "bottom-right",
30 37
 		fade_in_speed: 250,
@@ -61,6 +68,7 @@ jQuery(document).ready(function($) {
61 68
 			});
62 69
 
63 70
 			dataContainer.children().removeClass("locked");
71
+			updateBalance(data.balance);
64 72
 		}, options);
65 73
 	});
66 74
 
@@ -121,7 +129,7 @@ jQuery(document).ready(function($) {
121 129
 
122 130
 						if(status === "success") {
123 131
 							selected_item.addClass("success");
124
-							//TODO neuer kontostand wär schnaffte
132
+							updateBalance(data.balance);
125 133
 						} else {
126 134
 							selected_item.addClass("failure");
127 135
 						}

Loading…
Cancel
Save