+ Range Data
    Scheme
This commit is contained in:
2019-01-21 17:47:42 +01:00
parent 92dd963117
commit 9b31c93341
8 changed files with 112 additions and 43 deletions

View File

@@ -11,11 +11,11 @@
<script>
$("#login-btn").on("click", function () {
var userName = $("#username").val();
var username = $("#username").val();
var password = $("#password").val();
$.ajax({
url: "/Account/_login",
data: { UserName: userName, Password: password, RememberMe: false },
data: { Username: username, Password: password },
dataType: "json",
type: "POST",
success: function (data) {
@@ -27,9 +27,6 @@
$("#user-menu").addClass("open");
}
return false;
},
error: function (xhr, status, error) {
alert(xhr.status+" "+xhr.responseText)
}
})
});

View File

@@ -7,7 +7,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- The user image in the navbar-->
<img src="~/AdminLTE-2.4.3/dist/img/user2-160x160.jpg" class="user-image" alt="User Image">
<img src="@session.GetString("avatar")" class="user-image" alt="User Image">
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span id="user-name" class="hidden-xs">@Model</span>
</a>
@@ -47,8 +47,14 @@
$(document).ready(function () {
$("#files").kendoUpload({
async: {
saveUrl: "save",
saveUrl: "/Account/_save",
autoUpload: true
},
success: function (data) {
if (data.response.success)
window.location.reload();
else
console.log(data.response.message);
}
});
});