make metadata path configurable
This commit is contained in:
@@ -2,19 +2,6 @@
|
||||
|
||||
function loadPage(page, config) {
|
||||
|
||||
$('#txtItemsByNamePath', page).val(config.ItemsByNamePath || '');
|
||||
|
||||
var customIbn = config.ItemsByNamePath ? true : false;
|
||||
$('#chkEnableCustomIBNPath', page).checked(customIbn).checkboxradio("refresh");
|
||||
|
||||
if (customIbn) {
|
||||
$('#fieldEnterIBNPath', page).show();
|
||||
$('#txtItemsByNamePath', page).attr("required", "required");
|
||||
} else {
|
||||
$('#fieldEnterIBNPath', page).hide();
|
||||
$('#txtItemsByNamePath', page).removeAttr("required");
|
||||
}
|
||||
|
||||
$('#txtSeasonZeroName', page).val(config.SeasonZeroDisplayName);
|
||||
|
||||
$('#chkEnableRealtimeMonitor', page).checked(config.EnableRealtimeMonitor).checkboxradio("refresh");
|
||||
@@ -28,50 +15,12 @@
|
||||
|
||||
var page = this;
|
||||
|
||||
$('#btnSelectIBNPath', page).on("click.selectDirectory", function () {
|
||||
|
||||
var picker = new DirectoryBrowser(page);
|
||||
|
||||
picker.show({
|
||||
|
||||
callback: function (path) {
|
||||
|
||||
if (path) {
|
||||
$('#txtItemsByNamePath', page).val(path);
|
||||
}
|
||||
picker.close();
|
||||
},
|
||||
|
||||
header: "Select Images By Name Path",
|
||||
|
||||
instruction: "Browse or enter the path to your items by name folder. The folder must be writeable."
|
||||
});
|
||||
});
|
||||
|
||||
$('#chkEnableCustomIBNPath', page).on("change.showIBNText", function () {
|
||||
|
||||
if (this.checked) {
|
||||
$('#fieldEnterIBNPath', page).show();
|
||||
$('#txtItemsByNamePath', page).attr("required", "required");
|
||||
} else {
|
||||
$('#fieldEnterIBNPath', page).hide();
|
||||
$('#txtItemsByNamePath', page).removeAttr("required");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
loadPage(page, config);
|
||||
|
||||
});
|
||||
|
||||
}).on('pagehide', "#librarySettingsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('#chkEnableCustomIBNPath', page).off("change.showIBNText");
|
||||
$('#btnSelectIBNPath', page).off("click.selectDirectory");
|
||||
});
|
||||
|
||||
function librarySettingsPage() {
|
||||
@@ -85,12 +34,6 @@
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
if ($('#chkEnableCustomIBNPath', form).checked()) {
|
||||
config.ItemsByNamePath = $('#txtItemsByNamePath', form).val();
|
||||
} else {
|
||||
config.ItemsByNamePath = '';
|
||||
}
|
||||
|
||||
config.SeasonZeroDisplayName = $('#txtSeasonZeroName', form).val();
|
||||
|
||||
config.EnableRealtimeMonitor = $('#chkEnableRealtimeMonitor', form).checked();
|
||||
|
||||
Reference in New Issue
Block a user