Changeset 566 for trunk/web2/addons/job_monarch/js
- Timestamp:
- 01/23/09 14:36:56 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/js/jobgrid.js
r564 r566 342 342 id: 'JobsDataStore', 343 343 proxy: JobProxy, 344 baseParams: { task: " LISTING" },344 baseParams: { task: "GETJOBS" }, 345 345 reader: new Ext.data.JsonReader({ 346 346 root: 'results', … … 497 497 }); 498 498 499 NodesDataStore = new Ext.data.Store({ 500 id: 'NodesDataStore', 501 proxy: JobProxy, 502 autoLoad: false, 503 baseParams: { task: "GETNODES" }, 504 reader: new Ext.data.JsonReader({ 505 root: 'results', 506 totalProperty: 'total', 507 id: 'id' 508 },[ 509 {name: 'c', type: 'string', mapping: 'c'}, 510 {name: 'h', type: 'string', mapping: 'h'}, 511 {name: 'v', type: 'string', mapping: 'v'}, 512 {name: 'x', type: 'string', mapping: 'x'}, 513 ]), 514 listeners: { 515 'beforeload': { 516 scope: this, 517 fn: function() { 518 var jids; 519 520 var row_records = CheckJobs.getSelections(); 521 522 for(var i=0; i<row_records.length; i++ ) 523 { 524 rsel = row_records[i]; 525 if( !jids ) 526 { 527 jids = rsel.get('jid'); 528 } 529 else 530 { 531 jids = jids + ',' + rsel.get('jid'); 532 } 533 } 534 NodesDataStore.baseParams.jids = jids; 535 NodesDataStore.baseParams.c = myparams.c; 536 } 537 } 538 } 539 }); 540 541 function ShowGraphs( Button, Event ) { 542 543 var GraphView = new Ext.DataView({ 544 itemSelector: 'thumb', 545 style:'overflow:auto', 546 multiSelect: true, 547 store: NodesDataStore, 548 tpl: new Ext.XTemplate( 549 '<tpl for=".">', 550 '<div class="thumb"><img src="../../graph.php?z=small&h={h}&x={x}&v={v}&c={c}" border="0"></div>', 551 '</tpl>' 552 ) 553 }); 554 555 var images = new Ext.Panel({ 556 id:'images', 557 title:'My Images', 558 region:'center', 559 margins: '5 5 5 0', 560 layout:'fit', 561 items: GraphView 562 }); 563 564 if(!win){ 565 win = new Ext.Window({ 566 width : 500, 567 height : 300, 568 closeAction :'hide', 569 items: [ images ] 570 }); 571 } 572 NodesDataStore.load(); 573 win.show(); 574 } 575 499 576 JobListingEditorGrid = new Ext.grid.EditorGridPanel({ 500 577 id: 'JobListingEditorGrid', … … 523 600 'click': { 524 601 scope: this, 525 fn: function() { 526 if(!win){ 527 win = new Ext.Window({ 528 width : 500, 529 height : 300, 530 closeAction :'hide', 531 }); 532 } 533 win.show( this ); 534 alert( CheckJobs.getSelections() ); 535 } 602 fn: ShowGraphs 536 603 } 537 604 }
Note: See TracChangeset
for help on using the changeset viewer.