641 // $('#SoftKeys > a > img').css(style['softkeysImg']); |
638 // $('#SoftKeys > a > img').css(style['softkeysImg']); |
642 |
639 |
643 NOKIA.menu.createSFKArea(); |
640 NOKIA.menu.createSFKArea(); |
644 |
641 |
645 $("#DeviceDisplayLayout").show(); |
642 $("#DeviceDisplayLayout").show(); |
646 $("#PreferencesTab").show(); |
|
647 $("#InspectorTab").show(); |
643 $("#InspectorTab").show(); |
648 |
644 |
649 if(!NOKIA.menu.is_dimmed) |
|
650 $("#PreferencesBtn").show(); |
|
651 if (/chrome/.test( navigator.userAgent.toLowerCase())) { |
645 if (/chrome/.test( navigator.userAgent.toLowerCase())) { |
652 $("#InspectorBtn").show(); |
646 $("#InspectorBtn").show(); |
653 } |
647 } |
654 if (/mac/.test( navigator.userAgent.toLowerCase())) { |
648 if (/mac/.test( navigator.userAgent.toLowerCase())) { |
655 $("#MacShortcut").show(); |
649 $("#MacShortcut").show(); |
981 NOKIA.helper.setPreference('__SYM_WRT_VERSION', ele.value); |
975 NOKIA.helper.setPreference('__SYM_WRT_VERSION', ele.value); |
982 $("#loaderDiv").html("Applying the " + ele.value + ", please wait..."); |
976 $("#loaderDiv").html("Applying the " + ele.value + ", please wait..."); |
983 $("#loaderDiv").show(); |
977 $("#loaderDiv").show(); |
984 $("#loaderDiv")[0].className = 'green'; |
978 $("#loaderDiv")[0].className = 'green'; |
985 |
979 |
986 $("#PreferencesTab").dialog('close'); |
|
987 |
|
988 window.setTimeout(function(){ |
980 window.setTimeout(function(){ |
989 document.location = document.location; |
981 document.location = document.location; |
990 }, 3000); |
982 }, 3000); |
991 } |
983 } |
992 else |
984 else |
999 } |
991 } |
1000 }, |
992 }, |
1001 |
993 |
1002 addListeners : function() |
994 addListeners : function() |
1003 { |
995 { |
1004 /* |
996 NOKIA.helper.loadPreferences(); |
1005 * Render Emulator for Interaction |
|
1006 */ |
|
1007 NOKIA.helper.prefDailog = $("#PreferencesTab").dialog({ |
|
1008 width: 550, minWidth: 550, minHeight: 350, height: 350, autoOpen: false, position : top, title : ' ', |
|
1009 buttons : { |
|
1010 Close : function(){ |
|
1011 $("#PreferencesTab").dialog('close'); |
|
1012 |
|
1013 // Hack for Mac firefox |
|
1014 if(/Mac/i.test(navigator.userAgent)) |
|
1015 { |
|
1016 $("#WidgetArea iframe").css({overflow:'auto'}); |
|
1017 } |
|
1018 |
|
1019 // select index : 0 tab selected |
|
1020 $('#tabs').tabs( 'select' , 0); |
|
1021 } |
|
1022 } |
|
1023 }); |
|
1024 /* |
997 /* |
1025 * Render Emulator for Interaction |
998 * Render Emulator for Interaction |
1026 */ |
999 */ |
1027 NOKIA.helper.inspectorDailog = $("#InspectorTab").dialog({ |
1000 NOKIA.helper.inspectorDailog = $("#InspectorTab").dialog({ |
1028 width: 370, minWidth: 300, minHeight: 200, height: 250, autoOpen: false, position : top, title : ' ', |
1001 width: 370, minWidth: 300, minHeight: 200, height: 250, autoOpen: false, position : top, title : ' ', |
1033 "Disconnect Debugger" : function(){ |
1006 "Disconnect Debugger" : function(){ |
1034 $.ajax({url : "__sym_command/terminateDebug"}); |
1007 $.ajax({url : "__sym_command/terminateDebug"}); |
1035 }} |
1008 }} |
1036 }); |
1009 }); |
1037 |
1010 |
1038 $('#PreferencesBtn').click(function(){ |
|
1039 // Load preferences |
|
1040 NOKIA.helper.loadPreferences(); |
|
1041 $('#PreferencesTab').dialog('open'); |
|
1042 |
|
1043 // Hack for Mac firefox |
|
1044 if(/Mac/i.test(navigator.userAgent)) |
|
1045 { |
|
1046 $("#WidgetArea iframe").css({overflow:'hidden'}); |
|
1047 } |
|
1048 }); |
|
1049 $('#InspectorBtn').click(function(){ |
1011 $('#InspectorBtn').click(function(){ |
1050 $('#InspectorTab').dialog('open'); |
1012 $('#InspectorTab').dialog('open'); |
1051 // Hack for Mac firefox |
1013 // Hack for Mac firefox |
1052 if(/Mac/i.test(navigator.userAgent)) |
1014 if(/Mac/i.test(navigator.userAgent)) |
1053 { |
1015 { |
1097 $("#WidgetArea")[0].className = 'hs_'+NOKIA.mode; |
1059 $("#WidgetArea")[0].className = 'hs_'+NOKIA.mode; |
1098 }); |
1060 }); |
1099 |
1061 |
1100 |
1062 |
1101 $("#iframeMask").click(function(){ |
1063 $("#iframeMask").click(function(){ |
1102 |
|
1103 $("#PreferencesBtn").show(); |
|
1104 $("#orientationIcon").hide(); |
1064 $("#orientationIcon").hide(); |
1105 $("#iframeMask").hide(); |
1065 $("#iframeMask").hide(); |
1106 $("#loaderDiv").hide(); |
1066 $("#loaderDiv").hide(); |
1107 |
1067 |
1108 NOKIA.menu.is_dimmed = false; |
1068 NOKIA.menu.is_dimmed = false; |
1384 */ |
1344 */ |
1385 NOKIA.namespace('layout'); |
1345 NOKIA.namespace('layout'); |
1386 NOKIA.layout = { |
1346 NOKIA.layout = { |
1387 _console_minimized : true, |
1347 _console_minimized : true, |
1388 _console_enabled : false, |
1348 _console_enabled : false, |
1389 _consoleWindowHeight : 200, |
1349 _consoleWindowHeight : 290, |
1390 _consoleHeaderHeight : 31, |
1350 _consoleHeaderHeight : 31, |
|
1351 _tabHeight : 27, |
1391 |
1352 |
1392 init : function(){ |
1353 init : function(){ |
1393 |
1354 |
1394 // Toggle console window |
1355 // Toggle console window |
1395 $('#Console-Toggle-Button').click(function(){ |
1356 $('#Console-Toggle-Button').click(function(){ |
1453 |
1414 |
1454 $('#preview-ui-bottom-header').css({ |
1415 $('#preview-ui-bottom-header').css({ |
1455 height: NOKIA.layout._consoleHeaderHeight + 'px' |
1416 height: NOKIA.layout._consoleHeaderHeight + 'px' |
1456 }); |
1417 }); |
1457 |
1418 |
1458 $('#preview-ui-bottom-body').css({ |
1419 $('#tabs').css({ |
1459 height: parseInt(NOKIA.layout._consoleWindowHeight - NOKIA.layout._consoleHeaderHeight) + 'px', |
1420 height: parseInt(NOKIA.layout._consoleWindowHeight - NOKIA.layout._consoleHeaderHeight) + 'px', |
|
1421 display : 'block' |
|
1422 }); |
|
1423 $('#console').css({ |
|
1424 height : parseInt(NOKIA.layout._consoleWindowHeight |
|
1425 - NOKIA.layout._consoleHeaderHeight |
|
1426 - NOKIA.layout._tabHeight * 2) |
|
1427 + 'px', |
1460 display : 'block' |
1428 display : 'block' |
1461 }); |
1429 }); |
1462 |
1430 |
1463 // Auto scroll when console window opened from MINIMIZED => MAXIMIZED state |
1431 // Auto scroll when console window opened from MINIMIZED => MAXIMIZED state |
1464 window.setTimeout(function(){ |
1432 window.setTimeout(function(){ |