From 393afbe5db517433070b586295dfee440700cef2 Mon Sep 17 00:00:00 2001 From: Czémán Arnold Date: Mon, 29 May 2017 22:31:31 +0200 Subject: [PATCH] Hide command strings, it solves issue #474 --- circle/dashboard/static/dashboard/vm-details.js | 15 ++++++++++----- circle/dashboard/templates/dashboard/vm-detail.html | 12 ++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/circle/dashboard/static/dashboard/vm-details.js b/circle/dashboard/static/dashboard/vm-details.js index bdda51c..754dfb6 100644 --- a/circle/dashboard/static/dashboard/vm-details.js +++ b/circle/dashboard/static/dashboard/vm-details.js @@ -70,12 +70,12 @@ $(function() { }); /* for js fallback */ - $("#vm-details-pw-show").parent("div").children("input").prop("type", "password"); + $(".vm-details-show-password").parent("div").children("input").prop("type", "password"); /* show password */ - $("#vm-details-pw-show").click(function() { + $(".vm-details-show-password").click(function() { var input = $(this).parent("div").children("input"); - var eye = $(this).children("#vm-details-pw-eye"); + var eye = $(this).children(".vm-details-password-eye"); var span = $(this); span.tooltip("destroy"); @@ -253,6 +253,11 @@ $(function() { }); // Clipboard for connection strings - if(Clipboard.isSupported()) - new Clipboard(".vm-details-connection-string-copy"); + if(Clipboard.isSupported()) { + new Clipboard(".vm-details-connection-string-copy", { + text: function(trigger) { + return $($(trigger).data("clipboard-target")).val(); + } + }); + } }); diff --git a/circle/dashboard/templates/dashboard/vm-detail.html b/circle/dashboard/templates/dashboard/vm-detail.html index 891e7df..1651ae8 100644 --- a/circle/dashboard/templates/dashboard/vm-detail.html +++ b/circle/dashboard/templates/dashboard/vm-detail.html @@ -133,9 +133,9 @@
- - +
@@ -160,6 +160,10 @@ + + + - {% empty %}
{% trans "Command" %} - - -
{% endfor %} {% if instance.get_connect_uri %} -- libgit2 0.26.0