|
|
@ -5,6 +5,8 @@
|
|
|
|
return opts.inverse(this);
|
|
|
|
return opts.inverse(this);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
|
|
|
|
|
|
|
|
var searchSource = $("#search-template").html();
|
|
|
|
var searchSource = $("#search-template").html();
|
|
|
|
var musicSource = $("#music-template").html();
|
|
|
|
var musicSource = $("#music-template").html();
|
|
|
|
var searchTemplate = Handlebars.compile(searchSource);
|
|
|
|
var searchTemplate = Handlebars.compile(searchSource);
|
|
|
@ -12,6 +14,13 @@ var musicTemplate = Handlebars.compile(musicSource);
|
|
|
|
|
|
|
|
|
|
|
|
var searchTimer = 0;
|
|
|
|
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
|
|
|
|
// Type in movie search
|
|
|
|
$("#movieSearchContent").on("input", function () {
|
|
|
|
$("#movieSearchContent").on("input", function () {
|
|
|
|
if (searchTimer) {
|
|
|
|
if (searchTimer) {
|
|
|
@ -285,3 +294,5 @@ function buildMusicContext(result) {
|
|
|
|
|
|
|
|
|
|
|
|
return context;
|
|
|
|
return context;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|