mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
Merge pull request #269 from JonnyWong16/miscellaneous-fixes
Miscellaneous fixes
This commit is contained in:
commit
c60340d88b
7 changed files with 13 additions and 14 deletions
|
@ -61,7 +61,7 @@ from plexpy import version
|
|||
<form action="search" method="post" class="form" id="search_form">
|
||||
<div class="input-group">
|
||||
<span class="input-textbox">
|
||||
<input type="text" class="form-control" name="search_query" id="search_query" aria-label="Search" placeholder="Search..."/>
|
||||
<input type="text" class="form-control" name="query" id="query" aria-label="Search" placeholder="Search..."/>
|
||||
</span>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-dark btn-inactive" type="submit" id="search_button"><i class="fa fa-search"></i></button>
|
||||
|
@ -131,19 +131,19 @@ ${next.headerIncludes()}
|
|||
</script>
|
||||
<script>
|
||||
$('#search_form').submit(function (e) {
|
||||
if ($('#search_query').hasClass('active') && $('#search_query').val().trim() != '') {
|
||||
if ($('#query').hasClass('active') && $('#query').val().trim() != '') {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: 'search',
|
||||
data: { 'query': $('#search_query').val() }
|
||||
data: { 'query': $('#query').val() }
|
||||
})
|
||||
} else {
|
||||
e.preventDefault();
|
||||
$('#search_button').removeClass('btn-inactive');
|
||||
$('#search_query').clearQueue().val('').animate({ right: '0', width: '250px' }).addClass('active').focus();
|
||||
$('#query').clearQueue().val('').animate({ right: '0', width: '250px' }).addClass('active').focus();
|
||||
}
|
||||
})
|
||||
$('#search_query').on('blur', function (e) {
|
||||
$('#query').on('blur', function (e) {
|
||||
if ($(this).val().trim() == '') {
|
||||
$(this).delay(200).animate({ right: '-250px', width: '0' }, function () {
|
||||
$('#search_button').addClass('btn-inactive');
|
||||
|
|
|
@ -2472,7 +2472,7 @@ table[id^='history_child'] thead th {
|
|||
display: inline-flex;
|
||||
float: right;
|
||||
}
|
||||
#search_form #search_query {
|
||||
#search_form #query {
|
||||
width: 0;
|
||||
height: 34px;
|
||||
margin-top: 0;
|
||||
|
@ -2481,7 +2481,7 @@ table[id^='history_child'] thead th {
|
|||
right: -250px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
#search_form #search_query.active {
|
||||
#search_form #query.active {
|
||||
width: 250px;
|
||||
right: 0px;
|
||||
}
|
||||
|
|
|
@ -636,7 +636,7 @@ DOCUMENTATION :: END
|
|||
url: 'get_search_results_children',
|
||||
type: 'GET',
|
||||
async: true,
|
||||
data: {'query': "${query['query_string']}",
|
||||
data: {'query': "${query['query_string'].replace('"','\\"')}",
|
||||
'media_type': "${query['media_type']}",
|
||||
'season_index': "${query['parent_media_index']}"
|
||||
},
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
<%def name="javascriptIncludes()">
|
||||
<script>
|
||||
$('#search_button').removeClass('btn-inactive');
|
||||
$('#search_query').val("${query}").css({ right: '0', width: '250px' }).addClass('active');
|
||||
$('#query').val("${query.replace('"','\\"')}").css({ right: '0', width: '250px' }).addClass('active');
|
||||
|
||||
$.ajax({
|
||||
url: 'get_search_results_children',
|
||||
type: "GET",
|
||||
async: true,
|
||||
data: {'query': "${query}"},
|
||||
data: {'query': "${query.replace('"','\\"')}"},
|
||||
complete: function (xhr, status) {
|
||||
$("#search-results-list").html(xhr.responseText);
|
||||
}
|
||||
|
|
|
@ -848,7 +848,7 @@ class DataFactory(object):
|
|||
media_type = 'artist'
|
||||
|
||||
if query_string and media_type:
|
||||
query = {'query_string': query_string.replace('"', ''),
|
||||
query = {'query_string': query_string,
|
||||
'title': title,
|
||||
'parent_title': parent_title,
|
||||
'grandparent_title': grandparent_title,
|
||||
|
|
|
@ -920,7 +920,7 @@ class PUSHOVER(object):
|
|||
|
||||
data = {'token': self.application_token,
|
||||
'user': plexpy.CONFIG.PUSHOVER_KEYS,
|
||||
'title': event,
|
||||
'title': event.encode("utf-8"),
|
||||
'message': message.encode("utf-8"),
|
||||
'sound': plexpy.CONFIG.PUSHOVER_SOUND,
|
||||
'priority': plexpy.CONFIG.PUSHOVER_PRIORITY}
|
||||
|
|
|
@ -1366,8 +1366,7 @@ class WebInterface(object):
|
|||
return json.dumps({'message': 'no data received'})
|
||||
|
||||
@cherrypy.expose
|
||||
def search(self, search_query=''):
|
||||
query = search_query.replace('"', '')
|
||||
def search(self, query=''):
|
||||
|
||||
return serve_template(templatename="search.html", title="Search", query=query)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue