Ignore:
Timestamp:
02/04/09 17:12:35 (15 years ago)
Author:
ramonb
Message:

job_monarch/js/jobgrid.js:

  • enable/disable graphs button if appropriate selection available
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web2/addons/job_monarch/js/jobgrid.js

    r588 r589  
    414414
    415415  Ext.QuickTips.init();
     416
     417  function jobRowSelect( selModel )
     418  {
     419    if( selModel.hasSelection() )
     420    {
     421      showGraphsButton.enable();
     422    }
     423    else
     424    {
     425      showGraphsButton.disable();
     426    }
     427  }
    416428
    417429  function jobCellClick(grid, rowIndex, columnIndex, e)
     
    823835}
    824836
     837  showGraphsButton = new Ext.Button({
     838                                text: 'Show graphs',
     839                                tooltip: 'Show node graphs for selected jobs',
     840                                iconCls: 'option',
     841                                disabled: true,
     842                                listeners: {
     843                                        'click': {
     844                                                scope: this,
     845                                                fn: ShowGraphs
     846                                        }
     847                                }
     848                        });
    825849
    826850  JobListingEditorGrid =  new Ext.grid.EditorGridPanel({
     
    843867            }),
    844868      tbar: [ SearchField,
    845                 new Ext.Button({
    846                                 text: 'Show graphs',
    847                                 tooltip: 'Show node graphs for selected jobs',
    848                                 iconCls: 'option',
    849                                 listeners: {
    850                                         'click': {
    851                                                 scope: this,
    852                                                 fn: ShowGraphs
    853                                         }
    854                                 }
    855                         }),
     869                showGraphsButton,
    856870                filterButton ]
    857871    });
     
    936950
    937951  JobListingEditorGrid.addListener( 'cellclick', jobCellClick );
    938 }
     952  CheckJobs.addListener( 'selectionchange', jobRowSelect );
     953}
Note: See TracChangeset for help on using the changeset viewer.