Merge pull request #302 from ldinc/issue#301

added simple copy to clipboard from data-id prop
This commit is contained in:
Dan Sosedoff 2017-10-13 22:33:58 -05:00 committed by GitHub
commit 5d110da392
2 changed files with 10 additions and 5 deletions

View File

@ -190,7 +190,7 @@
<div class="connection-ssh-group">
<hr/>
<div class="form-group">
<label class="col-sm-3 control-label">SSH Host</label>
<div class="col-sm-7">
@ -200,7 +200,7 @@
<input type="text" id="ssh_port" class="form-control" placeholder="22" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">SSH User</label>
<div class="col-sm-9">
@ -244,6 +244,8 @@
<li class="divider"></li>
<li><a href="#" data-action="truncate">Truncate Table</a></li>
<li><a href="#" data-action="delete">Delete Table</a></li>
<li class="divider"></li>
<li><a href="#" data-action="copy">Copy Table Name</a></li>
</ul>
</div>
<div id="databases_context_menu">

View File

@ -224,6 +224,9 @@ function performTableAction(table, action, el) {
var win = window.open(url, "_blank");
win.focus();
break;
case "copy":
copyToClipboard(table.split('.')[1]);
break;
}
}
@ -313,7 +316,7 @@ function setCurrentTab(id) {
if (id != "table_content") {
$("#body").removeClass("with-pagination");
}
$("#nav ul li.selected").removeClass("selected");
$("#" + id).addClass("selected");
@ -490,7 +493,7 @@ function showTableStructure() {
}
setCurrentTab("table_structure");
$("#input").hide();
$("#body").prop("class", "full");
@ -1143,7 +1146,7 @@ $(document).ready(function() {
$("#pg_password").val(item.password);
$("#pg_db").val(item.database);
$("#connection_ssl").val(item.ssl);
if (item.ssh && Object.keys(item.ssh).length > 0) {
$("#ssh_host").val(item.ssh.host);
$("#ssh_port").val(item.ssh.port);