[chronojump-server] Date in results and sprints are being shown directly fromn server. Velocity step counter set to 0, 1.
- From: Marcos Venteo Garcia <mventeo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump-server] Date in results and sprints are being shown directly fromn server. Velocity step counter set to 0, 1.
- Date: Thu, 29 Jun 2017 09:38:36 +0000 (UTC)
commit 94c0682a80df185f910856a65a6ba2cf98bde833
Author: Marcos Venteo <mventeo gmail com>
Date: Thu Jun 29 11:37:11 2017 +0200
Date in results and sprints are being shown directly fromn server. Velocity step counter set to 0,1.
/airport url is working again and it is a redirection to /airport/1
chronojumpserver/js/results.js | 4 ++++
chronojumpserver/js/sprints.js | 3 +++
chronojumpserver/templates/player_list.html | 2 +-
chronojumpserver/views.py | 4 ++--
4 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/chronojumpserver/js/results.js b/chronojumpserver/js/results.js
index 363559f..948868a 100755
--- a/chronojumpserver/js/results.js
+++ b/chronojumpserver/js/results.js
@@ -64,13 +64,17 @@ $(document).ready(function() {
title: "Data",
data: "dt",
render: function(value) {
+
// Compare with today
today = new Date();
+ // To adjust the hour
+ var _offsetHours = today.getTimezoneOffset()/60;
var dd = today.getDate();
var mm = today.getMonth();
var yy = today.getFullYear();
var dt = new Date(value);
+ dt.setHours(dt.getHours() + _offsetHours);
var dd2 = dt.getDate();
var mm2 = dt.getMonth();
var yy2 = dt.getFullYear();
diff --git a/chronojumpserver/js/sprints.js b/chronojumpserver/js/sprints.js
index 0191247..6007947 100644
--- a/chronojumpserver/js/sprints.js
+++ b/chronojumpserver/js/sprints.js
@@ -64,11 +64,14 @@ $(document).ready(function() {
render: function(value) {
// Compare with today
today = new Date();
+ // To adjust the hour
+ var _offsetHours = today.getTimezoneOffset()/60;
var dd = today.getDate();
var mm = today.getMonth();
var yy = today.getFullYear();
var dt = new Date(value);
+ dt.setHours(dt.getHours() + _offsetHours);
var dd2 = dt.getDate();
var mm2 = dt.getMonth();
var yy2 = dt.getFullYear();
diff --git a/chronojumpserver/templates/player_list.html b/chronojumpserver/templates/player_list.html
index 478a15d..f932b05 100755
--- a/chronojumpserver/templates/player_list.html
+++ b/chronojumpserver/templates/player_list.html
@@ -68,7 +68,7 @@
</div>
<label for="recipient-name" class="col-sm-2
control-label">Velocitat:</label>
<div class="col-sm-2">
- <input id="taskSpeed"
name="taskSpeed" type="number" class="form-control" ></input>
+ <input id="taskSpeed"
name="taskSpeed" type="number" class="form-control" min="-1" step="0.1"></input>
</div>
<label for="recipient-name" class="col-sm-2
control-label">% Vel. Max:</label>
<div class="col-sm-2">
diff --git a/chronojumpserver/views.py b/chronojumpserver/views.py
index 1fa0547..2e896ec 100755
--- a/chronojumpserver/views.py
+++ b/chronojumpserver/views.py
@@ -19,10 +19,10 @@ def index():
@app.route('/airport')
def airport():
"""Airport mode."""
- redirect('/airport/1')
+ return redirect('/airport/1')
@app.route('/airport/<pageId>')
-def airport_page(pageId):
+def airport_page(pageId=1):
"""Airport mode."""
stations = [ station.serialize for station in Station.query.filter(Station.type != 'S')]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]