From ac67c231fccb9ed80d57b3d73ba9dff8b88bcfd1 Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Wed, 16 May 2018 12:31:13 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E5=89=8D=E7=AB=AF?= =?UTF-8?q?rdp=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE=E7=9A=84=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/templates/assets/_system_user.html | 93 +++++++++---------- .../assets/gateway_create_update.html | 39 ++++---- .../templates/assets/system_user_detail.html | 11 +-- .../templates/assets/system_user_update.html | 6 -- 4 files changed, 65 insertions(+), 84 deletions(-) diff --git a/apps/assets/templates/assets/_system_user.html b/apps/assets/templates/assets/_system_user.html index 98d1b6098..314967d22 100644 --- a/apps/assets/templates/assets/_system_user.html +++ b/apps/assets/templates/assets/_system_user.html @@ -79,59 +79,50 @@ {% endblock %} {% block custom_foot_js %} - + {% endblock %} \ No newline at end of file diff --git a/apps/assets/templates/assets/gateway_create_update.html b/apps/assets/templates/assets/gateway_create_update.html index e57d8ed5c..e0b10ba73 100644 --- a/apps/assets/templates/assets/gateway_create_update.html +++ b/apps/assets/templates/assets/gateway_create_update.html @@ -68,27 +68,26 @@ {% endblock %} {% block custom_foot_js %} - +$(document).ready(function(){ + protocolChange(); +}) +.on('change', protocol_id, function(){ + protocolChange(); +}); + {% endblock %} \ No newline at end of file diff --git a/apps/assets/templates/assets/system_user_detail.html b/apps/assets/templates/assets/system_user_detail.html index 96ed7bb93..cc686a62b 100644 --- a/apps/assets/templates/assets/system_user_detail.html +++ b/apps/assets/templates/assets/system_user_detail.html @@ -66,12 +66,12 @@ {% trans 'Protocol' %}: {{ system_user.protocol }} - + {% trans 'Sudo' %}: {{ system_user.sudo }} {% if system_user.shell %} - + {% trans 'Shell' %}: {{ system_user.shell }} @@ -107,7 +107,7 @@
-
+
{% trans 'Quick update' %}
@@ -237,11 +237,8 @@ function updateSystemUserNode(nodes) { jumpserver.nodes_selected = {}; $(document).ready(function () { if($('#id_protocol_type').text() === 'rdp'){ - $('#id_quick_update').addClass('hidden'); - $('#id_sudo').addClass('hidden'); - $('#id_shell').addClass('hidden'); + $('.only-ssh').addClass('hidden') } - $('.select2').select2() .on('select2:select', function(evt) { var data = evt.params.data; diff --git a/apps/assets/templates/assets/system_user_update.html b/apps/assets/templates/assets/system_user_update.html index a8a5c7483..7e1590db5 100644 --- a/apps/assets/templates/assets/system_user_update.html +++ b/apps/assets/templates/assets/system_user_update.html @@ -15,9 +15,3 @@
{% endblock %} -{% block document_ready %} - $(document).ready(function () { - $('.select2').select2(); - protocolChange(); - }); -{% endblock %}