Remove aciTree and its references.

This commit is contained in:
Akshay Joshi
2022-04-13 17:35:01 +05:30
parent 3a4ff2677e
commit 86a3696ab4
20 changed files with 57 additions and 135 deletions

View File

@@ -97,8 +97,7 @@ class BrowserModule(PgAdminModule):
('static', 'vendor/codemirror/codemirror.css'),
('static', 'vendor/codemirror/addon/dialog/dialog.css'),
('static', context_menu_file),
('static', wcdocker_file),
(BROWSER_STATIC, 'vendor/aciTree/css/aciTree.css')
('static', wcdocker_file)
]:
stylesheets.append(url_for(endpoint, filename=filename))
return stylesheets
@@ -139,49 +138,6 @@ class BrowserModule(PgAdminModule):
'exports': 'jQuery.contextMenu',
'preloaded': True
})
scripts.append({
'name': JQUERY_ACIPLUGIN,
'path': url_for(
BROWSER_STATIC,
filename='vendor/aciTree/jquery.aciPlugin.min'
),
'deps': ['jquery'],
'exports': 'aciPluginClass',
'preloaded': True
})
scripts.append({
'name': 'jquery.acitree',
'path': url_for(
BROWSER_STATIC,
filename='vendor/aciTree/jquery.aciTree' if
current_app.debug else 'vendor/aciTree/jquery.aciTree.min'
),
'deps': ['jquery', JQUERY_ACIPLUGIN],
'exports': 'aciPluginClass.plugins.aciTree',
'preloaded': True
})
scripts.append({
'name': 'jquery.acisortable',
'path': url_for(
BROWSER_STATIC,
filename='vendor/aciTree/jquery.aciSortable.min'
),
'deps': ['jquery', JQUERY_ACIPLUGIN],
'exports': 'aciPluginClass.plugins.aciSortable',
'when': None,
'preloaded': True
})
scripts.append({
'name': 'jquery.acifragment',
'path': url_for(
BROWSER_STATIC,
filename='vendor/aciTree/jquery.aciFragment.min'
),
'deps': ['jquery', JQUERY_ACIPLUGIN],
'exports': 'aciPluginClass.plugins.aciFragment',
'when': None,
'preloaded': True
})
scripts.append({
'name': 'wcdocker',
'path': url_for(

View File

@@ -16,15 +16,13 @@ define('pgadmin.browser', [
'sources/check_node_visibility', './toolbar', 'pgadmin.help',
'sources/csrf', 'sources/utils', 'sources/window', 'pgadmin.authenticate.kerberos',
'sources/tree/tree_init',
'pgadmin.browser.utils', 'wcdocker', 'jquery.contextmenu', 'jquery.aciplugin',
'jquery.acitree',
'pgadmin.browser.utils', 'wcdocker', 'jquery.contextmenu',
'pgadmin.browser.preferences', 'pgadmin.browser.messages',
'pgadmin.browser.menu', 'pgadmin.browser.panel', 'pgadmin.browser.layout',
'pgadmin.browser.runtime', 'pgadmin.browser.error', 'pgadmin.browser.frame',
'pgadmin.browser.node', 'pgadmin.browser.collection', 'pgadmin.browser.activity',
'sources/codemirror/addon/fold/pgadmin-sqlfoldcode', 'pgadmin.browser.dialog',
'pgadmin.browser.keyboard', 'sources/tree/pgadmin_tree_save_state','jquery.acisortable',
'jquery.acifragment',
'pgadmin.browser.keyboard', 'sources/tree/pgadmin_tree_save_state'
], function(
gettext, url_for, require, $, _,
Bootstrap, pgAdmin, Alertify, codemirror,

View File

@@ -368,12 +368,12 @@ _.extend(pgBrowser.keyboardNavigation, {
return isPanelVisible;
},
getTreeDetails: function() {
const aciTree = pgAdmin.Browser.tree;
const selectedTreeNode = aciTree.selected() ? aciTree.selected() : aciTree.first();
const selectedTreeNodeData = selectedTreeNode ? aciTree.itemData(selectedTreeNode) : undefined;
const tree = pgAdmin.Browser.tree;
const selectedTreeNode = tree.selected() ? tree.selected() : tree.first();
const selectedTreeNodeData = selectedTreeNode ? tree.itemData(selectedTreeNode) : undefined;
return {
t: aciTree,
t: tree,
i: selectedTreeNode,
d: selectedTreeNodeData,
};