Merge pull request #536 from maoueh/feature/remove-alert-on-column-copy

Removes (annoying) `alert` on column copy value
This commit is contained in:
Dan Sosedoff 2021-12-08 09:33:27 -06:00 committed by GitHub
commit b1b50045a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,7 +207,7 @@ function resetTable() {
data("mode", ""). data("mode", "").
removeClass("empty"). removeClass("empty").
removeClass("no-crop"); removeClass("no-crop");
$("#results_header").html(""); $("#results_header").html("");
$("#results_body").html(""); $("#results_body").html("");
} }
@ -701,7 +701,7 @@ function showUniqueColumnsValues(table, column, showCounts) {
// Show numeric stats on the field // Show numeric stats on the field
function showFieldNumStats(table, column) { function showFieldNumStats(table, column) {
var query = 'SELECT count(1), min(' + column + '), max(' + column + '), avg(' + column + ') FROM ' + table; var query = 'SELECT count(1), min(' + column + '), max(' + column + '), avg(' + column + ') FROM ' + table;
executeQuery(query, function(data) { executeQuery(query, function(data) {
$("#input").hide(); $("#input").hide();
$("#body").prop("class", "full"); $("#body").prop("class", "full");
@ -950,7 +950,6 @@ function bindTableHeaderMenu() {
switch(menuItem.data("action")) { switch(menuItem.data("action")) {
case "copy_value": case "copy_value":
copyToClipboard($(context).text()); copyToClipboard($(context).text());
alert("Requested cell value has been copied to the clipboard!");
break; break;
case "filter_by_value": case "filter_by_value":
var colIdx = $(context).data("col"); var colIdx = $(context).data("col");
@ -1074,7 +1073,7 @@ function bindContextMenus() {
function toggleDatabaseSearch() { function toggleDatabaseSearch() {
$("#current_database").toggle(); $("#current_database").toggle();
$("#database_search").toggle(); $("#database_search").toggle();
} }
function enableDatabaseSearch(data) { function enableDatabaseSearch(data) {
@ -1082,10 +1081,10 @@ function enableDatabaseSearch(data) {
input.typeahead("destroy"); input.typeahead("destroy");
input.typeahead({ input.typeahead({
source: data, source: data,
minLength: 0, minLength: 0,
items: "all", items: "all",
autoSelect: false, autoSelect: false,
fitToElement: true fitToElement: true
}); });
@ -1283,13 +1282,13 @@ $(document).ready(function() {
enableDatabaseSearch(resp); enableDatabaseSearch(resp);
}); });
}); });
$("#database_search").change(function(e) { $("#database_search").change(function(e) {
var current = $("#database_search").typeahead("getActive"); var current = $("#database_search").typeahead("getActive");
if (current && current == $("#database_search").val()) { if (current && current == $("#database_search").val()) {
apiCall("post", "/switchdb", { db: current }, function(resp) { apiCall("post", "/switchdb", { db: current }, function(resp) {
if (resp.error) { if (resp.error) {
alert(resp.error); alert(resp.error);
return; return;
}; };
window.location.reload(); window.location.reload();