Skip to content

Commit 0293061

Browse files
committed
Fix bugs in adding/removing documents to personal ID list.
Commit ready for merge. - Legacy-Id: 9855
1 parent 491e6a6 commit 0293061

4 files changed

Lines changed: 11 additions & 16 deletions

File tree

ietf/templates/doc/search/search_result_row.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
{% if user.is_authenticated %}
1616
{% if doc.name in doc_is_tracked %}
1717
<a href="{% url "community_remove_track_document" doc.name %}" class="community-list-add-remove-doc" title="Remove from your personal ID list">
18-
<span class="fa fa-bookmark-o"></span>
18+
<span class="fa fa-bookmark"></span>
1919
</a>
2020
{% else %}
2121
<a href="{% url "community_add_track_document" doc.name %}" class="community-list-add-remove-doc" title="Add to your personal ID list">
22-
<span class="fa fa-bookmark"></span>
22+
<span class="fa fa-bookmark-o"></span>
2323
</a>
2424
{% endif %}
2525
{% endif %}

ietf/templates/doc/search/search_results.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@
1616
<table class="table table-condensed table-striped">
1717
<thead>
1818
<tr>
19-
<th>
20-
{% if show_add_to_list and user.is_authenticated %}
21-
<span class="fa fa-bookmark"></span>
22-
{% endif %}
23-
</th>
19+
<th></th>
2420

2521
{% for h in meta.headers %}
2622
{% if h.title != "Title" %}

ietf/templates/iesg/agenda_documents.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ <h2>IESG telechat {{t.date}}</h2>
4545
<table class="table table-condensed table-striped ietf">
4646
<thead>
4747
<tr>
48-
<th>
49-
{% if show_add_to_list and user.is_authenticated %}
50-
<span class="fa fa-bookmark"></span>
51-
{% endif %}
52-
</th>
53-
48+
<th></th>
5449
<th>Document</th>
5550
<th>Date</th>
5651
<th>Status</th>

static/js/ietf.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ $(document).ready(function () {
110110
dataType: 'json',
111111
success: function(response){
112112
if (response.success) {
113-
trigger.parent().find(".tooltip").remove();
114-
// it would be neater to swap in remove link
115-
trigger.replaceWith('<span class="fa fa-tag text-danger"></span>');
113+
trigger.parent().find(".tooltip").remove();
114+
trigger.find("span.fa").toggleClass("fa-bookmark fa-bookmark-o");
115+
if (trigger.hasClass('btn')) {
116+
trigger.attr('disabled', true).blur();
117+
} else {
118+
trigger.contents().unwrap().blur();
116119
}
120+
}
117121
}
118122
});
119123
});

0 commit comments

Comments
 (0)