From c04ac2c462aa798b82e711649bc849bb380d4c83 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 18 May 2014 15:58:42 -0400 Subject: [PATCH] channel fixes --- dashboard-ui/css/librarybrowser.css | 2 +- dashboard-ui/itemdetails.html | 2 +- dashboard-ui/scripts/channelitems.js | 12 +++-- dashboard-ui/scripts/itemdetailpage.js | 2 +- dashboard-ui/scripts/librarybrowser.js | 6 ++- dashboard-ui/scripts/supporterkeypage.js | 69 ++++++++++++------------ dashboard-ui/supporterkey.html | 9 ---- 7 files changed, 48 insertions(+), 54 deletions(-) diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index b4f62f67d1..7be495662f 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -17,7 +17,7 @@ } .backdropPage { - background-color: rgba(0, 0, 0, .85)!important; + background-color: rgba(0, 0, 0, .86)!important; } .backdropContainer { diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 2ec47520b5..a4012e1df9 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -8,7 +8,7 @@ diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js index 7f1c760ff2..f081071b7d 100644 --- a/dashboard-ui/scripts/channelitems.js +++ b/dashboard-ui/scripts/channelitems.js @@ -9,7 +9,7 @@ }; function getSavedQueryId() { - return 'channels-' + (getParameterByName('categoryId') || ''); + return 'channels-' + getParameterByName('id') + (getParameterByName('categoryId') || ''); } function showLoadingMessage(page) { @@ -35,9 +35,7 @@ $('.categoryTitle', page).html(item.Name); }); - if (categoryId) { - query.categoryId = categoryId; - } + query.categoryId = categoryId; $.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Items", query)).done(function (result) { @@ -55,7 +53,8 @@ shape: "auto", context: 'channels', showTitle: true, - centerText: true + centerText: true, + coverImage: true }); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); @@ -80,6 +79,9 @@ LibraryBrowser.saveQueryValues(getSavedQueryId(), query); + + }).always(function() { + hideLoadingMessage(page); }); } diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 0eda1433c9..682166d361 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -1165,7 +1165,7 @@ } if (version.Path) { - html += '
Path' + version.Path + '
'; + html += '
Path' + version.Path + '
'; } if (version.Container) { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index b84f89d170..bbad878bc1 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -479,7 +479,11 @@ if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) { options.shape = 'backdrop'; } - else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .34) { + else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .33) { + options.coverImage = true; + options.shape = 'square'; + } + else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.3333334) < .01) { options.coverImage = true; options.shape = 'square'; } diff --git a/dashboard-ui/scripts/supporterkeypage.js b/dashboard-ui/scripts/supporterkeypage.js index 54666b1757..3cdf438d42 100644 --- a/dashboard-ui/scripts/supporterkeypage.js +++ b/dashboard-ui/scripts/supporterkeypage.js @@ -5,66 +5,63 @@ }, load: function (page) { - + Dashboard.showLoadingMsg(); ApiClient.getPluginSecurityInfo().done(function (info) { - - $('#txtSupporterKey', page).val(info.SupporterKey); - $('#txtLegacyKey', page).val(info.LegacyKey); - if ((info.LegacyKey || info.SupporterKey) && !info.IsMBSupporter) { + $('#txtSupporterKey', page).val(info.SupporterKey); + + if (info.SupporterKey && !info.IsMBSupporter) { $('#txtSupporterKey', page).addClass("invalidEntry"); $('.notSupporter', page).show(); } else { $('#txtSupporterKey', page).removeClass("invalidEntry"); $('.notSupporter', page).hide(); } - + Dashboard.hideLoadingMsg(); }); }, - + updateSupporterKey: function () { Dashboard.showLoadingMsg(); var form = this; - + var key = $('#txtSupporterKey', form).val(); - var legacyKey = $('#txtLegacyKey', form).val(); - var info = { - SupporterKey: key, - LegacyKey: legacyKey - }; + var info = { + SupporterKey: key + }; - ApiClient.updatePluginSecurityInfo(info).done(function () { - - Dashboard.resetPluginSecurityInfo(); - Dashboard.hideLoadingMsg(); - - if (key) { + ApiClient.updatePluginSecurityInfo(info).done(function () { - Dashboard.alert({ - message: "Thank you. Your supporter key has been updated.", - title: "Confirmation" - }); + Dashboard.resetPluginSecurityInfo(); + Dashboard.hideLoadingMsg(); - } else { - Dashboard.alert({ - message: "Thank you. Your supporter key has been removed.", - title: "Confirmation" - }); - } + if (key) { - var page = $(form).parents('.page'); + Dashboard.alert({ + message: "Thank you. Your supporter key has been updated.", + title: "Confirmation" + }); - SupporterKeyPage.load(page); - }); + } else { + Dashboard.alert({ + message: "Thank you. Your supporter key has been removed.", + title: "Confirmation" + }); + } + + var page = $(form).parents('.page'); + + SupporterKeyPage.load(page); + }); return false; }, - + linkSupporterKeys: function () { Dashboard.showLoadingMsg(); @@ -96,7 +93,7 @@ return false; }, - + retrieveSupporterKey: function () { Dashboard.showLoadingMsg(); @@ -104,13 +101,13 @@ var email = $('#txtEmail', form).val(); - var url = "http://mb3admin.com/admin/service/supporter/retrievekey?email="+email; + var url = "http://mb3admin.com/admin/service/supporter/retrievekey?email=" + email; console.log(url); $.post(url).done(function (res) { var result = JSON.parse(res); Dashboard.hideLoadingMsg(); if (result.Success) { - Dashboard.alert("Key emailed to "+email); + Dashboard.alert("Key emailed to " + email); } else { Dashboard.showError(result.ErrorMessage); } diff --git a/dashboard-ui/supporterkey.html b/dashboard-ui/supporterkey.html index 65cf7f8af3..02a184e0ea 100644 --- a/dashboard-ui/supporterkey.html +++ b/dashboard-ui/supporterkey.html @@ -33,15 +33,6 @@

- -
- - - -
- Some premium plugins may give credit for registrations with previous versions in MB2. -
-