mirror of https://github.com/Jackett/Jackett
Manual search: swap tracker and category and remove search button text
This commit is contained in:
parent
58e9869284
commit
f6bbb0cf9e
|
@ -719,7 +719,7 @@ function showSearch(selectedIndexer) {
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#jackett-search-perform').click(function () {
|
$('#jackett-search-perform').click(function () {
|
||||||
if ($('#jackett-search-perform').text().trim() !== 'Search trackers') {
|
if ($('#jackett-search-perform span').hasClass("spinner")) {
|
||||||
// We are searchin already
|
// We are searchin already
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -733,13 +733,13 @@ function showSearch(selectedIndexer) {
|
||||||
$('#searchResults div.dataTables_filter input').val("");
|
$('#searchResults div.dataTables_filter input').val("");
|
||||||
clearSearchResultTable($('#searchResults'));
|
clearSearchResultTable($('#searchResults'));
|
||||||
var jqxhr = $.post("search", queryObj, function (data) {
|
var jqxhr = $.post("search", queryObj, function (data) {
|
||||||
$('#jackett-search-perform').html('Search trackers');
|
$('#jackett-search-perform').html($('#search-button-ready').html());
|
||||||
var searchResults = $('#searchResults');
|
var searchResults = $('#searchResults');
|
||||||
searchResults.empty();
|
searchResults.empty();
|
||||||
var datatable = updateSearchResultTable(searchResults, data).search('').columns().search('').draw();
|
var datatable = updateSearchResultTable(searchResults, data).search('').columns().search('').draw();
|
||||||
searchResults.find('div.dataTables_filter input').focusWithoutScrolling();
|
searchResults.find('div.dataTables_filter input').focusWithoutScrolling();
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
$('#jackett-search-perform').html('Search trackers');
|
$('#jackett-search-perform').html($('#search-button-ready').html());
|
||||||
doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
|
doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -393,20 +393,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>You can search all configured indexers from this screen.</p>
|
<p>You can search all configured indexers from this screen.</p>
|
||||||
<label>Query</label>
|
<label for="text">Query</label>
|
||||||
<input type="text" name="query" id="searchquery"/>
|
<input type="text" name="query" id="searchquery"/>
|
||||||
<label>Category</label>
|
<label for="tracker">Tracker</label>
|
||||||
<select name="category" id="searchCategory"></select>
|
|
||||||
<label>Tracker</label>
|
|
||||||
<select name="tracker" id="searchTracker">
|
<select name="tracker" id="searchTracker">
|
||||||
<option value="">-- All --</option>
|
<option value="">-- All --</option>
|
||||||
{{#each indexers}}
|
{{#each indexers}}
|
||||||
<option value="{{id}}">{{name}}</option>
|
<option value="{{id}}">{{name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
<button id="jackett-search-perform" class="btn btn-success btn-sm">
|
<label for="category">Category</label>
|
||||||
<i class="fa fa-search"></i> Search trackers<span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
<select name="category" id="searchCategory"></select>
|
||||||
</button>
|
<button id="jackett-search-perform" class="btn btn-success btn-sm"><span class="fa fa-search"></span></button>
|
||||||
<div id="searchResults"></div>
|
<div id="searchResults"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -588,6 +586,10 @@
|
||||||
<span class="spinner glyphicon glyphicon-refresh"></span>
|
<span class="spinner glyphicon glyphicon-refresh"></span>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script id="search-button-ready" type="text/x-handlebars-template">
|
||||||
|
<span class="fa fa-search"></span>
|
||||||
|
</script>
|
||||||
|
|
||||||
<script src="../custom.js"></script>
|
<script src="../custom.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue