1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

merge from dev

This commit is contained in:
Luke Pulverenti 2015-12-14 10:43:03 -05:00
parent 1c8f02ce0f
commit 33b01d778c
911 changed files with 34157 additions and 57125 deletions

View file

@ -6,25 +6,28 @@
self.show = function () {
$('.headerSearchInput').val('');
require(["jquery", "velocity"], function ($, Velocity) {
require(['css!css/search.css'], function() {
$('.headerSearchInput').val('');
$('.btnCloseSearch').hide();
var elem = $('.viewMenuSearch')
.css({ left: '100%' })
.removeClass('hide')[0];
var elem = $('.viewMenuSearch').removeClass('hide')[0];
Velocity.animate(elem, { "left": "0px" },
{
complete: function () {
$('.headerSearchInput').focus();
$('.btnCloseSearch').show();
}
});
fadeIn(elem, 1).onfinish = function () {
$('.headerSearchInput').focus();
$('.btnCloseSearch').show();
};
});
};
function fadeIn(elem, iterations) {
var keyframes = [
{ opacity: '0', offset: 0 },
{ opacity: '1', offset: 1 }];
var timing = { duration: 200, iterations: iterations };
return elem.animate(keyframes, timing);
}
self.hide = function () {
var viewMenuSearch = document.querySelector('.viewMenuSearch');
@ -34,18 +37,8 @@
}
if (!viewMenuSearch.classList.contains('hide')) {
require(["jquery", "velocity"], function ($, Velocity) {
$('.btnCloseSearch').hide();
viewMenuSearch.style.left = '0';
Velocity.animate(viewMenuSearch, { "left": "100%" },
{
complete: function () {
$('.viewMenuSearch').visible(false);
}
});
});
$('.btnCloseSearch').hide();
viewMenuSearch.classList.add('hide');
}
};