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

30 lines
827 B
JavaScript
Raw Normal View History

2013-02-20 18:33:05 -07:00
var SupporterPage = {
onPageShow: function () {
SupporterPage.load();
},
onPageHide: function () {
},
load: function() {
Dashboard.showLoadingMsg();
var page = $.mobile.activePage;
ApiClient.getPluginSecurityInfo().done(function (info) {
$('#txtSupporterKey', page).val(info.SupporterKey);
if (info.IsMBSupporter) {
$('.supporterOnly', page).show();
} else {
$('.supporterOnly', page).hide();
}
2013-03-28 17:10:15 -07:00
$('#paypalReturnUrl', page).val(ApiClient.getUrl("dashboard/supporterkey.html"));
2013-02-20 18:33:05 -07:00
Dashboard.hideLoadingMsg();
});
}
};
$(document).on('pageshow', "#supporterPage", SupporterPage.onPageShow)
.on('pagehide', "#supporterPage", SupporterPage.onPageHide);