mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 03:36:33 +03:00
Do not show row context menu if results are empty
This commit is contained in:
parent
6ed3d5b501
commit
29d4b276e2
File diff suppressed because one or more lines are too long
@ -874,8 +874,10 @@ function bindTableHeaderMenu() {
|
||||
scopes: "td",
|
||||
target: "#results_row_menu",
|
||||
before: function(e, element, target) {
|
||||
// Enable menu for browsing table rows view only.
|
||||
if ($("#results").data("mode") != "browse") {
|
||||
var isEmpty = $("#results").hasClass("empty");
|
||||
var isBrowsing = $("#results").data("mode") == "browse";
|
||||
|
||||
if (isEmpty || !isBrowsing) {
|
||||
e.preventDefault();
|
||||
this.closemenu();
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user