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