Ignore:
Timestamp:
07/19/08 17:16:25 (16 years ago)
Author:
ramonb
Message:

job_monarch/js/jobgrid.js,
job_monarch/templates/header.tpl:

  • better window positioning and sizing stuff
Location:
trunk/web2/addons/job_monarch
Files:
2 edited

Legend:

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

    r555 r556  
    162162};
    163163
     164function achorJobListing()
     165{
     166  JobListingWindow.anchorTo( "ClusterImageWindow", "tr-br", [ 0, 10 ] );
     167}
     168
     169function setClusterImagePosition()
     170{
     171  ci_x = (window.innerWidth - ClusterImageWindow.getSize()['width'] - 20);
     172  ClusterImageWindow.setPosition( ci_x, 10 );
     173}
     174
    164175function reloadClusterImage()
    165176{
     
    173184  newClusterImage.loadEvent = function( url, image )
    174185    {
    175       resizeClusterImage();
    176186      ClusterImageWindow.getBottomToolbar().clearStatus( { useDefaults:true } );
     187      setTimeout( "resizeClusterImage()", 250 );
     188      setTimeout( "setClusterImagePosition()", 500 );
     189      setTimeout( "achorJobListing()", 1000 );
    177190    }
    178191
     
    181194}
    182195
    183 function getCiWindowWidth()
    184 {
    185   return (document.getElementById( "clusterimage" ).width + ClusterImageWindow.getFrameWidth());
    186 }
    187 function getCiWindowHeight()
    188 {
    189   return (document.getElementById( "clusterimage" ).height + ClusterImageWindow.getFrameHeight());
    190 }
    191 
    192196function resizeClusterImage()
    193197{
    194   var ci_height = getCiWindowHeight();
    195   var ci_width = getCiWindowWidth();
     198  var ci_height = document.getElementById( "clusterimage" ).height + ClusterImageWindow.getFrameHeight();
     199  var ci_width = document.getElementById( "clusterimage" ).width + ClusterImageWindow.getFrameWidth();
    196200
    197201  ClusterImageWindow.setSize( ci_width, ci_height );
     
    201205
    202206  Ext.QuickTips.init();
    203 
    204   function clusterImageResize( window, width, heigth )
    205   {
    206     var ci_height = getCiWindowHeight();
    207     var ci_width = getCiWindowWidth();
    208 
    209     if( ci_height != heigth || ci_width != width )
    210     {
    211       resizeClusterImage();
    212     }
    213   }
    214207
    215208  function jobCellClick(grid, rowIndex, columnIndex, e)
     
    435428      plain: true,
    436429      shadow: true,
    437       //resizable: false,
    438       resizable: true,
     430      resizable: false,
    439431      shadowOffset: 10,
    440432      layout: 'fit',
     
    455447      width: 300,
    456448      height: 500,
    457       y: 15,
     449      x: 10,
     450      y: 10,
    458451      plain: true,
    459452      shadow: true,
     
    504497
    505498  JobListingEditorGrid.addListener( 'cellclick', jobCellClick );
    506   ClusterImageWindow.addListener( 'resize', clusterImageResize );
    507 }
     499}
  • trunk/web2/addons/job_monarch/templates/header.tpl

    r555 r556  
    3333
    3434  JobListingWindow.setTitle( "{cluster} Jobs Overview" );
    35   JobListingWindow.y = (ClusterImageWindow.getSize()['height'] + 150);
    3635  JobListingWindow.show();
    3736  reloadJobStore();
Note: See TracChangeset for help on using the changeset viewer.