mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 04:49:33 -07:00
#131 fix for default selected tab
This commit is contained in:
parent
c52ca41e32
commit
96fde83488
1 changed files with 250 additions and 239 deletions
|
@ -5,6 +5,8 @@
|
|||
return opts.inverse(this);
|
||||
});
|
||||
|
||||
$(function () {
|
||||
|
||||
var searchSource = $("#search-template").html();
|
||||
var musicSource = $("#music-template").html();
|
||||
var searchTemplate = Handlebars.compile(searchSource);
|
||||
|
@ -12,6 +14,13 @@ var musicTemplate = Handlebars.compile(musicSource);
|
|||
|
||||
var searchTimer = 0;
|
||||
|
||||
// fix for selecting a default tab
|
||||
var $tabs = $('#nav-tabs').children('li');
|
||||
if ($tabs.filter(function (li) { return $(li).hasClass('active') }).length <= 0) {
|
||||
$tabs.first().children('a:first-child').tab('show');
|
||||
}
|
||||
|
||||
|
||||
// Type in movie search
|
||||
$("#movieSearchContent").on("input", function () {
|
||||
if (searchTimer) {
|
||||
|
@ -285,3 +294,5 @@ function buildMusicContext(result) {
|
|||
|
||||
return context;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue