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

update playlist content

This commit is contained in:
Luke Pulverenti 2016-10-12 14:23:09 -04:00
parent a511a2fa84
commit d08286c538
24 changed files with 1115 additions and 156 deletions

View file

@ -1,4 +1,5 @@
define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectionManager', 'require', 'loading', 'scrollHelper', 'emby-checkbox', 'css!./../formdialog', 'material-icons'], function (dialogHelper, globalize, userSettings, layoutManager, connectionManager, require, loading, scrollHelper) {
'use strict';
function save(context, options) {
@ -32,7 +33,7 @@
var type = chkCategorys[i].getAttribute('data-type');
chkCategorys[i].checked = !selectedCategories.length || selectedCategories.indexOf(type) != -1;
chkCategorys[i].checked = !selectedCategories.length || selectedCategories.indexOf(type) !== -1;
}
}

View file

@ -1,4 +1,5 @@
define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectionManager', 'require', 'loading', 'scrollHelper', 'emby-checkbox', 'emby-radio', 'css!./../formdialog', 'material-icons'], function (dialogHelper, globalize, userSettings, layoutManager, connectionManager, require, loading, scrollHelper) {
'use strict';
function save(context) {
@ -32,28 +33,28 @@
var type = chkIndicators[i].getAttribute('data-type');
if (chkIndicators[i].getAttribute('data-default') == 'true') {
chkIndicators[i].checked = userSettings.get('guide-indicator-' + type) != 'false';
if (chkIndicators[i].getAttribute('data-default') === 'true') {
chkIndicators[i].checked = userSettings.get('guide-indicator-' + type) !== 'false';
} else {
chkIndicators[i].checked = userSettings.get('guide-indicator-' + type) == 'true';
chkIndicators[i].checked = userSettings.get('guide-indicator-' + type) === 'true';
}
}
context.querySelector('.chkColorCodedBackgrounds').checked = userSettings.get('guide-colorcodedbackgrounds') == 'true';
context.querySelector('.chkFavoriteChannelsAtTop').checked = userSettings.get('livetv-favoritechannelsattop') != 'false';
context.querySelector('.chkColorCodedBackgrounds').checked = userSettings.get('guide-colorcodedbackgrounds') === 'true';
context.querySelector('.chkFavoriteChannelsAtTop').checked = userSettings.get('livetv-favoritechannelsattop') !== 'false';
var sortByValue = userSettings.get('livetv-channelorder') || 'DatePlayed';
var sortBys = context.querySelectorAll('.chkSortOrder');
for (i = 0, length = sortBys.length; i < length; i++) {
sortBys[i].checked = sortBys[i].value == sortByValue;
sortBys[i].checked = sortBys[i].value === sortByValue;
}
}
function onSortByChange() {
var newValue = this.value;
if (this.checked) {
var changed = options.query.SortBy != newValue;
var changed = options.query.SortBy !== newValue;
options.query.SortBy = newValue.replace('_', ',');
options.query.StartIndex = 0;

View file

@ -1,4 +1,5 @@
define(['require', 'browser', 'globalize', 'connectionManager', 'serverNotifications', 'loading', 'datetime', 'focusManager', 'userSettings', 'imageLoader', 'events', 'layoutManager', 'itemShortcuts', 'registrationservices', 'dom', 'clearButtonStyle', 'css!./guide.css', 'programStyles', 'material-icons', 'scrollStyles', 'emby-button', 'paper-icon-button-light'], function (require, browser, globalize, connectionManager, serverNotifications, loading, datetime, focusManager, userSettings, imageLoader, events, layoutManager, itemShortcuts, registrationServices, dom) {
'use strict';
function showViewSettings(instance) {
@ -176,11 +177,11 @@
channelQuery.EnableImageTypes = "Primary";
var categories = self.categoryOptions.categories || [];
var displayMovieContent = !categories.length || categories.indexOf('movies') != -1;
var displaySportsContent = !categories.length || categories.indexOf('sports') != -1;
var displayNewsContent = !categories.length || categories.indexOf('news') != -1;
var displayKidsContent = !categories.length || categories.indexOf('kids') != -1;
var displaySeriesContent = !categories.length || categories.indexOf('series') != -1;
var displayMovieContent = !categories.length || categories.indexOf('movies') !== -1;
var displaySportsContent = !categories.length || categories.indexOf('sports') !== -1;
var displayNewsContent = !categories.length || categories.indexOf('news') !== -1;
var displayKidsContent = !categories.length || categories.indexOf('kids') !== -1;
var displaySeriesContent = !categories.length || categories.indexOf('series') !== -1;
if (displayMovieContent && displaySportsContent && displayNewsContent && displayKidsContent) {
channelQuery.IsMovie = null;
@ -206,7 +207,7 @@
}
}
if (userSettings.get('livetv-channelorder') == 'Number') {
if (userSettings.get('livetv-channelorder') === 'Number') {
channelQuery.SortBy = "SortName";
channelQuery.SortOrder = "Ascending";
} else {
@ -350,14 +351,14 @@
var status;
if (item.Type == 'SeriesTimer') {
if (item.Type === 'SeriesTimer') {
return '<i class="md-icon programIcon seriesTimerIcon">&#xE062;</i>';
}
else if (item.TimerId || item.SeriesTimerId) {
status = item.Status || 'Cancelled';
}
else if (item.Type == 'Timer') {
else if (item.Type === 'Timer') {
status = item.Status;
}
@ -367,7 +368,7 @@
if (item.SeriesTimerId) {
if (status != 'Cancelled') {
if (status !== 'Cancelled') {
return '<i class="md-icon programIcon seriesTimerIcon">&#xE062;</i>';
}
@ -385,7 +386,7 @@
var endMs = startMs + msPerDay - 1;
programs = programs.filter(function (curr) {
return curr.ChannelId == channel.Id;
return curr.ChannelId === channel.Id;
});
var outerCssClass = layoutManager.tv ? 'channelPrograms channelPrograms-tv' : 'channelPrograms';
@ -395,18 +396,18 @@
var clickAction = layoutManager.tv ? 'link' : 'programdialog';
var categories = self.categoryOptions.categories || [];
var displayMovieContent = !categories.length || categories.indexOf('movies') != -1;
var displaySportsContent = !categories.length || categories.indexOf('sports') != -1;
var displayNewsContent = !categories.length || categories.indexOf('news') != -1;
var displayKidsContent = !categories.length || categories.indexOf('kids') != -1;
var displaySeriesContent = !categories.length || categories.indexOf('series') != -1;
var enableColorCodedBackgrounds = userSettings.get('guide-colorcodedbackgrounds') == 'true';
var displayMovieContent = !categories.length || categories.indexOf('movies') !== -1;
var displaySportsContent = !categories.length || categories.indexOf('sports') !== -1;
var displayNewsContent = !categories.length || categories.indexOf('news') !== -1;
var displayKidsContent = !categories.length || categories.indexOf('kids') !== -1;
var displaySeriesContent = !categories.length || categories.indexOf('series') !== -1;
var enableColorCodedBackgrounds = userSettings.get('guide-colorcodedbackgrounds') === 'true';
for (var i = 0, length = programs.length; i < length; i++) {
var program = programs[i];
if (program.ChannelId != channel.Id) {
if (program.ChannelId !== channel.Id) {
continue;
}
@ -533,11 +534,11 @@
var allowIndicators = dom.getWindowSize().innerWidth >= 600;
var options = {
showHdIcon: allowIndicators && userSettings.get('guide-indicator-hd') == 'true',
showLiveIndicator: allowIndicators && userSettings.get('guide-indicator-live') != 'false',
showPremiereIndicator: allowIndicators && userSettings.get('guide-indicator-premiere') != 'false',
showNewIndicator: allowIndicators && userSettings.get('guide-indicator-new') == 'true',
showRepeatIndicator: allowIndicators && userSettings.get('guide-indicator-repeat') == 'true'
showHdIcon: allowIndicators && userSettings.get('guide-indicator-hd') === 'true',
showLiveIndicator: allowIndicators && userSettings.get('guide-indicator-live') !== 'false',
showPremiereIndicator: allowIndicators && userSettings.get('guide-indicator-premiere') !== 'false',
showNewIndicator: allowIndicators && userSettings.get('guide-indicator-new') === 'true',
showRepeatIndicator: allowIndicators && userSettings.get('guide-indicator-repeat') === 'true'
};
for (var i = 0, length = channels.length; i < length; i++) {
@ -661,7 +662,7 @@
var focusElem;
if (itemId) {
focusElem = context.querySelector('[data-id="' + itemId + '"]')
focusElem = context.querySelector('[data-id="' + itemId + '"]');
}
if (focusElem) {
@ -671,7 +672,7 @@
var autoFocusParent;
if (channelRowId) {
autoFocusParent = context.querySelector('[data-channelid="' + channelRowId + '"]')
autoFocusParent = context.querySelector('[data-channelid="' + channelRowId + '"]');
}
if (!autoFocusParent) {
@ -788,7 +789,7 @@
var selectedDate = currentDate || new Date();
dateOptions.forEach(function (d) {
d.selected = new Date(d.id).getDate() == selectedDate.getDate();
d.selected = new Date(d.id).getDate() === selectedDate.getDate();
});
require(['actionsheet'], function (actionsheet) {
@ -961,7 +962,7 @@
self.refresh();
});
};
}
return Guide;
});