[Systeminfo]Updated Private -> RSA
authorji.ji <ji.ji@samsung.com>
Tue, 9 Jul 2013 10:22:06 +0000 (19:22 +0900)
committerji.ji <ji.ji@samsung.com>
Tue, 9 Jul 2013 10:22:06 +0000 (19:22 +0900)
Change-Id: I3d28300f8fc2a180101d3f3c3354175bcc64a838

config.xml
index.html
js/main.js

index 12297ae..2da32aa 100755 (executable)
@@ -3,9 +3,5 @@
     <tizen:application id="nGZWgKPPAa.Systeminfo" package="nGZWgKPPAa" required_version="2.2"/>
     <content src="index.html"/>
     <icon src="icon.png"/>
-    <name>Systeminfo</name>
-        
-        
-        
-        
+    <name>System info</name>
 </widget>
index 4ae23d8..c369e36 100755 (executable)
@@ -2,8 +2,8 @@
 <html>
 <head>
        <meta charset="utf-8"/>
-       <meta name="description" content="Systeminfo API Tutorial"/>
-       <title>Systeminfo</title>
+       <meta name="description" content="System info API Tutorial"/>
+       <title>System info</title>
        <script src="/usr/share/tizen-web-ui-fw/latest/js/jquery.min.js"></script>
        <script src="./js/config.js"></script>
        <script src="/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.min.js"></script>
        <script type="text/javascript" src="./js/main.js"></script>
        <link rel="stylesheet" type="text/css" href="./css/style.css"/>
 </head>
-
 <body>
-       <div data-role="page" id="main" data-add-back-btn="header">
+
+       <div data-role="page" id="main">
                <div data-role="header" data-position="fixed">
                        <h1>System information</h1>
                </div>
-
                <div data-role="content">
                        <ul data-role="listview">
                                <li id="storage-info">Storage</li>
                                <li id="orientation-info">Device orientation</li>
                        </ul>
                </div>
-
-               <div data-role="footer" data-position="fixed">
-               </div>
        </div>
 
-       <div data-role="page" id="info" data-add-back-btn="header">
+       <div data-role="page" id="info">
                <div data-role="header" data-position="fixed">
                        <h1 id="info-title"></h1>
                </div>
-
                <div data-role="content">
                        <ul data-role="listview" id="info-list">
                        </ul>
                </div>
-               <div data-role="footer" data-position="fixed">
-               </div>
        </div>
+
 </body>
 </html>
index c2e4750..f9de595 100644 (file)
 var gInfoTitle = "", gInfo = "", gBatteryListener;
 
 $(document).delegate("#main", "pageinit", function() {
-       $("#main .ui-btn-back").bind("vclick", function() {
-               tizen.application.getCurrentApplication().exit();
-               return false;
-       });
        $("#storage-info").bind("vclick", function() {
                getSystemProperty("STORAGE", onStorageSuccess);
                return false;
@@ -43,8 +39,8 @@ $(document).delegate("#main", "pageinit", function() {
                return false;
        });
 
-       document.addEventListener('tizenhwkey', function (e) {
-               if (e.keyName === "back") {
+       $(window).on('tizenhwkey', function (e) {
+               if (e.originalEvent.keyName === "back") {
                        if ($.mobile.activePage.attr('id') === 'main') {
                                tizen.application.getCurrentApplication().exit();
                        } else {
@@ -82,21 +78,21 @@ function makeDividerListItem(value) {
 }
 
 function onStorageSuccess(storages) {
-       gInfoTitle = "STORAGES(" + storages.length + ")";
+       gInfoTitle = "Storages (" + storages.units.length + ")";
        gInfo = "";
-       for (var i = 0; i < storages.length; i++) {
+       for (var i = 0; i < storages.units.length; i++) {
                gInfo += makeDividerListItem("Storage " + (i + 1))
-                               + make2lineListItem("Type", storages[i].type)
-                               + make2lineListItem("Capacity", Math.floor(storages[i].capacity / 1000000) + " MB")
-                               + make2lineListItem("Available capacity", Math.floor(storages[i].availableCapacity / 1000000) + " MB")
-                               + make2lineListItem("Removable", (storages[i].isRemoveable == true ? "Yes" : "No"));
+                               + make2lineListItem("Type", storages.units[i].type)
+                               + make2lineListItem("Capacity", Math.floor(storages.units[i].capacity / 1000000) + " MB")
+                               + make2lineListItem("Available capacity", Math.floor(storages.units[i].availableCapacity / 1000000) + " MB")
+                               + make2lineListItem("Removable", (storages.units[i].isRemoveable == true ? "Yes" : "No"));
        }
 
        $.mobile.changePage("#info");
 }
 
 function onBatterySuccess(battery) {
-       gInfoTitle = "BATTERY";
+       gInfoTitle = "Battery";
        gInfo = make2lineListItem("Level", battery.level)
                        + make2lineListItem("Charging", (battery.isCharging == true ? "Yes" : "No"));
 
@@ -111,7 +107,7 @@ function onCpuInfoSuccess(cpu) {
 }
 
 function onDisplaySuccess(display) {
-       gInfoTitle = "DISPLAY";
+       gInfoTitle = "Display";
        gInfo = makeDividerListItem("Resolution")
                        + make2lineListItem("Width", display.resolutionWidth)
                        + make2lineListItem("Height", display.resolutionHeight)
@@ -128,7 +124,7 @@ function onDisplaySuccess(display) {
 }
 
 function onDeviceSuccess(device) {
-       gInfoTitle = "DEVICE";
+       gInfoTitle = "Device";
        gInfo = make2lineListItem("IMEI", device.imei)
                        + make2lineListItem("Model", device.model)
                        + make2lineListItem("Version", device.version)
@@ -138,7 +134,7 @@ function onDeviceSuccess(device) {
 }
 
 function onOrientationSuccess(orientation) {
-       gInfoTitle = "DEVICE ORIENTATION";
+       gInfoTitle = "Device orientation";
        gInfo = make2lineListItem("Status", orientation.status);
 
        $.mobile.changePage("#info");