mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Adds views script handling during global AJAX navigation
This commit is contained in:
1 parent
1eeb6661ca
commit
a840364483
8 files changed
+183
-34
No files matched your search
@@ -7,6 +7,11 @@
|
||||
|
||||
@inject IUrlService _urlService
|
||||
|
||||
@{
|
||||
// generate a unique id for the scripts section of this view, so it can be dynamically loaded/unloaded by the global AJAX navigator handler
|
||||
var scriptId = ScriptIdentifierHelper.GenerateScriptId();
|
||||
}
|
||||
|
||||
@model LoginRequestModel
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
@@ -53,7 +58,7 @@
|
||||
</form>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script type="text/javascript" defer>
|
||||
<script type="text/javascript" data-form="@scriptId" defer>
|
||||
document.getElementById('login-form').addEventListener('keypress', async (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
|
||||
Reference in new issue
Block a user