org.symbian.tools.wrttools.previewer/preview/script/nokia.js
changeset 338 41174f0a7f7c
parent 337 afe6a53c0ed4
child 364 84c00c972166
equal deleted inserted replaced
337:afe6a53c0ed4 338:41174f0a7f7c
   554 		},
   554 		},
   555 	
   555 	
   556 		render : function()
   556 		render : function()
   557 		{
   557 		{
   558 			this.load();
   558 			this.load();
   559 			
   559 			//	Selecting Resoltion
       
   560 			var resOptions = $("#resOptions")[0];
       
   561 			for(var i=0; i<NOKIA.resolution.length; i++)
       
   562 			{
       
   563 				if(NOKIA.resolution[i] == NOKIA.currentDevice)
       
   564 				{
       
   565 					resOptions.options[i].selected = true;
       
   566 					break;
       
   567 				}				
       
   568 			}
       
   569 
   560 			if(!NOKIA.emulator.orientationSupports())
   570 			if(!NOKIA.emulator.orientationSupports())
   561 				NOKIA.mode = NOKIA.deviceList[NOKIA.currentDevice]['default'];
   571 				NOKIA.mode = NOKIA.deviceList[NOKIA.currentDevice]['default'];
   562 			
   572 			
   563 			if(typeof NOKIA.deviceList == 'undefined' || typeof NOKIA.deviceList[NOKIA.currentDevice] == 'undefined' || typeof NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode] == 'undefined')
   573 			if(typeof NOKIA.deviceList == 'undefined' || typeof NOKIA.deviceList[NOKIA.currentDevice] == 'undefined' || typeof NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode] == 'undefined')
   564 			{
   574 			{
   567 			}
   577 			}
   568 			
   578 			
   569 			this.setStyle();
   579 			this.setStyle();
   570 			var or = (NOKIA.mode == 'portrait') ? NOKIA.orientation : (NOKIA.orientation + 90);
   580 			var or = (NOKIA.mode == 'portrait') ? NOKIA.orientation : (NOKIA.orientation + 90);
   571 			var val = "rotate(" + or + "deg)";
   581 			var val = "rotate(" + or + "deg)";
   572 			$("#preview-ui-top").css("-moz-transform", val);
   582 			$("#DeviceDisplayLayout").css("-moz-transform", val);
   573 			$("#preview-ui-top").css("-webkit-transform", val);
   583 			$("#DeviceDisplayLayout").css("-webkit-transform", val);
   574 		},
   584 		},
   575 		
   585 		
   576 		setMode : function(mode)
   586 		setMode : function(mode)
   577 		{
   587 		{
   578 			NOKIA.mode = mode;
   588 			NOKIA.mode = mode;
  1139 			$("#MenuItemsArea").mouseout(function(){
  1149 			$("#MenuItemsArea").mouseout(function(){
  1140 				if(NOKIA.helper.intervalId)
  1150 				if(NOKIA.helper.intervalId)
  1141 					clearInterval(NOKIA.helper.intervalId);
  1151 					clearInterval(NOKIA.helper.intervalId);
  1142 
  1152 
  1143 				NOKIA.helper.intervalId = setTimeout(function(){
  1153 				NOKIA.helper.intervalId = setTimeout(function(){
  1144 					NOKIA.menu.cancel()
  1154 					NOKIA.menu.cancel();
  1145 				}, 500);
  1155 				}, 500);
  1146 			});
  1156 			});
  1147 
  1157 
  1148 
  1158 
  1149 			// Tabs
  1159 			// Tabs