widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #17837
[Merge] lp:~trimardio/widelands-website/scheduler_utc_fix into lp:widelands-website
Trimardio has proposed merging lp:~trimardio/widelands-website/scheduler_utc_fix into lp:widelands-website.
Commit message:
Fix the display of UTC. Currently, if there was no difference between your profile registered UTC and your browser's the text just says "you are currently noted as UTC" instead of "UTC + x"
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~trimardio/widelands-website/scheduler_utc_fix/+merge/369479
--
Your team Widelands Developers is requested to review the proposed merge of lp:~trimardio/widelands-website/scheduler_utc_fix into lp:widelands-website.
=== modified file 'wlscheduling/static/js/scheduling.js'
--- wlscheduling/static/js/scheduling.js 2018-11-22 17:50:41 +0000
+++ wlscheduling/static/js/scheduling.js 2019-06-29 19:40:22 +0000
@@ -17,17 +17,17 @@
// Add warning in case of disparency between browser and profil timezone
-function addTimeZoneWarningIfNeeded() {
+function addTimeZoneInfo() {
var userTimeZone = document.getElementById('django-data').getAttribute('user-time-zone')
var browserTimeZone = - new Date().getTimezoneOffset()/60
if ( browserTimeZone != userTimeZone) {
document.getElementById('timezone-error').removeAttribute("hidden");
- profilTime = document.getElementsByClassName('profil-time');
- for (var element in profilTime) {
- profilTime[element].innerHTML = cleanAndAddSign(userTimeZone);
- }
- document.getElementById('browser-time').innerHTML = cleanAndAddSign(browserTimeZone);
- }
+ }
+ profilTime = document.getElementsByClassName('profil-time');
+ for (var element in profilTime) {
+ profilTime[element].innerHTML = cleanAndAddSign(userTimeZone);
+ }
+ document.getElementById('browser-time').innerHTML = cleanAndAddSign(browserTimeZone);
}
function addPreviousDateFromUser(calendar) {
=== modified file 'wlscheduling/templates/wlscheduling/find.html'
--- wlscheduling/templates/wlscheduling/find.html 2018-11-09 07:00:30 +0000
+++ wlscheduling/templates/wlscheduling/find.html 2019-06-29 19:40:22 +0000
@@ -10,7 +10,7 @@
{% block content_main %}
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function(){
- addTimeZoneWarningIfNeeded();
+ addTimeZoneInfo();
addOtherUsersAvailabilities();
}, false);
</script>
=== modified file 'wlscheduling/templates/wlscheduling/scheduling.html'
--- wlscheduling/templates/wlscheduling/scheduling.html 2018-03-11 16:12:19 +0000
+++ wlscheduling/templates/wlscheduling/scheduling.html 2019-06-29 19:40:22 +0000
@@ -12,7 +12,7 @@
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function(){
var calendar = createCalendar();
- addTimeZoneWarningIfNeeded();
+ addTimeZoneInfo();
addPreviousDateFromUser(calendar);
addOtherUsersAvailabilities();
Follow ups