mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
#93 Change IPT to be category aware and render availible categories to the front end.
This commit is contained in:
@@ -211,7 +211,7 @@ function displayIndexerSetup(id) {
|
||||
return;
|
||||
}
|
||||
|
||||
populateSetupForm(id, data.name, data.config);
|
||||
populateSetupForm(id, data.name, data.config, data.caps);
|
||||
|
||||
}).fail(function () {
|
||||
doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
|
||||
@@ -236,17 +236,12 @@ function populateConfigItems(configForm, config) {
|
||||
}
|
||||
}
|
||||
|
||||
function newConfigModal(title, config) {
|
||||
//config-setup-modal
|
||||
var configTemplate = Handlebars.compile($("#templates > .config-setup-modal")[0].outerHTML);
|
||||
var configForm = $(configTemplate({ title: title }));
|
||||
|
||||
function newConfigModal(title, config, caps) {
|
||||
var configTemplate = Handlebars.compile($("#jackett-config-setup-modal").html());
|
||||
var configForm = $(configTemplate({ title: title, caps: caps }));
|
||||
$("#modals").append(configForm);
|
||||
|
||||
populateConfigItems(configForm, config);
|
||||
|
||||
return configForm;
|
||||
//modal.remove();
|
||||
}
|
||||
|
||||
function getConfigModalJson(configForm) {
|
||||
@@ -267,8 +262,8 @@ function getConfigModalJson(configForm) {
|
||||
return configJson;
|
||||
}
|
||||
|
||||
function populateSetupForm(indexerId, name, config) {
|
||||
var configForm = newConfigModal(name, config);
|
||||
function populateSetupForm(indexerId, name, config, caps) {
|
||||
var configForm = newConfigModal(name, config, caps);
|
||||
var $goButton = configForm.find(".setup-indexer-go");
|
||||
$goButton.click(function () {
|
||||
var data = { indexer: indexerId, name: name };
|
||||
|
Reference in New Issue
Block a user