mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
update provider setting
This commit is contained in:
parent
cf91a36742
commit
7844fdd920
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'loading', 'jQuery', 'paper-fab', 'paper-input', 'paper-checkbox', 'paper-icon-button-light'], function (dialogHelper, loading, $) {
|
||||
define(['dialogHelper', 'loading', 'jQuery', 'paper-fab', 'emby-input', 'paper-checkbox', 'paper-icon-button-light'], function (dialogHelper, loading, $) {
|
||||
|
||||
var currentItem;
|
||||
var currentItemType;
|
||||
@ -243,13 +243,13 @@
|
||||
|
||||
var id = "txtLookup" + idInfo.Key;
|
||||
|
||||
html += '<div>';
|
||||
html += '<div class="inputContainer">';
|
||||
|
||||
var idLabel = Globalize.translate('LabelDynamicExternalId').replace('{0}', idInfo.Name);
|
||||
|
||||
var value = providerIds[idInfo.Key] || '';
|
||||
|
||||
html += '<paper-input class="txtLookupId" data-providerkey="' + idInfo.Key + '" id="' + id + '" label="' + idLabel + '"></paper-input>';
|
||||
html += '<input is="emby-input" class="txtLookupId" data-providerkey="' + idInfo.Key + '" id="' + id + '" label="' + idLabel + '"/>';
|
||||
|
||||
html += '</div>';
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
<form class="popupIdentifyForm" style="margin:auto;">
|
||||
|
||||
<p>${HeaderIdentifyItemHelp}</p>
|
||||
<div>
|
||||
<paper-input type="text" id="txtLookupName" class="identifyField" data-lookup="Name" label="${LabelName}"></paper-input>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="text" id="txtLookupName" class="identifyField" data-lookup="Name" label="${LabelName}" />
|
||||
</div>
|
||||
<div class="fldLookupYear">
|
||||
<paper-input type="number" id="txtLookupYear" class="identifyField" data-lookup="Year" pattern="[0-9]*" min="1800" label="${LabelYear}"></paper-input>
|
||||
<div class="fldLookupYear inputContainer">
|
||||
<input is="emby-input" type="number" id="txtLookupYear" class="identifyField" data-lookup="Year" pattern="[0-9]*" min="1800" label="${LabelYear}"/>
|
||||
</div>
|
||||
|
||||
<div class="identifyProviderIds">
|
||||
|
@ -234,8 +234,6 @@
|
||||
|
||||
function hideChapterMenu(page) {
|
||||
|
||||
//$('.chapterMenuOverlay', page).hide();
|
||||
//$('.chapterMenu', page).hide();
|
||||
}
|
||||
|
||||
return function () {
|
||||
|
@ -1,95 +0,0 @@
|
||||
define(['events'], function (events) {
|
||||
|
||||
function thresholdMonitor(elem, horizontal, lowerTolerance, upperTolerance) {
|
||||
|
||||
var defaultTolerance = horizontal ? (screen.availWidth / 3) : (screen.availHeight / 3);
|
||||
lowerTolerance = lowerTolerance || defaultTolerance;
|
||||
upperTolerance = upperTolerance || defaultTolerance;
|
||||
|
||||
var self = this;
|
||||
var upperTriggered = true;
|
||||
var lowerTriggered = false;
|
||||
var isWindow = elem == window || elem.tagName == 'HTML' || elem.tagName == 'BODY';
|
||||
|
||||
var scrollSize;
|
||||
|
||||
function getScrollSize() {
|
||||
|
||||
if (!scrollSize) {
|
||||
|
||||
if (isWindow) {
|
||||
scrollSize = horizontal ? (document.documentElement.scrollWidth - document.documentElement.offsetWidth) : (document.documentElement.scrollHeight - document.documentElement.offsetHeight);
|
||||
} else {
|
||||
scrollSize = horizontal ? (elem.scrollWidth - elem.offsetWidth) : (elem.scrollHeight - elem.offsetHeight);
|
||||
}
|
||||
}
|
||||
return scrollSize;
|
||||
}
|
||||
|
||||
function onScroll(e) {
|
||||
|
||||
if (lowerTriggered && upperTriggered) {
|
||||
return;
|
||||
}
|
||||
|
||||
var position;
|
||||
|
||||
if (isWindow) {
|
||||
position = horizontal ? window.pageXOffset : window.pageYOffset;
|
||||
} else {
|
||||
position = horizontal ? elem.scrollLeft : elem.scrollTop;
|
||||
}
|
||||
|
||||
//console.log('onscroll: ' + position + '-' + getScrollSize());
|
||||
|
||||
// Detect upper threshold
|
||||
if (position < upperTolerance) {
|
||||
if (!upperTriggered) {
|
||||
upperTriggered = true;
|
||||
events.trigger(self, 'upper-threshold');
|
||||
}
|
||||
} else {
|
||||
upperTriggered = false;
|
||||
}
|
||||
|
||||
// Detect lower threshold
|
||||
if (position >= (getScrollSize() - lowerTolerance)) {
|
||||
if (!lowerTriggered) {
|
||||
lowerTriggered = true;
|
||||
events.trigger(self, 'lower-threshold');
|
||||
}
|
||||
} else {
|
||||
lowerTriggered = false;
|
||||
}
|
||||
}
|
||||
|
||||
self.reset = function () {
|
||||
self.resetSize();
|
||||
upperTriggered = true;
|
||||
lowerTriggered = false;
|
||||
};
|
||||
|
||||
self.resetSize = function () {
|
||||
scrollSize = null;
|
||||
};
|
||||
|
||||
self.enabled = function (enabled) {
|
||||
|
||||
self.reset();
|
||||
|
||||
if (enabled) {
|
||||
elem.addEventListener('scroll', onScroll, true);
|
||||
} else {
|
||||
elem.removeEventListener('scroll', onScroll, true);
|
||||
}
|
||||
};
|
||||
|
||||
self.enabled(true);
|
||||
|
||||
self.destroy = function () {
|
||||
self.enabled(false);
|
||||
};
|
||||
}
|
||||
|
||||
return thresholdMonitor;
|
||||
});
|
Loading…
Reference in New Issue
Block a user