Convert $.setVisible to $.toggle.

Review Request #12975 — Created April 21, 2023 and submitted — Latest diff uploaded

Information

Djblets
release-4.x

Reviewers

When we first wrote Djblets's JS codebase, jQuery forced you to either
use .show() or .hide(), and didn't have a way to easily show based
on a bool, so we wrote our own. Way back in jQuery 1.3, they added this,
but we never noticed. This change updates our codebase to use
$.toggle() instead.

Ran js-tests.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Convert $.setVisible to $.toggle.
When we first wrote Djblets's JS codebase, jQuery forced you to either use `.show()` or `.hide()`, and didn't have a way to easily show based on a bool, so we wrote our own. Way back in jQuery 1.3, they added this, but we never noticed. This change updates our codebase to use `$.toggle()` instead. Testing Done: Ran js-tests.
46d0004b42b652122452d2dbb418d17876dbc437 David Trowbridge
Convert $.setVisible to $.toggle.
When we first wrote Djblets's JS codebase, jQuery forced you to either use `.show()` or `.hide()`, and didn't have a way to easily show based on a bool, so we wrote our own. Way back in jQuery 1.3, they added this, but we never noticed. This change updates our codebase to use `$.toggle()` instead. Testing Done: Ran js-tests.
4989bf44083a42e4b525547745c52e6d99d0d8b8 David Trowbridge
djblets/static/djblets/js/jquery.gravy.util.js
Loading...