mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
add path picker
This commit is contained in:
parent
8edd6fc958
commit
5406262f6b
@ -1,4 +1,4 @@
|
||||
define(['jQuery', 'paper-checkbox', 'paper-button', 'emby-input', 'paper-item-body', 'paper-icon-item'], function ($) {
|
||||
define(['jQuery', 'paper-checkbox', 'paper-button', 'emby-input', 'paper-item-body', 'paper-icon-item', 'paper-icon-button-light'], function ($) {
|
||||
|
||||
return function (page, providerId, options) {
|
||||
|
||||
@ -153,6 +153,27 @@
|
||||
page.querySelector('.btnSubmitListingsContainer').click();
|
||||
};
|
||||
|
||||
function onSelectPathClick(e) {
|
||||
var page = $(e.target).parents('.xmltvForm')[0];
|
||||
require(['directorybrowser'], function (directoryBrowser) {
|
||||
|
||||
var picker = new directoryBrowser();
|
||||
|
||||
picker.show({
|
||||
|
||||
callback: function (path) {
|
||||
|
||||
if (path) {
|
||||
var txtPath = page.querySelector('.txtPath');
|
||||
txtPath.value = path;
|
||||
txtPath.focus();
|
||||
}
|
||||
picker.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
self.init = function () {
|
||||
|
||||
options = options || {};
|
||||
@ -174,6 +195,8 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
page.querySelector('#btnSelectPath').addEventListener("click", onSelectPathClick);
|
||||
|
||||
page.querySelector('.chkAllTuners').addEventListener('change', function (e) {
|
||||
if (e.target.checked) {
|
||||
page.querySelector('.selectTunersSection').classList.add('hide');
|
||||
|
@ -1,9 +1,15 @@
|
||||
<h1>Xml TV</h1>
|
||||
|
||||
<form>
|
||||
<form class="xmltvForm">
|
||||
<div>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" class="txtPath" label="${LabelPath}" required="required" autocomplete="off" />
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="flex-grow:1;">
|
||||
<input is="emby-input" class="txtPath" label="${LabelPath}" required="required" autocomplete="off" />
|
||||
</div>
|
||||
<button type="button" is="paper-icon-button-light" id="btnSelectPath"><iron-icon icon="search"></iron-icon></button>
|
||||
</div>
|
||||
<div class="fieldDescription">${XmlTvPathHelp}</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" class="txtKids" label="${LabelKidsCategories}" autocomplete="off" />
|
||||
|
@ -2363,5 +2363,6 @@
|
||||
"LabelNewsCategories": "News categories:",
|
||||
"XmlTvNewsCategoriesHelp": "Programs with these categories will be displayed as news programs. Separate multiple with '|'.",
|
||||
"LabelKidsCategories": "Children's categories:",
|
||||
"XmlTvKidsCategoriesHelp": "Programs with these categories will be displayed as programs for children. Separate multiple with '|'."
|
||||
"XmlTvKidsCategoriesHelp": "Programs with these categories will be displayed as programs for children. Separate multiple with '|'.",
|
||||
"XmlTvPathHelp": "A path to an xml tv file. Emby will read this file and periodically check it for updates. You are responsible for creating and updating the file."
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user