Permalink
Browse files

More

  • Loading branch information...
1 parent eea12a0 commit 5dc7bb6781c51ae3e6d6b888b821fc71a7b13647 Matthew Baxter-Reynolds committed Mar 6, 2012
View
Binary file not shown.
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>documents</key>
+ <array>
+ <dict>
+ <key>filename</key>
+ <string>index.html</string>
+ <key>lastUsed</key>
+ <date>2012-03-06T13:25:55Z</date>
+ </dict>
+ <dict>
+ <key>filename</key>
+ <string>scripts/jquery-1.7.1.min.js</string>
+ </dict>
+ <dict>
+ <key>filename</key>
+ <string>scripts/jquery.mobile-1.0.1.min.js</string>
+ </dict>
+ <dict>
+ <key>filename</key>
+ <string>scripts/knockout-2.0.0.js</string>
+ </dict>
+ <dict>
+ <key>filename</key>
+ <string>styles/jquery.mobile-1.0.1.min.css</string>
+ <key>lastUsed</key>
+ <date>2012-03-05T21:49:48Z</date>
+ </dict>
+ <dict>
+ <key>filename</key>
+ <string>scripts/busy.js</string>
+ <key>lastUsed</key>
+ <date>2012-03-06T13:25:59Z</date>
+ <key>selected</key>
+ <true/>
+ </dict>
+ </array>
+ <key>fileHierarchyDrawerWidth</key>
+ <integer>200</integer>
+ <key>metaData</key>
+ <dict/>
+ <key>showFileHierarchyDrawer</key>
+ <true/>
+ <key>windowFrame</key>
+ <string>{{333, 75}, {1104, 806}}</string>
+</dict>
+</plist>
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Busy indicator</title>
+
+ <!-- makes the magic happen... -->
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ <!-- normal stuff -->
+ <link rel="stylesheet" href="styles/jquery.mobile-1.0.1.min.css" />
+ <script src="scripts/jquery-1.7.1.min.js"></script>
+ <script src="scripts/jquery.mobile-1.0.1.min.js"></script>
+ <script src="scripts/knockout-2.0.0.js"></script>
+ <script src="scripts/busy.js"></script>
+
+ </head>
+
+ <body>
+
+ <div id="main" data-role="page">
+
+ <div data-role="header">Busy</div>
+ <div data-role="content">
+
+ <input type="button" id="showbusybutton" value="I'm busy!" data-transition="none" />
+ <input type="button" id="showverybusybutton" value="I'm very busy!" data-transition="none" />
+
+ </div>
+
+ </div>
+
+ </body>
+
+</html>
+
@@ -0,0 +1,37 @@
+$("#main").live("pageinit", function(event) {
+ initialize();
+});
+
+function initialize() {
+ $("#showbusybutton").click(handleShowBusy);
+ $("#showverybusybutton").click(handleShowVeryBusy);
+}
+
+function handleShowBusy() {
+
+ // show...
+ $.mobile.showPageLoadingMsg();
+
+ // hide in a short while...
+ lazyHideBusy();
+}
+
+function lazyHideBusy() {
+ window.setTimeout("hideBusy()", 1500);
+}
+
+function hideBusy() {
+ $.mobile.hidePageLoadingMsg();
+}
+
+function handleShowVeryBusy() {
+
+ // show...
+ $.mobile.showPageLoadingMsg(null, "I'm very busy!");
+
+ // set...
+ lazyHideBusy();
+ return false;
+
+}
+
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
@@ -2,15 +2,13 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>currentDocument</key>
- <string>scripts/touch.js</string>
<key>documents</key>
<array>
<dict>
<key>filename</key>
<string>index.html</string>
<key>lastUsed</key>
- <date>2012-03-05T22:21:16Z</date>
+ <date>2012-03-06T13:25:52Z</date>
</dict>
<dict>
<key>filename</key>
@@ -32,51 +30,17 @@
</dict>
<dict>
<key>filename</key>
- <string>scripts/touch.js</string>
+ <string>scripts/dialogs.js</string>
<key>lastUsed</key>
- <date>2012-03-05T22:21:16Z</date>
+ <date>2012-03-06T13:25:53Z</date>
<key>selected</key>
<true/>
</dict>
</array>
<key>fileHierarchyDrawerWidth</key>
<integer>200</integer>
<key>metaData</key>
- <dict>
- <key>index.html</key>
- <dict>
- <key>caret</key>
- <dict>
- <key>column</key>
- <integer>4</integer>
- <key>line</key>
- <integer>22</integer>
- </dict>
- <key>firstVisibleColumn</key>
- <integer>0</integer>
- <key>firstVisibleLine</key>
- <integer>0</integer>
- </dict>
- <key>scripts/touch.js</key>
- <dict>
- <key>caret</key>
- <dict>
- <key>column</key>
- <integer>11</integer>
- <key>line</key>
- <integer>36</integer>
- </dict>
- <key>firstVisibleColumn</key>
- <integer>0</integer>
- <key>firstVisibleLine</key>
- <integer>21</integer>
- </dict>
- </dict>
- <key>openDocuments</key>
- <array>
- <string>index.html</string>
- <string>scripts/touch.js</string>
- </array>
+ <dict/>
<key>showFileHierarchyDrawer</key>
<true/>
<key>windowFrame</key>
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>Touch</title>
+ <title>Dialogs</title>
<!-- makes the magic happen... -->
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -11,21 +11,38 @@
<script src="scripts/jquery-1.7.1.min.js"></script>
<script src="scripts/jquery.mobile-1.0.1.min.js"></script>
<script src="scripts/knockout-2.0.0.js"></script>
- <script src="scripts/touch.js"></script>
+ <script src="scripts/dialogs.js"></script>
</head>
<body>
<div id="main" data-role="page">
- <div data-role="header">Woof!</div>
+
+ <div data-role="header">Dialogs</div>
+ <div data-role="content">
+
+ Hello. This is the main page.
+
+ <a href="#mydialog" data-role="button"
+ data-rel="dialog">Show me a Dialog!</a>
+
+ </div>
+
+ </div>
+
+ <div id="mydialog" data-role="dialog">
+
+ <div data-role="header">
+ <h1>My dialog</h1>
+ </div>
+
<div data-role="content">
-
- <img id="photo" />
-
- </div>
+ <p>Great! We're in a dialog!</p>
+ <a href="#" data-role="button" data-rel="back">Close</a>
+ </div>
</div>
-
+
</body>
</html>
@@ -0,0 +1,62 @@
+var maxId = 3;
+
+$("#main").live("pageinit", function(event) {
+ initialize();
+});
+
+function initialize() {
+
+ console.log("Initializing...");
+
+ // subscribe...
+ $("#photo").live("swiperight", function(e) {
+ alert("Right!");
+ });
+ $("#photo").live("swipeleft", function(e) {
+ alert("Left!");
+ });
+
+ // show a picture...
+ showPicture(0);
+
+}
+
+function swipe(direction) {
+
+ var current = getCurrentId();
+ if(direction < 0) {
+ current--;
+ if(current < 0)
+ current = maxId;
+ } else {
+ current++;
+ if(current == maxId)
+ current = 0;
+ }
+
+ // show...
+ showPicture(current);
+
+}
+
+function getCurrentId() {
+ return $("#photo").data("selectedId");
+}
+
+function showPicture(id) {
+
+ // get...
+ var image = $("#photo");
+
+ image.fadeOut(null, function() {
+
+ image.attr("src", "dogs/dog" + id + ".jpg");
+ image.data("selectedId", id);
+
+ image.fadeIn();
+
+ });
+
+}
+
+
Binary file not shown.
@@ -34,7 +34,7 @@
<key>filename</key>
<string>index.html</string>
<key>lastUsed</key>
- <date>2012-03-06T10:46:01Z</date>
+ <date>2012-03-06T11:19:36Z</date>
<key>selected</key>
<true/>
</dict>
@@ -66,14 +66,30 @@
<key>caret</key>
<dict>
<key>column</key>
- <integer>49</integer>
+ <integer>4</integer>
<key>line</key>
- <integer>13</integer>
+ <integer>22</integer>
</dict>
+ <key>columnSelection</key>
+ <false/>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>0</integer>
+ <key>selectFrom</key>
+ <dict>
+ <key>column</key>
+ <integer>2</integer>
+ <key>line</key>
+ <integer>20</integer>
+ </dict>
+ <key>selectTo</key>
+ <dict>
+ <key>column</key>
+ <integer>4</integer>
+ <key>line</key>
+ <integer>22</integer>
+ </dict>
</dict>
<key>mypage1.html</key>
<dict>
Oops, something went wrong.

0 comments on commit 5dc7bb6

Please sign in to comment.