Commit b6169371 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Allow user to copy to clipboard ssh command

parent f545e22a
......@@ -4562,7 +4562,7 @@ table.list-machines .wave {
display: none;
}
.overlay .copy-content .clip-copy {
.overlay .copy-content .clip-copy {
right: 10px;
top:8px;
border: 1px solid #fff;
......
......@@ -37,6 +37,11 @@
this.subinfo = this.info.find(".subinfo");
},
beforeOpen: function() {
this.clip = new snf.util.ClipHelper();
this.connect.parent().append(this.clip.cont);
},
handle_success: function(data) {
this.error.hide();
this.info.show();
......@@ -49,7 +54,13 @@
this.subinfo.html(data.subinfo).show();
if (!data.subinfo) { this.subinfo.hide() };
if (data.ssh) {
this.clip.cont.show();
this.clip.setText(data.link.title);
} else {
this.clip.cont.hide();
}
},
handle_error: function() {
......
......@@ -7,7 +7,7 @@
<div class="description">
<p></p>
</div>
<div class="connect">
<div class="connect copy-content">
<p></p>
</div>
<div class="subinfo description">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment