mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add new streambuilder options
This commit is contained in:
parent
4ea172b6c5
commit
69b1a9efe2
7 changed files with 70 additions and 39 deletions
0
dashboard-ui/bower_components/emby-webcomponents/emby-radio/emby-radio.css
vendored
Normal file
0
dashboard-ui/bower_components/emby-webcomponents/emby-radio/emby-radio.css
vendored
Normal file
45
dashboard-ui/bower_components/emby-webcomponents/emby-radio/emby-radio.js
vendored
Normal file
45
dashboard-ui/bower_components/emby-webcomponents/emby-radio/emby-radio.js
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
define(['css!./emby-radio', 'registerElement'], function () {
|
||||||
|
|
||||||
|
var EmbyRadioPrototype = Object.create(HTMLInputElement.prototype);
|
||||||
|
|
||||||
|
function onKeyDown(e) {
|
||||||
|
|
||||||
|
// Don't submit form on enter
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
this.checked = true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EmbyRadioPrototype.attachedCallback = function () {
|
||||||
|
|
||||||
|
if (this.getAttribute('data-radio') == 'true') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setAttribute('data-radio', 'true');
|
||||||
|
|
||||||
|
this.classList.add('mdl-radio__button');
|
||||||
|
|
||||||
|
var labelElement = this.parentNode;
|
||||||
|
//labelElement.classList.add('"mdl-radio mdl-js-radio mdl-js-ripple-effect');
|
||||||
|
labelElement.classList.add('mdl-radio');
|
||||||
|
labelElement.classList.add('mdl-js-radio');
|
||||||
|
labelElement.classList.add('mdl-js-ripple-effect');
|
||||||
|
|
||||||
|
var labelTextElement = labelElement.querySelector('span');
|
||||||
|
labelElement.insertAdjacentHTML('beforeend', '<span class="mdl-checkbox__focus-helper"></span><span class="checkboxOutline"><span class="mdl-checkbox__tick-outline"></span></span>');
|
||||||
|
|
||||||
|
labelTextElement.classList.add('radioButtonLabel');
|
||||||
|
|
||||||
|
this.addEventListener('keydown', onKeyDown);
|
||||||
|
};
|
||||||
|
|
||||||
|
document.registerElement('emby-radio', {
|
||||||
|
prototype: EmbyRadioPrototype,
|
||||||
|
extends: 'input'
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
define(['dialogHelper', 'events', 'browser', 'emby-checkbox', 'emby-collapse', 'css!components/filterdialog/style', 'paper-radio-button', 'paper-radio-group'], function (dialogHelper, events, browser) {
|
define(['dialogHelper', 'events', 'browser', 'emby-checkbox', 'emby-collapse', 'css!components/filterdialog/style'], function (dialogHelper, events, browser) {
|
||||||
|
|
||||||
function renderOptions(context, selector, cssClass, items, isCheckedFn) {
|
function renderOptions(context, selector, cssClass, items, isCheckedFn) {
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
context.querySelector('#chkMissingEpisode').checked = query.IsMissing == true;
|
context.querySelector('#chkMissingEpisode').checked = query.IsMissing == true;
|
||||||
context.querySelector('#chkFutureEpisode').checked = query.IsUnaired == true;
|
context.querySelector('#chkFutureEpisode').checked = query.IsUnaired == true;
|
||||||
|
|
||||||
context.querySelector('.playersRadioGroup').selected = query.MinPlayers == null ? 'all' : query.MinPlayers;
|
//context.querySelector('.playersRadioGroup').selected = query.MinPlayers == null ? 'all' : query.MinPlayers;
|
||||||
|
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (i = 0, length = elems.length; i < length; i++) {
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.mode == 'games') {
|
if (options.mode == 'games') {
|
||||||
context.querySelector('.players').classList.remove('hide');
|
//context.querySelector('.players').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.mode == 'movies' || options.mode == 'series' || options.mode == 'games' || options.mode == 'episodes') {
|
if (options.mode == 'movies' || options.mode == 'series' || options.mode == 'games' || options.mode == 'episodes') {
|
||||||
|
@ -446,17 +446,17 @@
|
||||||
triggerChange(self);
|
triggerChange(self);
|
||||||
});
|
});
|
||||||
|
|
||||||
context.querySelector('.playersRadioGroup').addEventListener('iron-select', function (e) {
|
//context.querySelector('.playersRadioGroup').addEventListener('iron-select', function (e) {
|
||||||
|
|
||||||
query.StartIndex = 0;
|
// query.StartIndex = 0;
|
||||||
var val = e.target.selected;
|
// var val = e.target.selected;
|
||||||
var newValue = val == "all" ? null : val;
|
// var newValue = val == "all" ? null : val;
|
||||||
var changed = query.MinPlayers != newValue;
|
// var changed = query.MinPlayers != newValue;
|
||||||
query.MinPlayers = newValue;
|
// query.MinPlayers = newValue;
|
||||||
if (changed) {
|
// if (changed) {
|
||||||
triggerChange(self);
|
// triggerChange(self);
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
|
|
||||||
context.addEventListener('change', function (e) {
|
context.addEventListener('change', function (e) {
|
||||||
|
|
||||||
|
@ -570,22 +570,12 @@
|
||||||
|
|
||||||
dlg.addEventListener('close', resolve);
|
dlg.addEventListener('close', resolve);
|
||||||
|
|
||||||
var onTimeout = function () {
|
updateFilterControls(dlg, options);
|
||||||
updateFilterControls(dlg, options);
|
bindEvents(dlg);
|
||||||
bindEvents(dlg);
|
|
||||||
|
|
||||||
if (enableDynamicFilters(options.mode)) {
|
if (enableDynamicFilters(options.mode)) {
|
||||||
dlg.classList.add('dynamicFilterDialog');
|
dlg.classList.add('dynamicFilterDialog');
|
||||||
loadDynamicFilters(dlg, Dashboard.getCurrentUserId(), options.query);
|
loadDynamicFilters(dlg, Dashboard.getCurrentUserId(), options.query);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// In browsers without native web components (FF/IE), there are some quirks with the checkboxes appearing incorrectly with no visible checkmark
|
|
||||||
// Applying a delay after setting innerHTML seems to resolve this
|
|
||||||
if (browser.animate) {
|
|
||||||
onTimeout();
|
|
||||||
} else {
|
|
||||||
setTimeout(onTimeout, 100);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="players hide">
|
<!--<div class="players hide">
|
||||||
<h2 style="margin-bottom: .25em;">
|
<h2 style="margin-bottom: .25em;">
|
||||||
${HeaderNumberOfPlayers}
|
${HeaderNumberOfPlayers}
|
||||||
</h2>
|
</h2>
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
<paper-radio-button class="radioPlayers" name="3">${Option3Player}</paper-radio-button>
|
<paper-radio-button class="radioPlayers" name="3">${Option3Player}</paper-radio-button>
|
||||||
<paper-radio-button class="radioPlayers" name="4">${Option4Player}</paper-radio-button>
|
<paper-radio-button class="radioPlayers" name="4">${Option4Player}</paper-radio-button>
|
||||||
</paper-radio-group>
|
</paper-radio-group>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
<div is="emby-collapse" title="${HeaderGenres}" class="genreFilters hide">
|
<div is="emby-collapse" title="${HeaderGenres}" class="genreFilters hide">
|
||||||
<div class="collapseContent filterOptions">
|
<div class="collapseContent filterOptions">
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
.dynamicFilterDialog {
|
.dynamicFilterDialog {
|
||||||
width: auto;
|
width: auto;
|
||||||
left: 15vw !important;
|
left: 10vw !important;
|
||||||
right: 15vw !important;
|
right: 10vw !important;
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,3 @@
|
||||||
left: 50% !important;
|
left: 50% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.filterDialog paper-radio-button {
|
|
||||||
display: block;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1358,7 +1358,7 @@
|
||||||
}
|
}
|
||||||
else if (item.ParentPrimaryImageTag) {
|
else if (item.ParentPrimaryImageTag) {
|
||||||
|
|
||||||
imgUrl = ApiClient.getImageUrl(item.ParentPrimaryImageItemId, {
|
imgUrl = ApiClient.getScaledImageUrl(item.ParentPrimaryImageItemId, {
|
||||||
type: "Primary",
|
type: "Primary",
|
||||||
maxWidth: downloadWidth,
|
maxWidth: downloadWidth,
|
||||||
tag: item.ParentPrimaryImageTag,
|
tag: item.ParentPrimaryImageTag,
|
||||||
|
|
|
@ -1799,6 +1799,7 @@ var AppInfo = {};
|
||||||
define("emby-select", [embyWebComponentsBowerPath + "/emby-select/emby-select"], returnFirstDependency);
|
define("emby-select", [embyWebComponentsBowerPath + "/emby-select/emby-select"], returnFirstDependency);
|
||||||
define("emby-slider", [embyWebComponentsBowerPath + "/emby-slider/emby-slider"], returnFirstDependency);
|
define("emby-slider", [embyWebComponentsBowerPath + "/emby-slider/emby-slider"], returnFirstDependency);
|
||||||
define("emby-checkbox", [embyWebComponentsBowerPath + "/emby-checkbox/emby-checkbox"], returnFirstDependency);
|
define("emby-checkbox", [embyWebComponentsBowerPath + "/emby-checkbox/emby-checkbox"], returnFirstDependency);
|
||||||
|
define("emby-radio", [embyWebComponentsBowerPath + "/emby-radio/emby-radio"], returnFirstDependency);
|
||||||
define("emby-textarea", [embyWebComponentsBowerPath + "/emby-textarea/emby-textarea"], returnFirstDependency);
|
define("emby-textarea", [embyWebComponentsBowerPath + "/emby-textarea/emby-textarea"], returnFirstDependency);
|
||||||
define("collectionEditor", [embyWebComponentsBowerPath + "/collectioneditor/collectioneditor"], returnFirstDependency);
|
define("collectionEditor", [embyWebComponentsBowerPath + "/collectioneditor/collectioneditor"], returnFirstDependency);
|
||||||
define("playlistEditor", [embyWebComponentsBowerPath + "/playlisteditor/playlisteditor"], returnFirstDependency);
|
define("playlistEditor", [embyWebComponentsBowerPath + "/playlisteditor/playlisteditor"], returnFirstDependency);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue