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

stub out channel mapping

This commit is contained in:
Luke Pulverenti 2016-06-08 01:24:25 -04:00
parent 36a0eb43e4
commit a2dbad16f4
21 changed files with 160 additions and 105 deletions

View file

@ -2,18 +2,15 @@
<div data-role="content">
<div class="content-primary">
<div style="margin: -25px 0 1em; text-align: right;">
<div class="listTopPaging" style="float: left; position: relative; top: 15px;">
</div>
<div>
<div style="float: right; position: relative; top: 15px;margin-top: -5px;display:none;" class="organizeTaskPanel">
<button is="emby-button" type="button" type="button" class="btnClearLog" raised style="display: inline-block;"><iron-icon icon="clear-all"></iron-icon><span>${ButtonClear}</span></button>
<button is="emby-button" type="button" type="button" class="btnOrganize" raised><iron-icon icon="check"></iron-icon><span>${ButtonOrganize}</span></button>
<progress max="100" min="0" style="width:100px;display:none;" class="organizeProgress"></progress>
<div style="text-align:right;" class="organizeTaskPanel hide">
<button is="emby-button" type="button" class="btnClearLog raised subdued"><iron-icon icon="clear-all"></iron-icon><span>${ButtonClear}</span></button>
<button is="emby-button" type="button" class="btnOrganize raised subdued"><iron-icon icon="check"></iron-icon><span>${ButtonOrganize}</span></button>
<progress max="100" min="0" style="width:100px;" class="organizeProgress"></progress>
</div>
<div class="listTopPaging">
</div>
<br />
<div style="clear: both;"></div>
</div>
<table data-role="table" data-mode="reflow" class="tblOrganizationResults stripedTable ui-responsive table-stroke">
<thead>

View file

@ -1,4 +1,4 @@
define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', 'paper-icon-button-light'], function (focusManager, layoutManager) {
define(['focusManager', 'css!./style.css', 'clearButtonStyle', 'paper-icon-button-light'], function (focusManager) {
function focus() {
var selected = this.querySelector('.selected');
@ -52,10 +52,6 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
element.innerHTML = html;
if (options.mode != 'keyboard') {
element.querySelector('.alphaPickerButton').classList.add('selected');
}
element.classList.add('focusable');
element.focus = focus;
}
@ -85,7 +81,6 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
if (document.activeElement == alphaFocusedElement) {
var value = alphaFocusedElement.getAttribute('data-value');
self.value(value, true);
}
}
@ -103,7 +98,7 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
return elem;
}
function onAlphaPickerClick(e) {
function onAlphaPickerInKeyboardModeClick(e) {
var alphaPickerButton = parentWithClass(e.target, 'alphaPickerButton');
@ -118,6 +113,21 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
}
}
function onAlphaPickerClick(e) {
var alphaPickerButton = parentWithClass(e.target, 'alphaPickerButton');
if (alphaPickerButton) {
var value = alphaPickerButton.getAttribute('data-value');
if (currentValue == value.toUpperCase()) {
self.value(null, true);
} else {
self.value(value, true);
}
}
}
function onAlphaPickerFocusIn(e) {
if (alphaFocusTimeout) {
@ -159,13 +169,13 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
}
if (options.mode == 'keyboard') {
element.addEventListener('click', onAlphaPickerClick);
element.addEventListener('click', onAlphaPickerInKeyboardModeClick);
}
if (layoutManager.tv) {
if (options.valueChangeEvent !== 'click') {
element.addEventListener('focus', onAlphaPickerFocusIn, true);
} else {
element.addEventListener('click', onAlphaPickerFocusIn);
element.addEventListener('click', onAlphaPickerClick);
}
} else {
@ -174,9 +184,9 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
itemsContainer.removeEventListener('focus', onItemsFocusIn, true);
}
element.removeEventListener('click', onAlphaPickerClick);
element.removeEventListener('click', onAlphaPickerInKeyboardModeClick);
element.removeEventListener('focus', onAlphaPickerFocusIn, true);
element.removeEventListener('click', onAlphaPickerFocusIn);
element.removeEventListener('click', onAlphaPickerClick);
}
};
@ -202,14 +212,17 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
var currentValue;
self.value = function (value, applyValue) {
var btn, selected;
if (value !== undefined) {
if (value != null) {
value = value.toUpperCase();
currentValue = value;
if (options.mode != 'keyboard') {
var selected = element.querySelector('.selected');
var btn = element.querySelector('.alphaPickerButton[data-value=\'' + value + '\']');
selected = element.querySelector('.selected');
btn = element.querySelector('.alphaPickerButton[data-value=\'' + value + '\']');
if (btn && btn != selected) {
btn.classList.add('selected');
@ -218,6 +231,15 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
selected.classList.remove('selected');
}
}
} else {
currentValue = value;
selected = element.querySelector('.selected');
if (selected) {
selected.classList.remove('selected');
}
}
}
if (applyValue) {
element.dispatchEvent(new CustomEvent("alphavaluechanged", {
@ -226,7 +248,6 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle',
}
}));
}
}
return currentValue;
};

View file

@ -45,7 +45,7 @@ button.alphaPickerButton {
opacity: 1;
}
.alphaPickerButton:focus {
.layout-tv .alphaPickerButton:focus {
background-color: #52B54B;
opacity: 1;
color: #fff;

View file

@ -289,7 +289,7 @@ a[data-role='button'], .type-interior button:not([data-role='none']):not(.clearB
}
.mainDrawerPanel:not([narrow]) .content-primary {
padding-top: 110px;
padding-top: 90px;
padding-bottom: 3em;
}
@ -305,12 +305,12 @@ a[data-role='button'], .type-interior button:not([data-role='none']):not(.clearB
.mainDrawerPanel:not([narrow]) .content-primary {
padding-right: 1.5em;
padding-left: 3em;
padding-left: 2em;
}
}
.mainDrawerPanel:not([narrow]) .withTabs .content-primary {
padding-top: 135px !important;
padding-top: 125px !important;
}
.mainDrawerPanel:not([narrow]) .content-primary ul:first-child {

View file

@ -1028,18 +1028,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
right: 20px;
}
.alphabetPicker a {
display: block;
text-decoration: none;
padding: 1px 2px 1px 5px;
font-weight: 500;
}
.alphabetPicker a:not(.selectedCharacter) {
color: #bbb !important;
}
.selectedCharacter {
color: #52B54B !important;
}
@ -1091,7 +1079,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
@media all and (max-height: 480px) {
.alphabetPicker {
display: none;
display: none !important;
}
}
@ -1123,8 +1111,8 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
@media all and (max-height: 650px) {
.vertical.alphabetPicker .alphaPickerButton {
padding-top: 2px!important;
padding-bottom: 2px!important;
padding-top: 2px !important;
padding-bottom: 2px !important;
}
}

View file

@ -643,21 +643,25 @@ progress {
height: 16px;
}
.supporterPromotion {
margin: 1em 0;
.supporterPromotionContainer {
margin: 0 0 2em;
}
@media all and (min-width: 800px) {
.supporterPromotion:not(.inlineSupporterPromotion) {
position: absolute;
top: 110px;
right: 20px;
margin: 0;
.supporterPromotionContainer {
display: flex;
flex-direction: row-reverse;
}
.inlineSupporterPromotion {
display: inline-block;
.supporterPromotion {
text-align: center;
padding: 0 2em;
}
.supporterPromotion button {
padding-left: 2em;
padding-right: 2em;
}
}

View file

@ -171,3 +171,7 @@ h1, h1 a {
.videoSubtitles {
font-size: 200% !important;
}
.alphabetPicker {
right: 5px !important;
}

View file

@ -257,9 +257,9 @@
});
if (result.TotalRecordCount) {
$('.btnClearLog', page).show();
page.querySelector('.btnClearLog').classList.remove('hide');
} else {
$('.btnClearLog', page).hide();
page.querySelector('.btnClearLog').classList.add('hide');
}
}
@ -312,7 +312,7 @@
$('.btnOrganize', page).taskButton({
mode: 'on',
progressElem: page.querySelector('.organizeProgress'),
panel: $('.organizeTaskPanel', page),
panel: page.querySelector('.organizeTaskPanel'),
taskKey: 'AutoOrganize'
});

View file

@ -1313,29 +1313,24 @@
})(jQuery, document, window);
(function () {
$(document).on('pageshow', ".type-interior", function () {
pageClassOn('pageshow', "type-interior", function () {
var page = this;
Dashboard.getPluginSecurityInfo().then(function (pluginSecurityInfo) {
if (!$('.customSupporterPromotion', page).length) {
if (!page.querySelector('.customSupporterPromotion')) {
$('.supporterPromotion', page).remove();
if (!pluginSecurityInfo.IsMBSupporter && AppInfo.enableSupporterMembership) {
var html = '<div class="supporterPromotion"><a class="clearLink" href="http://emby.media/premiere" target="_blank"><button is="emby-button" type="button" class="raised block" style="text-transform:none;background-color:#52B54B;color:#fff;"><div>' + Globalize.translate('HeaderSupportTheTeam') + '</div><div style="font-weight:normal;margin-top:5px;">' + Globalize.translate('TextEnjoyBonusFeatures') + '</div></button></a></div>';
var html = '<div class="supporterPromotionContainer"><div class="supporterPromotion"><a class="clearLink" href="http://emby.media/premiere" target="_blank"><button is="emby-button" type="button" class="raised block" style="text-transform:none;background-color:#52B54B;color:#fff;"><div>' + Globalize.translate('HeaderSupportTheTeam') + '</div><div style="font-weight:normal;margin-top:5px;">' + Globalize.translate('TextEnjoyBonusFeatures') + '</div></button></a></div></div>';
$('.content-primary', page).append(html);
page.querySelector('.content-primary').insertAdjacentHTML('afterbegin', html);
}
}
});
});
})();
});

View file

@ -260,7 +260,8 @@
});
self.alphaPicker = new alphaPicker({
element: alphaPickerElement
element: alphaPickerElement,
valueChangeEvent: 'click'
});
$(view).on('click', '.mediaItem', onListItemClick);

View file

@ -316,7 +316,7 @@
html += '</a>';
html += '</paper-item-body>';
html += '<button type="button" is="paper-icon-button-light" class="btnDelete" data-id="' + provider.Id + '" title="' + Globalize.translate('ButtonDelete') + '"><iron-icon icon="delete"></iron-icon></button>';
html += '<button type="button" is="paper-icon-button-light" class="btnOptions" data-id="' + provider.Id + '"><iron-icon icon="more-vert"></iron-icon></button>';
html += '</paper-icon-item>';
}
@ -325,11 +325,49 @@
var elem = $('.providerList', page).html(html);
$('.btnDelete', elem).on('click', function () {
$('.btnOptions', elem).on('click', function () {
var id = this.getAttribute('data-id');
showProviderOptions(page, id, this);
});
}
function showProviderOptions(page, id, button) {
var items = [];
items.push({
name: Globalize.translate('ButtonDelete'),
id: 'delete'
});
items.push({
name: Globalize.translate('MapChannels'),
id: 'map'
});
require(['actionsheet'], function (actionsheet) {
actionsheet.show({
items: items,
positionTo: button
}).then(function (id) {
switch (id) {
case 'delete':
deleteProvider(page, id);
break;
case 'map':
alert('coming soon');
break;
default:
break;
}
});
});
}

View file

@ -285,7 +285,8 @@
});
self.alphaPicker = new alphaPicker({
element: alphaPickerElement
element: alphaPickerElement,
valueChangeEvent: 'click'
});
context.querySelector('.itemsContainer').addEventListener('needsrefresh', function () {

View file

@ -174,7 +174,8 @@
});
self.alphaPicker = new alphaPicker({
element: alphaPickerElement
element: alphaPickerElement,
valueChangeEvent: 'click'
});
tabContent.querySelector('.itemsContainer').addEventListener('needsrefresh', function () {

View file

@ -169,7 +169,8 @@
});
self.alphaPicker = new alphaPicker({
element: alphaPickerElement
element: alphaPickerElement,
valueChangeEvent: 'click'
});
self.renderTab = function () {

View file

@ -222,7 +222,8 @@
});
self.alphaPicker = new alphaPicker({
element: alphaPickerElement
element: alphaPickerElement,
valueChangeEvent: 'click'
});
self.renderTab = function () {

View file

@ -169,7 +169,8 @@
});
self.alphaPicker = new alphaPicker({
element: alphaPickerElement
element: alphaPickerElement,
valueChangeEvent: 'click'
});
self.renderTab = function () {

View file

@ -205,7 +205,7 @@
var html = '';
html += '<div>';
html += '<h1>Try Emby Theater<button is="paper-icon-button-light" style="margin-left:1em;" onclick="jQuery(this.parentNode.parentNode).remove();"><iron-icon icon="close"></iron-icon></button></h1>';
html += '<h1>Try Emby Theater<button is="paper-icon-button-light" style="margin-left:1em;" onclick="this.parentNode.parentNode.remove();"><iron-icon icon="close"></iron-icon></button></h1>';
var nameText = AppInfo.isNativeApp ? 'Emby Theater' : '<a href="https://emby.media/download" target="_blank">Emby Theater</a>';
html += '<p>A beautiful app for your TV and large screen tablet. ' + nameText + ' runs on Windows, Xbox One, Google Chrome, FireFox, Microsoft Edge and Opera.</p>';
@ -223,7 +223,7 @@
var html = '';
html += '<div>';
html += '<h1>Try Emby Premiere<button is="paper-icon-button-light" style="margin-left:1em;" onclick="jQuery(this.parentNode.parentNode).remove();"><iron-icon icon="close"></iron-icon></button></h1>';
html += '<h1>Try Emby Premiere<button is="paper-icon-button-light" style="margin-left:1em;" onclick="this.parentNode.parentNode.remove();"><iron-icon icon="close"></iron-icon></button></h1>';
var learnMoreText = AppInfo.isNativeApp ? '' : '<a href="https://emby.media/premiere" target="_blank">Learn more</a>';

View file

@ -25,9 +25,9 @@
if (options.panel) {
if (task) {
$(options.panel).show();
options.panel.classList.remove('hide');
} else {
$(options.panel).hide();
options.panel.classList.add('hide');
}
}
@ -157,7 +157,7 @@
}
if (options.panel) {
$(options.panel).hide();
options.panel.classList.add('hide');
}
if (options.mode == 'off') {

View file

@ -202,7 +202,8 @@
});
self.alphaPicker = new alphaPicker({
element: alphaPickerElement
element: alphaPickerElement,
valueChangeEvent: 'click'
});
tabContent.querySelector('.btnFilter').addEventListener('click', function () {

View file

@ -2371,5 +2371,6 @@
"LabelBindToLocalNetworkAddress": "Bind to local network address:",
"LabelBindToLocalNetworkAddressHelp": "Optional. Override the local IP address to bind the http server to. If left empty, the server will bind to all availabile addresses. Changing this value requires restarting Emby Server.",
"TitleHostingSettings": "Hosting Settings",
"SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default."
"SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default.",
"MapChannels": "Map Channels"
}

View file

@ -3,11 +3,6 @@
<div data-role="content">
<div class="content-primary">
<div style="text-align:right;margin-top:-10px;">
<button is="emby-button" type="button" class="raised btnSync"><iron-icon icon="sync"></iron-icon><span>${ButtonConvertMedia}</span></button>
<progress max="100" min="0" style="width:100px;display:none;" class="syncProgress"></progress>
</div>
<br />
<div class="supporterPromotionContainer" style="display:none;">
<div class="customSupporterPromotion supporterPromotion">
<a class="clearLink" href="http://emby.media/premiere" target="_blank">
@ -21,6 +16,11 @@
</a>
</div>
</div>
<div style="text-align:right;">
<button is="emby-button" type="button" class="raised btnSync subdued"><iron-icon icon="sync"></iron-icon><span>${ButtonConvertMedia}</span></button>
<progress max="100" min="0" style="width:100px;display:none;" class="syncProgress"></progress>
</div>
<br />
<div class="syncActivity">
</div>