Created
July 18, 2012 18:32
-
-
Save filmaj/3137938 to your computer and use it in GitHub Desktop.
Revisions
-
Trevoke revised this gist
Jul 18, 2012 . 1 changed file with 19 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,27 +10,29 @@ <script type="text/javascript" src="jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.js"></script> <script type="text/javascript"> function onDeviceReady(){ console.log("ON DEVICE READY"); /*Back event handler for all pages navigation*/ document.addEventListener('pageshow', function (e, data) { if ($.mobile.activePage.attr('id') == 'index') { document.addEventListener("backbutton", function () { setTimeout( function() {navigator.app.exitApp();}, 100 ); }, true); } else{ document.addEventListener("backbutton", function () { setTimeout( function() {$.mobile.changePage("#index");}, 100 ); }, true); } }); } function onBodyLoad() { console.log("Normal javascript stuff"); document.addEventListener("deviceready", onDeviceReady, false); } </script> @@ -62,4 +64,4 @@ <h1>Work with me here</h1> </body> </html> -
Trevoke revised this gist
Jul 18, 2012 . 1 changed file with 6 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,6 @@ <script type="text/javascript" src="jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.js"></script> <script type="text/javascript"> function onDeviceReady(){ console.log("ON DEVICE READY"); /*Back event handler for all pages navigation*/ @@ -27,12 +25,12 @@ }, true); } }); } function onBodyLoad() { console.log("Normal javascript stuff"); document.addEventListener("deviceready", onDeviceReady, false); } </script> @@ -64,4 +62,4 @@ <h1>Work with me here</h1> </body> </html> -
Trevoke revised this gist
Jul 18, 2012 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ 07-18 14:21:39.333: WARN/System.err(1256): java.net.SocketException: Permission denied 07-18 14:21:39.333: WARN/System.err(1256): at org.apache.harmony.luni.platform.OSNetworkSystem.createServerStreamSocketImpl(Native Method) 07-18 14:21:39.353: WARN/System.err(1256): at org.apache.harmony.luni.platform.OSNetworkSystem.createServerStreamSocket(OSNetworkSystem.java:170) 07-18 14:21:39.353: WARN/System.err(1256): at org.apache.harmony.luni.net.PlainServerSocketImpl.create(PlainServerSocketImpl.java:45) 07-18 14:21:39.363: WARN/System.err(1256): at java.net.ServerSocket.<init>(ServerSocket.java:135) 07-18 14:21:39.363: WARN/System.err(1256): at java.net.ServerSocket.<init>(ServerSocket.java:89) 07-18 14:21:39.363: WARN/System.err(1256): at org.apache.cordova.CallbackServer.run(CallbackServer.java:205) 07-18 14:21:39.363: WARN/System.err(1256): at java.lang.Thread.run(Thread.java:1096) -
Trevoke revised this gist
Jul 18, 2012 . 1 changed file with 36 additions and 34 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,56 +10,58 @@ <script type="text/javascript" src="jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.js"></script> <script type="text/javascript"> function onBodyLoad() { function onDeviceReady(){ console.log("ON DEVICE READY"); /*Back event handler for all pages navigation*/ document.addEventListener('pageshow', function (e, data) { if ($.mobile.activePage.attr('id') == 'index') { document.addEventListener("backbutton", function () { setTimeout( function() {navigator.app.exitApp();}, 100 ); }, true); } else{ document.addEventListener("backbutton", function () { setTimeout( function() {$.mobile.changePage("#index");}, 100 ); }, true); } }); } console.log("Normal javascript stuff"); document.addEventListener("deviceready", onDeviceReady, false); } </script> </head> <body onload='onBodyLoad()'> <div id="index" data-role="page" data-theme="a"> <div data-role="header"> <h1>Work with me here</h1> </div> <div data-role="content"> I am page 1. <a href="#char-1" data-role="button">Next</a> </div> </div> <div id="char-1" data-role="page" data-theme="a"> <div data-role="content"> HAHAHA!<br/> <a href="#char-2" data-role="button">Last</a> </div> </div> <div id="char-2" data-role="page" data-theme="a"> <div data-role="content">The buck stops here.</div> </div> </body> </html> -
Trevoke revised this gist
Jul 18, 2012 . 1 changed file with 27 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,32 +5,40 @@ <title>TestApp</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.css"/> <script type="test/javascript" src='cordova-1.8.1.js'></script> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.js"></script> <script type="text/javascript"> function onDeviceReady(){ /*Back event handler for all pages navigation*/ $(document).bind ('pageshow', function (e, data) { if ($.mobile.activePage.attr('id') == 'index') { document.addEventListener("backbutton", function () { setTimeout( function() {navigator.app.exitApp();}, 100 ); }, true); } else{ document.addEventListener("backbutton", function () { setTimeout( function() {$.mobile.changePage("#index");}, 100 ); }, true); } }); } $(document).ready( function() { document.addEventListener("deviceready", onDeviceReady, true); }); </script> </head> <body> <div id="index" data-role="page" data-theme="a"> <div data-role="header"> <h1>Work with me here</h1> </div> @@ -42,9 +50,16 @@ <h1>Work with me here</h1> </div> <div id="char-1" data-role="page" data-theme="a"> <div data-role="content"> HAHAHA!<br/> <a href="#char-2" data-role="button">Last</a> </div> </div> <div id="char-2" data-role="page" data-theme="a"> <div data-role="content">The buck stops here.</div> </div> </body> </html> -
Trevoke revised this gist
Jul 17, 2012 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,12 +13,15 @@ console.log("OH SNAP"); } function onDeviceReady() { $(document).bind('pageshow', function(e, data) { document.addEventListener('backbutton', onBackButton, true); }); } $(document).ready( function() { document.addEventListener("deviceready", onDeviceReady, false); }); </script> <script type="test/javascript" src='cordova-1.8.1.js'></script> -
Trevoke created this gist
Jul 17, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>TestApp</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.css"/> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.js"></script> <script type="text/javascript"> function onBackButton() { console.log("OH SNAP"); } function onDeviceReady() { $(document).on('pageshow', function(e, data) { document.addEventListener('backbutton', onBackButton, true); }); } document.addEventListener("deviceready", onDeviceReady, false); </script> <script type="test/javascript" src='cordova-1.8.1.js'></script> </head> <body> <div id="homepage" data-role="page" data-theme="a"> <div data-role="header"> <h1>Work with me here</h1> </div> <div data-role="content"> I am page 1. <a href="#char-1" data-role="button">Next</a> </div> </div> <div id="char-1" data-role="page" data-theme="a"> <div data-role="content">HAHAHA!</div> </div> </body> </html>