disqus / gargoyle

Feature switches in Django
http://engineering.disqus.com
Apache License 2.0
746 stars 112 forks source link

UI is broken for switches having dots in their name, adding a new condition fails #72

Open Raekkeri opened 11 years ago

Raekkeri commented 11 years ago

Functionality (that depends on jQuery) to control Switches seems to be broken for any switch that have "dot" character in its name (e.g. "blog.comments.globally_disabled"). Can anyone reproduce? The bug seem to have appeared after commit d9d82770e1614d4ebd15ac6972fa6b85ec7ad7ee. Anyone seeing a solution that would be backwards compatible for anyone actually using the element ids?

Raekkeri commented 11 years ago

Updating jQuery (in Nexus) to a newer version probably fixes the issue, see http://bugs.jquery.com/ticket/7533 (Nexus uses jQuery 1.4.4)

Raekkeri commented 11 years ago

So, plan to fix this would be to

  1. update gargoyle.js file so that its syntax is correct for jQuery version 1.6.4 (see pull request https://github.com/disqus/gargoyle/pull/73). This should be backwards compatible with jQuery 1.4.4.
  2. then update jQuery version in Nexus to 1.6.4 (newer jQuery version doesn't work as its API has changed too much) (this change is currently only in my forked repo: https://github.com/Raekkeri/nexus/commit/eeb3ac0870bc79473f37d7ecb2290c3da6dc6097)