org.symbian.tools.wrttools.previewer/preview/script/nokia.js
changeset 274 d236e890687c
parent 273 b1f63c2c240c
child 277 7cca3bcacbc1
--- a/org.symbian.tools.wrttools.previewer/preview/script/nokia.js	Tue Mar 16 18:01:11 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/preview/script/nokia.js	Thu Mar 18 09:51:41 2010 -0700
@@ -607,9 +607,13 @@
 			
 			$("#DeviceDisplayLayout").show();
 			$("#PreferencesTab").show();
+			$("#InspectorTab").show();
 			
 			if(!NOKIA.menu.is_dimmed)
 				$("#PreferencesBtn").show();
+			if (/chrome/.test( navigator.userAgent.toLowerCase())) {
+				$("#InspectorBtn").show();
+			}
 		},
 		
 		setWidgetStyle : function()
@@ -660,6 +664,7 @@
 		path : document.location.pathname,
 		errorDailog	: null,
 		prefDailog : null,
+		inspectorDailog : null,
 		intervalId : null,
 		infoPlistCounter : false,
 		IconFileCounter  : false,
@@ -1053,6 +1058,32 @@
 						}
 					}
 				});
+			/*
+			 * Render Emulator for Interaction
+			 */
+			NOKIA.helper.inspectorDailog = $("#InspectorTab").dialog({
+				width: 370,	minWidth: 300, minHeight: 200, height: 250, autoOpen: false, position : top, title : ' ',
+				buttons : {
+				"Close" : function(){
+				$("#InspectorTab").dialog('close');
+				
+				//	Hack for Mac firefox
+				if(/Mac/i.test(navigator.userAgent))
+				{
+					$("#WidgetArea iframe").css({overflow:'auto'});
+				}
+			},			
+				"Disconnect Debugger" : function(){
+				$.ajax({url : "__sym_command/terminateDebug"});
+				$("#InspectorTab").dialog('close');
+				
+				//	Hack for Mac firefox
+				if(/Mac/i.test(navigator.userAgent))
+				{
+					$("#WidgetArea iframe").css({overflow:'auto'});
+				}
+			}}
+			});
 				
 			$('#PreferencesBtn').click(function(){
 				//	Load preferences
@@ -1065,6 +1096,14 @@
 					$("#WidgetArea iframe").css({overflow:'hidden'});
 				}
 			});
+			$('#InspectorBtn').click(function(){
+				$('#InspectorTab').dialog('open');
+				//	Hack for Mac firefox
+				if(/Mac/i.test(navigator.userAgent))
+				{
+					$("#WidgetArea iframe").css({overflow:'hidden'});
+				}
+			});
 			
 			$('#input_portrait').change(function(){
 				NOKIA.helper.toggle(this);