Update demo

This commit is contained in:
Patrick Altman
2013-01-18 20:36:43 -06:00
parent 8b2d668d06
commit 8e8694f35c
4 changed files with 4 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
{% else %}
<a href="{% url task_mark_done task.pk %}" class="btn ajax" data-method="post" data-refresh="#done-count" data-replace-closest="tr"><i class="icon-ok"></i></a>
{% endif %}
<a href="{% url task_delete task.pk %}" class="btn ajax" data-method="post" data-replace-closest="tr" data-refresh="#done-count"><i class="icon-trash"></i></a>
<a href="{% url task_delete task.pk %}" class="btn ajax" data-method="post" data-replace-inner="#message" data-remove-closest="tr" data-refresh="#done-count"><i class="icon-trash"></i></a>
</div>
</div>
</td>

View File

@@ -26,6 +26,7 @@
</div>
</form>
{% include "_complete_count.html" %}
<div id="message"></div>
<table class="table table-striped" id="tasks">
{% for task in tasks %}
{% include "_task.html" %}

View File

@@ -21,7 +21,7 @@
{% endblock %}
{% block extra_body_base %}
<script type="text/javascript" src="https://raw.github.com/eldarion/bootstrap-ajax/e272efd297da2ed140049e420912960b280a066d/js/bootstrap-ajax.js"></script>
<script src="https://raw.github.com/eldarion/bootstrap-ajax/master/js/bootstrap-ajax.js"></script>
{% analytics %}
{% block extra_body %}{% endblock %}
{% endblock %}

View File

@@ -96,6 +96,6 @@ def delete(request, pk):
)
task.delete()
data = {
"html": ""
"html": "<div class=\"alert alert-info\">Task #{} deleted!</div>".format(pk)
}
return HttpResponse(json.dumps(data), mimetype="application/json")