org.symbian.tools.wrttools.previewer/preview/script/nokia.js
changeset 274 d236e890687c
parent 273 b1f63c2c240c
child 277 7cca3bcacbc1
equal deleted inserted replaced
273:b1f63c2c240c 274:d236e890687c
   605 
   605 
   606 			NOKIA.menu.createSFKArea();
   606 			NOKIA.menu.createSFKArea();
   607 			
   607 			
   608 			$("#DeviceDisplayLayout").show();
   608 			$("#DeviceDisplayLayout").show();
   609 			$("#PreferencesTab").show();
   609 			$("#PreferencesTab").show();
       
   610 			$("#InspectorTab").show();
   610 			
   611 			
   611 			if(!NOKIA.menu.is_dimmed)
   612 			if(!NOKIA.menu.is_dimmed)
   612 				$("#PreferencesBtn").show();
   613 				$("#PreferencesBtn").show();
       
   614 			if (/chrome/.test( navigator.userAgent.toLowerCase())) {
       
   615 				$("#InspectorBtn").show();
       
   616 			}
   613 		},
   617 		},
   614 		
   618 		
   615 		setWidgetStyle : function()
   619 		setWidgetStyle : function()
   616 		{
   620 		{
   617 			var style = NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode]['style'];
   621 			var style = NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode]['style'];
   658 	NOKIA.namespace('helper.loadScript');
   662 	NOKIA.namespace('helper.loadScript');
   659 	NOKIA.helper = {
   663 	NOKIA.helper = {
   660 		path : document.location.pathname,
   664 		path : document.location.pathname,
   661 		errorDailog	: null,
   665 		errorDailog	: null,
   662 		prefDailog : null,
   666 		prefDailog : null,
       
   667 		inspectorDailog : null,
   663 		intervalId : null,
   668 		intervalId : null,
   664 		infoPlistCounter : false,
   669 		infoPlistCounter : false,
   665 		IconFileCounter  : false,
   670 		IconFileCounter  : false,
   666 		loadScript : function(path)
   671 		loadScript : function(path)
   667 		{
   672 		{
  1051 							//	select index : 0 tab selected
  1056 							//	select index : 0 tab selected
  1052 							$('#tabs').tabs( 'select' , 0);
  1057 							$('#tabs').tabs( 'select' , 0);
  1053 						}
  1058 						}
  1054 					}
  1059 					}
  1055 				});
  1060 				});
       
  1061 			/*
       
  1062 			 * Render Emulator for Interaction
       
  1063 			 */
       
  1064 			NOKIA.helper.inspectorDailog = $("#InspectorTab").dialog({
       
  1065 				width: 370,	minWidth: 300, minHeight: 200, height: 250, autoOpen: false, position : top, title : ' ',
       
  1066 				buttons : {
       
  1067 				"Close" : function(){
       
  1068 				$("#InspectorTab").dialog('close');
       
  1069 				
       
  1070 				//	Hack for Mac firefox
       
  1071 				if(/Mac/i.test(navigator.userAgent))
       
  1072 				{
       
  1073 					$("#WidgetArea iframe").css({overflow:'auto'});
       
  1074 				}
       
  1075 			},			
       
  1076 				"Disconnect Debugger" : function(){
       
  1077 				$.ajax({url : "__sym_command/terminateDebug"});
       
  1078 				$("#InspectorTab").dialog('close');
       
  1079 				
       
  1080 				//	Hack for Mac firefox
       
  1081 				if(/Mac/i.test(navigator.userAgent))
       
  1082 				{
       
  1083 					$("#WidgetArea iframe").css({overflow:'auto'});
       
  1084 				}
       
  1085 			}}
       
  1086 			});
  1056 				
  1087 				
  1057 			$('#PreferencesBtn').click(function(){
  1088 			$('#PreferencesBtn').click(function(){
  1058 				//	Load preferences
  1089 				//	Load preferences
  1059 				NOKIA.helper.loadPreferences();
  1090 				NOKIA.helper.loadPreferences();
  1060 				$('#PreferencesTab').dialog('open');
  1091 				$('#PreferencesTab').dialog('open');
  1061 
  1092 
       
  1093 				//	Hack for Mac firefox
       
  1094 				if(/Mac/i.test(navigator.userAgent))
       
  1095 				{
       
  1096 					$("#WidgetArea iframe").css({overflow:'hidden'});
       
  1097 				}
       
  1098 			});
       
  1099 			$('#InspectorBtn').click(function(){
       
  1100 				$('#InspectorTab').dialog('open');
  1062 				//	Hack for Mac firefox
  1101 				//	Hack for Mac firefox
  1063 				if(/Mac/i.test(navigator.userAgent))
  1102 				if(/Mac/i.test(navigator.userAgent))
  1064 				{
  1103 				{
  1065 					$("#WidgetArea iframe").css({overflow:'hidden'});
  1104 					$("#WidgetArea iframe").css({overflow:'hidden'});
  1066 				}
  1105 				}