add chosen

This commit is contained in:
Luke Hatcher 2012-08-31 02:30:40 -04:00
parent 1871be41e9
commit 240eb42df4

View file

@ -11,6 +11,7 @@
{% endblock %} {% endblock %}
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" href="{{ STATIC_URL }}chosen/chosen.css" />
<style> <style>
td { td {
font-size: 9pt; font-size: 9pt;
@ -43,6 +44,9 @@
font-weight: bold; font-weight: bold;
line-height: 10pt; line-height: 10pt;
} }
#id_presentation {
width:400px;
}
</style> </style>
{% endblock %} {% endblock %}
@ -64,7 +68,7 @@
<a class="close" data-dismiss="modal">&times;</a> <a class="close" data-dismiss="modal">&times;</a>
<h3>{% trans "Edit Slot" %}</h3> <h3>{% trans "Edit Slot" %}</h3>
</div> </div>
<div class="modal-body"> <div class="modal-body" style="height:300px">
{% csrf_token %} {% csrf_token %}
{{ form|as_bootstrap }} {{ form|as_bootstrap }}
</div> </div>
@ -77,12 +81,14 @@
{% endblock %} {% endblock %}
{% block extra_script %} {% block extra_script %}
<script src="{{ STATIC_URL }}chosen/chosen.jquery.min.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$("a.edit-slot").click(function() { $("a.edit-slot").click(function() {
$("#slotEditForm").get(0).setAttribute("action", $(this).data("action")); $("#slotEditForm").get(0).setAttribute("action", $(this).data("action"));
$("#slotEditModal").modal("show"); $("#slotEditModal").modal("show");
}); });
$("#id_presentation").chosen();
}); });
</script> </script>
{% endblock %} {% endblock %}