mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Co-authored-by: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com>
This commit is contained in:
@@ -1319,7 +1319,7 @@ function updateSearchResultTable(element, results) {
|
|||||||
var newInputSearch = inputSearch.clone();
|
var newInputSearch = inputSearch.clone();
|
||||||
newInputSearch.attr("custom", "true");
|
newInputSearch.attr("custom", "true");
|
||||||
newInputSearch.attr("data-toggle", "tooltip");
|
newInputSearch.attr("data-toggle", "tooltip");
|
||||||
newInputSearch.attr("title", "Search query consists of several keywords.\nKeyword starting with \"-\" is considered a negative match.");
|
newInputSearch.attr("title", "Search query consists of several keywords.\nKeyword starting with \"-\" is considered a negative match.\nKeywords separated by \"|\" are considered as OR filters.");
|
||||||
newInputSearch.on("input", function () {
|
newInputSearch.on("input", function () {
|
||||||
var newKeywords = [];
|
var newKeywords = [];
|
||||||
var filterTextKeywords = $(this).val().split(" ");
|
var filterTextKeywords = $(this).val().split(" ");
|
||||||
@@ -1332,7 +1332,7 @@ function updateSearchResultTable(element, results) {
|
|||||||
else if (keyword.startsWith("-"))
|
else if (keyword.startsWith("-"))
|
||||||
newKeyword = "^((?!" + $.fn.dataTable.util.escapeRegex(keyword.substring(1)) + ").)*$";
|
newKeyword = "^((?!" + $.fn.dataTable.util.escapeRegex(keyword.substring(1)) + ").)*$";
|
||||||
else
|
else
|
||||||
newKeyword = $.fn.dataTable.util.escapeRegex(keyword);
|
newKeyword = '(' + keyword.split('|').map(k => $.fn.dataTable.util.escapeRegex(k)).join('|') + ')';
|
||||||
newKeywords.push(newKeyword);
|
newKeywords.push(newKeyword);
|
||||||
});
|
});
|
||||||
var filterText = newKeywords.join(" ");
|
var filterText = newKeywords.join(" ");
|
||||||
|
@@ -754,6 +754,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
|
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
|
||||||
<script type="text/javascript" src="../custom.js?changed=20220721002"></script>
|
<script type="text/javascript" src="../custom.js?changed=20221002"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user