Files
ayanova7/source/ri/ri/Views/Settings/LocalBrowser.cshtml
2018-06-29 19:47:36 +00:00

39 lines
1.0 KiB
Plaintext

@using ri.util;
@using (Html.BeginForm())
{
<hr />
<div class="row">
<label for="nativeDateTimeLocal">Use native date time picker:</label>
<input type="checkbox" name="nativeDateTimeLocal" id="nativeDateTimeLocal" />
</div>
<hr />
<div class="row">
@ay.formBackButton()
</div>
}
<script>
$(document).ready(function () {
$("#nativeDateTimeLocal").prop("checked", !ayShimDateTime());
$("#nativeDateTimeLocal").change(function (ev) {
debugger;
var shim = !this.checked;
if (sessionStorage) {
if (shim) {
sessionStorage.ayShimDateTime = true;
}
else {
sessionStorage.removeItem('ayShimDateTime')
}
} else {
alert('This browser does not support session storage, local settings can not be made!');
}
});
});
</script>