Ignore:
Timestamp:
01/21/09 23:32:40 (15 years ago)
Author:
ramonb
Message:

web2/.../js/jobgrid.js:

  • cleanup
  • added checkbox selection model
  • added show nodes popup button
File:
1 edited

Legend:

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

    r559 r560  
    4444   
    4545    onPageSizeChanged: function(combo) {
    46         this.pageSize = parseInt(combo.getValue());
    4746        mylimit = parseInt(combo.getValue());
     47        this.pageSize = mylimit;
    4848        this.doLoad(0);
    4949    }
     
    153153  // Can't be sure if there are enough pages for new filter: reset to page 1
    154154  //
    155   //myparams = joinMyArray( myparams, { start: 0, limit: 30 } );
    156   //mylimit = JobListingEditorGrid.bbar.pageSize;
    157155  myparams = joinMyArray( myparams, { start: 0, limit: mylimit } );
    158156
     
    274272
    275273  Ext.QuickTips.init();
    276   Ext.form.Field.prototype.msgTarget = 'side';
    277274
    278275  function jobCellClick(grid, rowIndex, columnIndex, e)
     
    363360      remoteSort: true
    364361    });
    365    
     362   
     363  var CheckJobs = new Ext.grid.CheckboxSelectionModel();
     364
    366365  JobsColumnModel = new Ext.grid.ColumnModel(
    367     [{
     366    [ CheckJobs,
     367    {
    368368        header: '#',
    369369        tooltip: 'Job id',
     
    462462    );
    463463    JobsColumnModel.defaultSortable= true;
     464
     465  var win;
    464466
    465467  JobListingEditorGrid =  new Ext.grid.EditorGridPanel({
     
    472474      selModel: new Ext.grid.RowSelectionModel({singleSelect:false}),
    473475      stripeRows: true,
     476      sm: CheckJobs,
    474477      bbar: new Ext.PagingToolbar({
    475478                pageSize: 15,
     
    484487                                params: {start: 0, limit: mylimit},
    485488                                width: 200
    486                     })
     489                    }),
     490                new Ext.Button({
     491                                text: 'Show nodes',
     492                                tooltip: 'Show nodes for selected jobs',
     493                                iconCls: 'option',
     494                                listeners: {
     495                                        'click': {
     496                                                scope: this,
     497                                                fn: function() {
     498                                                        if(!win){
     499                                                                    win = new Ext.Window({
     500                                                                        width       : 500,
     501                                                                        height      : 300,
     502                                                                        closeAction :'hide',
     503                                                                    });
     504                                                        }
     505                                                        win.show( this );
     506                                                }
     507                                        }
     508                                }
     509                        })
    487510      ]
    488511    });
Note: See TracChangeset for help on using the changeset viewer.