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

1 line
774 B
JavaScript
Raw Normal View History

2017-01-27 20:16:59 -07:00
define(["jQuery"],function($){"use strict";function loadUser(page,user){LibraryMenu.setTitle(user.Name),"Guest"==user.ConnectLinkType?$(".connectMessage",page).show():$(".connectMessage",page).hide(),Dashboard.hideLoadingMsg()}function loadData(page){Dashboard.showLoadingMsg();var userId=getParameterByName("userId");ApiClient.getUser(userId).then(function(user){loadUser(page,user)})}$(document).on("pageinit","#userPasswordPage",function(){$(".adminUpdatePasswordForm").off("submit",UpdatePasswordPage.onSubmit).on("submit",UpdatePasswordPage.onSubmit),$(".adminLocalAccessForm").off("submit",UpdatePasswordPage.onLocalAccessSubmit).on("submit",UpdatePasswordPage.onLocalAccessSubmit)}).on("pagebeforeshow","#userPasswordPage",function(){var page=this;loadData(page)})});