Welcome to mirror list, hosted at ThFree Co, Russian Federation.

visitortimezone.js « js « core - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e984c90a894f3483343aed7faab6f375ea2d8981 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* global jstz */
$(document).ready(function () {
		$('#timezone_offset').val((-new Date().getTimezoneOffset() / 60));
		$('#timezone').val(jstz.determine().name());

		// only enable the submit button once we are sure that the timezone is set
		var $loginForm = $('form[name="login"]');
		if ($loginForm.length) {
			$loginForm.find('input#submit').prop('disabled', false);
		}
	}
);