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

Unminify using 1.5.323

Repo with tag: https://github.com/MediaBrowser/emby-webcomponents/tree/1.5.323
This commit is contained in:
Vasily 2019-01-10 15:39:37 +03:00
parent 4678528d00
commit de6ac33ec1
289 changed files with 78483 additions and 54701 deletions

View file

@ -1,71 +1,172 @@
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";
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 saveCategories(context, options) {
for (var categories = [], chkCategorys = context.querySelectorAll(".chkCategory"), i = 0, length = chkCategorys.length; i < length; i++) {
var type = chkCategorys[i].getAttribute("data-type");
chkCategorys[i].checked && categories.push(type)
var categories = [];
var chkCategorys = context.querySelectorAll('.chkCategory');
for (var i = 0, length = chkCategorys.length; i < length; i++) {
var type = chkCategorys[i].getAttribute('data-type');
if (chkCategorys[i].checked) {
categories.push(type);
}
}
categories.length >= 4 && categories.push("series"), categories.push("all"), options.categories = categories
if (categories.length >= 4) {
categories.push('series');
}
// differentiate between none and all
categories.push('all');
options.categories = categories;
}
function loadCategories(context, options) {
for (var selectedCategories = options.categories || [], chkCategorys = context.querySelectorAll(".chkCategory"), i = 0, length = chkCategorys.length; i < length; i++) {
var type = chkCategorys[i].getAttribute("data-type");
chkCategorys[i].checked = !selectedCategories.length || -1 !== selectedCategories.indexOf(type)
var selectedCategories = options.categories || [];
var chkCategorys = context.querySelectorAll('.chkCategory');
for (var i = 0, length = chkCategorys.length; i < length; i++) {
var type = chkCategorys[i].getAttribute('data-type');
chkCategorys[i].checked = !selectedCategories.length || selectedCategories.indexOf(type) !== -1;
}
}
function save(context) {
var i, length, chkIndicators = context.querySelectorAll(".chkIndicator");
var i, length;
var chkIndicators = context.querySelectorAll('.chkIndicator');
for (i = 0, length = chkIndicators.length; i < length; i++) {
var type = chkIndicators[i].getAttribute("data-type");
userSettings.set("guide-indicator-" + type, chkIndicators[i].checked)
var type = chkIndicators[i].getAttribute('data-type');
userSettings.set('guide-indicator-' + type, chkIndicators[i].checked);
}
userSettings.set("guide-colorcodedbackgrounds", context.querySelector(".chkColorCodedBackgrounds").checked), userSettings.set("livetv-favoritechannelsattop", context.querySelector(".chkFavoriteChannelsAtTop").checked);
var sortBys = context.querySelectorAll(".chkSortOrder");
for (i = 0, length = sortBys.length; i < length; i++)
userSettings.set('guide-colorcodedbackgrounds', context.querySelector('.chkColorCodedBackgrounds').checked);
userSettings.set('livetv-favoritechannelsattop', context.querySelector('.chkFavoriteChannelsAtTop').checked);
var sortBys = context.querySelectorAll('.chkSortOrder');
for (i = 0, length = sortBys.length; i < length; i++) {
if (sortBys[i].checked) {
userSettings.set("livetv-channelorder", sortBys[i].value);
break
userSettings.set('livetv-channelorder', sortBys[i].value);
break;
}
}
}
function load(context) {
var i, length, chkIndicators = context.querySelectorAll(".chkIndicator");
var i, length;
var chkIndicators = context.querySelectorAll('.chkIndicator');
for (i = 0, length = chkIndicators.length; i < length; i++) {
var type = chkIndicators[i].getAttribute("data-type");
"true" === chkIndicators[i].getAttribute("data-default") ? chkIndicators[i].checked = "false" !== userSettings.get("guide-indicator-" + type) : chkIndicators[i].checked = "true" === userSettings.get("guide-indicator-" + type)
var type = chkIndicators[i].getAttribute('data-type');
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';
}
}
context.querySelector('.chkColorCodedBackgrounds').checked = userSettings.get('guide-colorcodedbackgrounds') === 'true';
context.querySelector('.chkFavoriteChannelsAtTop').checked = userSettings.get('livetv-favoritechannelsattop') !== 'false';
var sortByValue = userSettings.get('livetv-channelorder') || 'Number';
var sortBys = context.querySelectorAll('.chkSortOrder');
for (i = 0, length = sortBys.length; i < length; i++) {
sortBys[i].checked = sortBys[i].value === sortByValue;
}
}
function onSortByChange() {
var newValue = this.value;
if (this.checked) {
var changed = options.query.SortBy !== newValue;
options.query.SortBy = newValue.replace('_', ',');
options.query.StartIndex = 0;
if (options.callback && changed) {
options.callback();
}
}
context.querySelector(".chkColorCodedBackgrounds").checked = "true" === userSettings.get("guide-colorcodedbackgrounds"), context.querySelector(".chkFavoriteChannelsAtTop").checked = "false" !== userSettings.get("livetv-favoritechannelsattop");
var sortByValue = userSettings.get("livetv-channelorder") || "Number",
sortBys = context.querySelectorAll(".chkSortOrder");
for (i = 0, length = sortBys.length; i < length; i++) sortBys[i].checked = sortBys[i].value === sortByValue
}
function showEditor(options) {
return new Promise(function(resolve, reject) {
var settingsChanged = !1;
require(["text!./guide-settings.template.html"], function(template) {
return new Promise(function (resolve, reject) {
var settingsChanged = false;
require(['text!./guide-settings.template.html'], function (template) {
var dialogOptions = {
removeOnClose: !0,
scrollY: !1
removeOnClose: true,
scrollY: false
};
layoutManager.tv ? dialogOptions.size = "fullscreen" : dialogOptions.size = "small";
if (layoutManager.tv) {
dialogOptions.size = 'fullscreen';
} else {
dialogOptions.size = 'small';
}
var dlg = dialogHelper.createDialog(dialogOptions);
dlg.classList.add("formDialog");
var html = "";
html += globalize.translateDocument(template, "sharedcomponents"), dlg.innerHTML = html, dlg.addEventListener("change", function() {
settingsChanged = !0
}), dlg.addEventListener("close", function() {
layoutManager.tv && scrollHelper.centerFocus.off(dlg.querySelector(".formDialogContent"), !1), save(dlg), saveCategories(dlg, options), settingsChanged ? resolve() : reject()
}), dlg.querySelector(".btnCancel").addEventListener("click", function() {
dialogHelper.close(dlg)
}), layoutManager.tv && scrollHelper.centerFocus.on(dlg.querySelector(".formDialogContent"), !1), load(dlg), loadCategories(dlg, options), dialogHelper.open(dlg)
})
})
dlg.classList.add('formDialog');
var html = '';
html += globalize.translateDocument(template, 'sharedcomponents');
dlg.innerHTML = html;
dlg.addEventListener('change', function () {
settingsChanged = true;
});
dlg.addEventListener('close', function () {
if (layoutManager.tv) {
scrollHelper.centerFocus.off(dlg.querySelector('.formDialogContent'), false);
}
save(dlg);
saveCategories(dlg, options);
if (settingsChanged) {
resolve();
} else {
reject();
}
});
dlg.querySelector('.btnCancel').addEventListener('click', function () {
dialogHelper.close(dlg);
});
if (layoutManager.tv) {
scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
}
load(dlg);
loadCategories(dlg, options);
dialogHelper.open(dlg);
});
});
}
return {
show: showEditor
}
};
});

View file

@ -1,194 +1,141 @@
.tvGuideHeader,
.tvguide {
display: -webkit-box;
display: -webkit-flex
}
.channelPrograms,
.programContainer,
.timeslotHeadersInner,
.tvProgram {
position: relative
}
.channelPrograms,
.channelsContainer,
.tvGuideHeader,
.tvguide {
-webkit-box-orient: vertical;
-webkit-box-direction: normal
}
.guideChannelName,
.guideChannelNumber,
.guideProgramName,
.guideProgramNameText {
-o-text-overflow: ellipsis
}
.tvguide {
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-align: initial;
-webkit-align-items: initial;
align-items: initial
align-items: initial;
}
.tvGuideHeader {
white-space: nowrap;
width: 100%;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-flex-shrink: 0;
flex-shrink: 0;
display: flex;
contain: layout style paint
contain: layout style paint;
}
.layout-desktop .tvGuideHeader {
margin-bottom: .5em
margin-bottom: .5em;
}
.guideHeaderDateSelection {
font-size: 86%;
padding: .4em 0
padding: .4em 0;
}
.guide-headerTimeslots {
display: -webkit-box;
display: -webkit-flex;
display: flex
display: flex;
}
.tvProgramSectionHeader {
margin: 0
margin: 0;
}
.tvProgram {
display: block;
text-decoration: none;
white-space: nowrap
white-space: nowrap;
position: relative;
}
.guideProgramIndicator {
text-transform: uppercase;
-webkit-border-radius: .25em;
border-radius: .25em;
margin-right: .5em;
font-size: 82%;
padding: .2em .25em;
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: inline-flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
text-align: center;
margin-left: 1em
margin-left: 1em;
}
.guide-channelTimeslotHeader {
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center
flex-shrink: 0;
justify-content: center;
}
.timeslotHeaders {
white-space: nowrap;
font-weight: 500;
font-size: 120%
font-size: 120%;
}
.programContainer {
white-space: nowrap;
-webkit-box-align: start;
-webkit-align-items: flex-start;
position: relative;
align-items: flex-start;
contain: strict
contain: strict;
}
.channelPrograms {
white-space: nowrap;
position: relative;
contain: strict;
box-sizing: border-box;
}
.timeslotHeadersInner {
position: relative;
}
.guideSpacer {
width: .3em;
-webkit-flex-shrink: 0;
flex-shrink: 0
flex-shrink: 0;
}
.channelPrograms,
.timeslotHeadersInner {
width: 1800vw
.channelPrograms, .timeslotHeadersInner {
width: 1800vw;
}
@media all and (min-width:37.5em) {
@media all and (min-width: 37.5em) {
.channelPrograms,
.timeslotHeadersInner {
width: 1400vw
.channelPrograms, .timeslotHeadersInner {
width: 1400vw;
}
}
@media all and (min-width:50em) {
@media all and (min-width: 50em) {
.channelPrograms,
.timeslotHeadersInner {
width: 1200vw
.channelPrograms, .timeslotHeadersInner {
width: 1200vw;
}
}
@media all and (min-width:80em) {
@media all and (min-width: 80em) {
.channelPrograms,
.timeslotHeadersInner {
width: 810vw
.channelPrograms, .timeslotHeadersInner {
width: 810vw;
}
}
.timeslotHeader {
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: inline-flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
text-indent: .25em;
width: 2.0833333333333333333333333333333%
width: 2.0833333333333333333333333333333%;
}
.guide-channelHeaderCell,
.guide-channelTimeslotHeader,
.programCell {
color: inherit;
.guide-channelHeaderCell, .guide-channelTimeslotHeader {
padding: 0 !important;
cursor: pointer;
outline: none !important;
width: 100%;
vertical-align: middle;
font-family: inherit;
text-decoration: none;
-webkit-box-align: center;
text-align: left;
overflow: hidden
}
.guide-channelHeaderCell,
.guide-channelTimeslotHeader {
padding: 0 !important;
outline: 0 !important;
width: 100%;
font-size: inherit;
-o-text-overflow: ellipsis;
overflow: hidden;
text-overflow: ellipsis;
margin: 0 1px 0 0;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
text-decoration: none;
/* Needed in firefox */
text-align: left;
contain: strict;
-webkit-flex-shrink: 0;
flex-shrink: 0;
-webkit-border-radius: .12em;
border-radius: .12em
border-radius: .12em;
color: inherit;
}
.guide-channelHeaderCell {
@ -198,187 +145,151 @@
height: 4.42em;
contain: strict;
position: relative;
background: 0 0
background: transparent;
}
.guide-channelTimeslotHeader {
border: 0 !important;
border-right-color: transparent
}
.channelsContainer,
.guide-channelTimeslotHeader {
width: 24vw
/* Important - have to put the fixed width on channelsContainer, not the individual channelHeaderCell
This was causing channelsContainer to extend beyond the fixed width on ps4, tizen, lg and opera tv.
*/
.channelsContainer, .guide-channelTimeslotHeader {
width: 24vw;
}
@media all and (min-width:31.25em) {
.channelsContainer,
.guide-channelTimeslotHeader {
width: 16vw
.channelsContainer, .guide-channelTimeslotHeader {
width: 16vw;
}
}
@media all and (min-width:37.5em) {
.channelsContainer,
.guide-channelTimeslotHeader {
width: 16vw
.channelsContainer, .guide-channelTimeslotHeader {
width: 16vw;
}
}
@media all and (min-width:50em) {
.channelsContainer,
.guide-channelTimeslotHeader {
width: 14vw
.channelsContainer, .guide-channelTimeslotHeader {
width: 14vw;
}
}
@media all and (min-width:80em) {
.channelsContainer,
.guide-channelTimeslotHeader {
width: 12vw
.channelsContainer, .guide-channelTimeslotHeader {
width: 12vw;
}
}
.btnGuideViewSettings {
margin: 0;
-webkit-flex-shrink: 0;
flex-shrink: 0
flex-shrink: 0;
}
.btnGuideViewSettingsIcon {
font-size: 1.5em !important
font-size: 1.5em !important;
}
.selectDateIcon {
-webkit-flex-shrink: 0;
flex-shrink: 0
flex-shrink: 0;
}
@media all and (max-width:50em) {
@media all and (max-width: 50em) {
.guideHdIcon,
.liveTvProgram,
.newTvProgram,
.premiereTvProgram {
display: none
.newTvProgram, .liveTvProgram, .premiereTvProgram, .guideHdIcon {
display: none;
}
}
.channelPrograms,
.programCell {
border-style: solid;
display: -webkit-box;
display: -webkit-flex;
contain: strict
}
.channelPrograms {
white-space: nowrap;
-webkit-box-sizing: border-box;
box-sizing: border-box;
height: 4.42em;
contain: strict;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
border-width: 1px 0
border-style: solid;
border-width: 1px 0 1px 0;
}
.channelPrograms+.channelPrograms,
.guide-channelHeaderCell+.guide-channelHeaderCell {
margin-top: -1px
.channelPrograms + .channelPrograms, .guide-channelHeaderCell + .guide-channelHeaderCell {
margin-top: -1px;
}
.channelPrograms-tv, .guide-channelHeaderCell-tv {
height: 3em;
}
.channelPrograms-tv,
.guide-channelHeaderCell-tv {
height: 3em
.guide-channelTimeslotHeader {
border-right-color: transparent;
}
.guide-channelTimeslotHeader,
.timeslotHeader {
background: 0 0 !important;
height: 2.8em
.guide-channelTimeslotHeader, .timeslotHeader {
background: transparent !important;
height: 2.8em;
}
.programGrid {
padding-bottom: 4px;
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
flex-grow: 1
flex-grow: 1;
}
.programCell {
background: 0 0;
color: inherit;
background: transparent;
border-style: solid;
border-width: 0 0 0 1px;
padding: 0 !important;
cursor: pointer;
outline: none !important;
width: 100%;
vertical-align: middle;
font-family: inherit;
font-size: inherit;
position: absolute;
top: 0;
bottom: 0;
display: flex;
-webkit-align-items: center;
text-decoration: none;
overflow: hidden;
align-items: center;
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
/* Needed for Firefox */
text-align: left;
contain: strict;
flex-grow: 1;
margin: 0 !important
}
.channelsContainer,
.guideProgramName,
.programGrid {
contain: layout style paint
}
.guide-programNameCaret,
.guideProgramName {
display: -webkit-box;
display: -webkit-flex;
-webkit-box-align: center
margin: 0 !important;
}
.guideProgramName {
padding: 0 .7em;
padding: 0 .7em 0;
overflow: hidden;
text-overflow: ellipsis;
-webkit-align-items: center;
align-items: center;
display: flex;
position: relative;
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
flex-grow: 1
flex-grow: 1;
contain: layout style paint;
/*transition: transform 60ms ease-out;*/
}
.guide-programNameCaret {
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
font-size: 200%
font-size: 200%;
}
.guideProgramNameText {
margin: 0;
font-weight: 400;
font-weight: normal;
overflow: hidden;
text-overflow: ellipsis
text-overflow: ellipsis;
}
.guideProgramSecondaryInfo {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
margin-top: .1em
margin-top: .1em;
}
.programIcon {
@ -387,26 +298,22 @@
width: 1em;
font-size: 1.6em;
color: #ddd;
-webkit-flex-shrink: 0;
flex-shrink: 0;
-webkit-box-flex: 0;
-webkit-flex-grow: 0;
flex-grow: 0
flex-grow: 0;
}
.guide-programTextIcon {
font-weight: 700;
font-weight: bold;
font-size: .9em;
padding: .16em .3em;
-webkit-border-radius: .25em;
border-radius: .25em;
margin-right: .35em;
width: auto;
height: auto
height: auto;
}
.guide-programTextIcon-tv {
font-size: .74em
font-size: .74em;
}
.guideChannelNumber {
@ -414,8 +321,8 @@
max-width: 30%;
text-overflow: ellipsis;
overflow: hidden;
font-weight: 400;
margin: 0
font-weight: normal;
margin: 0;
}
.guideChannelName {
@ -423,7 +330,7 @@
margin-right: 1em;
text-overflow: ellipsis;
overflow: hidden;
max-width: 70%
max-width: 70%;
}
.guideChannelImage {
@ -432,68 +339,62 @@
top: 15%;
bottom: 15%;
width: 40%;
-webkit-background-size: contain;
background-size: contain;
background-repeat: no-repeat;
background-position: right center
background-position: right center;
}
@media all and (min-width:62.5em) {
@media all and (min-width: 62.5em) {
.guideChannelName {
max-width: 40%
max-width: 40%;
}
}
@media all and (max-width:62.5em) {
@media all and (max-width: 62.5em) {
.guideChannelNumber {
display: none
display: none;
}
.guideChannelImage {
width: 70%
width: 70%;
}
}
.channelsContainer {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-flex-shrink: 0;
flex-shrink: 0;
-webkit-flex-direction: column;
flex-direction: column
flex-direction: column;
}
.guide-channelHeaderCell,
.programCell {
outline: 0 !important
.channelsContainer, .programGrid {
contain: layout style paint;
}
.seriesTimerIcon,
.timerIcon {
color: #c33 !important
.programCell, .guide-channelHeaderCell {
outline: none !important;
}
.timerIcon, .seriesTimerIcon {
color: #cc3333 !important;
}
.seriesTimerIcon-inactive {
color: inherit !important;
opacity: .7
opacity: .7;
}
.guideOptions {
-webkit-flex-shrink: 0;
flex-shrink: 0;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center
align-items: center;
}
@media all and (max-width:50em),
all and (max-height:37.5em) {
@media all and (max-width: 50em), all and (max-height: 37.5em) {
.tvGuideHeader {
padding-left: 0
padding-left: 0;
}
}
@ -501,31 +402,29 @@ all and (max-height:37.5em) {
margin: 1em auto;
text-align: center;
padding: 1em;
-webkit-flex-shrink: 0;
flex-shrink: 0
flex-shrink: 0;
}
.noRubberBanding {
padding-bottom: 7em
/* This is needed to combat the rubber banding in iOS */
padding-bottom: 7em;
}
.guideDateTabsSlider {
text-align: center
text-align: center;
}
.guide-date-tab-button {
padding: .3em .7em !important;
margin: 0 .3em !important;
font-weight: 400
font-weight: normal;
}
.guide-date-tab-button.emby-tab-button-active {
border-color: transparent !important
}
.guide-date-tab-button.emby-tab-button-active {
border-color: transparent !important;
}
.guide-date-tab-button.emby-button-tv:focus {
-webkit-border-radius: .15em !important;
border-radius: .15em !important;
-webkit-transform: none !important;
transform: none !important
}
.guide-date-tab-button.emby-button-tv:focus {
border-radius: .15em !important;
transform: none !important;
}

File diff suppressed because it is too large Load diff

View file

@ -1,19 +1,19 @@
.newTvProgram {
background: #38c;
color: #fff
background: #3388cc;
color: #fff;
}
.liveTvProgram {
background: #c33;
color: #fff
background: #cc3333;
color: #fff;
}
.premiereTvProgram {
background: #EF6C00;
color: #fff
color: #fff;
}
.repeatTvProgram {
background: #009688;
color: #fff
}
color: #fff;
}