Merge pull request #457 from sosedoff/query-results-context-menu

Show results row context menu on custom query results
This commit is contained in:
Dan Sosedoff 2020-03-15 20:22:09 -05:00 committed by GitHub
commit 136206fcff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -934,10 +934,11 @@ function bindTableHeaderMenu() {
scopes: "td",
target: "#results_row_menu",
before: function(e, element, target) {
var isEmpty = $("#results").hasClass("empty");
var isBrowsing = $("#results").data("mode") == "browse";
var browseMode = $("#results").data("mode");
var isEmpty = $("#results").hasClass("empty");
var isAllowed = browseMode == "browse" || browseMode == "query";
if (isEmpty || !isBrowsing) {
if (isEmpty || !isAllowed) {
e.preventDefault();
this.closemenu();
return false;
@ -949,6 +950,7 @@ function bindTableHeaderMenu() {
switch(menuItem.data("action")) {
case "copy_value":
copyToClipboard($(context).text());
alert("Requested cell value has been copied to the clipboard!");
break;
case "filter_by_value":
var colIdx = $(context).data("col");