mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update search
This commit is contained in:
parent
8dd2c5d717
commit
cc428aac1d
34 changed files with 814 additions and 549 deletions
|
@ -11,7 +11,7 @@
|
|||
|
||||
function hideStatusBar() {
|
||||
if (options.type == 'video' && window.StatusBar) {
|
||||
StatusBar.backgroundColorByName("black");
|
||||
//StatusBar.backgroundColorByName("black");
|
||||
//StatusBar.overlaysWebView(true);
|
||||
StatusBar.hide();
|
||||
}
|
||||
|
|
|
@ -143,15 +143,7 @@
|
|||
return false;
|
||||
},
|
||||
|
||||
configureSwipeTabs: function (ownerpage, tabs, pages) {
|
||||
|
||||
if (LibraryBrowser.animatePaperTabs()) {
|
||||
// Safari doesn't handle the horizontal swiping very well
|
||||
pages.entryAnimation = 'slide-from-right-animation';
|
||||
pages.exitAnimation = 'slide-left-animation';
|
||||
}
|
||||
|
||||
var pageCount = pages.querySelectorAll('neon-animatable').length;
|
||||
allowSwipe: function (target) {
|
||||
|
||||
function allowSwipeOn(elem) {
|
||||
|
||||
|
@ -166,28 +158,34 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
function allowSwipe(e) {
|
||||
|
||||
var target = e.target;
|
||||
|
||||
var parent = target.parentNode;
|
||||
while (parent != null) {
|
||||
if (!allowSwipeOn(parent)) {
|
||||
return false;
|
||||
}
|
||||
parent = parent.parentNode;
|
||||
var parent = target;
|
||||
while (parent != null) {
|
||||
if (!allowSwipeOn(parent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
configureSwipeTabs: function (ownerpage, tabs, pages) {
|
||||
|
||||
if (LibraryBrowser.animatePaperTabs()) {
|
||||
// Safari doesn't handle the horizontal swiping very well
|
||||
pages.entryAnimation = 'slide-from-right-animation';
|
||||
pages.exitAnimation = 'slide-left-animation';
|
||||
}
|
||||
|
||||
var pageCount = pages.querySelectorAll('neon-animatable').length;
|
||||
|
||||
require(['hammer'], function (Hammer) {
|
||||
|
||||
var hammertime = new Hammer(pages);
|
||||
hammertime.get('swipe').set({ direction: Hammer.DIRECTION_HORIZONTAL });
|
||||
|
||||
hammertime.on('swipeleft', function (e) {
|
||||
if (allowSwipe(e)) {
|
||||
if (LibraryBrowser.allowSwipe(e.target)) {
|
||||
var selected = parseInt(pages.selected || '0');
|
||||
if (selected < (pageCount - 1)) {
|
||||
if (LibraryBrowser.animatePaperTabs()) {
|
||||
|
@ -200,7 +198,7 @@
|
|||
});
|
||||
|
||||
hammertime.on('swiperight', function (e) {
|
||||
if (allowSwipe(e)) {
|
||||
if (LibraryBrowser.allowSwipe(e.target)) {
|
||||
var selected = parseInt(pages.selected || '0');
|
||||
if (selected > 0) {
|
||||
if (LibraryBrowser.animatePaperTabs()) {
|
||||
|
|
|
@ -955,8 +955,10 @@
|
|||
this.on('click', onListViewPlayButtonClick);
|
||||
|
||||
if (AppInfo.isTouchPreferred) {
|
||||
this.off('contextmenu', disableEvent);
|
||||
this.on('contextmenu', disableEvent);
|
||||
//this.off('contextmenu', disableEvent);
|
||||
//this.on('contextmenu', disableEvent);
|
||||
this.off('contextmenu', onContextMenu);
|
||||
this.on('contextmenu', onContextMenu);
|
||||
}
|
||||
else {
|
||||
this.off('contextmenu', onContextMenu);
|
||||
|
@ -973,7 +975,7 @@
|
|||
}
|
||||
|
||||
for (var i = 0, length = this.length; i < length; i++) {
|
||||
initTapHold(this[i]);
|
||||
//initTapHold(this[i]);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
@ -990,6 +992,10 @@
|
|||
|
||||
function initTapHold(element) {
|
||||
|
||||
if (!LibraryBrowser.allowSwipe(element)) {
|
||||
return;
|
||||
}
|
||||
|
||||
require(['hammer'], function (Hammer) {
|
||||
|
||||
var hammertime = new Hammer(element);
|
||||
|
|
|
@ -249,10 +249,15 @@
|
|||
}
|
||||
|
||||
Events.on(player, 'playbackstop', onPlaybackStop);
|
||||
Events.on(player, 'playbackstart', onPlaybackStart);
|
||||
};
|
||||
|
||||
function onPlaybackStart(e, state) {
|
||||
$(self).trigger('playbackstart', [state, this]);
|
||||
}
|
||||
|
||||
function onPlaybackStop(e, state) {
|
||||
$(self).trigger('playbackstop', [state]);
|
||||
$(self).trigger('playbackstop', [state, this]);
|
||||
}
|
||||
|
||||
self.getPlayerInfo = function () {
|
||||
|
|
|
@ -13,7 +13,12 @@
|
|||
page.querySelector('.labelSyncStatus').innerHTML = Globalize.translate('LabelLocalSyncStatusValue', status);
|
||||
page.querySelector('.syncSpinner').active = status == "Active";
|
||||
|
||||
page.querySelector('.btnSyncNow').disabled = status == "Active";
|
||||
if (status == "Active") {
|
||||
page.querySelector('.btnSyncNow').classList.add('hide');
|
||||
}
|
||||
else {
|
||||
page.querySelector('.btnSyncNow').classList.remove('hide');
|
||||
}
|
||||
|
||||
} else {
|
||||
page.querySelector('.localSyncStatus').classList.add('hide');
|
||||
|
|
41
dashboard-ui/scripts/searchpage.js
Normal file
41
dashboard-ui/scripts/searchpage.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
(function () {
|
||||
|
||||
function loadSuggestions(page) {
|
||||
|
||||
var options = {
|
||||
|
||||
SortBy: "IsFavoriteOrLike,Random",
|
||||
IncludeItemTypes: "Movie,Series,MusicArtist",
|
||||
Limit: 20,
|
||||
Recursive: true,
|
||||
ImageTypeLimit: 0,
|
||||
EnableImages: false
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
var html = result.Items.map(function (i) {
|
||||
|
||||
var href = LibraryBrowser.getHref(i);
|
||||
|
||||
var itemHtml = '<a href="' + href + '" style="display:block;padding:.5em 0;">';
|
||||
itemHtml += i.Name;
|
||||
itemHtml += '</a>';
|
||||
return itemHtml;
|
||||
|
||||
}).join('');
|
||||
|
||||
page.querySelector('.searchSuggestions').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
pageIdOn('pageshowready', "searchPage", function () {
|
||||
|
||||
var page = this;
|
||||
loadSuggestions(page);
|
||||
|
||||
Search.showSearchPanel();
|
||||
});
|
||||
|
||||
|
||||
})();
|
|
@ -1762,6 +1762,7 @@ var AppInfo = {};
|
|||
AppInfo.enableMovieTrailersTab = true;
|
||||
}
|
||||
|
||||
AppInfo.enableAppLayouts = true;
|
||||
if (isCordova) {
|
||||
AppInfo.enableAppLayouts = true;
|
||||
AppInfo.hasKnownExternalPlayerSupport = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue