mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update startup wizard
This commit is contained in:
parent
681639cc95
commit
b4c8cb07c9
16 changed files with 256 additions and 70 deletions
|
@ -12,12 +12,13 @@
|
|||
function searchMenu() {
|
||||
|
||||
var self = this;
|
||||
var headerSearchInput = document.querySelector('.headerSearchInput');
|
||||
|
||||
self.show = function () {
|
||||
|
||||
require(['css!css/search.css'], function () {
|
||||
|
||||
document.querySelector('.headerSearchInput').value = '';
|
||||
headerSearchInput.value = '';
|
||||
|
||||
document.querySelector('.btnCloseSearch').classList.add('hide');
|
||||
var elem = document.querySelector('.viewMenuSearch');
|
||||
|
@ -25,7 +26,7 @@
|
|||
elem.classList.remove('hide');
|
||||
|
||||
var onFinish = function() {
|
||||
document.querySelector('.headerSearchInput').focus();
|
||||
headerSearchInput.focus();
|
||||
document.querySelector('.btnCloseSearch').classList.remove('hide');
|
||||
};
|
||||
|
||||
|
@ -62,24 +63,8 @@
|
|||
Events.trigger(self, 'closed');
|
||||
});
|
||||
|
||||
document.querySelector('.headerSearchInput').addEventListener('keyup', function (e) {
|
||||
|
||||
// Down key
|
||||
if (e.keyCode == 40) {
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
|
||||
} else {
|
||||
|
||||
Events.trigger(self, 'change', [this.value]);
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelector('.headerSearchInput').addEventListener('search', function (e) {
|
||||
if (!this.value) {
|
||||
Events.trigger(self, 'change', ['']);
|
||||
}
|
||||
headerSearchInput.addEventListener('input', function (e) {
|
||||
Events.trigger(self, 'change', [this.value]);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue