diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-03-07 14:03:23 -0500 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-03-07 14:03:23 -0500 |
| commit | 830f6e2201cf13077646ff98e1c64424b45bb9ab (patch) | |
| tree | c87b09b8913ed2665a2464be8a8fae330c74e9b8 /MediaBrowser.WebDashboard/Html/scripts/AddPluginPage.js | |
| parent | e5f0c32035a0610b9068e1f492a111fa84c559cf (diff) | |
Add concept of Supporter-only plug-ins (premium with price = 0)
Diffstat (limited to 'MediaBrowser.WebDashboard/Html/scripts/AddPluginPage.js')
| -rw-r--r-- | MediaBrowser.WebDashboard/Html/scripts/AddPluginPage.js | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/MediaBrowser.WebDashboard/Html/scripts/AddPluginPage.js b/MediaBrowser.WebDashboard/Html/scripts/AddPluginPage.js index e8cf82e86..8b45747bb 100644 --- a/MediaBrowser.WebDashboard/Html/scripts/AddPluginPage.js +++ b/MediaBrowser.WebDashboard/Html/scripts/AddPluginPage.js @@ -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,23 +65,29 @@ if (pluginSecurityInfo.IsMBSupporter) { $('#regInfo', page).html(pkg.regInfo || ""); - // Fill in PayPal info - $('#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) { - if (dev.payPalEmail) { - $('#payPalEmail', page).val(dev.payPalEmail); - - } else { - $('#ppButton', page).hide(); - $('#noEmail', page).show(); - } - }); + 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) { + if (dev.payPalEmail) { + $('#payPalEmail', page).val(dev.payPalEmail); + + } else { + $('#ppButton', page).hide(); + $('#noEmail', page).show(); + } + }); + } else { + // 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 register this feature.</h3>"); + $('#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(); } |
