mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed blank screen issue while opening online help in new window. #5503
This commit is contained in:
parent
cc0d467927
commit
adfef8e2bb
@ -248,11 +248,6 @@ function launchPgAdminWindow() {
|
|||||||
docsURLSubStrings.forEach(function (key) {
|
docsURLSubStrings.forEach(function (key) {
|
||||||
if (url.indexOf(key) >= 0) {
|
if (url.indexOf(key) >= 0) {
|
||||||
isDocURL = true;
|
isDocURL = true;
|
||||||
|
|
||||||
if(key.indexOf('help') >= 0) {
|
|
||||||
url = url.slice(url.indexOf('/help'))
|
|
||||||
url = startPageUrl.slice(0, startPageUrl.indexOf('?') -1 ) + url;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -10,6 +10,9 @@ import gettext from 'sources/gettext';
|
|||||||
import pgAdmin from 'sources/pgadmin';
|
import pgAdmin from 'sources/pgadmin';
|
||||||
import { getBrowser } from '../../../static/js/utils';
|
import { getBrowser } from '../../../static/js/utils';
|
||||||
import Menu, { MenuItem } from './new_menu';
|
import Menu, { MenuItem } from './new_menu';
|
||||||
|
import getApiInstance from '../../../static/js/api_instance';
|
||||||
|
import url_for from 'sources/url_for';
|
||||||
|
import Notifier from '../../../static/js/helpers/Notifier';
|
||||||
|
|
||||||
export let MainMenus = [
|
export let MainMenus = [
|
||||||
{ label: gettext('File'), name: 'file', id: 'mnu_file', index: 0, addSepratior: true },
|
{ label: gettext('File'), name: 'file', id: 'mnu_file', index: 0, addSepratior: true },
|
||||||
@ -64,7 +67,14 @@ export class MainMenuItemFactory {
|
|||||||
options.callback(options);
|
options.callback(options);
|
||||||
} else {
|
} else {
|
||||||
if (options.url != '#') {
|
if (options.url != '#') {
|
||||||
window.open(options.url);
|
let api = getApiInstance();
|
||||||
|
api(
|
||||||
|
url_for('tools.initialize')
|
||||||
|
).then(()=>{
|
||||||
|
window.open(options.url);
|
||||||
|
}).catch(()=>{
|
||||||
|
Notifier.error(gettext('Error in opening window'));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}, (menu, item)=> {
|
}}, (menu, item)=> {
|
||||||
|
Loading…
Reference in New Issue
Block a user