diff options
author | Alexander_Kabui | 2024-08-21 21:37:47 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-08-29 18:58:56 +0300 |
commit | d8780211bea450da1f9f25c5558ca68314026dc3 (patch) | |
tree | 49cac90550927e5d9efdde5d68913fd6023b7a1d /gn2/wqflask/templates/gn_editor.html | |
parent | a0f9be94930241544a00bf2f214daf9171d6a82f (diff) | |
download | genenetwork2-d8780211bea450da1f9f25c5558ca68314026dc3.tar.gz |
Add diff btn for navbar.
Diffstat (limited to 'gn2/wqflask/templates/gn_editor.html')
-rw-r--r-- | gn2/wqflask/templates/gn_editor.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/gn_editor.html b/gn2/wqflask/templates/gn_editor.html index 2c0d8a36..9e4d4a98 100644 --- a/gn2/wqflask/templates/gn_editor.html +++ b/gn2/wqflask/templates/gn_editor.html @@ -1,6 +1,11 @@ {% extends "base.html" %} {% block title %}Genenetwork Files Editor{% endblock %} {% block css %} + <style> + #diffBtn { + cursor:pointer + } + </style> <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='diff2html/diff2html.min.css') }}" /> @@ -27,6 +32,9 @@ hx-swap="innerHTML">Commit</a> </li> <li> + <a hx-trigger="click" id="diffBtn" hx-swap="innerHTML">Diff</a> + </li> + <li> <a href="#" hx-get="/editor/settings" hx-target="#output" @@ -179,6 +187,17 @@ } }) + + htmx.on("#diffBtn","click",function(event){ + //dispatch your event here + console.log("Clicked diff btn here") + htmx.find("#output").dispatchEvent( + new CustomEvent("diffEvent", { + bubbles: true, + detail: {}, + }), + ); + }) function updatePreview(){ const {markedHighlight} = globalThis.markedHighlight; |