Skip to content
Browse files

2_hardware_info section

  • Loading branch information...
1 parent 536b712 commit 9db2572619b56d3453af059e2ec7838f9642ba42 @jamesgpearce jamesgpearce committed Jun 20, 2011
Showing with 41 additions and 4 deletions.
  1. +2 −1 .gitignore
  2. +16 −3 HTML/app/app.js
  3. +23 −0 HTML/index.html
View
3 .gitignore
@@ -8,4 +8,5 @@
/HelloNKAppDelegate.m
/iPad/
/iPhone/
-/main.m
+/main.m
+/HTML/lib/touch/sencha-touch-debug.js
View
19 HTML/app/app.js
@@ -10,9 +10,22 @@ new Ext.Application({
ui:'light'
},
items: [{
- title: 'One'
- }, {
- title: 'Two'
+ title: 'Info',
+ html:
+ '<table>' +
+ '<tr><th>Device</th><td>' +
+ NKGetDeviceType() +
+ '</td></tr>' +
+ '<tr><th>ID</th><td>' +
+ NKGetUniqueIdentifier() +
+ '</td></tr>' +
+ '<tr><th>Cellular</th><td>' +
+ NKIsInternetAvailableViaCellularNetwork() +
+ '</td></tr>' +
+ '<tr><th>WiFi</th><td>' +
+ NKIsInternetAvailableViaWifi() +
+ '</td></tr>' +
+ '</table>'
}]
});
}
View
23 HTML/index.html
@@ -6,9 +6,32 @@
<script src="lib/touch/sencha-touch.js" type="text/javascript"></script>
<script type="text/javascript" src="app/app.js"></script>
+ <script type="text/javascript" src="NKit.js"></script>
<link href="lib/touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />
+ <style>
+ table {
+ border-collapse: separate;
+ border-spacing: 4px;
+ }
+ td, th {
+ padding:4px;
+ vertical-align:top;
+ }
+ th {
+ background: #ddd;
+ font-weight: bold;
+ }
+ td {
+ background: #fff;
+ }
+ .x-button {
+ margin:12px auto 0;
+ width:50%;
+ }
+ </style>
+
</head>
<body></body>
</html>

0 comments on commit 9db2572

Please sign in to comment.
Something went wrong with that request. Please try again.