1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00

[groups]clean code

This commit is contained in:
llj
2012-10-10 15:54:17 +08:00
parent 8b44047240
commit 0c6c2b1d2a
3 changed files with 4 additions and 12 deletions

View File

@@ -13,15 +13,9 @@
{% block extra_script %} {% block extra_script %}
<script type="text/javascript"> <script type="text/javascript">
$("#group-add").click(function() {
$("#group-add-form").modal({appendTo: "#main"});
return false;
});
{% url 'group_list' as group_add_url %} {% url 'group_list' as group_add_url %}
{% with post_url=group_add_url %} {% with post_url=group_add_url %}
{% include "snippets/group_add_js.html" %} {% include "snippets/group_add_js.html" %}
{% endwith %} {% endwith %}
</script> </script>
{% endblock %} {% endblock %}

View File

@@ -14,15 +14,9 @@
{% block extra_script %} {% block extra_script %}
<script type="text/javascript"> <script type="text/javascript">
$("#group-add").click(function() {
$("#group-add-form").modal({appendTo: "#main"});
return false;
});
{% url 'org_groups' org.url_prefix as group_add_url %} {% url 'org_groups' org.url_prefix as group_add_url %}
{% with post_url=group_add_url %} {% with post_url=group_add_url %}
{% include "snippets/group_add_js.html" %} {% include "snippets/group_add_js.html" %}
{% endwith %} {% endwith %}
</script> </script>
{% endblock %} {% endblock %}

View File

@@ -1,3 +1,7 @@
$("#group-add").click(function() {
$("#group-add-form").modal({appendTo: "#main"});
});
$('#group-add-submit').click(function() { $('#group-add-submit').click(function() {
$.ajax({ $.ajax({
url: '{{ post_url }}', url: '{{ post_url }}',