mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 10:23:02 +03:00
Remove double click action on cell
This feature was a source of confusion for new pgweb users for quite some time now. Most people thought by double-clicking the cell it would allow them to edit the value since the column is replaced with textarea. The textarea was there to copy the cell's value, not for editing. Feature is no longer required due to availability of a cell context menu, which provides a link to copy the value.
This commit is contained in:
parent
dc390b552d
commit
6025b7afb2
File diff suppressed because one or more lines are too long
@ -538,12 +538,6 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: pre;
|
||||
|
||||
/*
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
*/
|
||||
}
|
||||
|
||||
#results td div span.null {
|
||||
|
@ -1189,26 +1189,6 @@ $(document).ready(function() {
|
||||
showTableContent(sortColumn, sortOrder);
|
||||
});
|
||||
|
||||
$("#results").on("dblclick", "td > div", function() {
|
||||
if ($(this).has("textarea").length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var value = unescapeHtml($(this).html());
|
||||
if (!value) { return; }
|
||||
|
||||
var textarea = $("<textarea />").
|
||||
text(value).
|
||||
addClass("form-control").
|
||||
css("width", $(this).css("width"));
|
||||
|
||||
if (value.split("\n").length >= 3) {
|
||||
textarea.css("height", "200px");
|
||||
}
|
||||
|
||||
$(this).html(textarea).css("max-height", "200px");
|
||||
});
|
||||
|
||||
$("#refresh_tables").on("click", function() {
|
||||
loadSchemas();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user