Merged in [9855] from lars@netapp.com:
Fix bugs in adding/removing documents to personal ID list.
- Legacy-Id: 9866
Note: SVN reference [9855] has been migrated to Git commit 0293061c3f
This commit is contained in:
parent
615a12485c
commit
e367c9e4ea
|
@ -15,11 +15,11 @@
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
{% if doc.name in doc_is_tracked %}
|
{% if doc.name in doc_is_tracked %}
|
||||||
<a href="{% url "community_remove_track_document" doc.name %}" class="community-list-add-remove-doc" title="Remove from your personal ID list">
|
<a href="{% url "community_remove_track_document" doc.name %}" class="community-list-add-remove-doc" title="Remove from your personal ID list">
|
||||||
<span class="fa fa-bookmark-o"></span>
|
<span class="fa fa-bookmark"></span>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url "community_add_track_document" doc.name %}" class="community-list-add-remove-doc" title="Add to your personal ID list">
|
<a href="{% url "community_add_track_document" doc.name %}" class="community-list-add-remove-doc" title="Add to your personal ID list">
|
||||||
<span class="fa fa-bookmark"></span>
|
<span class="fa fa-bookmark-o"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
<table class="table table-condensed table-striped">
|
<table class="table table-condensed table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th></th>
|
||||||
{% if show_add_to_list and user.is_authenticated %}
|
|
||||||
<span class="fa fa-bookmark"></span>
|
|
||||||
{% endif %}
|
|
||||||
</th>
|
|
||||||
|
|
||||||
{% for h in meta.headers %}
|
{% for h in meta.headers %}
|
||||||
{% if h.title != "Title" %}
|
{% if h.title != "Title" %}
|
||||||
|
|
|
@ -45,12 +45,7 @@
|
||||||
<table class="table table-condensed table-striped ietf">
|
<table class="table table-condensed table-striped ietf">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th></th>
|
||||||
{% if show_add_to_list and user.is_authenticated %}
|
|
||||||
<span class="fa fa-bookmark"></span>
|
|
||||||
{% endif %}
|
|
||||||
</th>
|
|
||||||
|
|
||||||
<th>Document</th>
|
<th>Document</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
|
|
@ -110,10 +110,14 @@ $(document).ready(function () {
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response){
|
success: function(response){
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
trigger.parent().find(".tooltip").remove();
|
trigger.parent().find(".tooltip").remove();
|
||||||
// it would be neater to swap in remove link
|
trigger.find("span.fa").toggleClass("fa-bookmark fa-bookmark-o");
|
||||||
trigger.replaceWith('<span class="fa fa-tag text-danger"></span>');
|
if (trigger.hasClass('btn')) {
|
||||||
|
trigger.attr('disabled', true).blur();
|
||||||
|
} else {
|
||||||
|
trigger.contents().unwrap().blur();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue