Permalink
Browse files

commit to old status

  • Loading branch information...
1 parent 4bb7703 commit 3f0d1c224d45d537b5915e0c0f622eca5c08450e @chrismelman chrismelman committed May 10, 2012
Showing with 21,807 additions and 0 deletions.
  1. BIN img/cover.png
  2. BIN img/default-icon.png
  3. BIN img/loading.gif
  4. +1,321 −0 js-minify/parse-js.js
  5. +1,684 −0 js-minify/process.js
  6. +87 −0 js/gears_init.js
  7. +251 −0 js/gestures.js
  8. +363 −0 js/iscroll.js
  9. +4 −0 js/jquery-1.7.1.min.js
  10. +148 −0 js/jquery-timeago.js
  11. +55 −0 js/jquery-ui-1.8.18.custom.min.js
  12. +52 −0 js/mobl.boot.js
  13. +2,395 −0 js/persistence.js
  14. +302 −0 js/persistence.migrations.js
  15. +298 −0 js/persistence.search.js
  16. +236 −0 js/persistence.store.memory.js
  17. +893 −0 js/persistence.store.sql.js
  18. +216 −0 js/persistence.store.websql.js
  19. +299 −0 js/persistence.sync.js
  20. +1,474 −0 mobl.mobl
  21. +51 −0 mobl/accelerometer.mobl
  22. +112 −0 mobl/canvas.mobl
  23. +16 −0 mobl/crypto.mobl
  24. +9 −0 mobl/crypto/md5-min.js
  25. +9 −0 mobl/crypto/sha1-min.js
  26. +90 −0 mobl/imagefetch.mobl
  27. +132 −0 mobl/jquery.jgrowl.css
  28. +330 −0 mobl/jquery.jgrowl.js
  29. +30 −0 mobl/location.mobl
  30. +30 −0 mobl/maps.mobl
  31. +37 −0 mobl/markdown.mobl
  32. +90 −0 mobl/media.mobl
  33. +100 −0 mobl/migration.mobl
  34. +30 −0 mobl/notify.mobl
  35. +154 −0 mobl/peersocket.mobl
  36. +37 −0 mobl/reflect.mobl
  37. +17 −0 mobl/server.mobl
  38. +66 −0 mobl/server/fs.mobl
  39. +53 −0 mobl/server/httpserver.mobl
  40. +876 −0 mobl/server/irc.js
  41. +30 −0 mobl/server/ircclient.mobl
  42. +22 −0 mobl/server/process.mobl
  43. +39 −0 mobl/server/socket.mobl
  44. +23 −0 mobl/server/stream.mobl
  45. +1,306 −0 mobl/showdown.js
  46. +45 −0 mobl/socket.mobl
  47. +1,695 −0 mobl/socketio.js
  48. +9 −0 mobl/sync.mobl
  49. +174 −0 mobl/test.mobl
  50. +39 −0 mobl/test/style.mobl
  51. +17 −0 mobl/test/type.mobl
  52. +29 −0 mobl/timeago.mobl
  53. +54 −0 mobl/ui.mobl
  54. +36 −0 mobl/ui/cachingList.mobl
  55. +46 −0 mobl/ui/cachingStagedList.mobl
  56. +403 −0 mobl/ui/generic.css
  57. +1,125 −0 mobl/ui/generic.mobl
  58. BIN mobl/ui/generic/accordion-down.png
  59. BIN mobl/ui/generic/accordion-right.png
  60. BIN mobl/ui/generic/arrow.png
  61. BIN mobl/ui/generic/arrowDown.png
  62. BIN mobl/ui/generic/back.png
  63. BIN mobl/ui/generic/button.png
  64. BIN mobl/ui/generic/contextmenu.png
  65. +329 −0 mobl/ui/generic/css-beziers.js
  66. +161 −0 mobl/ui/generic/datepicker.mobl
  67. BIN mobl/ui/generic/iphone-switch-yesno.png
  68. BIN mobl/ui/generic/loading-large.gif
  69. BIN mobl/ui/generic/search.png
  70. BIN mobl/ui/generic/titlebg.png
  71. +69 −0 mobl/ui/generic/touchscroll.css
  72. +1,133 −0 mobl/ui/generic/touchscroll.js
  73. +53 −0 mobl/ui/generic_ext.css
  74. +141 −0 mobl/ui/googlechart.mobl
  75. +86 −0 mobl/ui/googlemap.mobl
  76. +463 −0 mobl/ui/ios.css
  77. +214 −0 mobl/ui/ios.mobl
  78. BIN mobl/ui/ios/calendar.gif
  79. BIN mobl/ui/ios/checkbox-checked.png
  80. BIN mobl/ui/ios/checkbox.png
  81. BIN mobl/ui/ios/chevron.png
  82. BIN mobl/ui/ios/compose.png
  83. +47 −0 mobl/ui/ios/datepicker.mobl
  84. BIN mobl/ui/ios/empty.png
  85. BIN mobl/ui/ios/growl.png
  86. BIN mobl/ui/ios/iPhoneBackButton.png
  87. BIN mobl/ui/ios/iPhoneButton.png
  88. BIN mobl/ui/ios/iPhoneToolbar.png
  89. BIN mobl/ui/ios/popover_arrow_up.png
  90. BIN mobl/ui/ios/popover_border.png
  91. BIN mobl/ui/ios/redButton.dark.png
  92. BIN mobl/ui/ios/redButton.png
  93. BIN mobl/ui/ios/search.png
  94. BIN mobl/ui/ios/selectedtabbg.png
  95. +92 −0 mobl/ui/ios/spinningwheel.css
  96. +535 −0 mobl/ui/ios/spinningwheel.js
  97. BIN mobl/ui/ios/stripes.png
  98. BIN mobl/ui/ios/sw-alpha.png
  99. BIN mobl/ui/ios/sw-button-cancel.png
  100. BIN mobl/ui/ios/sw-button-done.png
  101. BIN mobl/ui/ios/sw-header.png
  102. BIN mobl/ui/ios/sw-slot-border.png
  103. BIN mobl/ui/ios/tabbg.png
  104. BIN mobl/ui/ios/whiteButton.png
  105. +225 −0 mobl/ui/jq.mobl
  106. +90 −0 mobl/ui/jquery.mobile.min.js
  107. +128 −0 mobl/ui/phasedRenderedList.mobl
  108. +36 −0 mobl/ui/render.mobl
  109. +36 −0 mobl/ui/stylemixin.mobl
  110. +88 −0 mobl/ui/tabledList.mobl
  111. +14 −0 mobl/ui/timeago.mobl
  112. +60 −0 mobl/ui/toggle.mobl
  113. +26 −0 mobl/yql.mobl
  114. +28 −0 phonegap/accelerometer.mobl
  115. +29 −0 phonegap/camera.mobl
  116. +32 −0 phonegap/compass.mobl
  117. +87 −0 phonegap/contact.mobl
  118. +46 −0 phonegap/filetransfer.mobl
  119. +95 −0 phonegap/nativecontrol.mobl
  120. +25 −0 phonegap/notification.mobl
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Oops, something went wrong.
View
Oops, something went wrong.
View
@@ -0,0 +1,87 @@
+// Copyright 2007, Google Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// 3. Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Sets up google.gears.*, which is *the only* supported way to access Gears.
+//
+// Circumvent this file at your own risk!
+//
+// In the future, Gears may automatically define google.gears.* without this
+// file. Gears may use these objects to transparently fix bugs and compatibility
+// issues. Applications that use the code below will continue to work seamlessly
+// when that happens.
+
+(function() {
+ // We are already defined. Hooray!
+ if (window.google && google.gears) {
+ return;
+ }
+
+ var factory = null;
+
+ // Firefox
+ if (typeof GearsFactory != 'undefined') {
+ factory = new GearsFactory();
+ } else {
+ // IE
+ try {
+ factory = new ActiveXObject('Gears.Factory');
+ // privateSetGlobalObject is only required and supported on IE Mobile on
+ // WinCE.
+ if (factory.getBuildInfo().indexOf('ie_mobile') != -1) {
+ factory.privateSetGlobalObject(this);
+ }
+ } catch (e) {
+ // Safari
+ if ((typeof navigator.mimeTypes != 'undefined')
+ && navigator.mimeTypes["application/x-googlegears"]) {
+ factory = document.createElement("object");
+ factory.style.display = "none";
+ factory.width = 0;
+ factory.height = 0;
+ factory.type = "application/x-googlegears";
+ document.documentElement.appendChild(factory);
+ }
+ }
+ }
+
+ // *Do not* define any objects if Gears is not installed. This mimics the
+ // behavior of Gears defining the objects in the future.
+ if (!factory) {
+ return;
+ }
+
+ // Now set up the objects, being careful not to overwrite anything.
+ //
+ // Note: In Internet Explorer for Windows Mobile, you can't add properties to
+ // the window object. However, global objects are automatically added as
+ // properties of the window object in all browsers.
+ if (!window.google) {
+ google = {};
+ }
+
+ if (!google.gears) {
+ google.gears = {factory: factory};
+ }
+})();
View
@@ -0,0 +1,251 @@
+/**
+ * You can identify a swipe gesture as follows: 1. Begin gesture if you receive
+ * a touchstart event containing one target touch. 2. Abort gesture if, at any
+ * time, you receive an event with >1 touches. 3. Continue gesture if you
+ * receive a touchmove event mostly in the x-direction. 4. Abort gesture if you
+ * receive a touchmove event mostly the y-direction. 5. End gesture if you
+ * receive a touchend event.
+ *
+ * @author Dave Dunkin
+ * @copyright public domain
+ */
+function addSwipeListener(el, listener) {
+ var startX;
+ var dx;
+ var direction;
+
+ function cancelTouch() {
+ el.removeEventListener('touchmove', onTouchMove);
+ el.removeEventListener('touchend', onTouchEnd);
+ startX = null;
+ startY = null;
+ direction = null;
+ }
+
+ function onTouchMove(e) {
+ if (e.touches.length > 1) {
+ cancelTouch();
+ } else {
+ dx = e.touches[0].pageX - startX;
+ var dy = e.touches[0].pageY - startY;
+ if (direction == null) {
+ direction = dx;
+ e.preventDefault();
+ } else if ((direction < 0 && dx > 0) || (direction > 0 && dx < 0)
+ || Math.abs(dy) > 15) {
+ cancelTouch();
+ }
+ }
+ }
+
+ function onTouchEnd(e) {
+ cancelTouch();
+ if (Math.abs(dx) > 50) {
+ e.direction = dx > 0 ? 'right' : 'left';
+ listener(e);
+ }
+ }
+
+ function onTouchStart(e) {
+ if (e.touches.length == 1) {
+ startX = e.touches[0].pageX;
+ startY = e.touches[0].pageY;
+ el.addEventListener('touchmove', onTouchMove, false);
+ el.addEventListener('touchend', onTouchEnd, false);
+ }
+ }
+
+ el.addEventListener('touchstart', onTouchStart, false);
+}
+
+jQuery.fn.swipe = function(callback) {
+ this.each(function(idx, node) {
+ addSwipeListener(node, callback);
+ });
+}
+
+$.event.special.swipe = {
+ add : function(callback) {
+ addSwipeListener(this, callback);
+ $(this).bind('dblclick', callback);
+ }
+};
+
+function NoClickDelay(el, callback) {
+ this.element = el;
+ this.element.addEventListener('touchstart', this, false);
+ this.callback = callback;
+}
+
+NoClickDelay.prototype = {
+ handleEvent : function(e) {
+ switch (e.type) {
+ case 'touchstart':
+ this.onTouchStart(e);
+ break;
+ case 'touchmove':
+ this.onTouchMove(e);
+ break;
+ case 'touchend':
+ this.onTouchEnd(e);
+ break;
+ }
+ },
+
+ onTouchStart : function(e) {
+ // e.preventDefault();
+ this.moved = false;
+ // console.log("Starting...");
+ this.element.addEventListener('touchmove', this, false);
+ this.element.addEventListener('touchend', this, false);
+ this.touchStartY = e.touches[0].pageY;
+ this.touchStartX = e.touches[0].pageX;
+ },
+
+ onTouchMove : function(e) {
+ // console.log("Moving");
+ var topDelta = e.touches[0].pageY - this.touchStartY;
+ var leftDelta = e.touches[0].pageX - this.touchStartX;
+ if (Math.abs(topDelta) > 5 || Math.abs(leftDelta) > 5) {
+ this.moved = true;
+ }
+ },
+
+ onTouchEnd : function(e) {
+ this.element.removeEventListener('touchmove', this, false);
+ this.element.removeEventListener('touchend', this, false);
+ e.preventDefault();
+
+ // console.log("The end");
+ if (!this.moved) {
+ this.callback.handler(e);
+ }
+ }
+};
+
+/*
+ * jQuery.fn.tap = function (callback) { // if (true) {//(mobl.isIphone) { //new
+ * NoClickDelay(this[0], callback); // } else { this.click(callback); // } };
+ *
+ * jQuery.fn.tap = function (callback) { if(mobl.isIphone() || mobl.isAndroid() ||
+ * mobl.isIpad()) { new NoClickDelay(this[0], callback); } else {
+ * this.click(callback); } };
+ */
+
+$.event.special.tap = {
+ add : function(callback) {
+ if (mobl.isTouchDevice()) {
+ var that = this;
+ setTimeout(function() {
+ new NoClickDelay(that, callback);
+ });
+ } else {
+ $(this).bind('click', callback);
+ }
+ },
+ remove : function(callback) {
+ if (mobl.isIphone() || mobl.isAndroid() || mobl.isIpad()) {
+ // new NoClickDelay(this, callback); // TODO FIX THIS!!
+ } else {
+ $(this).unbind('click', callback);
+ }
+ }
+};
+
+$.event.special.touchdown = {
+ add : function(callback) {
+ var that = $(this);
+
+ setTimeout(function() {
+ if (mobl.isTouchDevice()) {
+ that.bind('touchstart', function(event) {
+ event = event.originalEvent;
+ // event.preventDefault();
+ if (event.touches.length === 1) {
+ var touch = event.touches[0];
+ event.x = touch.pageX - that.offset().left;
+ event.y = touch.pageY - that.offset().top;
+ event.clientX = touch.pageX;
+ event.clientY = touch.pageY;
+ callback.handler(event);
+ }
+ });
+ } else {
+ that.mousedown(function(event) {
+ // event.preventDefault();
+ this.dragging = true;
+ event.x = event.offsetX || event.layerX - that.offset().left;
+ event.y = event.offsetY || event.layerY - that.offset().top;
+ callback.handler(event);
+ });
+ }
+ });
+ }
+};
+
+$.event.special.touchdrag = {
+ add : function(callback) {
+ var that = $(this);
+ setTimeout(function() {
+ if (mobl.isTouchDevice()) {
+ that.bind('touchmove', function(event) {
+ event = event.originalEvent;
+ // event.preventDefault();
+ if (event.touches.length === 1) {
+ var touch = event.touches[0];
+ event.x = touch.pageX - that.offset().left;
+ event.y = touch.pageY - that.offset().top;
+ event.clientX = touch.pageX;
+ event.clientY = touch.pageY;
+ callback.handler(event);
+ }
+ });
+ } else {
+ that
+ .mousemove(function(event) {
+ // event.preventDefault();
+ if (this.dragging) {
+ event.x = event.offsetX || event.layerX
+ - that.offset().left;
+ event.y = event.offsetY || event.layerY
+ - that.offset().top;
+ callback.handler(event);
+ }
+ });
+ that.mouseup(function() {
+ this.dragging = false;
+ });
+ }
+ });
+ }
+};
+
+$.event.special.touchup = {
+ add : function(callback) {
+ var that = $(this);
+ setTimeout(function() {
+ if (mobl.isTouchDevice()) {
+ that.bind('touchend', function(event) {
+ event = event.originalEvent;
+ event.preventDefault();
+ if (event.changedTouches.length === 1) {
+ var touch = event.changedTouches[0];
+ event.x = touch.pageX - that.offset().left;
+ event.y = touch.pageY - that.offset().top;
+ event.clientX = touch.pageX;
+ event.clientY = touch.pageY;
+ callback.handler(event);
+ }
+ });
+ } else {
+ that.mouseup(function(event) {
+ event.preventDefault();
+ this.dragging = false;
+ event.x = event.offsetX || event.layerX - that.offset().left;
+ event.y = event.offsetY || event.layerY - that.offset().top;
+ callback.handler(event);
+ });
+ }
+ });
+ }
+};
Oops, something went wrong.

0 comments on commit 3f0d1c2

Please sign in to comment.