2014-10-29 15:01:02 -07:00
|
|
|
|
(function ($, window, document) {
|
|
|
|
|
|
|
|
|
|
function loadUser(page, user) {
|
|
|
|
|
|
|
|
|
|
Dashboard.setPageTitle(user.Name);
|
|
|
|
|
|
2015-01-31 20:29:26 -07:00
|
|
|
|
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");
|
|
|
|
|
|
2015-12-14 08:43:03 -07:00
|
|
|
|
ApiClient.getUser(userId).then(function (user) {
|
2014-10-29 15:01:02 -07:00
|
|
|
|
|
|
|
|
|
loadUser(page, user);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-01 07:01:59 -07:00
|
|
|
|
$(document).on('pageinit', "#userPasswordPage", function () {
|
2015-06-07 20:16:42 -07:00
|
|
|
|
|
|
|
|
|
$('.adminUpdatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit);
|
|
|
|
|
$('.adminLocalAccessForm').off('submit', UpdatePasswordPage.onLocalAccessSubmit).on('submit', UpdatePasswordPage.onLocalAccessSubmit);
|
|
|
|
|
|
2015-08-31 23:22:46 -07:00
|
|
|
|
}).on('pagebeforeshow', "#userPasswordPage", function () {
|
2014-10-29 15:01:02 -07:00
|
|
|
|
|
|
|
|
|
var page = this;
|
|
|
|
|
|
|
|
|
|
loadData(page);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})(jQuery, window, document);
|