Add concept of Supporter-only plug-ins (premium with price = 0)

pull/702/head
Eric Reed 12 years ago
parent e5f0c32035
commit 830f6e2201

@ -39,6 +39,7 @@
</p>
<p id="regInfo">
</p>
<div class="premiumHasPrice" style="display: none">
<p id="regPrice">
</p>
<input type="hidden" name="cmd" value="_xclick">
@ -56,6 +57,8 @@
</div>
</div>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" style="margin-top: 2em;" data-theme="a">
<h3>Developer Info</h3>
<p id="developer"></p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -50,7 +50,7 @@
regStatus += "You are currently registered for this feature";
} else {
if (new Date(pkg.expDate).getTime() < new Date(1970, 1, 1).getTime()) {
regStatus += "You have never installed this feature";
regStatus += "This feature has no registration information";
} else {
if (pkg.expDate <= new Date().getTime()) {
regStatus += "The trial period for this feature has expired on this machine";
@ -65,13 +65,15 @@
if (pluginSecurityInfo.IsMBSupporter) {
$('#regInfo', page).html(pkg.regInfo || "");
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("<h2>Price: $" + pkg.price.toFixed(2) + " (USD)</h2>");
var url = "http://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner;
$.getJSON(url).done(function (dev) {
$.getJSON(url).done(function(dev) {
if (dev.payPalEmail) {
$('#payPalEmail', page).val(dev.payPalEmail);
@ -81,7 +83,11 @@
}
});
} else {
$('#regInfo', page).html("<h3>You must be a <a href='supporter.html'>Media Browser Supporter</a> in order to register this feature.</h3>");
// Supporter-only feature
$('premiumHasPrice', page).hide();
}
} else {
$('#regInfo', page).html("<h3>You must be a <a href='supporter.html'>Media Browser Supporter</a> in order to gain access to this feature.</h3>");
$('#ppButton', page).hide();
}

@ -47,7 +47,11 @@
}
if (plugin.isPremium) {
if (plugin.price > 0) {
html += "<div class='premiumBanner'><img src='css/images/premiumflag.png' /></div>";
} else {
html += "<div class='premiumBanner'><img src='css/images/supporterflag.png' /></div>";
}
}
var color = plugin.tileColor || Dashboard.getRandomMetroColor();

@ -385,6 +385,7 @@
<EmbeddedResource Include="Html\scripts\ItemDetailPage.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Html\css\images\supporterflag.png" />
<EmbeddedResource Include="Html\scripts\ItemListPage.js" />
<EmbeddedResource Include="Html\itemList.html" />
<EmbeddedResource Include="Html\scripts\WizardFinishPage.js" />

Loading…
Cancel
Save