@@ -338,35 +338,53 @@ $(document).ready(function () {
338338 placeholder : "select me"
339339 } ) ;
340340
341- // Show clue DataTable. Hide node view and component summary table
342- showClueButton . click ( function ( ) {
341+ // Show Table View (aka " clue DataTable"). Hide node view and component summary table.
342+ function showTableView ( ) {
343343 cluesContainer . show ( ) ;
344344 nodeContainer . hide ( ) ;
345345 componentContainer . hide ( ) ;
346346 leftCol . addClass ( 'col-md-2' ) . show ( ) ;
347347 tabBar . removeClass ( 'col-md-11' ) . addClass ( 'col-md-9' ) ;
348348 cluesTable . draw ( ) ;
349- } ) ;
349+ }
350+
351+ // Show clue DataTable. Hide node view and component summary table
352+ showClueButton . click ( showTableView ) ;
353+
354+ // Show clue DataTable. Hide node view and component summary table -- custom menu
355+ ipcRenderer . on ( 'table-view' , showTableView ) ;
350356
351357 // Show node view. Hide clue and component table
352- showNodeViewButton . click ( function ( ) {
358+ function showNodeView ( ) {
353359 nodeContainer . show ( ) ;
354360 cluesContainer . hide ( ) ;
355361 componentContainer . hide ( ) ;
356362 leftCol . addClass ( 'col-md-2' ) . show ( ) ;
357363 tabBar . removeClass ( 'col-md-11' ) . addClass ( 'col-md-9' ) ;
358364 nodeView . redraw ( ) ;
359- } ) ;
365+ }
366+
367+ // Show node view. Hide clue and component table
368+ showNodeViewButton . click ( showNodeView ) ;
369+
370+ // Show node view. Hide clue and component table -- custom menu
371+ ipcRenderer . on ( 'node-view' , showNodeView ) ;
360372
361373 // Show component summary table. Hide DataTable and node view
362- showComponentButton . click ( function ( ) {
374+ function showComponentSummaryView ( ) {
363375 componentContainer . show ( ) ;
364376 nodeContainer . hide ( ) ;
365377 cluesContainer . hide ( ) ;
366378 leftCol . removeClass ( 'col-md-2' ) . hide ( ) ;
367379 tabBar . removeClass ( 'col-md-9' ) . addClass ( 'col-md-11' ) ;
368380 componentsTable . reload ( ) ;
369- } ) ;
381+ }
382+
383+ // Show component summary table. Hide DataTable and node view
384+ showComponentButton . click ( showComponentSummaryView ) ;
385+
386+ // Show component summary table. Hide DataTable and node view -- custom menu
387+ ipcRenderer . on ( 'component-summary-view' , showComponentSummaryView ) ;
370388
371389 // Creates the database and all View objects from a SQLite file
372390 function loadDatabaseFromFile ( fileName ) {
0 commit comments