Skip to content

Commit

Permalink
Revert "bug: fix displaying JSON in grant detail"
Browse files Browse the repository at this point in the history
This reverts commit 18e67bf.
  • Loading branch information
owocki committed Jan 10, 2020
1 parent e0207cc commit ede8c8b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/grants/templates/grants/detail/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<script src="{% static "v2/js/lib/ipfs-api.js" %}"></script>
<script src="{% static "v2/js/ipfs.js" %}"></script>
<script>
$('[data-toggle="tooltip"]').bootstrapTooltip();
$('[data-toggle="tooltip"]').bootstrapTooltip();
</script>
<script src="{% static "v2/js/user-search.js" %}"></script>
<script src="{% static "v2/js/grants/shared.js" %}"></script>
Expand Down
40 changes: 21 additions & 19 deletions app/grants/templates/grants/detail/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,26 @@ <h4 class="m-auto text-center font-weight-semibold">{% trans "No Activity for th
</div>

<script>
if (document.getElementById("editor")) {
let grant_description;

grant_description = new Quill('#editor', {
theme: 'bubble',
readOnly: true,
});

{% if is_team_member and not grant_is_inactive %}
grant_description = new Quill('#editor', {
theme: 'snow',
});
grant_description.enable(false);
{% endif %}
{% with description_tab_url=grant.url|addstr:'?tab=description' %}
let grant_description;

{% if request.get_full_path == description_tab_url or request.get_full_path == grant.url %}
grant_description = new Quill('#editor', {
theme: 'bubble',
readOnly: true,
});

{% if is_team_member and not grant_is_inactive %}
grant_description = new Quill('#editor', {
theme: 'snow',
});
grant_description.enable(false);
{% endif %}

let desc = JSON.parse(grant_description.getContents().ops[0].insert);
if (desc.ops) {
grant_description.setContents(desc);
}
}
let desc = JSON.parse(grant_description.getContents().ops[0].insert);
if (desc.ops) {
grant_description.setContents(desc);
}
{% endif %}
{% endwith %}
</script>

0 comments on commit ede8c8b

Please sign in to comment.