+ Avatar
+ Range Data
Scheme
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user