diff --git a/dashboard-ui/plugincatalog.html b/dashboard-ui/plugincatalog.html index cde52fc62b..d056a7d50a 100644 --- a/dashboard-ui/plugincatalog.html +++ b/dashboard-ui/plugincatalog.html @@ -13,9 +13,14 @@ Plugin Catalog Automatic Updates -
- -
+ +
Displaying plugins for:
+
+ MB Server + MB Theatre + MB Classic + +
@@ -23,20 +28,6 @@
-
- -

Application:

-
- - - - - - - - -
-

Pricing:

diff --git a/dashboard-ui/scripts/plugincatalogpage.js b/dashboard-ui/scripts/plugincatalogpage.js index e86da18522..d2b4a218d6 100644 --- a/dashboard-ui/scripts/plugincatalogpage.js +++ b/dashboard-ui/scripts/plugincatalogpage.js @@ -2,6 +2,7 @@ // The base query options var query = { + TargetSystems: 'Server' }; function reloadList(page) { @@ -70,31 +71,28 @@ } + if (!availablePlugins.length) { + html = '
No available plugins
'; + } + $('#pluginTiles', page).html(html); Dashboard.hideLoadingMsg(); } + function selectTab(elem) { + $("#pluginTabs a").removeClass("ui-btn-active"); + $(elem).addClass("ui-btn-active"); + + query.TargetSystems = $(elem).attr("rel"); + + reloadList($.mobile.activePage); + } + $(document).on('pageinit', "#pluginCatalogPage", function () { var page = this; - $('.chkStandardFilter', this).on('change', function () { - - var filterName = this.getAttribute('data-filter'); - var filters = query.TargetSystems || ""; - - filters = (',' + filters).replace(',' + filterName, '').substring(1); - - if (this.checked) { - filters = filters ? (filters + ',' + filterName) : filterName; - } - - query.TargetSystems = filters; - - reloadList(page); - }); - $('.chkPremiumFilter', this).on('change', function () { if (this.checked) { @@ -103,24 +101,18 @@ query.IsPremium = null; } - reloadList(page); }); - }).on('pageshow', "#pluginCatalogPage", function () { + $('#pluginTabs a', this).each(function(){ + $(this).on('click', function () { + selectTab(this); + }); + }); - reloadList(this); + }).on('pageshow', "#pluginCatalogPage", function () { + selectTab($("#pluginTabs a.ui-btn-active")); // Reset form values using the last used query - - $('.chkStandardFilter', this).each(function () { - - var filters = "," + (query.TargetSystems || ""); - var filterName = this.getAttribute('data-filter'); - - this.checked = filters.indexOf(',' + filterName) != -1; - - }).checkboxradio('refresh'); - $('.chkPremiumFilter', this).each(function () { var filters = query.IsPremium || false;