1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

lazy load scripts

This commit is contained in:
Luke Pulverenti 2015-05-16 15:09:02 -04:00
parent 1f0760df09
commit 89e0515a15
31 changed files with 366 additions and 328 deletions

View file

@ -4,7 +4,7 @@
<title>${TitleSupport}</title> <title>${TitleSupport}</title>
</head> </head>
<body> <body>
<div id="aboutPage" data-role="page" class="page type-interior"> <div id="aboutPage" data-role="page" class="page type-interior" data-require="scripts/aboutpage">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">

View file

@ -4,7 +4,7 @@
<title>${TitlePlugins}</title> <title>${TitlePlugins}</title>
</head> </head>
<body> <body>
<div id="addPluginPage" data-role="page" class="page type-interior pluginConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Plugins"> <div id="addPluginPage" data-role="page" class="page type-interior pluginConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Plugins" data-require="scripts/registrationservices">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
@ -55,6 +55,7 @@
</form> </form>
<div class="premiumPackage" style="display: none; margin-top: 1.5em;"> <div class="premiumPackage" style="display: none; margin-top: 1.5em;">
<!--CORDOVA_EXCLUDE_START-->
<div> <div>
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<p id="regStatus"> <p id="regStatus">
@ -93,7 +94,7 @@
</div> </div>
</form> </form>
</div> </div>
<!--CORDOVA_EXCLUDE_END-->
</div> </div>
</div> </div>
</div> </div>

View file

@ -4,7 +4,7 @@
<title>Emby</title> <title>Emby</title>
</head> </head>
<body> <body>
<div id="channelsPage" data-role="page" class="page libraryPage channelsPage" data-contextname="${HeaderChannels}"> <div id="channelsPage" data-role="page" class="page libraryPage channelsPage" data-contextname="${HeaderChannels}" data-require="scripts/channels">
<div class="libraryViewNav scopedLibraryViewNav"> <div class="libraryViewNav scopedLibraryViewNav">
<a href="channelslatest.html" class="latestChannelItemsTab">${TabLatest}</a> <a href="channelslatest.html" class="latestChannelItemsTab">${TabLatest}</a>

View file

@ -89,19 +89,11 @@
position: relative; position: relative;
} }
.backdropCard .cardPadder { .backdropCard .cardPadder, .smallBackdropCard .cardPadder, .overflowBackdropCard .cardPadder {
padding-bottom: 56.25%; padding-bottom: 56.25%;
} }
.smallBackdropCard .cardPadder { .squareCard .cardPadder, .overflowSquareCard .cardPadder {
padding-bottom: 56.25%;
}
.squareCard .cardPadder {
padding-bottom: 100%;
}
.smallSquareCard .cardPadder {
padding-bottom: 100%; padding-bottom: 100%;
} }
@ -109,11 +101,7 @@
padding-bottom: 75%; padding-bottom: 75%;
} }
.portraitCard .cardPadder { .portraitCard .cardPadder, .overflowPortraitCard .cardPadder {
padding-bottom: 150%;
}
.smallPortraitCard .cardPadder {
padding-bottom: 150%; padding-bottom: 150%;
} }
@ -277,10 +265,6 @@
width: 50%; width: 50%;
} }
.smallSquareCard {
width: 33.3334%;
}
.backdropCard { .backdropCard {
width: 50%; width: 50%;
} }
@ -293,8 +277,12 @@
width: 33.3%; width: 33.3%;
} }
.smallPortraitCard { .overflowPortraitCard {
width: 33.334%; width: 40%;
}
.overflowBackdropCard {
width: 70%;
} }
.cardProgress { .cardProgress {
@ -307,6 +295,10 @@
opacity: .8; opacity: .8;
} }
.overflowSquareCard {
width: 42%;
}
@media all and (max-width: 1200px) { @media all and (max-width: 1200px) {
.portraitCard .cardOverlayInner { .portraitCard .cardOverlayInner {
@ -331,16 +323,20 @@
@media all and (min-width: 640px) { @media all and (min-width: 640px) {
.smallSquareCard {
width: 25%;
}
.portraitCard { .portraitCard {
width: 25%; width: 25%;
} }
.smallPortraitCard { .overflowPortraitCard {
width: 25%; width: 36%;
}
.overflowBackdropCard {
width: 60%;
}
.overflowSquareCard {
width: 30%;
} }
} }
@ -364,17 +360,9 @@
width: 20%; width: 20%;
} }
.smallSquareCard {
width: 20%;
}
.smallBackdropCard { .smallBackdropCard {
width: 25%; width: 25%;
} }
.smallPortraitCard {
width: 20%;
}
} }
@ -388,8 +376,16 @@
width: 20%; width: 20%;
} }
.smallPortraitCard { .overflowPortraitCard {
width: 16.666666666666666666666666666667%; width: 23%;
}
.overflowBackdropCard {
width: 40%;
}
.overflowSquareCard {
width: 22%;
} }
} }
@ -415,14 +411,6 @@
.smallBackdropCard { .smallBackdropCard {
width: 16.666666666666666666666666666667%; width: 16.666666666666666666666666666667%;
} }
.smallSquareCard {
width: 16.666666666666666666666666666667%;
}
.smallPortraitCard {
width: 14.285714285714285714285714285714%;
}
} }
@ -439,10 +427,6 @@
.smallBackdropCard { .smallBackdropCard {
width: 14.285714285714285714285714285714%; width: 14.285714285714285714285714285714%;
} }
.smallPortraitCard {
width: 12.5%;
}
} }

View file

@ -208,7 +208,6 @@
display: inline-block; display: inline-block;
background-size: cover; background-size: cover;
vertical-align: top; vertical-align: top;
cursor: pointer;
} }
.starRating { .starRating {
@ -1474,10 +1473,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
display: none !important; display: none !important;
} }
.homeFavoritesTabDisabled .homeFavoritesTab {
display: none !important;
}
.detailsMenu { .detailsMenu {
width: 280px; width: 280px;
} }

View file

@ -166,6 +166,37 @@ h1 a:hover {
margin: -10px 0 0 -10px; margin: -10px 0 0 -10px;
} }
.hiddenScrollX {
overflow-x: scroll;
-webkit-overflow-scrolling: touch;
overflow-y: hidden;
white-space: nowrap;
}
.touch .hiddenScrollX {
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
}
.touch .hiddenScrollX::-webkit-scrollbar {
height: 0 !important;
display: none;
}
.hiddenScrollY {
overflow-y: scroll;
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
-webkit-overflow-scrolling: touch;
overflow-x: hidden;
}
.hiddenScrollY::-webkit-scrollbar {
width: 0 !important;
display: none;
}
/** /**
* Note: I have omitted any vendor-prefixes for clarity. * Note: I have omitted any vendor-prefixes for clarity.
* Adding them is left as an exercise for the reader. * Adding them is left as an exercise for the reader.

View file

@ -18,7 +18,7 @@
<div data-role="content"> <div data-role="content">
<div class="ehsContent"> <div class="ehsContent">
<div id="resumableSection" style="display: none;"> <div id="resumableSection" style="display: none;" class="homePageSection">
<div> <div>
<h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderResume}</h1> <h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderResume}</h1>
<a href="#" class="accentButton categorySyncButton" data-category="Resume"><i class="fa fa-cloud"></i>${ButtonSync}</a> <a href="#" class="accentButton categorySyncButton" data-category="Resume"><i class="fa fa-cloud"></i>${ButtonSync}</a>
@ -28,6 +28,7 @@
</div> </div>
</div> </div>
<div class="homePageSection">
<div> <div>
<h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderLatestMovies}</h1> <h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderLatestMovies}</h1>
<a href="#" class="accentButton categorySyncButton" data-category="Latest"><i class="fa fa-cloud"></i>${ButtonSync}</a> <a href="#" class="accentButton categorySyncButton" data-category="Latest"><i class="fa fa-cloud"></i>${ButtonSync}</a>
@ -35,8 +36,9 @@
<div id="recentlyAddedItems" class="itemsContainer"> <div id="recentlyAddedItems" class="itemsContainer">
</div> </div>
</div>
<div class="recommendations"> <div class="recommendations homePageSection">
</div> </div>
<div class="noItemsMessage" style="display: none;"> <div class="noItemsMessage" style="display: none;">
<br /> <br />

View file

@ -4,7 +4,7 @@
<title>Emby</title> <title>Emby</title>
</head> </head>
<body> <body>
<div id="musicAlbumArtistsPage" data-role="page" class="page libraryPage"> <div id="musicAlbumArtistsPage" data-role="page" class="page libraryPage" data-require="scripts/musicalbumartists">
<div class="libraryViewNav scopedLibraryViewNav"> <div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a> <a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a> <a href="songs.html" class="musicSongsTab">${TabSongs}</a>

View file

@ -4,7 +4,7 @@
<title>Emby</title> <title>Emby</title>
</head> </head>
<body> <body>
<div id="musicAlbumsPage" data-role="page" class="page libraryPage"> <div id="musicAlbumsPage" data-role="page" class="page libraryPage" data-require="scripts/musicalbums">
<div class="libraryViewNav scopedLibraryViewNav"> <div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a> <a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a> <a href="songs.html" class="musicSongsTab">${TabSongs}</a>

View file

@ -4,7 +4,7 @@
<title>Emby</title> <title>Emby</title>
</head> </head>
<body> <body>
<div id="musicArtistsPage" data-role="page" class="page libraryPage"> <div id="musicArtistsPage" data-role="page" class="page libraryPage" data-require="scripts/musicartists">
<div class="libraryViewNav scopedLibraryViewNav"> <div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a> <a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a> <a href="songs.html" class="musicSongsTab">${TabSongs}</a>

View file

@ -4,7 +4,7 @@
<title>Emby</title> <title>Emby</title>
</head> </head>
<body> <body>
<div id="musicRecommendedPage" data-role="page" class="page libraryPage backdropPage" data-backdroptype="musicartist"> <div id="musicRecommendedPage" data-role="page" class="page libraryPage backdropPage" data-backdroptype="musicartist" data-require="scripts/musicrecommended">
<div class="libraryViewNav scopedLibraryViewNav"> <div class="libraryViewNav scopedLibraryViewNav">
<a href="#" class="ui-btn-active">${TabSuggestions}</a> <a href="#" class="ui-btn-active">${TabSuggestions}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a> <a href="songs.html" class="musicSongsTab">${TabSongs}</a>

View file

@ -26,7 +26,7 @@
<label for="radopTheater">${PluginTabAppTheater}</label> <label for="radopTheater">${PluginTabAppTheater}</label>
</fieldset> </fieldset>
</div> </div>
<div style="display:inline-block;vertical-align:bottom;"> <div style="display:inline-block;vertical-align:bottom;" class="optionAdultContainer">
<div style="margin-left:1em;"> <div style="margin-left:1em;">
<label for="chkAdult">${OptionDisplayAdultContent}</label> <label for="chkAdult">${OptionDisplayAdultContent}</label>
<input id="chkAdult" type="checkbox" data-mini="true" data-inline="true" /> <input id="chkAdult" type="checkbox" data-mini="true" data-inline="true" />

View file

@ -1,6 +1,6 @@
(function ($, document) { (function ($, document) {
$(document).on('pageshow', "#aboutPage", function () { $(document).on('pageshown', "#aboutPage", function () {
var page = this; var page = this;

View file

@ -131,84 +131,7 @@
$('#developer', page).html(pkg.owner); $('#developer', page).html(pkg.owner);
if (pkg.isPremium) { RegistrationServices.renderPluginInfo(page, pkg, pluginSecurityInfo);
$('.premiumPackage', page).show();
// Fill in registration info
var regStatus = "";
if (pkg.isRegistered) {
regStatus += "<p style='color:green;'>";
regStatus += Globalize.translate('MessageFeatureIncludedWithSupporter');
} else {
var expDateTime = new Date(pkg.expDate).getTime();
var nowTime = new Date().getTime();
if (expDateTime <= nowTime) {
regStatus += "<p style='color:red;'>";
regStatus += Globalize.translate('MessageTrialExpired');
}
else if (expDateTime > new Date(1970, 1, 1).getTime()) {
regStatus += "<p style='color:blue;'>";
regStatus += Globalize.translate('MessageTrialWillExpireIn').replace('{0}', Math.round(expDateTime - nowTime) / (86400000));
}
}
regStatus += "</p>";
$('#regStatus', page).html(regStatus);
if (pluginSecurityInfo.IsMBSupporter) {
$('#regInfo', page).html(pkg.regInfo || "");
$('.premiumDescription', page).hide();
$('.supporterDescription', page).hide();
if (pkg.price > 0) {
// Fill in PayPal info
$('.premiumHasPrice', page).show();
$('#featureId', page).val(pkg.featureId);
$('#featureName', page).val(pkg.name);
$('#amount', page).val(pkg.price);
$('#regPrice', page).html("<h3>" + Globalize.translate('ValuePriceUSD').replace('{0}', "$" + pkg.price.toFixed(2)) + "</h3>");
var url = "http://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner;
$.getJSON(url).done(function (dev) {
if (dev.payPalEmail) {
$('#payPalEmail', page).val(dev.payPalEmail);
} else {
$('#ppButton', page).hide();
}
});
} else {
// Supporter-only feature
$('.premiumHasPrice', page).hide();
}
} else {
if (pkg.price) {
$('.premiumDescription', page).show();
$('.supporterDescription', page).hide();
$('#regInfo', page).html("");
} else {
$('.premiumDescription', page).hide();
$('.supporterDescription', page).show();
$('#regInfo', page).html("");
}
$('#ppButton', page).hide();
}
} else {
$('.premiumPackage', page).hide();
}
//Ratings and Reviews //Ratings and Reviews
var ratingHtml = RatingHelpers.getStoreRatingHtml(pkg.avgRating, pkg.id, pkg.name); var ratingHtml = RatingHelpers.getStoreRatingHtml(pkg.avgRating, pkg.id, pkg.name);
@ -246,7 +169,7 @@
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
} }
$(document).on('pageshow', "#addPluginPage", function () { $(document).on('pageshown', "#addPluginPage", function () {
var page = this; var page = this;

View file

@ -60,14 +60,12 @@
} }
$(document).on('pagebeforeshow', "#channelsPage", function () { $(document).on('pageshown', "#channelsPage", function () {
LibraryBrowser.loadSavedQueryValues('channels', query); LibraryBrowser.loadSavedQueryValues('channels', query);
reloadItems(this); reloadItems(this);
}).on('pageshow', "#channelsPage", function () {
updateFilterControls(this); updateFilterControls(this);
}); });

View file

@ -1189,7 +1189,7 @@
var chapters = item.Chapters || []; var chapters = item.Chapters || [];
var maxWwidth = LibraryBrowser.getPosterViewInfo().thumbWidth; var maxWidth = LibraryBrowser.getPosterViewInfo().backdropWidth;
for (var i = 0, length = chapters.length; i < length; i++) { for (var i = 0, length = chapters.length; i < length; i++) {
@ -1212,7 +1212,7 @@
if (chapter.ImageTag) { if (chapter.ImageTag) {
imgUrl = ApiClient.getScaledImageUrl(item.Id, { imgUrl = ApiClient.getScaledImageUrl(item.Id, {
maxWidth: maxWwidth, maxWidth: maxWidth,
tag: chapter.ImageTag, tag: chapter.ImageTag,
type: "Chapter", type: "Chapter",
index: i index: i
@ -1411,7 +1411,7 @@
var html = ''; var html = '';
var maxWwidth = LibraryBrowser.getPosterViewInfo().thumbWidth; var maxWidth = LibraryBrowser.getPosterViewInfo().backdropWidth;
for (var i = 0, length = items.length; i < length; i++) { for (var i = 0, length = items.length; i < length; i++) {
@ -1439,7 +1439,7 @@
if (imageTags.Primary) { if (imageTags.Primary) {
imgUrl = ApiClient.getScaledImageUrl(item.Id, { imgUrl = ApiClient.getScaledImageUrl(item.Id, {
maxWidth: maxWwidth, maxWidth: maxWidth,
tag: imageTags.Primary, tag: imageTags.Primary,
type: "primary" type: "primary"
}); });

View file

@ -961,6 +961,8 @@
return screenWidth; return screenWidth;
}, },
shapes: ['square', 'portrait', 'banner', 'smallBackdrop', 'homePageSmallBackdrop', 'backdrop', 'overflowBackdrop', 'overflowPortrait', 'overflowSquare'],
getPostersPerRow: function (screenWidth) { getPostersPerRow: function (screenWidth) {
function getValue(shape) { function getValue(shape) {
@ -973,14 +975,10 @@
var info = {}; var info = {};
info.square = getValue('square'); for (var i = 0, length = LibraryBrowser.shapes.length; i < length; i++) {
info.smallSquare = getValue('smallSquare'); var currentShape = LibraryBrowser.shapes[i];
info.thumb = getValue('backdrop'); info[currentShape] = getValue(currentShape);
info.portrait = getValue('portrait'); }
info.smallPortrait = getValue('smallPortrait');
info.banner = getValue('banner');
info.smallThumb = getValue('smallBackdrop');
return info; return info;
}, },
@ -1010,57 +1008,29 @@
var imagesPerRow = LibraryBrowser.getPostersPerRow(screenWidth); var imagesPerRow = LibraryBrowser.getPostersPerRow(screenWidth);
var result = {};
result.screenWidth = screenWidth;
if (!AppInfo.hasLowImageBandwidth) { if (!AppInfo.hasLowImageBandwidth) {
screenWidth *= 1.25; screenWidth *= 1.25;
} }
var thumbWidth = screenWidth / imagesPerRow.thumb; var roundTo = 100;
var smallThumbWidth = screenWidth / imagesPerRow.smallThumb;
var posterWidth = screenWidth / imagesPerRow.portrait; for (var i = 0, length = LibraryBrowser.shapes.length; i < length; i++) {
var smallPosterWidth = screenWidth / imagesPerRow.smallPortrait; var currentShape = LibraryBrowser.shapes[i];
var squareSize = screenWidth / imagesPerRow.square;
var smallSquareSize = screenWidth / imagesPerRow.smallSquare; var shapeWidth = screenWidth / imagesPerRow[currentShape];
var bannerWidth = screenWidth / imagesPerRow.banner;
if (!AppInfo.isTouchPreferred) { if (!AppInfo.isTouchPreferred) {
var roundTo = 100; shapeWidth = Math.round(shapeWidth / roundTo) * roundTo;
thumbWidth = Math.round(thumbWidth / roundTo) * roundTo;
smallThumbWidth = Math.round(smallThumbWidth / roundTo) * roundTo;
posterWidth = Math.round(posterWidth / roundTo) * roundTo;
smallPosterWidth = Math.round(smallPosterWidth / roundTo) * roundTo;
squareSize = Math.round(squareSize / roundTo) * roundTo;
bannerWidth = Math.round(bannerWidth / roundTo) * roundTo;
} }
var defaultPortait = 'portrait'; result[currentShape + 'Width'] = Math.round(shapeWidth);
var defaultThumb = 'backdrop';
var defaultSquare = 'square';
if (AppInfo.hasLowImageBandwidth) {
defaultThumb = 'smallBackdrop';
defaultSquare = 'smallSquare';
defaultPortait = 'smallPortrait';
} }
return { return result;
defaultThumb: defaultThumb,
smallThumbWidth: Math.round(smallThumbWidth),
thumbWidth: Math.round(thumbWidth),
defaultPortait: defaultPortait,
posterWidth: Math.round(posterWidth),
smallPosterWidth: Math.round(smallPosterWidth),
defaultSquare: defaultSquare,
squareSize: Math.round(squareSize),
smallSquareSize: Math.round(smallSquareSize),
bannerWidth: Math.round(bannerWidth),
screenWidth: screenWidth
};
}, },
getPosterViewHtml: function (options) { getPosterViewHtml: function (options) {
@ -1096,44 +1066,41 @@
var posterInfo = LibraryBrowser.getPosterViewInfo(); var posterInfo = LibraryBrowser.getPosterViewInfo();
var thumbWidth = posterInfo.thumbWidth; var thumbWidth = posterInfo.backdropWidth;
var posterWidth = posterInfo.posterWidth; var posterWidth = posterInfo.portraitWidth;
var squareSize = posterInfo.squareSize; var squareSize = posterInfo.squareWidth;
var bannerWidth = posterInfo.bannerWidth; var bannerWidth = posterInfo.bannerWidth;
if (isThumbAspectRatio) { if (isThumbAspectRatio) {
posterInfo.smallPosterWidth = posterInfo.smallThumbWidth;
posterWidth = thumbWidth; posterWidth = thumbWidth;
} }
else if (isSquareAspectRatio) { else if (isSquareAspectRatio) {
posterInfo.smallPosterWidth = posterInfo.smallSquareSize;
posterWidth = squareSize; posterWidth = squareSize;
} }
if (options.shape == 'backdrop' && posterInfo.defaultThumb == 'smallBackdrop') { if (options.shape == 'overflowBackdrop') {
options.shape = 'smallBackdrop'; thumbWidth = posterInfo.overflowBackdropWidth;
} }
else if (options.shape == 'overflowPortrait') {
else if (options.shape == 'portrait' && posterInfo.defaultPortait == 'smallPortrait') { posterWidth = posterInfo.overflowPortraitWidth;
options.shape = 'smallPortrait';
} }
else if (options.shape == 'overflowSquare') {
else if (options.shape == 'square' && posterInfo.defaultSquare == 'smallSquare') { squareSize = posterInfo.overflowSquareWidth;
options.shape = 'smallSquare';
} }
else if (options.shape == 'smallBackdrop') {
if (options.shape == 'smallBackdrop') { thumbWidth = posterInfo.smallBackdropWidth;
thumbWidth = posterInfo.smallThumbWidth;
} }
else if (options.shape == 'smallPortrait') { else if (options.shape == 'homePageSmallBackdrop') {
posterWidth = posterInfo.smallPosterWidth; thumbWidth = posterInfo.homePageSmallBackdropWidth;
} posterWidth = posterInfo.homePageSmallBackdropWidth;
else if (options.shape == 'smallSquare') {
squareSize = posterInfo.smallSquareSize;
} }
else if (options.shape == 'detailPagePortrait') { else if (options.shape == 'detailPagePortrait') {
posterWidth = 200; posterWidth = 200;
} }
else if (options.shape == 'detailPageSquare') {
posterWidth = 200;
squareSize = 200;
}
else if (options.shape == 'detailPage169') { else if (options.shape == 'detailPage169') {
posterWidth = 320; posterWidth = 320;
thumbWidth = 320; thumbWidth = 320;

View file

@ -407,7 +407,7 @@
html += '</div>'; html += '</div>';
if (item.Chapters && item.Chapters.length) { if (item.Chapters && item.Chapters.length) {
html += '<div class="tabScenes nowPlayingTab" style="display:none;white-space:nowrap;margin-bottom:2em;">'; html += '<div class="tabScenes nowPlayingTab hiddenScrollX" style="display:none;white-space:nowrap;margin-bottom:2em;">';
var chapterIndex = 0; var chapterIndex = 0;
html += item.Chapters.map(function (c) { html += item.Chapters.map(function (c) {
@ -454,7 +454,7 @@
} }
if (item.People && item.People.length) { if (item.People && item.People.length) {
html += '<div class="tabCast nowPlayingTab" style="display:none;white-space:nowrap;">'; html += '<div class="tabCast nowPlayingTab hiddenScrollX" style="display:none;white-space:nowrap;">';
html += item.People.map(function (cast) { html += item.People.map(function (cast) {
var personHtml = '<div class="tileItem smallPosterTileItem" style="width:300px;">'; var personHtml = '<div class="tileItem smallPosterTileItem" style="width:300px;">';

View file

@ -18,6 +18,18 @@
return 'ThumbCard'; return 'ThumbCard';
} }
function enableScrollX() {
return AppInfo.isTouchPreferred;
}
function getPortraitShape() {
return enableScrollX() ? 'overflowPortrait' : 'portrait';
}
function getThumbShape() {
return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
}
function loadLatest(page, userId, parentId) { function loadLatest(page, userId, parentId) {
var limit = 18; var limit = 18;
@ -45,7 +57,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: items, items: items,
lazy: true, lazy: true,
shape: 'portrait', shape: getPortraitShape(),
overlayText: false, overlayText: false,
showTitle: true, showTitle: true,
showYear: true, showYear: true,
@ -58,7 +70,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: items, items: items,
shape: "portrait", shape: getPortraitShape(),
centerText: true, centerText: true,
lazy: true, lazy: true,
overlayText: true overlayText: true
@ -104,7 +116,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
preferThumb: true, preferThumb: true,
shape: 'backdrop', shape: getThumbShape(),
showTitle: true, showTitle: true,
showYear: true, showYear: true,
lazy: true, lazy: true,
@ -118,7 +130,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
preferThumb: true, preferThumb: true,
shape: 'backdrop', shape: getThumbShape(),
overlayText: true, overlayText: true,
showTitle: true, showTitle: true,
lazy: true, lazy: true,
@ -155,9 +167,14 @@
break; break;
} }
html += '<div class="homePageSection">';
html += '<h1 class="listHeader">' + title + '</h1>'; html += '<h1 class="listHeader">' + title + '</h1>';
if (enableScrollX()) {
html += '<div class="hiddenScrollX">';
} else {
html += '<div>'; html += '<div>';
}
var view = getView(); var view = getView();
@ -166,7 +183,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: recommendation.Items, items: recommendation.Items,
lazy: true, lazy: true,
shape: 'portrait', shape: getPortraitShape(),
overlayText: false, overlayText: false,
showTitle: true, showTitle: true,
showYear: true, showYear: true,
@ -179,7 +196,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: recommendation.Items, items: recommendation.Items,
shape: "portrait", shape: getPortraitShape(),
centerText: true, centerText: true,
lazy: true, lazy: true,
overlayText: true, overlayText: true,
@ -187,6 +204,7 @@
}); });
} }
html += '</div>'; html += '</div>';
html += '</div>';
return html; return html;
} }
@ -234,14 +252,19 @@
var page = this; var page = this;
var userId = Dashboard.getCurrentUserId(); var userId = Dashboard.getCurrentUserId();
if (enableScrollX()) {
$('.itemsContainer', page).addClass('hiddenScrollX');
} else {
$('.itemsContainer', page).removeClass('hiddenScrollX');
}
loadResume(page, userId, parentId); loadResume(page, userId, parentId);
loadLatest(page, userId, parentId); loadLatest(page, userId, parentId);
if (!AppInfo.hasLowImageBandwidth) { if (AppInfo.enableMovieHomeSuggestions) {
loadSuggestions(page, userId, parentId); loadSuggestions(page, userId, parentId);
} }
}); });
})(jQuery, document); })(jQuery, document);

View file

@ -141,7 +141,7 @@
} }
} }
$(document).on('pageinit', "#musicAlbumArtistsPage", function () { $(document).on('pageinitdepends', "#musicAlbumArtistsPage", function () {
var page = this; var page = this;
@ -196,7 +196,7 @@
reloadItems(page); reloadItems(page);
}); });
}).on('pagebeforeshow', "#musicAlbumArtistsPage", function () { }).on('pageshown', "#musicAlbumArtistsPage", function () {
var page = this; var page = this;
query.ParentId = LibraryMenu.getTopParentId(); query.ParentId = LibraryMenu.getTopParentId();
@ -223,8 +223,6 @@
} }
}); });
}).on('pageshow', "#musicAlbumArtistsPage", function () {
updateFilterControls(this); updateFilterControls(this);
}); });

View file

@ -153,7 +153,7 @@
} }
} }
$(document).on('pageinit', "#musicAlbumsPage", function () { $(document).on('pageinitdepends', "#musicAlbumsPage", function () {
var page = this; var page = this;
@ -248,7 +248,7 @@
reloadItems(page); reloadItems(page);
}); });
}).on('pagebeforeshow', "#musicAlbumsPage", function () { }).on('pageshown', "#musicAlbumsPage", function () {
query.ParentId = LibraryMenu.getTopParentId(); query.ParentId = LibraryMenu.getTopParentId();
@ -274,27 +274,7 @@
} }
}); });
}).on('pageshow', "#musicAlbumsPage", function () {
updateFilterControls(this); updateFilterControls(this);
var updateScheduled = false;
function onscreen() {
var viewportBottom = $(window).scrollTop() + $(window).height();
return ($(document).height() - viewportBottom) < 100;
}
$(window).on('scroll', function () {
console.log('load');
if (!updateScheduled) {
setTimeout(function () {
if (onscreen()) {
console.log('load');
}
updateScheduled = false;
}, 500);
updateScheduled = true;
}
});
}); });
})(jQuery, document); })(jQuery, document);

View file

@ -142,7 +142,7 @@
} }
} }
$(document).on('pageinit', "#musicArtistsPage", function () { $(document).on('pageinitdepends', "#musicArtistsPage", function () {
var page = this; var page = this;
@ -197,7 +197,7 @@
reloadItems(page); reloadItems(page);
}); });
}).on('pagebeforeshow', "#musicArtistsPage", function () { }).on('pageshown', "#musicArtistsPage", function () {
var page = this; var page = this;
@ -225,8 +225,6 @@
} }
}); });
}).on('pageshow', "#musicArtistsPage", function () {
updateFilterControls(this); updateFilterControls(this);
}); });

View file

@ -7,6 +7,14 @@
return screenWidth >= 1920 ? 9 : (screenWidth >= 1200 ? 12 : (screenWidth >= 1000 ? 10 : 8)); return screenWidth >= 1920 ? 9 : (screenWidth >= 1200 ? 12 : (screenWidth >= 1000 ? 10 : 8));
} }
function enableScrollX() {
return AppInfo.isTouchPreferred;
}
function getSquareShape() {
return enableScrollX() ? 'overflowSquare' : 'square';
}
function loadLatest(page, parentId) { function loadLatest(page, parentId) {
var userId = Dashboard.getCurrentUserId(); var userId = Dashboard.getCurrentUserId();
@ -27,7 +35,7 @@
showUnplayedIndicator: false, showUnplayedIndicator: false,
showChildCountIndicator: true, showChildCountIndicator: true,
showLatestItemsPopup: false, showLatestItemsPopup: false,
shape: "square", shape: getSquareShape(),
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
lazy: true, lazy: true,
@ -65,7 +73,7 @@
$('#recentlyPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({ $('#recentlyPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
showUnplayedIndicator: false, showUnplayedIndicator: false,
shape: "square", shape: getSquareShape(),
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
defaultAction: 'play', defaultAction: 'play',
@ -105,7 +113,7 @@
$('#topPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({ $('#topPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
showUnplayedIndicator: false, showUnplayedIndicator: false,
shape: "square", shape: getSquareShape(),
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
defaultAction: 'play', defaultAction: 'play',
@ -144,7 +152,7 @@
$('.itemsContainer', elem).html(LibraryBrowser.getPosterViewHtml({ $('.itemsContainer', elem).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "square", shape: getSquareShape(),
showTitle: true, showTitle: true,
lazy: true, lazy: true,
defaultAction: 'play', defaultAction: 'play',
@ -155,10 +163,9 @@
})).lazyChildren(); })).lazyChildren();
}); });
} }
$(document).on('pagebeforeshow', "#musicRecommendedPage", function () { $(document).on('pageshown', "#musicRecommendedPage", function () {
var parentId = LibraryMenu.getTopParentId(); var parentId = LibraryMenu.getTopParentId();
@ -168,6 +175,12 @@
loadPlaylists(page, parentId); loadPlaylists(page, parentId);
loadRecentlyPlayed(page, parentId); loadRecentlyPlayed(page, parentId);
loadFrequentlyPlayed(page, parentId); loadFrequentlyPlayed(page, parentId);
if (enableScrollX()) {
$('.itemsContainer', page).addClass('hiddenScrollX');
} else {
$('.itemsContainer', page).removeClass('hiddenScrollX');
}
}); });

View file

@ -10,6 +10,14 @@
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
if (AppInfo.enableAppStorePolicy) {
$('.optionAdultContainer', page).hide();
} else {
$('.optionAdultContainer', page).show();
}
query.IsAppStoreSafe = true;
var promise1 = ApiClient.getAvailablePlugins(query); var promise1 = ApiClient.getAvailablePlugins(query);
var promise2 = ApiClient.getInstalledPlugins(); var promise2 = ApiClient.getInstalledPlugins();
@ -128,7 +136,7 @@
if (!plugin.isExternal) { if (!plugin.isExternal) {
html += "<div class='cardText packageReviewText'>"; html += "<div class='cardText packageReviewText'>";
html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : Globalize.translate('LabelFree'); html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : Globalize.translate('LabelFree');
html += RatingHelpers.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name); html += RatingHelpers.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name, true);
html += "<span class='storeReviewCount'>"; html += "<span class='storeReviewCount'>";
html += " " + Globalize.translate('LabelNumberReviews').replace("{0}", plugin.totalRatings); html += " " + Globalize.translate('LabelNumberReviews').replace("{0}", plugin.totalRatings);

View file

@ -112,7 +112,7 @@
for (var i = 1; i <= 5; i++) { for (var i = 1; i <= 5; i++) {
var title = noLinks ? rating + " stars" : "Rate " + i + (i > 1 ? " stars" : " star"); var title = noLinks ? rating + " stars" : "Rate " + i + (i > 1 ? " stars" : " star");
html += noLinks ? "" : "<span data-id=" + id + " data-name='" + name + "' data-rating=" + i + " onclick='RatingHelpers.ratePackage(this);return false;' >"; html += noLinks ? "" : "<a href='#' data-id=" + id + " data-name='" + name + "' data-rating=" + i + " onclick='RatingHelpers.ratePackage(this);return false;' >";
if (rating <= i - 1) { if (rating <= i - 1) {
html += "<div class='storeStarRating emptyStarRating' title='" + title + "'></div>"; html += "<div class='storeStarRating emptyStarRating' title='" + title + "'></div>";
} else if (rating < i) { } else if (rating < i) {
@ -120,7 +120,7 @@
} else { } else {
html += "<div class='storeStarRating' title='" + title + "'></div>"; html += "<div class='storeStarRating' title='" + title + "'></div>";
} }
html += noLinks ? "" : "</span>"; html += noLinks ? "" : "</a>";
} }
html += "</div>"; html += "</div>";

View file

@ -0,0 +1,112 @@
window.RegistrationServices = {
renderPluginInfo: function (page, pkg, pluginSecurityInfo) {
if (pkg.isPremium) {
$('.premiumPackage', page).show();
// Fill in registration info
var regStatus = "";
if (pkg.isRegistered) {
regStatus += "<p style='color:green;'>";
regStatus += Globalize.translate('MessageFeatureIncludedWithSupporter');
} else {
var expDateTime = new Date(pkg.expDate).getTime();
var nowTime = new Date().getTime();
if (expDateTime <= nowTime) {
regStatus += "<p style='color:red;'>";
regStatus += Globalize.translate('MessageTrialExpired');
}
else if (expDateTime > new Date(1970, 1, 1).getTime()) {
regStatus += "<p style='color:blue;'>";
regStatus += Globalize.translate('MessageTrialWillExpireIn').replace('{0}', Math.round(expDateTime - nowTime) / (86400000));
}
}
regStatus += "</p>";
$('#regStatus', page).html(regStatus);
if (pluginSecurityInfo.IsMBSupporter) {
$('#regInfo', page).html(pkg.regInfo || "");
$('.premiumDescription', page).hide();
$('.supporterDescription', page).hide();
if (pkg.price > 0) {
$('.premiumHasPrice', page).show();
$('#featureId', page).val(pkg.featureId);
$('#featureName', page).val(pkg.name);
$('#amount', page).val(pkg.price);
$('#regPrice', page).html("<h3>" + Globalize.translate('ValuePriceUSD').replace('{0}', "$" + pkg.price.toFixed(2)) + "</h3>");
var url = "http://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner;
$.getJSON(url).done(function (dev) {
if (dev.payPalEmail) {
$('#payPalEmail', page).val(dev.payPalEmail);
} else {
$('#ppButton', page).hide();
}
});
} else {
// Supporter-only feature
$('.premiumHasPrice', page).hide();
}
} else {
if (pkg.price) {
$('.premiumDescription', page).show();
$('.supporterDescription', page).hide();
$('#regInfo', page).html("");
} else {
$('.premiumDescription', page).hide();
$('.supporterDescription', page).show();
$('#regInfo', page).html("");
}
$('#ppButton', page).hide();
}
} else {
$('.premiumPackage', page).hide();
}
},
addRecurringFields: function(page, period) {
var formSelector = '.supporterForm';
// Add recurring fields to form
$("<input type='hidden' name='a3' class='pprecurring' />")
.attr('value', $('#donateAmt', page).val())
.appendTo(formSelector, page);
$("<input type='hidden' name='p3' value='1' class='pprecurring' />")
.appendTo(formSelector, page);
$("<input type='hidden' name='t3' value='" + period + "' class='pprecurring' />")
.appendTo(formSelector, page);
$("<input type='hidden' name='src' value='1' class='pprecurring' />")
.appendTo(formSelector, page);
$("<input type='hidden' name='sra' value='1' class='pprecurring' />")
.appendTo(formSelector, page);
//change command for subscriptions
$('#ppCmd', page).val('_xclick-subscriptions');
$(formSelector, page).trigger('create');
}
};

View file

@ -1375,7 +1375,7 @@ var Dashboard = {
// The native app can handle a little bit more than safari // The native app can handle a little bit more than safari
if (Dashboard.isRunningInCordova()) { if (Dashboard.isRunningInCordova()) {
quality -= 15; quality -= 10;
if (isBackdrop) { if (isBackdrop) {
quality -= 20; quality -= 20;
@ -1505,6 +1505,10 @@ var AppInfo = {};
AppInfo.enableDetailPageChapters = true; AppInfo.enableDetailPageChapters = true;
AppInfo.enableDetailsMenuImages = true; AppInfo.enableDetailsMenuImages = true;
AppInfo.enableHeaderImages = true; AppInfo.enableHeaderImages = true;
AppInfo.enableMovieHomeSuggestions = true;
AppInfo.enableAppStorePolicy = isCordova;
if ($.browser.safari) { if ($.browser.safari) {
@ -1519,6 +1523,7 @@ var AppInfo = {};
AppInfo.enableDetailPageChapters = false; AppInfo.enableDetailPageChapters = false;
AppInfo.enableDetailsMenuImages = false; AppInfo.enableDetailsMenuImages = false;
AppInfo.enableHeaderImages = false; AppInfo.enableHeaderImages = false;
AppInfo.enableMovieHomeSuggestions = false;
} }
} }
else { else {
@ -1534,7 +1539,6 @@ var AppInfo = {};
AppInfo.enableLatestChannelItems = true; AppInfo.enableLatestChannelItems = true;
AppInfo.enableStudioTabs = true; AppInfo.enableStudioTabs = true;
AppInfo.enablePeopleTabs = true; AppInfo.enablePeopleTabs = true;
AppInfo.enableHomeFavoritesTab = true;
AppInfo.enableTvEpisodesTab = true; AppInfo.enableTvEpisodesTab = true;
AppInfo.enableMusicArtistsTab = true; AppInfo.enableMusicArtistsTab = true;
AppInfo.enableHomeLatestTab = true; AppInfo.enableHomeLatestTab = true;
@ -1550,6 +1554,8 @@ var AppInfo = {};
function initializeApiClient(apiClient) { function initializeApiClient(apiClient) {
apiClient.enableAppStorePolicy = AppInfo.enableAppStorePolicy;
$(apiClient).off('.dashboard') $(apiClient).off('.dashboard')
.on("websocketmessage.dashboard", Dashboard.onWebSocketMessageReceived) .on("websocketmessage.dashboard", Dashboard.onWebSocketMessageReceived)
.on('requestfail.dashboard', Dashboard.onRequestFail) .on('requestfail.dashboard', Dashboard.onRequestFail)
@ -1629,6 +1635,10 @@ var AppInfo = {};
function onReady() { function onReady() {
if (AppInfo.isTouchPreferred) {
$(document.body).addClass('touch');
}
if ($.browser.safari && $.browser.mobile) { if ($.browser.safari && $.browser.mobile) {
initFastClick(); initFastClick();
} }
@ -1649,10 +1659,6 @@ var AppInfo = {};
$(document.body).addClass('peopleTabDisabled'); $(document.body).addClass('peopleTabDisabled');
} }
if (!AppInfo.enableHomeFavoritesTab) {
$(document.body).addClass('homeFavoritesTabDisabled');
}
if (!AppInfo.enableTvEpisodesTab) { if (!AppInfo.enableTvEpisodesTab) {
$(document.body).addClass('tvEpisodesTabDisabled'); $(document.body).addClass('tvEpisodesTabDisabled');
} }
@ -1863,7 +1869,7 @@ $(document).on('pagecreate', ".page", function () {
var require = this.getAttribute('data-require'); var require = this.getAttribute('data-require');
if (require) { if (require) {
requirejs([require], function () { requirejs(require.split(','), function () {
$(page).trigger('pageinitdepends'); $(page).trigger('pageinitdepends');
}); });
@ -1880,7 +1886,7 @@ $(document).on('pagecreate', ".page", function () {
var require = this.getAttribute('data-require'); var require = this.getAttribute('data-require');
if (require) { if (require) {
requirejs([require], function () { requirejs(require.split(','), function () {
$(page).trigger('pageshown'); $(page).trigger('pageshown');
}); });

View file

@ -1,29 +1,7 @@
(function () { (function () {
function addRecurringFields(period, page) { function addRecurringFields(period, page) {
RegistrationServices.addRecurringFields(page, period);
// Add recurring fields to form
$("<input type='hidden' name='a3' class='pprecurring' />")
.attr('value', $('#donateAmt', page).val())
.appendTo("#payPalSupporterForm", page);
$("<input type='hidden' name='p3' value='1' class='pprecurring' />")
.appendTo("#payPalSupporterForm", page);
$("<input type='hidden' name='t3' value='" + period + "' class='pprecurring' />")
.appendTo("#payPalSupporterForm", page);
$("<input type='hidden' name='src' value='1' class='pprecurring' />")
.appendTo("#payPalSupporterForm", page);
$("<input type='hidden' name='sra' value='1' class='pprecurring' />")
.appendTo("#payPalSupporterForm", page);
//change command for subscriptions
$('#ppCmd', page).val('_xclick-subscriptions');
$('#payPalSupporterForm', page).trigger('create');
console.log($('#payPalSupporterForm', page).html());
} }
function removeRecurringFields(page) { function removeRecurringFields(page) {
@ -187,7 +165,7 @@
$('.dailyAmount', page).html('$' + dailyAmount); $('.dailyAmount', page).html('$' + dailyAmount);
$('.yearlyAmount', page).html('$' + yearlyAmount); $('.yearlyAmount', page).html('$' + yearlyAmount);
$('#paypalReturnUrl', page).val(ApiClient.getUrl("supporterkey.html")); $('#returnUrl', page).val(ApiClient.getUrl("supporterkey.html"));
$('.radioDonationType', page).trigger('change'); $('.radioDonationType', page).trigger('change');

View file

@ -27,7 +27,7 @@
<p class="planSummary"></p> <p class="planSummary"></p>
</div> </div>
<form style="margin-top:1.5em;" name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" id="payPalSupporterForm" method="post"> <form style="margin-top:1.5em;" name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" class="supporterForm" method="post">
<fieldset data-role="controlgroup"> <fieldset data-role="controlgroup">
<legend>${HeaderDonationType}</legend> <legend>${HeaderDonationType}</legend>
@ -52,13 +52,6 @@
<span class="monthlyAmount"></span> <span class="monthlyAmount"></span>
</label> </label>
</div> </div>
<!--<div class="fldDaily">
<input type="radio" class="radioDonationType" name="radioDonationType" id="radioDailySupporter" value="daily">
<label for="radioDailySupporter">
Daily supporter membership<br />
<span class="dailyAmount"></span>
</label>
</div>-->
</fieldset> </fieldset>
<div class="fieldDescription">${LabelRecurringDonationCanBeCancelledHelp}</div> <div class="fieldDescription">${LabelRecurringDonationCanBeCancelledHelp}</div>
@ -90,17 +83,21 @@
<br /> <br />
<!--CORDOVA_EXCLUDE_START-->
<input type="hidden" name="cmd" id="ppCmd" value="_xclick"> <input type="hidden" name="cmd" id="ppCmd" value="_xclick">
<input type="hidden" name="business" value="donation@mediabrowser.tv"> <input type="hidden" name="business" value="donation@mediabrowser.tv">
<input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Emby Supporter"> <input type="hidden" name="item_name" value="Emby Supporter">
<input type="hidden" name="item_number" id="ppItemNo" value="MBSupporter"> <input type="hidden" name="item_number" id="ppItemNo" value="MBSupporter">
<input type="hidden" name="notify_url" value="http://mb3admin.com/admin/service/services/ppipn.php"> <input type="hidden" name="notify_url" value="http://mb3admin.com/admin/service/services/ppipn.php">
<input type="hidden" name="return" id="paypalReturnUrl" value="#"> <input type="hidden" name="return" id="returnUrl" value="#">
<!--CORDOVA_EXCLUDE_END-->
<button type="submit" data-role="none" class="btn" style="background-color:#179BD7"> <button type="submit" data-role="none" class="btn" style="background-color:#179BD7">
<!--CORDOVA_REPLACE_SUPPORTER_SUBMIT_START-->
<i class="fa fa-paypal"></i> <i class="fa fa-paypal"></i>
<span>${ButtonDonateWithPayPal}</span> <span>${ButtonDonateWithPayPal}</span>
<!--CORDOVA_REPLACE_SUPPORTER_SUBMIT_END-->
</button> </button>
<input type="hidden" id="donateAmt" name="amount" /> <input type="hidden" id="donateAmt" name="amount" />
@ -118,7 +115,7 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$('#payPalSupporterForm').off('submit', SupporterPage.onSubmit).on('submit', SupporterPage.onSubmit); $('.supporterForm').off('submit', SupporterPage.onSubmit).on('submit', SupporterPage.onSubmit);
</script> </script>
</div> </div>
</body> </body>

View file

@ -28,6 +28,8 @@
var webSocket; var webSocket;
var serverInfo; var serverInfo;
self.enableAppStorePolicy = false;
/** /**
* Gets the server address. * Gets the server address.
*/ */
@ -1688,6 +1690,10 @@
options = options || {}; options = options || {};
options.PackageType = "UserInstalled"; options.PackageType = "UserInstalled";
if (self.enableAppStorePolicy) {
options.IsAppStoreEnabled = true;
}
var url = self.getUrl("Packages", options); var url = self.getUrl("Packages", options);
return self.ajax({ return self.ajax({
@ -2138,7 +2144,13 @@
*/ */
self.getInstalledPlugins = function () { self.getInstalledPlugins = function () {
var url = self.getUrl("Plugins"); var options = {};
if (self.enableAppStorePolicy) {
options.IsAppStoreEnabled = true;
}
var url = self.getUrl("Plugins", options);
return self.ajax({ return self.ajax({
type: "GET", type: "GET",

View file

@ -0,0 +1,12 @@
window.RegistrationServices = {
renderPluginInfo: function (page, pkg, pluginSecurityInfo) {
},
addRecurringFields: function (page, period) {
}
};