Move timezone check to external JS

This commit is contained in:
Lukas Reschke 2013-01-21 21:10:44 +01:00
parent 0c59074eeb
commit 39da6f8166
2 changed files with 5 additions and 6 deletions

View file

@ -0,0 +1,4 @@
$(document).ready(function () {
var visitortimezone = (-new Date().getTimezoneOffset() / 60);
$('#timezone-offset').val(visitortimezone);
});

View file

@ -41,10 +41,5 @@
<input type="submit" id="submit" class="login primary" value="<?php echo $l->t('Log in'); ?>"/>
</fieldset>
</form>
<script>
$(document).ready(function () {
var visitortimezone = (-new Date().getTimezoneOffset() / 60);
$('#timezone-offset').val(visitortimezone);
});
<?php OCP\Util::addscript('core', 'visitortimezone'); ?>
</script>