Changeset 567
- Timestamp:
- 01/26/09 10:22:46 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/js/jobgrid.js
r566 r567 4 4 var JobListingWindow; 5 5 var JobProxy; 6 var SearchField; 6 7 var myfilters = { }; 7 8 var myparams = { }; … … 178 179 } 179 180 181 function makeFilterString() 182 { 183 var filter_str = ''; 184 185 for( arkey in myfilters ) 186 { 187 filter_str = filter_str + ' > ' + myfilters[arkey]; 188 } 189 190 return filter_str; 191 } 192 180 193 var ImageLoader = function( id, url ) 181 194 { … … 236 249 237 250 ClusterImageWindow.getBottomToolbar().showBusy(); 251 252 filter_str = 'Nodes Overview' + makeFilterString(); 253 ClusterImageWindow.setTitle( filter_str ); 254 238 255 newClusterImage.load(); 239 256 } … … 311 328 reloadClusterImage(); 312 329 } 330 filter_str = myparams.c + ' Jobs Overview' + makeFilterString(); 331 JobListingWindow.setTitle( filter_str ); 313 332 } 314 333 } … … 337 356 }); 338 357 339 var SearchField;340 358 341 359 JobsDataStore = new Ext.data.Store({ … … 364 382 sortInfo: { field: 'jid', direction: "DESC" }, 365 383 remoteSort: true, 366 listeners: { 'load': { 384 listeners: 385 { 386 'beforeload': 387 { 388 scope: this, 389 fn: function() 390 { 391 if( SearchField ) 392 { 393 search_value = SearchField.getEl().dom.value; 394 if( search_value == '' ) 395 { 396 delete SearchField.store.baseParams['query']; 397 delete myfilters['query']; 398 delete myparams['query']; 399 } 400 } 401 } 402 }, 403 'load': 404 { 367 405 scope: this, 368 fn: function() { 369 if( SearchField ) { 370 search_value = SearchField.getEl().dom.value; 371 372 if( search_value != '' ) 373 { 374 myfilters['query'] = search_value; 375 } 376 377 reloadClusterImage(); 378 379 if( search_value != '' ) 380 { 381 delete myfilters['query']; 382 } 406 fn: function() 407 { 408 if( SearchField ) 409 { 410 search_value = SearchField.getEl().dom.value; 411 412 if( search_value != '' ) 413 { 414 myfilters['query'] = search_value; 415 } 416 417 reloadClusterImage(); 418 419 filter_str = myparams.c + ' Jobs Overview' + makeFilterString(); 420 JobListingWindow.setTitle( filter_str ); 421 422 if( search_value != '' ) 423 { 424 delete myfilters['query']; 383 425 } 384 426 } 385 427 } 386 428 } 429 } 387 430 }); 388 431 … … 510 553 {name: 'h', type: 'string', mapping: 'h'}, 511 554 {name: 'v', type: 'string', mapping: 'v'}, 512 {name: 'x', type: 'string', mapping: 'x'} ,555 {name: 'x', type: 'string', mapping: 'x'} 513 556 ]), 514 557 listeners: { … … 564 607 if(!win){ 565 608 win = new Ext.Window({ 609 animateTarget: Button, 566 610 width : 500, 567 611 height : 300, … … 571 615 } 572 616 NodesDataStore.load(); 573 win.show( );617 win.show(Button); 574 618 } 575 619
Note: See TracChangeset
for help on using the changeset viewer.