Fixed an issue where alert message should get displayed on active browser window.

refs #4059
This commit is contained in:
Rahul Shirsat 2020-09-10 12:09:56 +05:30 committed by Akshay Joshi
parent d0310b669e
commit 7fac72cac5

View File

@ -8,6 +8,7 @@
//////////////////////////////////////////////////////////////
import {getTreeNodeHierarchyFromIdentifier} from 'sources/tree/pgadmin_tree_node';
import {showQueryTool} from 'tools/datagrid/static/js/show_query_tool';
define('tools.querytool', [
'sources/gettext', 'sources/url_for', 'jquery', 'jquery.ui',
@ -4317,14 +4318,16 @@ define('tools.querytool', [
_show_query_tool: function() {
var self = this;
setTimeout(() => {
var tree_node = pgWindow.default.pgAdmin.selected_tree_map.get(self.url_params.did || self.url_params.sid);
if(self.preferences.new_browser_tab) {
is_main_window_alive();
}
var tree_node = pgWindow.default.pgAdmin.selected_tree_map.get(self.url_params.did || self.url_params.sid);
if(self.preferences.new_browser_tab) {
is_main_window_alive();
}
this._open_query_tool(tree_node);
},
pgWindow.default.pgAdmin.DataGrid.show_query_tool('', tree_node.i);
}, 200);
_open_query_tool: function(tree_node) {
const transId = pgadminUtils.getRandomInt(1, 9999999);
showQueryTool(pgWindow.default.pgAdmin.DataGrid, pgWindow.default.pgAdmin.Browser, alertify, '', tree_node.i, transId);
},
/*