Merge pull request #8749 from missionfloyd/extra-network-info
Don't bubble when metadata_button is clicked
This commit is contained in:
commit
e442b73633
@ -132,12 +132,14 @@ function popup(contents){
|
|||||||
globalPopup.style.display = "flex";
|
globalPopup.style.display = "flex";
|
||||||
}
|
}
|
||||||
|
|
||||||
function extraNetworksShowMetadata(text){
|
function extraNetworksShowMetadata(event, text){
|
||||||
elem = document.createElement('pre')
|
elem = document.createElement('pre')
|
||||||
elem.classList.add('popup-metadata');
|
elem.classList.add('popup-metadata');
|
||||||
elem.textContent = text;
|
elem.textContent = text;
|
||||||
|
|
||||||
popup(elem);
|
popup(elem);
|
||||||
|
|
||||||
|
event.stopPropagation()
|
||||||
}
|
}
|
||||||
|
|
||||||
function requestGet(url, data, handler, errorHandler){
|
function requestGet(url, data, handler, errorHandler){
|
||||||
|
@ -150,7 +150,7 @@ class ExtraNetworksPage:
|
|||||||
metadata_button = ""
|
metadata_button = ""
|
||||||
metadata = item.get("metadata")
|
metadata = item.get("metadata")
|
||||||
if metadata:
|
if metadata:
|
||||||
metadata_button = f"<div class='metadata-button' title='Show metadata' onclick='extraNetworksRequestMetadata({json.dumps(self.name)}, {json.dumps(item['name'])})'></div>"
|
metadata_button = f"<div class='metadata-button' title='Show metadata' onclick='extraNetworksRequestMetadata(event, {json.dumps(self.name)}, {json.dumps(item['name'])})'></div>"
|
||||||
|
|
||||||
args = {
|
args = {
|
||||||
"preview_html": "style='background-image: url(\"" + html.escape(preview) + "\")'" if preview else '',
|
"preview_html": "style='background-image: url(\"" + html.escape(preview) + "\")'" if preview else '',
|
||||||
|
Loading…
Reference in New Issue
Block a user