Query Tool - Cell Double Click Fix
Yosry Muhammad <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.pgadmin.devel |
|---|---|
| Message-ID | <CAFSMqn_gFvTrQijpSxxbBN4VE2twyjJ1M_W=VH5jSUTOOV-hgQ@mail.gmail.com> |
Hi hackers, Please find attached a fix of a bug where users could not double click to expand the contents of a cell if the resultset was not editable. Please review. Thanks. -- *Yosry Muhammad Yosry* Computer Engineering student, The Faculty of Engineering, Cairo University (2021). Class representative of CMP 2021. https://www.linkedin.com/in/yosrym93/
query_tool_double_click_fix.patch
(text/x-patch, 1.7 KB)
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index 4e1302d7b..0121348e9 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -713,7 +713,7 @@ define('tools.querytool', [
*/
// This function is responsible to create and render the SlickGrid.
- render_grid: function(collection, columns, is_editable, client_primary_key, rows_affected, is_explain_plan) {
+ render_grid: function(collection, columns, is_editable, client_primary_key, rows_affected) {
var self = this;
self.handler.numberOfModifiedCells = 0;
@@ -833,7 +833,7 @@ define('tools.querytool', [
}
var grid_options = {
- editable: is_editable || is_explain_plan,
+ editable: true,
enableAddRow: is_editable,
enableCellNavigation: true,
enableColumnReorder: false,
@@ -2481,7 +2481,6 @@ define('tools.querytool', [
&& data.types[0] && data.types[0].typname === 'json') {
/* json is sent as text, parse it */
explain_data_json = JSON.parse(data.result[0][0]);
- self.is_explain_plan = true;
}
if (explain_data_json && explain_data_json[0] &&
@@ -2497,7 +2496,7 @@ define('tools.querytool', [
function() {
self.gridView.render_grid(
explain_data_array, self.columns, self.can_edit,
- self.client_primary_key, 0, self.is_explain_plan
+ self.client_primary_key, 0
);
// Make sure - the 'Explain' panel is visible, before - we
// start rendering the grid.