jquery DOM manipulation; ajax http requests#77
Conversation
Co-authored-by: Meru Gopalan <merugopalan2007@gmail.com>
Co-authored-by: Meru Gopalan <merugopalan2007@gmail.com>
|
|
Implemented on this branch but depends on this PR |
nschneid
left a comment
There was a problem hiding this comment.
In general I'll defer to you on the translation to jQuery.
static/script.js
Outdated
| } else { | ||
| el.style.display = 'none'; | ||
| link.innerHTML = 'show' + link.innerHTML.substring(4); | ||
| link.html('show' + link.html().substring(4)); |
There was a problem hiding this comment.
Are lines 23 and 26 meant to set the text of the link? If so, I would probably set .text() instead of .html(). I don't know where in the UI these "show" and "hide" links occur though.
There was a problem hiding this comment.
Thanks for pointing this out -- this actually reveals a larger issue, which is that togglelink, toggletextbox are never called from within an Activedop html template, or from within a relevant Python module. These functions are also defined within the disco-dop submodule (in a file also called static.js) and in some of disco-dop's own internal web UI functionality that we never use. They seem safe to delete from my own testing -- I imagine that the disco-dop static.js was the basis of Activedop's and that some superfluous code was copied over unintentionally.
Reflects (in part) changes from bwaldon#4
I have in mind a couple simple UI changes that will make the tool much more usable:
Both of those changes will be facilitated by standardizing/modernizing how we manipulate the DOM and handle HTTP requests