Permalink
Browse files

adding examples dir for sencha touch examples

  • Loading branch information...
1 parent 1b664d0 commit 6fcf95a8b4ba2a20573ad9e36b290cd38f722d4a @devendram devendram committed Oct 2, 2012
@@ -0,0 +1,50 @@
+var pubnub = PUBNUB.init({
+ publish_key : 'demo',
+ subscribe_key : 'demo',
+ ssl : false,
+ origin : 'pubsub.pubnub.com'
+});
+
+
+Ext.application({
+ launch: function () {
+ var myStore = Ext.create('Ext.data.Store', {
+ storeId: 'list',
+ fields: ['txt']
+ });
+
+ Ext.create('Ext.List', {
+ fullscreen: true,
+ store: 'list',
+ itemTpl: '{txt}',
+ items: [{
+ xtype: 'titlebar',
+ docked: 'top',
+ items: [
+ {
+ xtype: 'textfield',
+ label: 'Channel',
+ name: 'channel',
+ id: 'channel'
+ },
+ {
+ text: 'Here Now',
+ handler: function () {
+ var channel = Ext.getCmp('channel').getValue() || 'sencha-demo-channel';
+ myStore.removeAll();
+ pubnub.here_now({
+ channel: channel,
+ callback: function(response){
+ for ( x in response["uuids"] ) {
+ myStore.insert(0,{txt : JSON.stringify(response["uuids"][x])});
+ }
+ }
+ });
+ }
+ }
+ ]
+ }]
+ });
+ }
+});
+
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML>
+<html manifest="" lang="en-US">
+<head>
+ <meta charset="UTF-8">
+ <title>history</title>
+ <style type="text/css">
+ /**
+ * Example of an initial loading indicator.
+ * It is recommended to keep this as minimal as possible to provide instant feedback
+ * while other resources are still being loaded for the first time
+ */
+ html, body {
+ height: 100%;
+ background-color: #1985D0
+ }
+
+ #appLoadingIndicator {
+ position: absolute;
+ top: 50%;
+ margin-top: -15px;
+ text-align: center;
+ width: 100%;
+ height: 30px;
+ -webkit-animation-name: appLoadingIndicator;
+ -webkit-animation-duration: 0.5s;
+ -webkit-animation-iteration-count: infinite;
+ -webkit-animation-direction: linear;
+ }
+
+ #appLoadingIndicator > * {
+ background-color: #FFFFFF;
+ display: inline-block;
+ height: 30px;
+ -webkit-border-radius: 15px;
+ margin: 0 5px;
+ width: 30px;
+ opacity: 0.8;
+ }
+
+ @-webkit-keyframes appLoadingIndicator{
+ 0% {
+ opacity: 0.8
+ }
+ 50% {
+ opacity: 0
+ }
+ 100% {
+ opacity: 0.8
+ }
+ }
+ </style>
+ <!-- The line below must be kept intact for Sencha Command to build your application -->
+ <link href=sencha-touch.css rel="stylesheet" type="text/css" />
+ <script src=sencha-touch-all.js type="text/javascript"></script>
+ <script src=pubnub-3.3.js type="text/javascript"></script>
+ <script src="app.js" type="text/javascript"></script>
+</head>
+<body>
+ <div id="appLoadingIndicator">
+ <div></div>
+ <div></div>
+ <div></div>
+ </div>
+</body>
+</html>
Oops, something went wrong.

0 comments on commit 6fcf95a

Please sign in to comment.