diff --git a/ApiClient.js b/ApiClient.js index 8380dc8e57..5ac4ecd8f0 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -572,9 +572,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { /** * Gets a list of plugins that are available to be installed */ - self.getAvailablePlugins = function () { + self.getAvailablePlugins = function (options) { - var url = self.getUrl("Packages", { PackageType: "UserInstalled" }); + options = $.extend({}, options || {}); + options.PackageType = "UserInstalled"; + + var url = self.getUrl("Packages", options); return self.ajax({ type: "GET", diff --git a/dashboard-ui/boxsets.html b/dashboard-ui/boxsets.html index 839c44f796..e19a65ce2d 100644 --- a/dashboard-ui/boxsets.html +++ b/dashboard-ui/boxsets.html @@ -1,77 +1,77 @@  - Media Browser + Media Browser -
-

- Box Sets

-
- -
- - -
-
-
-
+
+

+ Movies

+
+ +
+ + +
+
+
+
-
-
-
- -

Sort By:

-
+ +
+
+ +

Sort By:

+
- - + + - - + + - - -
+ + +
-
- -

Sort Order:

-
+
+ +

Sort Order:

+
- - + + - - -
-
-
-
-
-
-
- -

Filters:

-
- - + + +
+
+ +
+
+
+
+ +

Filters:

+
+ + - - + + - - -
-
-
-
+ + + + +
+ diff --git a/dashboard-ui/plugincatalog.html b/dashboard-ui/plugincatalog.html index 6801d0ce40..1694c8c6f0 100644 --- a/dashboard-ui/plugincatalog.html +++ b/dashboard-ui/plugincatalog.html @@ -8,44 +8,44 @@
-
+
Installed Plugins Plugin Catalog Automatic Updates
-
- -
+
+ +
-
-
-
- -

Application:

-
- - +
+ +
+ +

Application:

+
+ + - - + + - - -
+ + +
-
- -

-
- - -
-
-
+
+ +

Pricing:

+
+ + +
+ +
diff --git a/dashboard-ui/scripts/plugincatalogpage.js b/dashboard-ui/scripts/plugincatalogpage.js index c328607178..e86da18522 100644 --- a/dashboard-ui/scripts/plugincatalogpage.js +++ b/dashboard-ui/scripts/plugincatalogpage.js @@ -1,139 +1,133 @@ (function ($, document) { - // The base query options - var query = { - IsPremium: false, - TargetSystems: "" - }; + // The base query options + var query = { + }; - function reloadList() { + function reloadList(page) { - Dashboard.showLoadingMsg(); + Dashboard.showLoadingMsg(); - var promise1 = ApiClient.getAvailablePlugins(query); - var promise2 = ApiClient.getInstalledPlugins(); + var promise1 = ApiClient.getAvailablePlugins(query); + var promise2 = ApiClient.getInstalledPlugins(); - $.when(promise1, promise2).done(function (response1, response2) { - populateList(response1[0], response2[0]); - }); + $.when(promise1, promise2).done(function (response1, response2) { + populateList(page, response1[0], response2[0]); + }); - Dashboard.hideLoadingMsg(); - } + Dashboard.hideLoadingMsg(); + } - function populateList(availablePlugins, installedPlugins) { + function populateList(page, availablePlugins, installedPlugins) { - var page = $($.mobile.activePage); - availablePlugins = availablePlugins.filter(function (p) { - return p.type == "UserInstalled"; - }).sort(function (a, b) { - return a.name > b.name ? 1 : -1; - }); + availablePlugins = availablePlugins.filter(function (p) { + return p.type == "UserInstalled"; + }).sort(function (a, b) { + return a.name > b.name ? 1 : -1; + }); - var html = ""; + var html = ""; - for (var i = 0, length = availablePlugins.length; i < length; i++) { + for (var i = 0, length = availablePlugins.length; i < length; i++) { - var plugin = availablePlugins[i]; + var plugin = availablePlugins[i]; - html += "
"; + html += "
"; - if (plugin.thumbImage) { - html += ""; - } else { - html += ""; - } + if (plugin.thumbImage) { + html += ""; + } else { + html += ""; + } - if (plugin.isPremium) { - if (plugin.price > 0) { - html += "
"; - } else { - html += "
"; - } - } + if (plugin.isPremium) { + if (plugin.price > 0) { + html += "
"; + } else { + html += "
"; + } + } - var color = plugin.tileColor || LibraryBrowser.getMetroColor(plugin.name); + var color = plugin.tileColor || LibraryBrowser.getMetroColor(plugin.name); - html += "
"; + html += "
"; - var installedPlugin = installedPlugins.filter(function (ip) { - return ip.Name == plugin.name; - })[0]; + var installedPlugin = installedPlugins.filter(function (ip) { + return ip.Name == plugin.name; + })[0]; - html += "
"; - if (installedPlugin) { - html += plugin.name + " (Installed)"; - } else { - html += plugin.name; - } - html += "
"; + html += "
"; + if (installedPlugin) { + html += plugin.name + " (Installed)"; + } else { + html += plugin.name; + } + html += "
"; - html += "
"; + html += "
"; - html += "
"; + html += "
"; - } + } - $('#pluginTiles', page).html(html); + $('#pluginTiles', page).html(html); - Dashboard.hideLoadingMsg(); - } + Dashboard.hideLoadingMsg(); + } - $(document).on('pageinit', "#pluginCatalogPage", function () { + $(document).on('pageinit', "#pluginCatalogPage", function () { - var page = this; + var page = this; + $('.chkStandardFilter', this).on('change', function () { - $('.chkStandardFilter', this).on('change', function () { + var filterName = this.getAttribute('data-filter'); + var filters = query.TargetSystems || ""; - var filterName = this.getAttribute('data-filter'); - var filters = query.TargetSystems || ""; + filters = (',' + filters).replace(',' + filterName, '').substring(1); - filters = (',' + filters).replace(',' + filterName, '').substring(1); + if (this.checked) { + filters = filters ? (filters + ',' + filterName) : filterName; + } - if (this.checked) { - filters = filters ? (filters + ',' + filterName) : filterName; - } + query.TargetSystems = filters; - query.TargetSystems = filters; + reloadList(page); + }); - reloadList(); - }); + $('.chkPremiumFilter', this).on('change', function () { - $('.chkPremiumFilter', this).on('change', function () { + if (this.checked) { + query.IsPremium = true; + } else { + query.IsPremium = null; + } - var filterName = this.getAttribute('data-filter'); + reloadList(page); + }); - if (this.checked) { - query.IsPremium = true; - }else { - query.IsPremium = false; - } + }).on('pageshow', "#pluginCatalogPage", function () { - reloadList(); - }); + reloadList(this); - }).on('pageshow', "#pluginCatalogPage", function () { + // Reset form values using the last used query - reloadList(); + $('.chkStandardFilter', this).each(function () { - // Reset form values using the last used query + var filters = "," + (query.TargetSystems || ""); + var filterName = this.getAttribute('data-filter'); - $('.chkStandardFilter', this).each(function () { + this.checked = filters.indexOf(',' + filterName) != -1; - var filters = "," + (query.TargetSystems || ""); - var filterName = this.getAttribute('data-filter'); + }).checkboxradio('refresh'); - this.checked = filters.indexOf(',' + filterName) != -1; + $('.chkPremiumFilter', this).each(function () { - }).checkboxradio('refresh'); + var filters = query.IsPremium || false; - $('.chkPremiumFilter', this).each(function () { + this.checked = filters; - var filters = query.IsPremium || false; - - this.checked = filters; - - }).checkboxradio('refresh'); - }); + }).checkboxradio('refresh'); + }); })(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index b3b6793d4f..46f37556d5 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1009,7 +1009,7 @@ var Dashboard = { type: "Primary" }); - if (!item.Id || !data.icon) { + if (!item.Id || !data.icon || data.icon == "undefined") { alert("bad image url: " + JSON.stringify(item)); console.log("bad image url: " + JSON.stringify(item)); diff --git a/packages.config b/packages.config index 42d7b089c5..30a541990f 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file