mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
#114 first pass at choosing quality profile when approving + focus search input by default and when switching tabs
This commit is contained in:
parent
96fde83488
commit
9ac949a67c
16 changed files with 325 additions and 77 deletions
|
@ -20,6 +20,10 @@ $(function () {
|
|||
$tabs.first().children('a:first-child').tab('show');
|
||||
}
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
focusSearch($($(e.target).attr('href')))
|
||||
});
|
||||
focusSearch($('li.active a', '#nav-tabs').first().attr('href'));
|
||||
|
||||
// Type in movie search
|
||||
$("#movieSearchContent").on("input", function () {
|
||||
|
@ -132,9 +136,14 @@ $(function () {
|
|||
var data = $form.serialize();
|
||||
|
||||
sendRequestAjax(data, type, url, buttonId);
|
||||
|
||||
});
|
||||
|
||||
function focusSearch($content) {
|
||||
if ($content.length > 0) {
|
||||
$('input[type=text].form-control', $content).first().focus();
|
||||
}
|
||||
}
|
||||
|
||||
function sendRequestAjax(data, type, url, buttonId) {
|
||||
$.ajax({
|
||||
type: type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue