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 characters
| var RocknCoder = RocknCoder || {}; | |
| RocknCoder.Pages = RocknCoder.Pages || {}; | |
| RocknCoder.Pages.Kernel = function (event) { | |
| var that = this, | |
| eventType = event.type, | |
| pageName = $(this).attr("data-rockncoder-jspage"); | |
| if (RocknCoder && RocknCoder.Pages && pageName && RocknCoder.Pages[pageName] && RocknCoder.Pages[pageName][eventType]) { | |
| RocknCoder.Pages[pageName][eventType].call(that); | |
| } |
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 characters
| "use strict"; | |
| var $, navigator, window; | |
| function getDimensions() { | |
| // the iphone specific code is kind of kludgy, if you have a better way let me know | |
| var isIPhone = (/iphone/gi).test(navigator.appVersion), | |
| iPhoneHeight = (isIPhone ? 60 : 0), | |
| width = $(window).width(), | |
| height = $(window).height(), |
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 characters
| <body> | |
| <div id="page1" data-role="page" data-rockncoder-jspage="page1"> | |
| <!-- the resize code takes into account whether or not there are headers and footers --> | |
| <header data-role="header" data-position="fixed"> | |
| <h1>Index Page</h1> | |
| </header> | |
| <section id="content" data-role="content"> | |
| <div id="flexDiv" ></div> | |
| </section> | |
| <footer data-role="footer" data-position="fixed"> |
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 characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>JQMImageScalePan</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <meta name="apple-mobile-web-app-capable" content="yes"/> | |
| <link href="content/jquery.mobile-1.1.0.min.css" rel="stylesheet" type="text/css" /> | |
| <link href="content/style.css" rel="stylesheet" type="text/css" /> | |
| <script src="scripts/jquery-1.7.1.min.js" type="text/javascript"></script> |
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 characters
| // Next two lines for JS-Lint, first a pragma instruction, then global vars specified | |
| "use strict"; | |
| var $, iScroll, document, alert, navigator; | |
| // create our own namespace | |
| var RocknCoder = RocknCoder || {}; | |
| RocknCoder.Pages = RocknCoder.Pages || {}; | |
| RocknCoder.Pages.Kernel = function (event) { | |
| var that = this, |
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 characters
| // determine the size of the jQuery Mobile content area for dynamic sizing | |
| RocknCoder.Dimensions = (function () { | |
| var width, height, headerHeight, footerHeight, contentHeight, | |
| getContentDimensions = function () { | |
| return { | |
| width: width, | |
| height: contentHeight | |
| }; | |
| }, | |
| init = function () { |
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 characters
| RocknCoder.Pages.page1 = (function () { | |
| var dims, | |
| // cache the selectors to some DOM elements | |
| $thePicture = $("#thePicture"), | |
| $snapPicture = $("#snapPicture"), | |
| $picFrame = $("#picFrame"), | |
| // once the image is loaded, get its dimensions | |
| picLoaded = function () { | |
| var width, height; |
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 characters
| // next two lines for JS-Lint | |
| "use strict"; | |
| var $, navigator, alert, document; | |
| // create our namespace | |
| var RocknCoder = RocknCoder || {}; | |
| // event handlers for the compass stuff, | |
| // one for updating the header text | |
| // the other for rotating the compass |
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 characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>pg-compass</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <meta name="apple-mobile-web-app-capable" content="yes"/> | |
| <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/> | |
| <link href="content/jquery.mobile-1.1.0.min.css" rel="stylesheet" type="text/css" /> | |
| <link href="content/style.css" rel="stylesheet" type="text/css" /> |
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 characters
| pageshow = function () { | |
| $entryLine = $("#entryLine", $.mobile.activePage); | |
| $li = $("#paperTape li"), | |
| myRow = RocknCoder.RowList.getCurrentRow(); |