1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

extract scripts

This commit is contained in:
Luke Pulverenti 2015-06-10 00:01:14 -04:00
parent d84e09e501
commit 6c97b11f21
41 changed files with 8363 additions and 204 deletions

View file

@ -37,36 +37,39 @@
function renderInstalled(page, availablePlugins, installedPlugins) {
var category = getCategories()[0];
requirejs(['scripts/pluginspage'], function() {
var category = getCategories()[0];
installedPlugins = installedPlugins.filter(function (i) {
installedPlugins = installedPlugins.filter(function (i) {
var catalogEntry = availablePlugins.filter(function (a) {
return a.guid == i.Id;
})[0];
var catalogEntry = availablePlugins.filter(function (a) {
return a.guid == i.Id;
})[0];
return catalogEntry && catalogEntry.category == category;
return catalogEntry && catalogEntry.category == category;
});
PluginsPage.renderPlugins(page, installedPlugins);
});
PluginsPage.renderPlugins(page, installedPlugins);
}
function renderCatalog(page, availablePlugins, installedPlugins) {
var categories = getCategories();
requirejs(['scripts/plugincatalogpage'], function () {
var categories = getCategories();
PluginCatalog.renderCatalog({
PluginCatalog.renderCatalog({
catalogElement: $('.catalog', page),
availablePlugins: availablePlugins,
installedPlugins: installedPlugins,
categories: categories,
showCategory: false,
context: getParameterByName('context'),
targetSystem: 'Server'
catalogElement: $('.catalog', page),
availablePlugins: availablePlugins,
installedPlugins: installedPlugins,
categories: categories,
showCategory: false,
context: getParameterByName('context'),
targetSystem: 'Server'
});
});
}
$(document).on('pagebeforeshow pageinit pageshow', "#appServicesPage", function () {
@ -93,7 +96,7 @@
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Notifications');
}
}).on('pageshow', "#appServicesPage", function () {
}).on('pageshowready', "#appServicesPage", function () {
// This needs both events for the helpurl to get done at the right time