Skip to content

Commit

Permalink
Can actually open the graph configurations table modal now
Browse files Browse the repository at this point in the history
  • Loading branch information
james-strauss-uwa committed Aug 14, 2024
1 parent 93196db commit c855b8e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/GraphConfigurationsTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import * as ko from "knockout";

import { Eagle } from './Eagle';
import { Node } from "./Node";
import { Utils } from "./Utils";

export class GraphConfigurationsTable {

static showTableModal : ko.Observable<boolean> = ko.observable(false);

static openModal = () : void => {
console.log("GraphConfigurationsTable.openModal()");

Expand All @@ -14,23 +17,25 @@ export class GraphConfigurationsTable {

setTimeout(function(){
if($('.modal.show').length>0){
if($('.modal.show').attr('id')==='parameterTableModal'){
if($('.modal.show').attr('id')==='graphConfigurationsTableModal'){
// TODO: use closeModal here!
$('#parameterTableModal').modal('hide')
eagle.showTableModal(false)
$('#graphConfigurationsTableModal').modal('hide')
GraphConfigurationsTable.showTableModal(false)
}else{
return
}
}

eagle.showTableModal(true)
Utils.showOpenGraphConfigurationsTableModal();

GraphConfigurationsTable.showTableModal(true)

},5)
}

static closeModal = (): void => {
$('#parameterTableModal').modal('hide')
Eagle.getInstance().showTableModal(false)
$('#graphConfigurationsTableModal').modal('hide')
GraphConfigurationsTable.showTableModal(false)
}

static addEmptyTableRow = () : void => {
Expand Down
4 changes: 4 additions & 0 deletions src/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,10 @@ export class Utils {
$('#parameterTableModal').modal("show");
}

static showOpenGraphConfigurationsTableModal() : void {
$('#graphConfigurationsTableModal').modal("show");
}

static showShortcutsModal() : void {
$('#shortcutsModal').modal("show");
}
Expand Down

0 comments on commit c855b8e

Please sign in to comment.