mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
revert network share path changes
This commit is contained in:
parent
326d9f9adf
commit
cd13be84fc
@ -131,6 +131,14 @@ define(['loading', 'dialogHelper', 'dom', 'listViewStyle', 'emby-input', 'emby-b
|
||||
if (!readOnlyAttribute) {
|
||||
html += '<div class="results paperList" style="max-height: 200px; overflow-y: auto;"></div>';
|
||||
}
|
||||
if (options.enableNetworkSharePath) {
|
||||
html += '<div class="inputContainer" style="margin-top:2em;">';
|
||||
html += '<input is="emby-input" id="txtNetworkPath" type="text" label="' + Globalize.translate("LabelOptionalNetworkPath") + '"/>';
|
||||
html += '<div class="fieldDescription">';
|
||||
html += Globalize.translate("LabelOptionalNetworkPathHelp");
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
}
|
||||
html += '<div class="formDialogFooter">';
|
||||
html += '<button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem">' + Globalize.translate("ButtonOk") + "</button>";
|
||||
html += "</div>";
|
||||
@ -211,8 +219,10 @@ define(['loading', 'dialogHelper', 'dom', 'listViewStyle', 'emby-input', 'emby-b
|
||||
|
||||
content.querySelector("form").addEventListener("submit", function(e) {
|
||||
if (options.callback) {
|
||||
var networkSharePath = this.querySelector("#txtNetworkPath");
|
||||
networkSharePath = networkSharePath ? networkSharePath.value : null;
|
||||
var path = this.querySelector("#txtDirectoryPickerPath").value;
|
||||
validatePath(path, options.validateWriteable, ApiClient).then(options.callback(path));
|
||||
validatePath(path, options.validateWriteable, ApiClient).then(options.callback(path, networkSharePath));
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
@ -279,6 +289,10 @@ define(['loading', 'dialogHelper', 'dom', 'listViewStyle', 'emby-input', 'emby-b
|
||||
});
|
||||
currentDialog = dlg;
|
||||
dlg.querySelector("#txtDirectoryPickerPath").value = initialPath;
|
||||
var txtNetworkPath = dlg.querySelector("#txtNetworkPath");
|
||||
if (txtNetworkPath) {
|
||||
txtNetworkPath.value = options.networkSharePath || "";
|
||||
}
|
||||
if (!options.pathReadOnly) {
|
||||
refreshDirectoryBrowser(dlg, initialPath, fileOptions, true);
|
||||
}
|
||||
|
@ -91,33 +91,20 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
|
||||
var picker = new directoryBrowser();
|
||||
picker.show({
|
||||
path: $("#txtMetadataPath", view).val(),
|
||||
callback: function(path) {
|
||||
networkSharePath: $("#txtMetadataNetworkPath", view).val(),
|
||||
callback: function(path, networkPath) {
|
||||
if (path) {
|
||||
$("#txtMetadataPath", view).val(path);
|
||||
}
|
||||
if (networkPath) {
|
||||
$("#txtMetadataNetworkPath", view).val(networkPath));
|
||||
}
|
||||
picker.close();
|
||||
},
|
||||
validateWriteable: true,
|
||||
header: Globalize.translate("HeaderSelectMetadataPath"),
|
||||
instruction: Globalize.translate("HeaderSelectMetadataPathHelp")
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
$("#btnSelectMetadataNetworkPath", view).on("click.selectDirectory", function() {
|
||||
require(["directorybrowser"], function(directoryBrowser) {
|
||||
var picker = new directoryBrowser();
|
||||
picker.show({
|
||||
path: $("#txtMetadataNetworkPath", view).val(),
|
||||
callback: function(path) {
|
||||
if (path) {
|
||||
$("#txtMetadataNetworkPath", view).val(path);
|
||||
}
|
||||
picker.close();
|
||||
},
|
||||
validateWriteable: true,
|
||||
header: Globalize.translate("LabelOptionalNetworkPath"),
|
||||
instruction: Globalize.translate("LabelOptionalNetworkPathHelp")
|
||||
instruction: Globalize.translate("HeaderSelectMetadataPathHelp"),
|
||||
enableNetworkSharePath: true
|
||||
})
|
||||
})
|
||||
});
|
||||
|
@ -53,16 +53,7 @@
|
||||
<button type="button" is="paper-icon-button-light" id="btnSelectMetadataPath" title="${ButtonSelectDirectory}" class="emby-input-iconbutton"><i class="md-icon">search</i></button>
|
||||
</div>
|
||||
<div class="fieldDescription">${LabelMetadataPathHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="inputContainer">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="flex-grow:1;">
|
||||
<input is="emby-input" id="txtMetadataNetworkPath" label="${LabelOptionalNetworkPath}" autocomplete="off" />
|
||||
</div>
|
||||
<button type="button" is="paper-icon-button-light" id="btnSelectMetadataNetworkPath" title="${ButtonSelectDirectory}" class="emby-input-iconbutton"><i class="md-icon">search</i></button>
|
||||
</div>
|
||||
<div class="fieldDescription">${LabelOptionalNetworkPathHelp}</div>
|
||||
<input type="hidden" id="txtMetadataNetworkPath" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user