From a04d296b55668ff6851a8d54fdaf7a1c43893597 Mon Sep 17 00:00:00 2001 From: Azerelat Date: Wed, 6 Jan 2016 19:53:13 +0000 Subject: [PATCH] Make Un-configured list smaller --- src/Jackett/Content/custom.css | 40 +++++++++++++++++++--------------- src/Jackett/Content/custom.js | 18 ++++++++------- src/Jackett/Content/index.html | 11 ++++------ 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/src/Jackett/Content/custom.css b/src/Jackett/Content/custom.css index 92617dd1a..20c3ed100 100644 --- a/src/Jackett/Content/custom.css +++ b/src/Jackett/Content/custom.css @@ -42,14 +42,17 @@ text-align: center; } - #unconfigured-indexers .card { - width: 200px; - } +#unconfigured-indexers .card { + width: 200px; + position: relative; +} .unconfigured-indexer { - height: 120px; + height: 70px; } + + .indexer { height: 252px; } @@ -62,16 +65,20 @@ padding-bottom: 5px; } - .indexer-logo > .hidden-name { - position: absolute; - color: rgba(255, 255, 255, 0); - left: 0; - } +.indexer-logo > .hidden-name { + position: absolute; + color: rgba(255, 255, 255, 0); + left: 0; +} - .indexer-logo > img { - width: 100%; - border-bottom: 1px solid #FFF; - } +.indexer-logo img { + width: 100%; + border-bottom: 1px solid #FFF; +} + +#unconfigured-indexers .indexer-logo img { + cursor: pointer; +} .indexer-name > h3 { margin-top: 13px; @@ -82,10 +89,9 @@ text-align: center; } - .indexer-buttons > .btn { - margin-bottom: 2px; - } - +.indexer-buttons > .btn { + margin-bottom: 2px; +} .indexer-button-test { width: 60px; diff --git a/src/Jackett/Content/custom.js b/src/Jackett/Content/custom.js index 19b8f5c0e..4832911ca 100644 --- a/src/Jackett/Content/custom.js +++ b/src/Jackett/Content/custom.js @@ -72,9 +72,10 @@ function displayIndexers(items) { $('.indexer-setup').each(function (i, btn) { var $btn = $(btn); var id = $btn.data("id"); + var link = $btn.data("link"); $btn.click(function () { $('#select-indexer-modal').modal('hide').on('hidden.bs.modal', function (e) { - displayIndexerSetup(id); + displayIndexerSetup(id, link); }); }); }); @@ -111,8 +112,9 @@ function prepareSetupButtons() { $('.indexer-setup').each(function (i, btn) { var $btn = $(btn); var id = $btn.data("id"); + var link = $btn.data("link"); $btn.click(function () { - displayIndexerSetup(id); + displayIndexerSetup(id, link); }); }); } @@ -137,7 +139,7 @@ function prepareTestButtons() { }); } -function displayIndexerSetup(id) { +function displayIndexerSetup(id, link) { var jqxhr = $.post("/admin/get_config_form", JSON.stringify({ indexer: id }), function (data) { if (data.result == "error") { @@ -145,7 +147,7 @@ function displayIndexerSetup(id) { return; } - populateSetupForm(id, data.name, data.config, data.caps); + populateSetupForm(id, data.name, data.config, data.caps, link); }).fail(function () { doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert"); @@ -196,9 +198,9 @@ function populateConfigItems(configForm, config) { } } -function newConfigModal(title, config, caps) { +function newConfigModal(title, config, caps, link) { var configTemplate = Handlebars.compile($("#jackett-config-setup-modal").html()); - var configForm = $(configTemplate({ title: title, caps: caps })); + var configForm = $(configTemplate({ title: title, caps: caps, link:link })); $("#modals").append(configForm); populateConfigItems(configForm, config); return configForm; @@ -234,8 +236,8 @@ function getConfigModalJson(configForm) { return configJson; } -function populateSetupForm(indexerId, name, config, caps) { - var configForm = newConfigModal(name, config, caps); +function populateSetupForm(indexerId, name, config, caps, link) { + var configForm = newConfigModal(name, config, caps, link); var $goButton = configForm.find(".setup-indexer-go"); $goButton.click(function () { var data = { indexer: indexerId, name: name }; diff --git a/src/Jackett/Content/index.html b/src/Jackett/Content/index.html index 2f3f5fcfe..51591b9c0 100644 --- a/src/Jackett/Content/index.html +++ b/src/Jackett/Content/index.html @@ -175,7 +175,7 @@ {{name}}
- - +