From 9de2ff2052f75421e000486fd085c4e4076f606d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B3=E4=B9=A6=E5=83=AE?= Date: Mon, 27 Mar 2017 07:58:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Didc=5Flist=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=B6=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BD=BDtable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/assets/asset_group_create.html | 4 +- .../templates/assets/asset_group_detail.html | 36 ---- apps/assets/templates/assets/asset_list.html | 202 +++++++++--------- apps/assets/templates/assets/idc_list.html | 55 ++--- 4 files changed, 131 insertions(+), 166 deletions(-) diff --git a/apps/assets/templates/assets/asset_group_create.html b/apps/assets/templates/assets/asset_group_create.html index 49654bb8a..41f0d3e2f 100644 --- a/apps/assets/templates/assets/asset_group_create.html +++ b/apps/assets/templates/assets/asset_group_create.html @@ -51,8 +51,8 @@
-

资产用户

- {{ form.system_users|bootstrap_horizontal }} +{#

资产用户

#} +{# {{ form.system_users|bootstrap_horizontal }}#}
diff --git a/apps/assets/templates/assets/asset_group_detail.html b/apps/assets/templates/assets/asset_group_detail.html index 2dc09ab41..26162f4e0 100644 --- a/apps/assets/templates/assets/asset_group_detail.html +++ b/apps/assets/templates/assets/asset_group_detail.html @@ -101,42 +101,6 @@
-
-
- {% trans 'Associate system user' %} -
-
- - - - - - - - - - - {% for system_user in system_users %} - - - - - {% endfor %} - -
- -
- -
{{ system_user.name }} - -
-
-
- diff --git a/apps/assets/templates/assets/asset_list.html b/apps/assets/templates/assets/asset_list.html index d12462cab..38c6a9c0a 100644 --- a/apps/assets/templates/assets/asset_list.html +++ b/apps/assets/templates/assets/asset_list.html @@ -71,7 +71,7 @@ - +
-
- +
+ +
+ +
+
{% endblock %} {% block content_bottom_left %}{% endblock %} @@ -65,19 +65,20 @@ $(document).ready(function(){ }) .on('click', '.btn_idc_delete', function () { - var $this = $(this); - var $data_table = $('#idc_list_table').DataTable(); - var name = $(this).closest("tr").find(":nth-child(2)").children('a').html(); - var uid = $this.data('uid'); - var the_url = '{% url "api-assets:idc-detail" pk=99991937 %}'.replace('99991937', uid); - objectDelete($this, name, the_url); - $data_table.ajax.reload(); -{# TODO: reload the tale #} + var $this = $(this); + var $data_table = $('#idc_list_table').DataTable(); + var name = $(this).closest("tr").find(":nth-child(2)").children('a').html(); + var uid = $this.data('uid'); + var the_url = '{% url "api-assets:idc-detail" pk=99991937 %}'.replace('99991937', uid); + objectDelete($this, name, the_url); + setTimeout( function () { + $data_table.ajax.reload(); + }, 3000); }) .on('click', '#btn_bulk_update', function () { - var action = $('#slct_bulk_update').val(); - var $data_table = $('#idc_list_table').DataTable(); + var action = $('#slct_bulk_update').val(); + var $data_table = $('#idc_list_table').DataTable(); var id_list = []; var plain_id_list = []; $data_table.rows({selected: true}).every(function(){ @@ -113,13 +114,13 @@ $(document).ready(function(){ jumpserver.checked = false; }); } - switch (action) { - case 'delete': - doDelete(); - break; - default: - break; - } + switch (action) { + case 'delete': + doDelete(); + break; + default: + break; + } }); {% endblock %}