mirror of
https://github.com/Jackett/Jackett
synced 2024-12-22 15:57:50 +00:00
Fixed display bug
This commit is contained in:
parent
0f89b630c9
commit
aa24c6b966
1 changed files with 18 additions and 13 deletions
|
@ -54,8 +54,7 @@
|
||||||
height: 230px;
|
height: 230px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#add-indexer {
|
.add-indexer {
|
||||||
margin-right: 0px;
|
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,12 +217,7 @@
|
||||||
<h3>Configured Indexers</h3>
|
<h3>Configured Indexers</h3>
|
||||||
<div id="indexers">
|
<div id="indexers">
|
||||||
|
|
||||||
<button class="indexer card" id="add-indexer" data-toggle="modal" data-target="#select-indexer-modal">
|
|
||||||
<div class="indexer-add-content">
|
|
||||||
<span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"></span>
|
|
||||||
<div class="light-text">Add</div>
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -269,7 +263,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="indexer card">
|
<button class="indexer card add-indexer" data-toggle="modal" data-target="#select-indexer-modal">
|
||||||
|
<div class="indexer-add-content">
|
||||||
|
<span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||||
|
<div class="light-text">Add</div>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="configured-indexer indexer card">
|
||||||
<div class="indexer-logo"><img src="logos/{{id}}.png" /></div>
|
<div class="indexer-logo"><img src="logos/{{id}}.png" /></div>
|
||||||
<div class="indexer-name"><h3>{{name}}</h3></div>
|
<div class="indexer-name"><h3>{{name}}</h3></div>
|
||||||
<div class="indexer-buttons">
|
<div class="indexer-buttons">
|
||||||
|
@ -410,7 +411,7 @@
|
||||||
|
|
||||||
function reloadIndexers() {
|
function reloadIndexers() {
|
||||||
$('#indexers').hide();
|
$('#indexers').hide();
|
||||||
$('#indexers > div.indexer').remove();
|
$('#indexers > .indexer').remove();
|
||||||
$('#unconfigured-indexers').empty();
|
$('#unconfigured-indexers').empty();
|
||||||
var jqxhr = $.get("get_indexers", function (data) {
|
var jqxhr = $.get("get_indexers", function (data) {
|
||||||
$("#api-key-input").val(data.api_key);
|
$("#api-key-input").val(data.api_key);
|
||||||
|
@ -421,16 +422,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayIndexers(items) {
|
function displayIndexers(items) {
|
||||||
var indexerTemplate = Handlebars.compile($("#templates > .indexer")[0].outerHTML);
|
var indexerTemplate = Handlebars.compile($("#templates > .configured-indexer")[0].outerHTML);
|
||||||
var unconfiguredIndexerTemplate = Handlebars.compile($("#templates > .unconfigured-indexer")[0].outerHTML);
|
var unconfiguredIndexerTemplate = Handlebars.compile($("#templates > .unconfigured-indexer")[0].outerHTML);
|
||||||
for (var i = 0; i < items.length; i++) {
|
for (var i = 0; i < items.length; i++) {
|
||||||
var item = items[i];
|
var item = items[i];
|
||||||
item.torznab_host = resolveUrl("/api/" + item.id);
|
item.torznab_host = resolveUrl("/api/" + item.id);
|
||||||
if (item.configured)
|
if (item.configured)
|
||||||
$('#indexers').prepend(indexerTemplate(item));
|
$('#indexers').append(indexerTemplate(item));
|
||||||
else
|
else
|
||||||
$('#unconfigured-indexers').prepend($(unconfiguredIndexerTemplate(item)));
|
$('#unconfigured-indexers').append($(unconfiguredIndexerTemplate(item)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var addIndexerButton = $("#templates > .add-indexer")[0].outerHTML;
|
||||||
|
$('#indexers').append(addIndexerButton);
|
||||||
|
|
||||||
$('#indexers').fadeIn();
|
$('#indexers').fadeIn();
|
||||||
prepareSetupButtons();
|
prepareSetupButtons();
|
||||||
prepareTestButtons();
|
prepareTestButtons();
|
||||||
|
|
Loading…
Reference in a new issue