Browse Source

Drop dependency on JsTimeZoneDetect (#8965)

pull/8983/head
Aleksander Machniak 2 years ago
parent
commit
ef9d345441
  1. 1
      CHANGELOG.md
  2. 11
      jsdeps.json
  3. 3
      program/include/rcmail_output_html.php
  4. 10
      program/js/app.js

1
CHANGELOG.md

@ -3,6 +3,7 @@
## Unreleased
- Update to jQuery 3.6.3
- Drop dependency on JsTimeZoneDetect (#8965)
- Removed support for MS SQL Server and Oracle (#7854)
- Store uploads metadata in a separate sql database table instead of a session (#8415)
- Advanced mail search syntax with more possibilities (without UI) (#8502)

11
jsdeps.json

@ -11,17 +11,6 @@
"copyright": "Copyright JS Foundation and other contributors",
"source": "https://github.com/jquery/jquery/tree/$v"
},
{
"lib": "jstz",
"name": "jsTimezoneDetect",
"version": "1.0.7",
"url": "https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.7/jstz.min.js",
"dest": "program/js/jstz.min.js",
"sha1": "a858ff12014b232fcc7c4c2e9f014ff852ddb917",
"license": "MIT",
"copyright": "Copyright (c) Jon Nylander",
"source": "https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.7/jstz.min.js"
},
{
"lib": "publickey",
"name": "PublicKey.js",

3
program/include/rcmail_output_html.php

@ -2468,9 +2468,6 @@ EOF;
$out = $this->form_tag(['name' => $form_name, 'method' => 'post'], $out);
}
// include script for timezone detection
$this->include_script('jstz.min.js');
return $out;
}

10
program/js/app.js

@ -589,8 +589,7 @@ function rcube_webmail()
break;
case 'login':
var tz, tz_name,
input_user = $('#rcmloginuser'),
var tz, input_user = $('#rcmloginuser');
input_tz = $('#rcmlogintz');
if (input_user.val() == '')
@ -599,10 +598,11 @@ function rcube_webmail()
$('#rcmloginpwd').focus();
// detect client timezone
if (window.jstz && (tz = jstz.determine()))
tz_name = tz.name();
try {
tz = Intl.DateTimeFormat().resolvedOptions().timeZone
} catch (e) { };
input_tz.val(tz_name ? tz_name : (new Date().getStdTimezoneOffset() / -60));
input_tz.val(tz ? tz : (new Date().getStdTimezoneOffset() / -60));
// display 'loading' message on form submit, lock submit button
$('form').submit(function () {

Loading…
Cancel
Save