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

update playerselection.js

This commit is contained in:
Luke Pulverenti 2017-01-19 15:09:04 -05:00
parent beea3e341f
commit 668418e69b
4 changed files with 39 additions and 36 deletions

View file

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.477",
"_release": "1.4.477",
"version": "1.4.478",
"_release": "1.4.478",
"_resolution": {
"type": "version",
"tag": "1.4.477",
"commit": "15c8b92f1398ccfe25f1d820994c162453f529cf"
"tag": "1.4.478",
"commit": "f0d0c518404756700c0d9f709c79f00fd45f06b0"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View file

@ -146,7 +146,6 @@
overflow: hidden;
text-overflow: ellipsis;
border-right: 1px solid #121212;
width: 24vw;
background: rgb(38, 38, 38);
display: flex;
align-items: center;
@ -156,30 +155,37 @@
contain: strict;
}
@media all and (min-width: 500px) {
/* 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, .channelTimeslotHeader {
width: 24vw;
}
.channelHeaderCell, .channelTimeslotHeader {
.channelHeaderCell {
width: 100%;
}
@media all and (min-width:500px) {
.channelsContainer, .channelTimeslotHeader {
width: 16vw;
}
}
@media all and (min-width: 600px) {
.channelHeaderCell, .channelTimeslotHeader {
@media all and (min-width:600px) {
.channelsContainer, .channelTimeslotHeader {
width: 16vw;
}
}
@media all and (min-width: 800px) {
.channelHeaderCell, .channelTimeslotHeader {
@media all and (min-width:800px) {
.channelsContainer, .channelTimeslotHeader {
width: 14vw;
}
}
@media all and (min-width: 1280px) {
.channelHeaderCell, .channelTimeslotHeader {
@media all and (min-width:1280px) {
.channelsContainer, .channelTimeslotHeader {
width: 12vw;
}
}
@ -222,7 +228,7 @@
}
.channelPrograms-tv, .channelHeaderCell-tv {
height: 3.8em;
height: 3.4em;
}
.channelTimeslotHeader {

View file

@ -1,4 +1,4 @@
define(['appSettings', 'events', 'browser', 'libraryMenu', 'loading', 'playbackManager', 'embyRouter', 'globalize'], function (appSettings, events, browser, libraryMenu, loading, playbackManager, embyRouter, globalize) {
define(['appSettings', 'events', 'browser', 'loading', 'playbackManager', 'embyRouter', 'globalize'], function (appSettings, events, browser, loading, playbackManager, embyRouter, globalize) {
'use strict';
var currentDisplayInfo;
@ -186,23 +186,6 @@
playbackManager.enableDisplayMirroring(this.checked);
}
function onCastButtonClicked() {
showPlayerSelection(this);
}
function bindCastButton() {
var btnCast = document.querySelector('.headerButton-btnCast');
if (btnCast) {
btnCast.removeEventListener('click', onCastButtonClicked);
btnCast.addEventListener('click', onCastButtonClicked);
}
}
document.addEventListener('headercreated', bindCastButton);
bindCastButton();
document.addEventListener('viewbeforeshow', function () {
currentDisplayInfo = null;
});

View file

@ -55,7 +55,6 @@
lazyLoadViewMenuBarImages();
document.dispatchEvent(new CustomEvent("headercreated", {}));
bindMenuEvents();
}
@ -224,6 +223,21 @@
viewMenuBar.querySelector('.btnNotifications').addEventListener('click', function () {
Dashboard.navigate('notificationlist.html');
});
var btnCast = document.querySelector('.headerButton-btnCast');
if (btnCast) {
btnCast.addEventListener('click', onCastButtonClicked);
}
}
function onCastButtonClicked() {
var btn = this;
require(['playerSelectionMenu'], function (playerSelectionMenu) {
playerSelectionMenu.show(btn);
});
}
function getItemHref(item, context) {