mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Make Un-configured list smaller
This commit is contained in:
@@ -44,12 +44,15 @@
|
|||||||
|
|
||||||
#unconfigured-indexers .card {
|
#unconfigured-indexers .card {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unconfigured-indexer {
|
.unconfigured-indexer {
|
||||||
height: 120px;
|
height: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.indexer {
|
.indexer {
|
||||||
height: 252px;
|
height: 252px;
|
||||||
}
|
}
|
||||||
@@ -68,11 +71,15 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.indexer-logo > img {
|
.indexer-logo img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-bottom: 1px solid #FFF;
|
border-bottom: 1px solid #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#unconfigured-indexers .indexer-logo img {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.indexer-name > h3 {
|
.indexer-name > h3 {
|
||||||
margin-top: 13px;
|
margin-top: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -86,7 +93,6 @@
|
|||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.indexer-button-test {
|
.indexer-button-test {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
}
|
}
|
||||||
|
@@ -72,9 +72,10 @@ function displayIndexers(items) {
|
|||||||
$('.indexer-setup').each(function (i, btn) {
|
$('.indexer-setup').each(function (i, btn) {
|
||||||
var $btn = $(btn);
|
var $btn = $(btn);
|
||||||
var id = $btn.data("id");
|
var id = $btn.data("id");
|
||||||
|
var link = $btn.data("link");
|
||||||
$btn.click(function () {
|
$btn.click(function () {
|
||||||
$('#select-indexer-modal').modal('hide').on('hidden.bs.modal', function (e) {
|
$('#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) {
|
$('.indexer-setup').each(function (i, btn) {
|
||||||
var $btn = $(btn);
|
var $btn = $(btn);
|
||||||
var id = $btn.data("id");
|
var id = $btn.data("id");
|
||||||
|
var link = $btn.data("link");
|
||||||
$btn.click(function () {
|
$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) {
|
var jqxhr = $.post("/admin/get_config_form", JSON.stringify({ indexer: id }), function (data) {
|
||||||
if (data.result == "error") {
|
if (data.result == "error") {
|
||||||
@@ -145,7 +147,7 @@ function displayIndexerSetup(id) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
populateSetupForm(id, data.name, data.config, data.caps);
|
populateSetupForm(id, data.name, data.config, data.caps, link);
|
||||||
|
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
|
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 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);
|
$("#modals").append(configForm);
|
||||||
populateConfigItems(configForm, config);
|
populateConfigItems(configForm, config);
|
||||||
return configForm;
|
return configForm;
|
||||||
@@ -234,8 +236,8 @@ function getConfigModalJson(configForm) {
|
|||||||
return configJson;
|
return configJson;
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateSetupForm(indexerId, name, config, caps) {
|
function populateSetupForm(indexerId, name, config, caps, link) {
|
||||||
var configForm = newConfigModal(name, config, caps);
|
var configForm = newConfigModal(name, config, caps, link);
|
||||||
var $goButton = configForm.find(".setup-indexer-go");
|
var $goButton = configForm.find(".setup-indexer-go");
|
||||||
$goButton.click(function () {
|
$goButton.click(function () {
|
||||||
var data = { indexer: indexerId, name: name };
|
var data = { indexer: indexerId, name: name };
|
||||||
|
@@ -175,7 +175,7 @@
|
|||||||
<img alt="{{name}}" title="{{name}}" src="../../logos/{{id}}.png" />
|
<img alt="{{name}}" title="{{name}}" src="../../logos/{{id}}.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="indexer-buttons">
|
<div class="indexer-buttons">
|
||||||
<button class="btn btn-primary btn-sm indexer-setup" data-id="{{id}}">
|
<button class="btn btn-primary btn-sm indexer-setup" data-id="{{id}}" data-link="{{site_link}}">
|
||||||
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger btn-sm indexer-button-delete" data-id="{{id}}">
|
<button class="btn btn-danger btn-sm indexer-button-delete" data-id="{{id}}">
|
||||||
@@ -203,14 +203,11 @@
|
|||||||
</script>
|
</script>
|
||||||
<script id="unconfigured-indexer" type="text/x-handlebars-template">
|
<script id="unconfigured-indexer" type="text/x-handlebars-template">
|
||||||
<div class="unconfigured-indexer card">
|
<div class="unconfigured-indexer card">
|
||||||
<div class="indexer-logo">
|
<div class="indexer-logo indexer-setup" data-id="{{id}}" data-link="{{site_link}}">
|
||||||
<!-- Make section browser searchable -->
|
<!-- Make section browser searchable -->
|
||||||
<span class="hidden-name">{{name}}</span>
|
<span class="hidden-name">{{name}}</span>
|
||||||
<img alt="{{name}}" title="{{name}}" src="../../logos/{{id}}.png" />
|
<img alt="{{name}}" title="{{name}}" src="../../logos/{{id}}.png" />
|
||||||
</div>
|
|
||||||
<div class="indexer-buttons">
|
|
||||||
<a class="btn btn-info" target="_blank" href="{{site_link}}">Visit <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a>
|
|
||||||
<button class="indexer-setup btn btn-success" data-id="{{id}}">Setup <span class="glyphicon glyphicon-ok" aria-hidden="true"></span></button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
@@ -437,7 +434,7 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h4 class="modal-title">{{title}}</h4>
|
<h4 class="modal-title">{{title}} - <a target="_blank" href="{{link}}">{{link}}</a></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form class="config-setup-form"></form>
|
<form class="config-setup-form"></form>
|
||||||
|
Reference in New Issue
Block a user