2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-07 04:12:11 +00:00

Added AjaxUpdateView class

Also cleaned up the modal form javascript
This commit is contained in:
Oliver
2018-04-26 08:18:53 +10:00
parent 99743c6bd0
commit 55e7f365df
4 changed files with 68 additions and 29 deletions

View File

@@ -19,7 +19,9 @@
<td><a href="{% url 'part-detail' sub_part.id %}">{{ sub_part.name }}</a></td>
<td>{{ sub_part.description }}</td>
<td>{{ bom_item.quantity }}</span></td>
<td><a href="{% url 'bom-item-detail' bom_item.id %}">Edit</a></td>
<td>
<button type='button' class='btn btn-success'>Edit</button>
</td>
</tr>
{% endwith %}
{% endfor %}
@@ -31,4 +33,10 @@
</a>
</div>
{% endblock %}
{% block javascript %}
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
{% endblock %}

View File

@@ -37,7 +37,11 @@
<script type="text/javascript">
$(document).ready(function () {
bindModalForm('#modal-cat', '.js-create-cat', "{% url 'category-create' %}");
$(".js-create-cat").click(function() {
launchModalForm("#modal-cat", "{% url 'category-create' %}");
});
//bindModalForm('#modal-cat', '.js-create-cat', "{% url 'category-create' %}");
});
</script>