mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live tv guide
This commit is contained in:
parent
0380fa5a83
commit
4120f18fc9
27 changed files with 330 additions and 352 deletions
|
@ -275,7 +275,11 @@
|
|||
|
||||
html += '<div class="editorTileInner">';
|
||||
|
||||
html += '<p>' + image.Width + ' X ' + image.Height + '</p>';
|
||||
if (image.Width && image.Height) {
|
||||
html += '<p>' + image.Width + ' X ' + image.Height + '</p>';
|
||||
} else {
|
||||
html += '<p> </p>';
|
||||
}
|
||||
|
||||
html += '<p>';
|
||||
|
||||
|
@ -527,7 +531,7 @@
|
|||
|
||||
$('.uploadItemImageForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
$('.btnOpenUploadMenu', page).on('click', function() {
|
||||
$('.btnOpenUploadMenu', page).on('click', function () {
|
||||
|
||||
$('#popupUpload', page).popup('open');
|
||||
});
|
||||
|
|
|
@ -69,12 +69,16 @@
|
|||
deferred.resolveWith(null, [culture]);
|
||||
|
||||
}, function () {
|
||||
|
||||
Logger.log('navigator.globalization.getLocaleName failed');
|
||||
|
||||
deferred.resolveWith(null, [null]);
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
Logger.log('navigator.globalization.getLocaleName is unavailable');
|
||||
|
||||
culture = document.documentElement.getAttribute('data-culture');
|
||||
deferred.resolveWith(null, [culture]);
|
||||
}
|
||||
|
|
|
@ -192,6 +192,7 @@
|
|||
configurePaperLibraryTabs: function (ownerpage, tabs, pages, defaultTabIndex) {
|
||||
|
||||
tabs.hideScrollButtons = true;
|
||||
tabs.noink = true;
|
||||
|
||||
if (AppInfo.enableBottomTabs) {
|
||||
tabs.alignBottom = true;
|
||||
|
|
|
@ -77,11 +77,11 @@
|
|||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#liveTvChannelsPage", function () {
|
||||
$(document).on('pageinitdepends', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
var page = this.querySelector('.channelsTabContent');
|
||||
|
||||
$('#chkFavorite', this).on('change', function () {
|
||||
$('#chkFavorite', page).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsFavorite = this.checked ? true : null;
|
||||
|
@ -90,7 +90,7 @@
|
|||
});
|
||||
|
||||
|
||||
$('#chkLikes', this).on('change', function () {
|
||||
$('#chkLikes', page).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsLiked = this.checked ? true : null;
|
||||
|
@ -98,7 +98,7 @@
|
|||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chkDislikes', this).on('change', function () {
|
||||
$('#chkDislikes', page).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsDisliked = this.checked ? true : null;
|
||||
|
@ -112,19 +112,27 @@
|
|||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshowready', "#liveTvChannelsPage", function () {
|
||||
});
|
||||
|
||||
$(document).on('pageinitdepends', "#liveTvSuggestedPage", function () {
|
||||
|
||||
// Can't use pagebeforeshow here or the loading popup won't center correctly
|
||||
var page = this;
|
||||
|
||||
if (LibraryBrowser.needsRefresh(page)) {
|
||||
query.UserId = Dashboard.getCurrentUserId();
|
||||
LibraryBrowser.loadSavedQueryValues('movies', query);
|
||||
query.Limit = query.Limit || LibraryBrowser.getDefaultPageSize();
|
||||
reloadItems(page);
|
||||
updateFilterControls(this);
|
||||
}
|
||||
|
||||
$(page.querySelector('neon-animated-pages')).on('tabchange', function () {
|
||||
|
||||
if (parseInt(this.selected) == 2) {
|
||||
var tabContent = page.querySelector('.channelsTabContent');
|
||||
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
query.UserId = Dashboard.getCurrentUserId();
|
||||
LibraryBrowser.loadSavedQueryValues('movies', query);
|
||||
query.Limit = query.Limit || LibraryBrowser.getDefaultPageSize();
|
||||
reloadItems(tabContent);
|
||||
updateFilterControls(this);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
|
@ -444,9 +444,9 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#liveTvGuidePage", function () {
|
||||
$(document).on('pageinitdepends', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
var page = this.querySelector('.guideTabContent');
|
||||
|
||||
Events.on(page.querySelector('.programGrid'), 'scroll', function () {
|
||||
|
||||
|
@ -485,13 +485,20 @@
|
|||
selectDate(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshowready', "#liveTvGuidePage", function () {
|
||||
}).on('pagebeforeshowready', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (LibraryBrowser.needsRefresh(page)) {
|
||||
reloadPage(page);
|
||||
}
|
||||
$(page.querySelector('neon-animated-pages')).on('tabchange', function () {
|
||||
|
||||
if (parseInt(this.selected) == 1) {
|
||||
var tabContent = page.querySelector('.guideTabContent');
|
||||
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
reloadPage(tabContent);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
|
@ -126,7 +126,7 @@
|
|||
ApiClient.createLiveTvSeriesTimer(item).done(function () {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
Dashboard.navigate('livetvseriestimers.html');
|
||||
Dashboard.navigate('livetvsuggested.html');
|
||||
|
||||
});
|
||||
|
||||
|
@ -134,7 +134,7 @@
|
|||
ApiClient.createLiveTvTimer(item).done(function () {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
Dashboard.navigate('livetvtimers.html');
|
||||
Dashboard.navigate('livetvsuggested.html');
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
}
|
||||
|
||||
$('.recordingItems', elem).html(LibraryBrowser.getPosterViewHtml({
|
||||
|
||||
|
||||
items: recordings,
|
||||
shape: "auto",
|
||||
showTitle: true,
|
||||
|
@ -101,13 +101,20 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshowready', "#liveTvRecordingsPage", function () {
|
||||
$(document).on('pagebeforeshowready', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (LibraryBrowser.needsRefresh(page)) {
|
||||
reload(page);
|
||||
}
|
||||
$(page.querySelector('neon-animated-pages')).on('tabchange', function () {
|
||||
|
||||
if (parseInt(this.selected) == 3) {
|
||||
var tabContent = page.querySelector('.recordingsTabContent');
|
||||
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
reload(tabContent);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -117,25 +117,32 @@
|
|||
}).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshowready', "#liveTvSeriesTimersPage", function () {
|
||||
$(document).on('pagebeforeshowready', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (LibraryBrowser.needsRefresh(page)) {
|
||||
reload(page);
|
||||
}
|
||||
$(page.querySelector('neon-animated-pages')).on('tabchange', function () {
|
||||
|
||||
}).on('pageinit', "#liveTvSeriesTimersPage", function () {
|
||||
if (parseInt(this.selected) == 5) {
|
||||
var tabContent = page.querySelector('.seriesTimersTabContent');
|
||||
|
||||
var page = this;
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
reload(tabContent);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
}).on('pageinitdepends', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this.querySelector('.seriesTimersTabContent');
|
||||
|
||||
$('.radioSortBy', page).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reload(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
$('.radioSortOrder', page).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
reload(page);
|
||||
|
|
|
@ -117,13 +117,56 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshowready', "#liveTvSuggestedPage", function () {
|
||||
function loadSuggestedTab(page) {
|
||||
|
||||
var tabContent = page.querySelector('.suggestedTabContent');
|
||||
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
reload(tabContent);
|
||||
}
|
||||
}
|
||||
|
||||
function loadTab(page, index) {
|
||||
|
||||
switch (index) {
|
||||
|
||||
case 0:
|
||||
loadSuggestedTab(page);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (LibraryBrowser.needsRefresh(page)) {
|
||||
reload(page);
|
||||
}
|
||||
var tabs = page.querySelector('paper-tabs');
|
||||
var pages = page.querySelector('neon-animated-pages');
|
||||
|
||||
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages);
|
||||
|
||||
$(tabs).on('iron-select', function () {
|
||||
var selected = this.selected;
|
||||
|
||||
if (LibraryBrowser.navigateOnLibraryTabSelect()) {
|
||||
|
||||
if (selected) {
|
||||
Dashboard.navigate('livetvsuggested.html?tab=' + selected);
|
||||
} else {
|
||||
Dashboard.navigate('livetvsuggested.html');
|
||||
}
|
||||
|
||||
} else {
|
||||
page.querySelector('neon-animated-pages').selected = selected;
|
||||
}
|
||||
});
|
||||
|
||||
$(pages).on('tabchange', function () {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
Dashboard.alert(Globalize.translate('MessageRecordingCancelled'));
|
||||
|
||||
Dashboard.navigate('livetvtimers.html');
|
||||
Dashboard.navigate('livetvsuggested.html');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
var program = timer.ProgramInfo || {};
|
||||
var imgUrl;
|
||||
|
||||
|
||||
if (program.ImageTags && program.ImageTags.Primary) {
|
||||
|
||||
imgUrl = ApiClient.getScaledImageUrl(program.Id, {
|
||||
|
@ -106,13 +106,20 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshowready', "#liveTvTimersPage", function () {
|
||||
$(document).on('pagebeforeshowready', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (LibraryBrowser.needsRefresh(page)) {
|
||||
reload(page);
|
||||
}
|
||||
$(page.querySelector('neon-animated-pages')).on('tabchange', function () {
|
||||
|
||||
if (parseInt(this.selected) == 4) {
|
||||
var tabContent = page.querySelector('.timersTabContent');
|
||||
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
reload(tabContent);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
Loading…
Add table
Add a link
Reference in a new issue