File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
scanpipe/templates/scanpipe Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 11{% load humanize %}
2-
32< div class ="mb-4 ">
43 < div class ="has-text-weight-semibold is-flex is-align-items-center is-family-monospace ">
54 {% if path_segments %}
1817 < button class ="copy-to-clipboard ml-2 is-size-6 is-shadowless is-white " aria-label ="Copy path " data-copy ="{{ path }} " data-copy-feedback ="Path copied! ">
1918 < i class ="fa-regular fa-copy "> </ i >
2019 </ button >
21- {% else %}
22- < span id ="resource-path " class ="has-text-weight-medium "> /</ span >
23- < button class ="copy-to-clipboard ml-2 is-size-6 is-shadowless is-white " aria-label ="Copy path " data-copy ="/ " data-copy-feedback ="Path copied! ">
24- < i class ="fa-regular fa-copy "> </ i >
25- </ button >
2620 {% endif %}
2721 </ div >
2822</ div >
Original file line number Diff line number Diff line change 115115
116116{% block scripts %}
117117 < script >
118- document . body . addEventListener ( 'htmx:afterSwap ' , function ( evt ) {
118+ document . body . addEventListener ( 'htmx:afterSettle ' , function ( evt ) {
119119 if ( evt . target && evt . target . id === 'right-pane' ) {
120120 if ( typeof enableCopyToClipboard === 'function' ) {
121121 enableCopyToClipboard ( '.copy-to-clipboard' ) ;
163163 finalNode . classList . add ( 'is-current' ) ;
164164 finalNode . scrollIntoView ( { behavior : "smooth" , block : "center" } ) ;
165165 }
166-
167- const rightPane = document . getElementById ( 'right-pane' ) ;
168- rightPane . setAttribute ( 'hx-get' , `/project/{{ project.slug }}/resource_table/?path=${ encodeURIComponent ( path ) } ` ) ;
169- htmx . trigger ( rightPane , 'htmx:trigger' ) ;
170166 }
171167
172168 document . addEventListener ( "click" , async e => {
182178 } ) ;
183179
184180 document . addEventListener ( "DOMContentLoaded" , function ( ) {
185- expandToPath ( "{{ path }}" ) ;
181+ const currentPath = "{{ path }}" ;
182+ if ( currentPath ) {
183+ expandToPath ( currentPath ) ;
184+ }
186185
187186 const resizer = document . getElementById ( 'resizer' ) ;
188187 const leftPane = document . getElementById ( 'left-pane' ) ;
You can’t perform that action at this time.
0 commit comments