-
Notifications
You must be signed in to change notification settings - Fork 25
Update popover() method to prevent its untimely dismissal #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
5b08114
54b0abf
089b9b5
4d12490
913c681
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -256,7 +256,7 @@ function interactive_edam_browser(){ | |
| data_content = "title=\"Some associated elements\"" | ||
| data_content += "data-toggle=\"popover\"" | ||
| data_content += "data-placement=\"auto right\"" | ||
| data_content += "data-trigger=\"hover\"" | ||
| data_content += "data-trigger=\"hover focus\"" | ||
| data_content += "data-html=\"true\"" | ||
| data_content += "data-content=\"<table class=' table table-condensed'>"; | ||
| var i=0; | ||
|
|
@@ -433,7 +433,7 @@ function interactive_edam_browser(){ | |
| }); | ||
| } | ||
| } | ||
| $('#details-'+identifier+' .'+id_b+' [data-toggle="popover"]').popover(); | ||
| $('#details-'+identifier+' .'+id_b+' [data-toggle="popover"]').popover({container: '#details-'+identifier+' .'+id_b+' [data-toggle="popover"]'}); | ||
| }); | ||
| } | ||
| var caller_s=biosphere_api().get_for(current_branch, __my_interactive_tree.textAccessor()(d), uri, d); | ||
|
|
@@ -446,7 +446,7 @@ function interactive_edam_browser(){ | |
| to_biosphere_href(c[0],caller_s.get_url(),data[0]) + ' by appliances, ' + | ||
| to_biosphere_href(c[1],caller_s.get_url(),data[1]) + ' by tools.' + | ||
| '</span>').appendTo(elt); | ||
| $('#details-'+identifier+' .'+id_s+' [data-toggle="popover"]').popover(); | ||
| $('#details-'+identifier+' .'+id_s+' [data-toggle="popover"]').popover({container: '#details-'+identifier+' .'+id_s+' [data-toggle="popover"]'}); | ||
|
||
| }); | ||
| } | ||
| var caller_w=bioweb_api().get_for(current_branch, __my_interactive_tree.textAccessor()(d), uri, d); | ||
|
|
@@ -456,7 +456,7 @@ function interactive_edam_browser(){ | |
| var elt=$('#details-'+identifier+' .'+id_w); | ||
| elt.empty(); | ||
| $(to_bioweb_href(c,caller_w.get_url(),data)).appendTo(elt); | ||
| $('#details-'+identifier+' .'+id_w+' [data-toggle="popover"]').popover(); | ||
| $('#details-'+identifier+' .'+id_w+' [data-toggle="popover"]').popover({container: '#details-'+identifier+' .'+id_w+' [data-toggle="popover"]'}); | ||
| }); | ||
| } | ||
| var caller_t=tess_api().get_for(current_branch, __my_interactive_tree.textAccessor()(d), uri, d); | ||
|
|
@@ -466,7 +466,7 @@ function interactive_edam_browser(){ | |
| var elt=$('#details-'+identifier+' .'+id_t); | ||
| elt.empty(); | ||
| $(to_tess_href(c,caller_t.get_url(),data)).appendTo(elt); | ||
| $('#details-'+identifier+' .'+id_t+' [data-toggle="popover"]').popover(); | ||
| $('#details-'+identifier+' .'+id_t+' [data-toggle="popover"]').popover({container: '#details-'+identifier+' .'+id_t+' [data-toggle="popover"]'}); | ||
| }); | ||
| } | ||
| if(uri.startsWith("http://edamontology.org/")){ | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work better !
I think we should wrap this "patch" in a function call, indeed it is error prone to have to copy past the selector. We wrapping we would then do
which would call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, doing so would actually reduce the repetitive selector part in code, and will make it cleaner. This would definitely be better than the existing change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I somehow missed on making this change for quite long, but better later than never. Thanks for keeping this pull request in the last state, I have added build_popover function with its selector just as suggested.