From 3ac2aa8954a05bb66514a75bd600068c102101c5 Mon Sep 17 00:00:00 2001 From: MWicenec Date: Tue, 17 Dec 2024 15:50:23 +0800 Subject: [PATCH 1/4] renamed file and its link --- templates/node_parameter_table.html | 452 ++++++++++++++++++++++++++++ 1 file changed, 452 insertions(+) create mode 100644 templates/node_parameter_table.html diff --git a/templates/node_parameter_table.html b/templates/node_parameter_table.html new file mode 100644 index 00000000..15cfafd7 --- /dev/null +++ b/templates/node_parameter_table.html @@ -0,0 +1,452 @@ + + \ No newline at end of file From 2bf7cb29e91876d453491342dc67ebef408fd686 Mon Sep 17 00:00:00 2001 From: MWicenec Date: Tue, 17 Dec 2024 17:29:51 +0800 Subject: [PATCH 2/4] renamed the bottom window mode enums --- src/Eagle.ts | 4 ++-- src/Field.ts | 2 +- src/KeyboardShortcut.ts | 4 ++-- src/ParameterTable.ts | 16 ++++++++-------- src/RightClick.ts | 12 ++++++------ templates/base.html | 8 ++++---- templates/inspector.html | 2 +- templates/navbar.html | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Eagle.ts b/src/Eagle.ts index 69c45d7a..b673b2f8 100644 --- a/src/Eagle.ts +++ b/src/Eagle.ts @@ -4663,9 +4663,9 @@ export namespace Eagle export enum BottomWindowMode { None = "None", - ParameterTable = "ParameterTable", + NodeParameterTable = "NodeParameterTable", GraphConfigsTable = "GraphConfigsTable", - GraphConfigAttributesTable = "GraphConfigAttributesTable", + ConfigParameterTable = "ConfigParameterTable", GraphErrors = "GraphErrors" } diff --git a/src/Field.ts b/src/Field.ts index 54fd6691..025ae166 100644 --- a/src/Field.ts +++ b/src/Field.ts @@ -501,7 +501,7 @@ export class Field { } //check if the node name matches, but only if using the key parameter table modal - if(Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.GraphConfigAttributesTable){ + if(Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.ConfigParameterTable){ if(Eagle.getInstance().logicalGraph().findNodeById(that.nodeId()).getName().toLowerCase().indexOf(term) >= 0){ result = true } diff --git a/src/KeyboardShortcut.ts b/src/KeyboardShortcut.ts index 52638607..76269ea3 100644 --- a/src/KeyboardShortcut.ts +++ b/src/KeyboardShortcut.ts @@ -276,8 +276,8 @@ export class KeyboardShortcut { new KeyboardShortcut("open_settings", "Open setting", [new Key("o")], "keydown", true, false, ['menu','options'], KeyboardShortcut.true, KeyboardShortcut.true, KeyboardShortcut.true, (eagle): void => {eagle.smartToggleModal('settingsModal');}), new KeyboardShortcut("open_help", "Open Online Documentation", [new Key("h")], "keydown", true, false, ['read me','guide','documentation'], KeyboardShortcut.true, KeyboardShortcut.true, KeyboardShortcut.true, (eagle): void => {eagle.onlineDocs();}), new KeyboardShortcut("open_keyboard_shortcut_modal", "Open Keyboard Shortcut Modal", [new Key("k")], "keydown", true, false, ['shortcuts'], KeyboardShortcut.true, KeyboardShortcut.true, KeyboardShortcut.true, (eagle): void => {eagle.smartToggleModal('shortcutsModal')}), - new KeyboardShortcut("open_parameter_table", "Open Parameter Table Modal", [new Key("t")], "keydown", true, false, ['fields','field','node','table'], KeyboardShortcut.true, KeyboardShortcut.notInStudentMode, KeyboardShortcut.notInStudentMode, (eagle): void => {ParameterTable.toggleTable(Eagle.BottomWindowMode.ParameterTable, ParameterTable.SelectType.Normal);}), - new KeyboardShortcut("open_graph_attributes_configuration_table", "Open Graph Attributes Configuration Table Modal", [new Key("t", KeyboardShortcut.Modifier.Shift)], "keydown", true, false, ['fields','field','node','graph','table','favourites'], KeyboardShortcut.true, KeyboardShortcut.true, KeyboardShortcut.true, (eagle): void => {ParameterTable.toggleTable(Eagle.BottomWindowMode.GraphConfigAttributesTable, ParameterTable.SelectType.Normal);}), + new KeyboardShortcut("open_parameter_table", "Open Parameter Table Modal", [new Key("t")], "keydown", true, false, ['fields','field','node','table'], KeyboardShortcut.true, KeyboardShortcut.notInStudentMode, KeyboardShortcut.notInStudentMode, (eagle): void => {ParameterTable.toggleTable(Eagle.BottomWindowMode.NodeParameterTable, ParameterTable.SelectType.Normal);}), + new KeyboardShortcut("open_graph_attributes_configuration_table", "Open Graph Attributes Configuration Table Modal", [new Key("t", KeyboardShortcut.Modifier.Shift)], "keydown", true, false, ['fields','field','node','graph','table','favourites'], KeyboardShortcut.true, KeyboardShortcut.true, KeyboardShortcut.true, (eagle): void => {ParameterTable.toggleTable(Eagle.BottomWindowMode.ConfigParameterTable, ParameterTable.SelectType.Normal);}), new KeyboardShortcut("undo", "Undo", [new Key("z")], "keydown", true, false, ['back','history'], KeyboardShortcut.true, KeyboardShortcut.true, KeyboardShortcut.true, (eagle): void => {eagle.undo().prevSnapshot(eagle)}), new KeyboardShortcut("redo", "Redo", [new Key("z", KeyboardShortcut.Modifier.Shift)], "keydown", true, false, ['forward','history'], KeyboardShortcut.true, KeyboardShortcut.true, KeyboardShortcut.true, (eagle): void => {eagle.undo().nextSnapshot(eagle)}), new KeyboardShortcut("check_graph", "Check Graph", [new Key("!", KeyboardShortcut.Modifier.Shift)], "keydown", true, false, ['error','errors','fix'], KeyboardShortcut.true, KeyboardShortcut.allowGraphEditing, KeyboardShortcut.allowGraphEditing, (eagle): void => {eagle.showGraphErrors();}), diff --git a/src/ParameterTable.ts b/src/ParameterTable.ts index 9a34075c..bdff50ff 100644 --- a/src/ParameterTable.ts +++ b/src/ParameterTable.ts @@ -62,7 +62,7 @@ export class ParameterTable { return ""; } - if (Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.ParameterTable || Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.GraphConfigAttributesTable){ + if (Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.NodeParameterTable || Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.ConfigParameterTable){ return ParameterTable.selectionParent().getDisplayText() + " - " + ParameterTable.selectionName(); } else { return "Unknown"; @@ -74,7 +74,7 @@ export class ParameterTable { return ""; } - if (Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.ParameterTable || Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.GraphConfigAttributesTable){ + if (Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.NodeParameterTable || Setting.findValue(Setting.BOTTOM_WINDOW_MODE) === Eagle.BottomWindowMode.ConfigParameterTable){ return ParameterTable.selection(); } else { return "Unknown"; @@ -158,10 +158,10 @@ export class ParameterTable { const eagle: Eagle = Eagle.getInstance(); switch (Setting.findValue(Setting.BOTTOM_WINDOW_MODE)){ - case Eagle.BottomWindowMode.ParameterTable: + case Eagle.BottomWindowMode.NodeParameterTable: return eagle.selectedNode()?.getFields(); - case Eagle.BottomWindowMode.GraphConfigAttributesTable: + case Eagle.BottomWindowMode.ConfigParameterTable: const lg: LogicalGraph = eagle.logicalGraph(); const config: GraphConfig = lg.getActiveGraphConfig(); const displayedFields: Field[] = []; @@ -206,7 +206,7 @@ export class ParameterTable { static getNodeLockedState = (field:Field) : boolean => { // this handles a special case where EAGLE is displaying the "Graph Configuration Attributes Table" // all the field names shown in that table should be locked (readonly) - if (Setting.find(Setting.BOTTOM_WINDOW_MODE).value() === Eagle.BottomWindowMode.GraphConfigAttributesTable){ + if (Setting.find(Setting.BOTTOM_WINDOW_MODE).value() === Eagle.BottomWindowMode.ConfigParameterTable){ return true; } @@ -381,7 +381,7 @@ export class ParameterTable { } else { graphConfig = new GraphConfig(); Utils.requestUserString("New Configuration", "Enter a name for the new configuration", Utils.generateGraphConfigName(graphConfig), false, (completed : boolean, userString : string) : void => { - ParameterTable.openTable(Eagle.BottomWindowMode.ParameterTable, ParameterTable.SelectType.Normal); + ParameterTable.openTable(Eagle.BottomWindowMode.NodeParameterTable, ParameterTable.SelectType.Normal); if (!completed){ return; @@ -416,7 +416,7 @@ export class ParameterTable { static requestEditConfig(config: GraphConfig): void { GraphConfigurationsTable.closeModal(); - ParameterTable.openTable(Eagle.BottomWindowMode.GraphConfigAttributesTable, ParameterTable.SelectType.Normal); + ParameterTable.openTable(Eagle.BottomWindowMode.ConfigParameterTable, ParameterTable.SelectType.Normal); } static requestEditDescriptionInModal(field: Field) : void { @@ -569,7 +569,7 @@ export class ParameterTable { eagle.setSelection(node, Eagle.FileType.Graph) - ParameterTable.openTable(Eagle.BottomWindowMode.ParameterTable, ParameterTable.SelectType.Normal); + ParameterTable.openTable(Eagle.BottomWindowMode.NodeParameterTable, ParameterTable.SelectType.Normal); setTimeout(function(){ $('#tableRow_'+field.getId()).addClass('highlighted') diff --git a/src/RightClick.ts b/src/RightClick.ts index 400eb3e4..6c04ed88 100644 --- a/src/RightClick.ts +++ b/src/RightClick.ts @@ -580,7 +580,7 @@ export class RightClick { $('#customContextMenu').append('
Graph Options
') $('#customContextMenu').append(`Show Graph Info`) - $('#customContextMenu').append(`Graph Attributes Table`) + $('#customContextMenu').append(`Graph Attributes Table`) $('#customContextMenu').append(`Copy Graph URL`) }else if(passedObjectClass === 'edgeDropCreate'){ if(Setting.findValue(Setting.ALLOW_GRAPH_EDITING)){ @@ -625,7 +625,7 @@ export class RightClick { if(Setting.findValue(Setting.ALLOW_PALETTE_EDITING)){ $('#customContextMenu').append(RightClick.getNodeDescriptionDropdown()) - $('#customContextMenu').append('Open Fields Table') + $('#customContextMenu').append('Open Fields Table') $('#customContextMenu').append('Delete') $('#customContextMenu').append('Add to another palette') } @@ -633,8 +633,8 @@ export class RightClick { Eagle.selectedRightClickLocation(Eagle.FileType.Graph) $('#customContextMenu').append(RightClick.getNodeDescriptionDropdown()) - $('#customContextMenu').append('Open Fields Table') - $('#customContextMenu').append('Graph Attributes') + $('#customContextMenu').append('Open Fields Table') + $('#customContextMenu').append('Graph Attributes') $('#customContextMenu').append('Delete') if(Setting.findValue(Setting.ALLOW_PALETTE_EDITING)){ $('#customContextMenu').append('Add to palette') @@ -643,8 +643,8 @@ export class RightClick { }else if(passedObjectClass === 'rightClick_graphNode'){ $('#customContextMenu').append(RightClick.getNodeDescriptionDropdown()) - $('#customContextMenu').append('Open Fields Table') - $('#customContextMenu').append('Graph Attributes') + $('#customContextMenu').append('Open Fields Table') + $('#customContextMenu').append('Graph Attributes') $('#customContextMenu').append('Delete') if (data.isConstruct()){ $('#customContextMenu').append('Delete All') diff --git a/templates/base.html b/templates/base.html index d640bc22..e2966a1e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -190,10 +190,10 @@
- -
- + {% include 'parameter_table.html' %} - + {% include 'config_parameter_table.html' %} diff --git a/templates/inspector.html b/templates/inspector.html index 452c82c9..9eb9115b 100644 --- a/templates/inspector.html +++ b/templates/inspector.html @@ -30,7 +30,7 @@
- diff --git a/templates/navbar.html b/templates/navbar.html index abcf5b49..4ecb6fba 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -24,7 +24,7 @@ - - - - - - - - - -
Fields Table:
- - -
- - - - - - - -
- - -
- search - - close - - -
-
-
-
- - -
-
-
- No fields on Node -
- Fields can be added with the 'Add Parameter' button above -
-
-
- - -
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Attribute Name -
-
- Field ID -
-
- Value -
-
- Default Value -
-
- Description -
-
TypeFlagsParameter TypeUse AsEncodingActions
- - - - - - - - - - - - - - - - - - arrow_forward - - - - - - arrow_forward - - - - -
-
- -
-
- arrow_forward - -
-
- -
-
-
- -
-
- -
-
- arrow_forward - -
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - -
- - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
- -
-
- - N/A - - -
- -
- -
- - - - - - - - - - - - - -
-
- - -
-
-
- - Too Many Nodes Selected -
- Select one node to change its parameters - - - No node selected -
- Select a node to change its parameters - -
-
-
-
-
-
\ No newline at end of file