2019-01-02 04:24:12 -06:00
|
|
|
/////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
2022-01-04 02:24:25 -06:00
|
|
|
// Copyright (C) 2013 - 2022, The pgAdmin Development Team
|
2019-01-02 04:24:12 -06:00
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
2017-07-18 09:14:59 -05:00
|
|
|
define('app', [
|
2022-04-07 07:06:56 -05:00
|
|
|
'sources/pgadmin', 'bundled_browser',
|
2019-10-10 01:35:28 -05:00
|
|
|
], function(pgAdmin) {
|
2018-01-17 01:54:25 -06:00
|
|
|
var initializeModules = function(Object) {
|
|
|
|
for (var key in Object) {
|
|
|
|
var module = Object[key];
|
2021-09-27 06:14:26 -05:00
|
|
|
|
|
|
|
if (module && module.init && typeof module.init == 'function') {
|
|
|
|
try {
|
|
|
|
module.init();
|
|
|
|
}
|
|
|
|
catch (e) {
|
|
|
|
console.warn(e.stack || e);
|
|
|
|
}
|
2018-01-17 01:54:25 -06:00
|
|
|
}
|
2021-09-27 06:14:26 -05:00
|
|
|
else if (module && module.Init && typeof module.Init == 'function') {
|
|
|
|
try {
|
2022-06-30 00:36:50 -05:00
|
|
|
module.Init();
|
2021-09-27 06:14:26 -05:00
|
|
|
}
|
|
|
|
catch (e) {
|
|
|
|
console.warn(e.stack || e);
|
|
|
|
}
|
2017-07-18 09:14:59 -05:00
|
|
|
}
|
|
|
|
}
|
2018-01-17 01:54:25 -06:00
|
|
|
};
|
2017-07-18 09:14:59 -05:00
|
|
|
|
2019-03-14 10:11:16 -05:00
|
|
|
// Initialize modules registered to pgAdmin, pgAdmin.Browser and Tools object.
|
2018-01-17 01:54:25 -06:00
|
|
|
initializeModules(pgAdmin);
|
|
|
|
initializeModules(pgAdmin.Browser);
|
|
|
|
initializeModules(pgAdmin.Tools);
|
2017-07-18 09:14:59 -05:00
|
|
|
|
2019-03-14 10:11:16 -05:00
|
|
|
// create menus after all modules are initialized.
|
2018-01-17 01:54:25 -06:00
|
|
|
pgAdmin.Browser.create_menus();
|
2017-07-27 06:55:07 -05:00
|
|
|
});
|