mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2025-12-28 05:35:00 +00:00
fix Extra networks tree show / edit (#1973)
Fix 'Show internal metadata' and 'Edit metadata' buttons when used from treeview. Issue seems like an oversight from an upstream change to handle filenames with an apostrophe. #1244
This commit is contained in:
parent
f4d5e8cac1
commit
34609fde67
@ -2,6 +2,7 @@
|
||||
<div class="tree-list-content {subclass}"
|
||||
type="button"
|
||||
onclick="extraNetworksTreeOnClick(event, '{tabname}', '{extra_networks_tabname}');{onclick_extra}"
|
||||
data-name="{action_list_item_label}"
|
||||
data-path="{data_path}"
|
||||
data-hash="{data_hash}"
|
||||
>
|
||||
@ -20,4 +21,4 @@
|
||||
<span class="tree-list-item-action tree-list-item-action--trailing">
|
||||
{action_list_item_action_trailing}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -661,6 +661,9 @@ function extraNetworksRequestMetadata(event, extraPage) {
|
||||
};
|
||||
|
||||
var cardName = event.target.parentElement.parentElement.getAttribute("data-name");
|
||||
if (cardName == null) { // from tree
|
||||
cardName = event.target.parentElement.parentElement.parentElement.getAttribute("data-name");
|
||||
}
|
||||
|
||||
requestGet("./sd_extra_networks/metadata", {page: extraPage, item: cardName}, function(data) {
|
||||
if (data && data.metadata) {
|
||||
@ -688,6 +691,9 @@ function extraNetworksEditUserMetadata(event, tabname, extraPage) {
|
||||
}
|
||||
|
||||
var cardName = event.target.parentElement.parentElement.getAttribute("data-name");
|
||||
if (cardName == null) { // from tree
|
||||
cardName = event.target.parentElement.parentElement.parentElement.getAttribute("data-name");
|
||||
}
|
||||
editor.nameTextarea.value = cardName;
|
||||
updateInput(editor.nameTextarea);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user