Skip to content

Instantly share code, notes, and snippets.

@talkingdotnet
Created June 7, 2018 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talkingdotnet/faf3ecbd867509f0274d11b0d49c3b35 to your computer and use it in GitHub Desktop.
Save talkingdotnet/faf3ecbd867509f0274d11b0d49c3b35 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width">
<base href="/" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" type="text/javascript"></script>
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />
</head>
<body>
<app>Loading...</app>
<script type="blazor-boot"></script>
<script>
Blazor.registerFunction('ShowControl', (id, item, bShow) => {
if (bShow) {
var txtInput = document.getElementById("txt_" + id);
$("#spn_" + id).hide();
txtInput.style.display = "";
txtInput.value = item;
txtInput.focus();
$("#btnEdit_" + id).hide();
$("#btnUpdate_" + id).show();
$("#btnCancel_" + id).show();
}
else {
document.getElementById("spn_" + id).style.display = "";
document.getElementById("txt_" + id).style.display = "none";
$("#btnEdit_" + id).show();
$("#btnUpdate_" + id).hide();
$("#btnCancel_" + id).hide();
}
return true;
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment