Index: trunk/web2/addons/job_monarch/jobstore.php
===================================================================
--- trunk/web2/addons/job_monarch/jobstore.php	(revision 599)
+++ trunk/web2/addons/job_monarch/jobstore.php	(revision 600)
@@ -480,4 +480,5 @@
 		$nr['jr']	= -$job_window;
 		$nr['js']	= (int) $jobs[$jid]['start_timestamp'];
+		$nr['jid']	= $jid;
 
 		$node_results[]	= $nr;
Index: trunk/web2/addons/job_monarch/js/monarch.js
===================================================================
--- trunk/web2/addons/job_monarch/js/monarch.js	(revision 599)
+++ trunk/web2/addons/job_monarch/js/monarch.js	(revision 600)
@@ -510,14 +510,24 @@
 });
 
-function jobRowSelect( selModel ) 
-{
-	if( selModel.hasSelection() )
+function jobBeforeRowSelect( mySelectionModel, rowIndex, keepExisting, myRecord )
+{
+	if( myRecord.get('status') == 'Q' )
+	{	// return false: dont select row if queued
+		return false;
+	}
+
+	return true;
+}
+
+function jobRowSelect( mySelectionModel, rowIndex, myRecord ) 
+{
+	if( mySelectionModel.hasSelection() )
 	{
 		showGraphsButton.enable();
-	}
-	else
-	{
-		showGraphsButton.disable();
-	}
+
+		return 0;
+	}
+
+	showGraphsButton.disable();
 }
 
@@ -690,5 +700,15 @@
 		listeners:
 		{
-			'selectionchange':
+			'beforerowselect':
+			{
+				scope:	this,
+				fn:	jobBeforeRowSelect
+			},
+			'rowselect':
+			{
+				scope:	this,
+				fn:	jobRowSelect
+			},
+			'rowdeselect':
 			{
 				scope:	this,
@@ -862,5 +882,6 @@
 				{name: 'l', type: 'string', mapping: 'l'},
 				{name: 'jr', type: 'string', mapping: 'jr'},
-				{name: 'js', type: 'string', mapping: 'js'}
+				{name: 'js', type: 'string', mapping: 'js'},
+				{name: 'jid', type: 'string', mapping: 'jid'}
 			]),
 			listeners:
@@ -876,5 +897,4 @@
 						//
 						myStore.proxy.url	= 'jobstore.php?timestamp=' + new Date().getTime();
-						//alert( myStore.proxy.url );
 					}
 				}
@@ -903,9 +923,10 @@
 			store:		store,
 			layout:		'fit',
+			closable:	true,
 			tpl:
 			
 				new Ext.XTemplate(
 					'<tpl for=".">',
-					'<div class="rrd-float"><img src="../../graph.php?z=small&c={c}&h={h}&l={l}&v={v}&x={x}&r=job&jr={jr}&js={js}" border="0"></div>',
+					'<div class="rrd-float"><a href="../../graph.php?z=large&c={c}&h={h}&l={l}&v={v}\&x={x}&r=job&jr={jr}&js={js}" border="0" rel="lightbox[{jid}]"><img src="../../graph.php?z=small&c={c}&h={h}&l={l}&v={v}&x={x}&r=job&jr={jr}&js={js}" border="0"></a></div>',
 					'</tpl>'
 				)
@@ -927,6 +948,5 @@
 			autoHeight:	true,
 			autoWidth:	true,
-			//margins:	'2 2 2 0',
-			//layout:	'fit',
+			autoScroll:	true,
 			resizeTabs:	true,
 			minTabWidth:	60,
@@ -935,17 +955,36 @@
 			enableTabScroll:true,
 			resizeTabs:	true,
-			//defaults:	{autoScroll:true},
-			listeners:
-			{
-				'tabchange':
+			// RB TODO: range combobox; hour, day, week, etc
+
+			tbar:
+			[
+				new Ext.form.ComboBox(
 				{
-					scope:	this,
-					fn:	function( myTabPanel, tab )
+					fieldLabel:	'Metric',
+					store:		MetricsDataStore,
+					valueField:	'name',
+					displayField:	'name',
+					typeAhead:	true,
+					mode:		'remote',
+					triggerAction:	'all',
+					emptyText:	'load_one',
+					selectOnFocus:	true,
+					xtype:		'combo',
+					width:		190,
+					listeners:
+					{
+						select: 
+								
+						function(combo, record, index)
 						{
-							//myTabPanel.items[0].refresh();
-							//this.view.refresh();
+							var metric = record.data.name;
+							// doe iets
+
+							// RB: misschien zo metric opgeven aan datastore?
+							//items[0].items[0].getStore().baseParams.metric = metric;
 						}
-				}
-			}
+					}
+				})
+			]
 		});
 
@@ -966,41 +1005,9 @@
 			animCollapse:	true,
 			maximizable:	true,
-			autoScroll:	true,
-			defaults:	{autoScroll:true},
+			//autoScroll:	true,
+			//defaults:	{autoScroll:true},
 			title:		'Node graph details',
-			//layout:		'fit',
-			tbar:	
+			tbar:		panel,
 		
-			// RB TODO: range combobox; hour, day, week, etc
-	
-			new Ext.form.ComboBox(
-			{
-				fieldLabel:	'Metric',
-				store:		MetricsDataStore,
-				valueField:	'name',
-				displayField:	'name',
-				typeAhead:	true,
-				mode:		'remote',
-				triggerAction:	'all',
-				emptyText:	'load_one',
-				selectOnFocus:	true,
-				xtype:		'combo',
-				width:		190,
-				listeners:
-				{
-					select: 
-							
-					function(combo, record, index)
-					{
-						var metric = record.data.name;
-						// doe iets
-
-						// RB: misschien zo metric opgeven aan datastore?
-						//items[0].items[0].getStore().baseParams.metric = metric;
-					}
-				}
-			}),
-
-			items:	[ panel ],
 			listeners:
 			{
@@ -1009,10 +1016,7 @@
 				function(  myWindow, width, height )
 				{
-					//var myPanel	= myWindow.getComponent( 'tabPanel' ).getEl();
 					var myPanel	= myWindow.items.get( 'tabPanel' );
-
 					var myView	= myPanel.getActiveTab();
 
-					//myView.doLayout();
 					myPanel.doLayout();
 					myWindow.doLayout();
@@ -1058,5 +1062,5 @@
 	for( var w=0; w<=windowCount; w++ )
 	{
-		if( graphWindowBehaviour == 'tabbed-prev-window' )
+		if( ( graphWindowBehaviour == 'tabbed-prev-window' ) && ( previousGraphWindow != null ) && ( previousGraphPanel != null ) )
 		{
 			myWindow	= previousGraphWindow;
@@ -1103,5 +1107,5 @@
 		clicksToEdit:	1,
 		loadMask:	true,
-		selModel:	new Ext.grid.RowSelectionModel({singleSelect:false}),
+		selModel:	new Ext.grid.RowSelectionModel( { singleSelect:	false } ),
 		stripeRows:	true,
 		sm:		CheckJobs,
Index: trunk/web2/addons/job_monarch/templates/header.tpl
===================================================================
--- trunk/web2/addons/job_monarch/templates/header.tpl	(revision 599)
+++ trunk/web2/addons/job_monarch/templates/header.tpl	(revision 600)
@@ -5,6 +5,13 @@
 <META http-equiv="Content-type" content="text/html; charset=utf-8">
 
+<link rel="stylesheet" href="./lib/lightbox/css/lightbox.css" type="text/css" media="screen" />
+
+<script type="text/javascript" src="./lib/lightbox/js/prototype.js"></script>
+<script type="text/javascript" src="./lib/lightbox/js/scriptaculous.js?load=effects,builder"></script>
+<script type="text/javascript" src="./lib/lightbox/js/lightbox.js"></script>
+
 <link rel="stylesheet" type="text/css" href="./lib/extjs/resources/css/ext-all.css" />
 <link rel="stylesheet" type="text/css" href="./css/styles.css" />
+
 <script type="text/javascript" src="./lib/extjs/adapter/ext/ext-base.js"></script>
 <!-- <script type="text/javascript" src="./lib/extjs/adapter/ext/ext-base-debug.js"></script> -->
@@ -47,4 +54,5 @@
 </script>
 
+
 </HEAD>
 <BODY CLASS="background">
