Skip to content

Commit

Permalink
adjusted the duplicate config function
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Wicenec committed Oct 31, 2024
1 parent d59b2dc commit d265a5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/LogicalGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ export class LogicalGraph {

Utils.showNotification("Duplicated Config", "as '" + clone.getName() + "' and set to active config", "success");

GraphConfigurationsTable.closeModal();
ParameterTable.openModal(ParameterTable.Mode.GraphConfig, ParameterTable.SelectType.Normal);
//focus on and select the name field of the newly duplicated config, ready to rename. this requires a little wait, to allow the ui to update
setTimeout(() => {
$('#graphConfigurationsTableWrapper .activeConfig .column-name input').focus().select()
}, 100);
}

removeGraphConfig = (config: GraphConfig): void => {
Expand Down
2 changes: 1 addition & 1 deletion templates/graph_configurations_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h5 class="bottomWindowHeader">
</thead>
<tbody>
<!-- ko foreach: logicalGraph().graphConfigs() -->
<tr data-bind="attr: {'id' : 'tableRow_'+$data.getName()}">
<tr data-bind="attr: {'id' : 'tableRow_'+$data.getName()}, css: {activeConfig: $data.id() === $root.logicalGraph().activeGraphConfigId()}">
<td class='columnCell column-sort'>
<!-- kept for now as we will need the space for the row drag handle -->
</td>
Expand Down
3 changes: 0 additions & 3 deletions templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,6 @@
<a class="dropdown-item" id="createNewConfig" href="#" data-bind="click: newConfig">New
<span data-bind="text: KeyboardShortcut.idToText('new_config', true)"></span>
</a>
<a class="dropdown-item" id="saveConfig" href="#" data-bind="click: saveConfig">Save
<span data-bind="text: KeyboardShortcut.idToText('save_config', true)"></span>
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" id="displayAllConfigs" href="#" data-bind="click: GraphConfigurationsTable.openModal">Display All
<span data-bind="text: KeyboardShortcut.idToText('open_graph_configurations_table', true)"></span>
Expand Down

0 comments on commit d265a5b

Please sign in to comment.