diff --git a/dashboard-ui/plugincatalog.html b/dashboard-ui/plugincatalog.html
index 366a675618..0c6d109e00 100644
--- a/dashboard-ui/plugincatalog.html
+++ b/dashboard-ui/plugincatalog.html
@@ -14,26 +14,25 @@
Automatic Updates
-
-
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
+
diff --git a/dashboard-ui/scripts/plugincatalogpage.js b/dashboard-ui/scripts/plugincatalogpage.js
index 595154d363..56f4632ffa 100644
--- a/dashboard-ui/scripts/plugincatalogpage.js
+++ b/dashboard-ui/scripts/plugincatalogpage.js
@@ -2,7 +2,7 @@
// The base query options
var query = {
- TargetSystems: 'Server,MBTheater,MBClassic'
+ TargetSystems: 'Server'
};
function reloadList(page) {
@@ -26,17 +26,28 @@
availablePlugins = availablePlugins.filter(function (p) {
return p.type == "UserInstalled";
}).sort(function (a, b) {
- return a.name > b.name ? 1 : -1;
+
+ var aName = (a.category || "General") + " " + a.name;
+ var bame = (b.category || "General") + " " + b.name;
+
+ return aName > bame ? 1 : -1;
});
- var serverhtml = '';
- var theatrehtml = '';
- var classichtml = "";
+ var pluginhtml = '';
+
+ var currentCategory;
for (var i = 0, length = availablePlugins.length; i < length; i++) {
var html = '';
var plugin = availablePlugins[i];
+ var category = plugin.category || "General";
+
+ if (category != currentCategory) {
+ html += '' + category + '
';
+ currentCategory = category;
+ }
+
html += "";
if (plugin.thumbImage) {
@@ -62,7 +73,7 @@
})[0];
if (installedPlugin) {
- html += ""+ plugin.name + " (Installed)";
+ html += "" + plugin.name + " (Installed)";
} else {
html += plugin.name;
}
@@ -71,13 +82,7 @@
html += "";
- if (plugin.targetSystem == "Server") {
- serverhtml += html;
- } else if (plugin.targetSystem == "MBTheater") {
- theatrehtml += html;
- } else if (plugin.targetSystem == "MBClassic") {
- classichtml += html;
- }
+ pluginhtml += html;
}
@@ -85,27 +90,7 @@
$("#noPlugins", page).hide();
}
- $('#pluginServerTiles', page).html(serverhtml);
- $('#pluginTheatreTiles', page).html(theatrehtml);
- $('#pluginClassicTiles', page).html(classichtml);
-
- if (serverhtml) {
- $('#pluginServerCollapsible', page).show();
- } else {
- $('#pluginServerCollapsible', page).hide();
- }
-
- if (theatrehtml) {
- $('#pluginTheatreCollapsible', page).show();
- } else {
- $('#pluginTheatreCollapsible', page).hide();
- }
-
- if (classichtml) {
- $('#pluginClassicCollapsible', page).show();
- } else {
- $('#pluginClassicCollapsible', page).hide();
- }
+ $('#pluginTiles', page).html(pluginhtml);
Dashboard.hideLoadingMsg();
}
@@ -127,6 +112,12 @@
reloadList(page);
});
+ $('#selectTargetSystem', page).on('change', function () {
+
+ query.TargetSystems = this.value;
+ reloadList(page);
+ });
+
}).on('pageshow', "#pluginCatalogPage", function () {
var page = this;