jellyfin-web/dashboard-ui/scripts/userpassword.js

39 lines
734 B
JavaScript
Raw Normal View History

2014-10-29 15:01:02 -07:00
(function ($, window, document) {
function loadUser(page, user) {
Dashboard.setPageTitle(user.Name);
if (user.ConnectLinkType == 'Guest') {
$('.connectMessage', page).show();
}
else {
$('.connectMessage', page).hide();
}
2014-10-29 15:01:02 -07:00
Dashboard.hideLoadingMsg();
}
function loadData(page) {
Dashboard.showLoadingMsg();
var userId = getParameterByName("userId");
ApiClient.getUser(userId).done(function (user) {
loadUser(page, user);
});
}
$(document).on('pagebeforeshow', "#userPasswordPage", function () {
var page = this;
loadData(page);
});
})(jQuery, window, document);