Skip to content

Commit

Permalink
Can now delete tags from the tag view.
Browse files Browse the repository at this point in the history
  • Loading branch information
lethain committed Jun 10, 2008
1 parent 7c44172 commit 46846c7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion templates/lifeflow/editor/edit_four.html
Expand Up @@ -26,6 +26,12 @@
update_model("{{model}}",{{ object.pk }}, data);
});
});
var delete_tag = function(pk) {
delete_model("tag",pk);
var id = "#tag_" + pk;
$(id).fadeOut('slow');
$("#select_" + pk).fadeOut('slow');
}
</script>

<div class="editing">
Expand All @@ -35,7 +41,7 @@

<div id="selectables" class="selectables">
{% for tag, selected in tags %}
<a class="selectable {% if selected %} selected{% endif %}" id="{{ tag.pk }}"> {{ tag.title }}</a>
<a id="select_{{ tag.pk}}" class="selectable {% if selected %} selected{% endif %}" id="{{ tag.pk }}"> {{ tag.title }}</a>
{% endfor %}
</div>
</li>
Expand All @@ -49,6 +55,15 @@
</table>
</form>
</li>
<li>
<p> Delete unnecessary tags. </p>
{% for tag, selected in tags %}
<a id="tag_{{ tag.pk}}" class="button negative" onclick="delete_tag({{ tag.pk }})"> Delete "{{ tag }}" </a>
{% endfor %}

</li>


</ul>
</div>

Expand Down

0 comments on commit 46846c7

Please sign in to comment.