Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Fix Nexus admin interface for Switches with spaces in their keys
Browse files Browse the repository at this point in the history
Fixes the issue reported in disqus#98, thanks @arnaudlimbourg.

Turns out that the rows were being assigned HTML ID's, which are not
allowed to feature spaces, however this is unneccesary since we only use
the `data-` attributes to reference the HTML.
  • Loading branch information
Adam Chainz committed Feb 12, 2016
1 parent b0c1aa1 commit 6a99815
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Pending Release
* Removed all inline javascript.
* Added ``ifnotswitch`` template tag, a merge of disqus/gargoyle#92, thanks
@mrfuxi.
* Fixed Nexus admin interface for Switches with spaces in their keys, an issue
reported in disqus/gargoyle#98, thanks @arnaudlimbourg.

1.1.1 (2016-01-15)
------------------
Expand Down
4 changes: 2 additions & 2 deletions gargoyle/templates/gargoyle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<table class="switches {% if not switches %}empty{% endif %}">
{% for switch in switches %}
<tr id="id_{{ switch.key }}" data-switch-key="{{ switch.key }}" data-switch-name="{{ switch.label }}" data-switch-desc="{{ switch.description }}" data-switch-status="{{ switch.status }}">
<tr data-switch-key="{{ switch.key }}" data-switch-name="{{ switch.label }}" data-switch-desc="{{ switch.description }}" data-switch-status="{{ switch.status }}">
<td class="name">
<h4>{% if switch.label %}{{ switch.label }}{% else %}{{ switch.key|title }}{% endif %} <small class="command">({{ switch.key }})</small></h4>
<h5>
Expand Down Expand Up @@ -157,7 +157,7 @@ <h2>Update a Switch</h2>
</script>

<script type="text/x-jquery-tmpl" id="switchData">
<tr id="id_${key}" data-switch-key="${key}" data-switch-name="${label}" data-switch-desc="${description}">
<tr data-switch-key="${key}" data-switch-name="${label}" data-switch-desc="${description}">
<td class="name">
<h4>${label} <small class="command">(${key})</small></h4>
<div class="inner">
Expand Down

0 comments on commit 6a99815

Please sign in to comment.