add web path as config option

This commit is contained in:
dkanada 2019-03-11 21:31:33 -07:00
parent 96e4296256
commit 9d462263b9
5 changed files with 40 additions and 3 deletions

View file

@ -109,6 +109,23 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
})
});
$("#btnSelectWebPath", view).on("click.selectDirectory", function() {
require(["directorybrowser"], function(directoryBrowser) {
var picker = new directoryBrowser;
picker.show({
callback: function(path) {
if (path) {
view.querySelector("#txtWebPath").value = path;
}
picker.close();
},
validateWriteable: true,
header: Globalize.translate("LabelWebPath"),
instruction: Globalize.translate("LabelWebPathHelp")
})
})
});
$(".dashboardGeneralForm", view).off("submit", onSubmit).on("submit", onSubmit);
view.addEventListener("viewshow", function() {
var promiseConfig = ApiClient.getServerConfiguration();