survivalkit 1.0.beta.8 → 1.0.beta.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. data/CHANGELOG.markdown +3 -0
  2. data/README.markdown +2 -2
  3. data/lib/survivalkit.rb +3 -2
  4. data/stylesheets/survivalkit/fonts/_font-awesome.scss +355 -0
  5. data/stylesheets/survivalkit/fonts/_league-gothic.scss +46 -0
  6. data/stylesheets/survivalkit/fonts/_ostrich-sans.scss +69 -0
  7. data/stylesheets/survivalkit/mixins/_ui.scss +22 -12
  8. data/stylesheets/survivalkit/survival-kit/_survival-kit.sass +157 -0
  9. data/templates/clean/manifest.rb +94 -0
  10. data/templates/drupal/script.js +2 -17
  11. data/templates/project/libs/jquery-1.8.2.min.js +2 -0
  12. data/templates/project/libs/modernizr-2.6.2.min.js +815 -0
  13. data/templates/project/manifest.rb +46 -27
  14. data/templates/project/script.js +2 -17
  15. data/templates/project/sources/FitText/README.md +52 -0
  16. data/templates/project/sources/FitText/example.html +60 -0
  17. data/templates/project/sources/FitText/jquery.fittext.js +43 -0
  18. data/templates/shared/fonts/font-awesome/fontawesome-webfont.eot +0 -0
  19. data/templates/shared/fonts/font-awesome/fontawesome-webfont.svg +255 -0
  20. data/templates/shared/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
  21. data/templates/shared/fonts/font-awesome/fontawesome-webfont.woff +0 -0
  22. data/templates/shared/fonts/league-gothic/leaguegothic-condensed-italic-webfont.eot +0 -0
  23. data/templates/shared/fonts/league-gothic/leaguegothic-condensed-italic-webfont.svg +224 -0
  24. data/templates/shared/fonts/league-gothic/leaguegothic-condensed-italic-webfont.ttf +0 -0
  25. data/templates/shared/fonts/league-gothic/leaguegothic-condensed-italic-webfont.woff +0 -0
  26. data/templates/shared/fonts/league-gothic/leaguegothic-condensed-regular-webfont.eot +0 -0
  27. data/templates/shared/fonts/league-gothic/leaguegothic-condensed-regular-webfont.svg +224 -0
  28. data/templates/shared/fonts/league-gothic/leaguegothic-condensed-regular-webfont.ttf +0 -0
  29. data/templates/shared/fonts/league-gothic/leaguegothic-condensed-regular-webfont.woff +0 -0
  30. data/templates/shared/fonts/league-gothic/leaguegothic-italic-webfont.eot +0 -0
  31. data/templates/shared/fonts/league-gothic/leaguegothic-italic-webfont.svg +224 -0
  32. data/templates/shared/fonts/league-gothic/leaguegothic-italic-webfont.ttf +0 -0
  33. data/templates/shared/fonts/league-gothic/leaguegothic-italic-webfont.woff +0 -0
  34. data/templates/shared/fonts/league-gothic/leaguegothic-regular-webfont.eot +0 -0
  35. data/templates/shared/fonts/league-gothic/leaguegothic-regular-webfont.svg +223 -0
  36. data/templates/shared/fonts/league-gothic/leaguegothic-regular-webfont.ttf +0 -0
  37. data/templates/shared/fonts/league-gothic/leaguegothic-regular-webfont.woff +0 -0
  38. data/templates/shared/fonts/ostrich/ostrich-black-webfont.eot +0 -0
  39. data/templates/shared/fonts/ostrich/ostrich-black-webfont.svg +141 -0
  40. data/templates/shared/fonts/ostrich/ostrich-black-webfont.ttf +0 -0
  41. data/templates/shared/fonts/ostrich/ostrich-black-webfont.woff +0 -0
  42. data/templates/shared/fonts/ostrich/ostrich-bold-webfont.eot +0 -0
  43. data/templates/shared/fonts/ostrich/ostrich-bold-webfont.svg +141 -0
  44. data/templates/shared/fonts/ostrich/ostrich-bold-webfont.ttf +0 -0
  45. data/templates/shared/fonts/ostrich/ostrich-bold-webfont.woff +0 -0
  46. data/templates/shared/fonts/ostrich/ostrich-dashed-webfont.eot +0 -0
  47. data/templates/shared/fonts/ostrich/ostrich-dashed-webfont.svg +141 -0
  48. data/templates/shared/fonts/ostrich/ostrich-dashed-webfont.ttf +0 -0
  49. data/templates/shared/fonts/ostrich/ostrich-dashed-webfont.woff +0 -0
  50. data/templates/shared/fonts/ostrich/ostrich-light-webfont.eot +0 -0
  51. data/templates/shared/fonts/ostrich/ostrich-light-webfont.svg +140 -0
  52. data/templates/shared/fonts/ostrich/ostrich-light-webfont.ttf +0 -0
  53. data/templates/shared/fonts/ostrich/ostrich-light-webfont.woff +0 -0
  54. data/templates/shared/fonts/ostrich/ostrich-regular-webfont.eot +0 -0
  55. data/templates/shared/fonts/ostrich/ostrich-regular-webfont.svg +141 -0
  56. data/templates/shared/fonts/ostrich/ostrich-regular-webfont.ttf +0 -0
  57. data/templates/shared/fonts/ostrich/ostrich-regular-webfont.woff +0 -0
  58. data/templates/shared/fonts/ostrich/ostrich-rounded-webfont.eot +0 -0
  59. data/templates/shared/fonts/ostrich/ostrich-rounded-webfont.svg +141 -0
  60. data/templates/shared/fonts/ostrich/ostrich-rounded-webfont.ttf +0 -0
  61. data/templates/shared/fonts/ostrich/ostrich-rounded-webfont.woff +0 -0
  62. data/templates/shared/partials/01-variables/_colors.scss +1 -1
  63. data/templates/shared/partials/01-variables/_fonts.scss +10 -0
  64. data/templates/shared/partials/06-ui-patterns/_drupal-patterns.scss +4 -5
  65. data/templates/shared/partials/07-styletile/_tile-design.scss +2 -2
  66. data/templates/shared/style.scss +2 -1
  67. metadata +73 -187
  68. data/stylesheets/survivalkit/survival_kit/_survival-kit.scss +0 -145
  69. data/templates/drupal/libs/320-up/helper.js +0 -146
  70. data/templates/drupal/libs/320-up/imgSizer.js +0 -61
  71. data/templates/drupal/libs/dd_belatedpng.js +0 -13
  72. data/templates/drupal/libs/formalize/README.txt +0 -11
  73. data/templates/drupal/libs/formalize/dojo.formalize.js +0 -174
  74. data/templates/drupal/libs/formalize/extjs.formalize.js +0 -168
  75. data/templates/drupal/libs/formalize/jquery.formalize.js +0 -158
  76. data/templates/drupal/libs/formalize/mootools.formalize.js +0 -163
  77. data/templates/drupal/libs/formalize/prototype.formalize.js +0 -171
  78. data/templates/drupal/libs/formalize/yui.formalize.js +0 -168
  79. data/templates/drupal/libs/jquery-1.6.js +0 -8865
  80. data/templates/drupal/libs/jquery-1.6.min.js +0 -16
  81. data/templates/drupal/libs/modernizr-2.0.min.js +0 -4
  82. data/templates/drupal/libs/mootools-core-1.3.1-full-compat-yc.js +0 -485
  83. data/templates/drupal/libs/plugins.js +0 -58
  84. data/templates/drupal/libs/respond.min.js +0 -7
  85. data/templates/drupal/libs/selectivizr-min.js +0 -5
  86. data/templates/drupal/libs/selectivizr.js +0 -5
  87. data/templates/project/files/apple-touch-icon-114x114-precomposed.png +0 -0
  88. data/templates/project/files/apple-touch-icon-72x72-precomposed.png +0 -0
  89. data/templates/project/files/apple-touch-icon.png +0 -0
  90. data/templates/project/files/crossdomain.xml +0 -25
  91. data/templates/project/files/favicon.ico +0 -0
  92. data/templates/project/files/favicon.png +0 -0
  93. data/templates/project/files/google.yml +0 -22
  94. data/templates/project/files/htaccess.htaccess +0 -478
  95. data/templates/project/files/html/404.html +0 -22
  96. data/templates/project/files/html/formalize_jquery_demo.html +0 -288
  97. data/templates/project/files/html/formalize_jquery_disabled.html +0 -288
  98. data/templates/project/files/html/formalize_jquery_errors.html +0 -288
  99. data/templates/project/files/html/index.html +0 -100
  100. data/templates/project/files/html/survivalkit/elements-common.html +0 -588
  101. data/templates/project/files/html/survivalkit/elements-html5.html +0 -2988
  102. data/templates/project/files/html/survivalkit/elements-typography.html +0 -240
  103. data/templates/project/files/html/survivalkit/elements-ui-patterns-drupal-css.html +0 -1883
  104. data/templates/project/files/html/survivalkit/elements-ui-patterns-drupal.html +0 -1882
  105. data/templates/project/files/html/survivalkit/elements-ui-patterns.html +0 -267
  106. data/templates/project/files/html/survivalkit/index.html +0 -132
  107. data/templates/project/files/html/survivalkit/styletile/index.html +0 -1
  108. data/templates/project/files/html/survivalkit/styletile/styletile.html +0 -215
  109. data/templates/project/files/humans.txt +0 -43
  110. data/templates/project/files/robots.txt +0 -5
  111. data/templates/project/libs/320-up/helper.js +0 -146
  112. data/templates/project/libs/320-up/imgSizer.js +0 -61
  113. data/templates/project/libs/jquery-1.6.js +0 -8865
  114. data/templates/project/libs/jquery-1.6.min.js +0 -16
  115. data/templates/project/libs/modernizr-2.0.min.js +0 -4
  116. data/templates/project/libs/plugins.js +0 -58
  117. data/templates/project/libs/selectivizr.js +0 -5
  118. data/templates/project/templates/_flashes.html.haml +0 -4
  119. data/templates/project/templates/_footer.html.haml +0 -2
  120. data/templates/project/templates/_head.html.haml +0 -26
  121. data/templates/project/templates/_header.html.haml +0 -1
  122. data/templates/project/templates/_javascripts.html.haml +0 -27
  123. data/templates/project/templates/_stylesheets.html.haml +0 -5
  124. data/templates/project/templates/application.html.haml +0 -28
  125. data/templates/project/templates/old/_layout.haml +0 -1
  126. data/templates/project/templates/old/home.html.haml +0 -14
  127. data/templates/project/templates/old/layouts/default.haml +0 -62
  128. data/templates/project/templates/old/layouts/survivalkit/default.haml +0 -64
  129. data/templates/project/templates/old/layouts/survivalkit/styletile.haml +0 -64
  130. data/templates/project/templates/old/survivalkit/_layout.haml +0 -1
  131. data/templates/project/templates/old/survivalkit/elements-common.haml +0 -33
  132. data/templates/project/templates/old/survivalkit/elements-html5.haml +0 -71
  133. data/templates/project/templates/old/survivalkit/elements-typography.haml +0 -100
  134. data/templates/project/templates/old/survivalkit/elements-ui-patterns-drupal.haml +0 -38
  135. data/templates/project/templates/old/survivalkit/elements-ui-patterns.haml +0 -23
  136. data/templates/project/templates/old/survivalkit/index.haml +0 -2
  137. data/templates/project/templates/old/survivalkit/partials/common/abbr.haml +0 -8
  138. data/templates/project/templates/old/survivalkit/partials/common/acronym.haml +0 -8
  139. data/templates/project/templates/old/survivalkit/partials/common/characters.haml +0 -11
  140. data/templates/project/templates/old/survivalkit/partials/common/cite.haml +0 -12
  141. data/templates/project/templates/old/survivalkit/partials/common/code.haml +0 -8
  142. data/templates/project/templates/old/survivalkit/partials/common/dfn.haml +0 -8
  143. data/templates/project/templates/old/survivalkit/partials/common/em.haml +0 -10
  144. data/templates/project/templates/old/survivalkit/partials/common/forms.haml +0 -27
  145. data/templates/project/templates/old/survivalkit/partials/common/headers.haml +0 -23
  146. data/templates/project/templates/old/survivalkit/partials/common/inline-images.haml +0 -9
  147. data/templates/project/templates/old/survivalkit/partials/common/kbd.haml +0 -10
  148. data/templates/project/templates/old/survivalkit/partials/common/links.haml +0 -10
  149. data/templates/project/templates/old/survivalkit/partials/common/lists.haml +0 -55
  150. data/templates/project/templates/old/survivalkit/partials/common/others.haml +0 -35
  151. data/templates/project/templates/old/survivalkit/partials/common/paragraphs.haml +0 -15
  152. data/templates/project/templates/old/survivalkit/partials/common/pre.haml +0 -27
  153. data/templates/project/templates/old/survivalkit/partials/common/q.haml +0 -8
  154. data/templates/project/templates/old/survivalkit/partials/common/samp.haml +0 -8
  155. data/templates/project/templates/old/survivalkit/partials/common/strong.haml +0 -8
  156. data/templates/project/templates/old/survivalkit/partials/common/tables.haml +0 -43
  157. data/templates/project/templates/old/survivalkit/partials/common/var.haml +0 -8
  158. data/templates/project/templates/old/survivalkit/partials/header-styletile.haml +0 -9
  159. data/templates/project/templates/old/survivalkit/partials/header.haml +0 -6
  160. data/templates/project/templates/old/survivalkit/partials/html5/a.haml +0 -36
  161. data/templates/project/templates/old/survivalkit/partials/html5/abbr.haml +0 -26
  162. data/templates/project/templates/old/survivalkit/partials/html5/address.haml +0 -27
  163. data/templates/project/templates/old/survivalkit/partials/html5/all-headings.haml +0 -31
  164. data/templates/project/templates/old/survivalkit/partials/html5/article.haml +0 -22
  165. data/templates/project/templates/old/survivalkit/partials/html5/aside.haml +0 -20
  166. data/templates/project/templates/old/survivalkit/partials/html5/b.haml +0 -21
  167. data/templates/project/templates/old/survivalkit/partials/html5/bdi.haml +0 -30
  168. data/templates/project/templates/old/survivalkit/partials/html5/blockquote.haml +0 -32
  169. data/templates/project/templates/old/survivalkit/partials/html5/cite.haml +0 -46
  170. data/templates/project/templates/old/survivalkit/partials/html5/code.haml +0 -70
  171. data/templates/project/templates/old/survivalkit/partials/html5/details.haml +0 -42
  172. data/templates/project/templates/old/survivalkit/partials/html5/dfn.haml +0 -52
  173. data/templates/project/templates/old/survivalkit/partials/html5/dl.haml +0 -69
  174. data/templates/project/templates/old/survivalkit/partials/html5/em.haml +0 -15
  175. data/templates/project/templates/old/survivalkit/partials/html5/fieldset.haml +0 -49
  176. data/templates/project/templates/old/survivalkit/partials/html5/figure.haml +0 -48
  177. data/templates/project/templates/old/survivalkit/partials/html5/footer.haml +0 -37
  178. data/templates/project/templates/old/survivalkit/partials/html5/header.haml +0 -44
  179. data/templates/project/templates/old/survivalkit/partials/html5/hgroup.haml +0 -20
  180. data/templates/project/templates/old/survivalkit/partials/html5/hr.haml +0 -52
  181. data/templates/project/templates/old/survivalkit/partials/html5/i.haml +0 -28
  182. data/templates/project/templates/old/survivalkit/partials/html5/kbd.haml +0 -19
  183. data/templates/project/templates/old/survivalkit/partials/html5/label.haml +0 -18
  184. data/templates/project/templates/old/survivalkit/partials/html5/li.haml +0 -91
  185. data/templates/project/templates/old/survivalkit/partials/html5/mark.haml +0 -30
  186. data/templates/project/templates/old/survivalkit/partials/html5/menu.haml +0 -39
  187. data/templates/project/templates/old/survivalkit/partials/html5/nav.haml +0 -68
  188. data/templates/project/templates/old/survivalkit/partials/html5/ol.haml +0 -23
  189. data/templates/project/templates/old/survivalkit/partials/html5/p.haml +0 -41
  190. data/templates/project/templates/old/survivalkit/partials/html5/pre.haml +0 -48
  191. data/templates/project/templates/old/survivalkit/partials/html5/q.haml +0 -34
  192. data/templates/project/templates/old/survivalkit/partials/html5/ruby.haml +0 -55
  193. data/templates/project/templates/old/survivalkit/partials/html5/s.haml +0 -17
  194. data/templates/project/templates/old/survivalkit/partials/html5/samp.haml +0 -27
  195. data/templates/project/templates/old/survivalkit/partials/html5/sample-forms.haml +0 -52
  196. data/templates/project/templates/old/survivalkit/partials/html5/sample-tables.haml +0 -152
  197. data/templates/project/templates/old/survivalkit/partials/html5/section.haml +0 -21
  198. data/templates/project/templates/old/survivalkit/partials/html5/small.haml +0 -33
  199. data/templates/project/templates/old/survivalkit/partials/html5/strong.haml +0 -25
  200. data/templates/project/templates/old/survivalkit/partials/html5/sub-sup.haml +0 -58
  201. data/templates/project/templates/old/survivalkit/partials/html5/table.haml +0 -196
  202. data/templates/project/templates/old/survivalkit/partials/html5/text-summary.haml +0 -305
  203. data/templates/project/templates/old/survivalkit/partials/html5/thead.haml +0 -67
  204. data/templates/project/templates/old/survivalkit/partials/html5/time.haml +0 -31
  205. data/templates/project/templates/old/survivalkit/partials/html5/ul.haml +0 -21
  206. data/templates/project/templates/old/survivalkit/partials/menu.haml +0 -14
  207. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/block.haml +0 -7
  208. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/breadcrumbs.haml +0 -7
  209. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/comments.haml +0 -69
  210. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/field-image.haml +0 -7
  211. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/form-comment.haml +0 -54
  212. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/form-login.haml +0 -23
  213. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/form-new-account.haml +0 -24
  214. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/form-new-password.haml +0 -16
  215. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/links.haml +0 -6
  216. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/menu.haml +0 -10
  217. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/messages.haml +0 -21
  218. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/node.haml +0 -28
  219. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/pager.haml +0 -17
  220. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/rss-link.haml +0 -5
  221. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/search.haml +0 -14
  222. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/site-name.haml +0 -6
  223. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/tabs.haml +0 -14
  224. data/templates/project/templates/old/survivalkit/partials/patterns-drupal/taxonomy.haml +0 -10
  225. data/templates/project/templates/old/survivalkit/partials/patterns-general/block.haml +0 -7
  226. data/templates/project/templates/old/survivalkit/partials/patterns-general/breadcrumbs.haml +0 -7
  227. data/templates/project/templates/old/survivalkit/partials/patterns-general/comments.haml +0 -69
  228. data/templates/project/templates/old/survivalkit/partials/patterns-general/field-image.haml +0 -7
  229. data/templates/project/templates/old/survivalkit/partials/patterns-general/form-comment.haml +0 -54
  230. data/templates/project/templates/old/survivalkit/partials/patterns-general/form-login.haml +0 -23
  231. data/templates/project/templates/old/survivalkit/partials/patterns-general/form-new-account.haml +0 -24
  232. data/templates/project/templates/old/survivalkit/partials/patterns-general/form-new-password.haml +0 -16
  233. data/templates/project/templates/old/survivalkit/partials/patterns-general/links.haml +0 -6
  234. data/templates/project/templates/old/survivalkit/partials/patterns-general/menu.haml +0 -10
  235. data/templates/project/templates/old/survivalkit/partials/patterns-general/messages.haml +0 -21
  236. data/templates/project/templates/old/survivalkit/partials/patterns-general/node.haml +0 -28
  237. data/templates/project/templates/old/survivalkit/partials/patterns-general/pager.haml +0 -17
  238. data/templates/project/templates/old/survivalkit/partials/patterns-general/rss-link.haml +0 -5
  239. data/templates/project/templates/old/survivalkit/partials/patterns-general/search.haml +0 -14
  240. data/templates/project/templates/old/survivalkit/partials/patterns-general/site-name.haml +0 -6
  241. data/templates/project/templates/old/survivalkit/partials/patterns-general/tabs.haml +0 -14
  242. data/templates/project/templates/old/survivalkit/partials/patterns-general/taxonomy.haml +0 -10
  243. data/templates/project/templates/old/survivalkit/styletile/_layout.haml +0 -1
  244. data/templates/project/templates/old/survivalkit/styletile/index.redirect +0 -1
  245. data/templates/project/templates/old/survivalkit/styletile/styletile.haml +0 -60
  246. data/templates/project/templates/old/view_helpers.rb +0 -25
  247. data/templates/shared/survivalkit/drupal7.scss +0 -3224
  248. data/templates/shared/survivalkit/survivalkit.scss +0 -32
@@ -1,146 +0,0 @@
1
- /*
2
- * MBP - Mobile boilerplate helper functions
3
- */
4
- (function(document){
5
-
6
- window.MBP = window.MBP || {};
7
-
8
- // Fix for iPhone viewport scale bug
9
- // http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
10
-
11
- MBP.viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]');
12
- MBP.ua = navigator.userAgent;
13
-
14
- MBP.scaleFix = function () {
15
- if (MBP.viewportmeta && /iPhone|iPad/.test(MBP.ua) && !/Opera Mini/.test(MBP.ua)) {
16
- MBP.viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
17
- document.addEventListener("gesturestart", MBP.gestureStart, false);
18
- }
19
- };
20
- MBP.gestureStart = function () {
21
- MBP.viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
22
- };
23
-
24
-
25
- // Hide URL Bar for iOS
26
- // http://remysharp.com/2010/08/05/doing-it-right-skipping-the-iphone-url-bar/
27
-
28
- MBP.hideUrlBar = function () {
29
- /iPhone/.test(MBP.ua) && !pageYOffset && !location.hash && setTimeout(function () {
30
- window.scrollTo(0, 1);
31
- }, 1000);
32
- };
33
-
34
-
35
- // Fast Buttons - read wiki below before using
36
- // https://github.com/shichuan/mobile-html5-boilerplate/wiki/JavaScript-Helper
37
-
38
- MBP.fastButton = function (element, handler) {
39
- this.element = element;
40
- this.handler = handler;
41
- if (element.addEventListener) {
42
- element.addEventListener('touchstart', this, false);
43
- element.addEventListener('click', this, false);
44
- }
45
- };
46
-
47
- MBP.fastButton.prototype.handleEvent = function(event) {
48
- switch (event.type) {
49
- case 'touchstart': this.onTouchStart(event); break;
50
- case 'touchmove': this.onTouchMove(event); break;
51
- case 'touchend': this.onClick(event); break;
52
- case 'click': this.onClick(event); break;
53
- }
54
- };
55
-
56
- MBP.fastButton.prototype.onTouchStart = function(event) {
57
- event.stopPropagation();
58
- this.element.addEventListener('touchend', this, false);
59
- document.body.addEventListener('touchmove', this, false);
60
- this.startX = event.touches[0].clientX;
61
- this.startY = event.touches[0].clientY;
62
- this.element.style.backgroundColor = "rgba(0,0,0,.7)";
63
- };
64
-
65
- MBP.fastButton.prototype.onTouchMove = function(event) {
66
- if(Math.abs(event.touches[0].clientX - this.startX) > 10 || Math.abs(event.touches[0].clientY - this.startY) > 10) {
67
- this.reset();
68
- }
69
- };
70
-
71
- MBP.fastButton.prototype.onClick = function(event) {
72
- event.stopPropagation();
73
- this.reset();
74
- this.handler(event);
75
- if(event.type == 'touchend') {
76
- MBP.preventGhostClick(this.startX, this.startY);
77
- }
78
- this.element.style.backgroundColor = "";
79
- };
80
-
81
- MBP.fastButton.prototype.reset = function() {
82
- this.element.removeEventListener('touchend', this, false);
83
- document.body.removeEventListener('touchmove', this, false);
84
- this.element.style.backgroundColor = "";
85
- };
86
-
87
- MBP.preventGhostClick = function (x, y) {
88
- MBP.coords.push(x, y);
89
- window.setTimeout(function (){
90
- MBP.coords.splice(0, 2);
91
- }, 2500);
92
- };
93
-
94
- MBP.ghostClickHandler = function (event) {
95
- for(var i = 0, len = MBP.coords.length; i < len; i += 2) {
96
- var x = MBP.coords[i];
97
- var y = MBP.coords[i + 1];
98
- if(Math.abs(event.clientX - x) < 25 && Math.abs(event.clientY - y) < 25) {
99
- event.stopPropagation();
100
- event.preventDefault();
101
- }
102
- }
103
- };
104
-
105
- if (document.addEventListener) {
106
- document.addEventListener('click', MBP.ghostClickHandler, true);
107
- }
108
-
109
- MBP.coords = [];
110
-
111
-
112
- // iOS Startup Image
113
- // https://github.com/shichuan/mobile-html5-boilerplate/issues#issue/2
114
-
115
- MBP.splash = function () {
116
- var filename = navigator.platform === 'iPad' ? 'h/' : 'l/';
117
- document.write('<link rel="apple-touch-startup-image" href="/img/' + filename + 'splash.png" />' );
118
- };
119
-
120
-
121
- // Autogrow
122
- // http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series.html
123
-
124
- MBP.autogrow = function (element, lh) {
125
-
126
- function handler(e){
127
- var newHeight = this.scrollHeight,
128
- currentHeight = this.clientHeight;
129
- if (newHeight > currentHeight) {
130
- this.style.height = newHeight + 3 * textLineHeight + "px";
131
- }
132
- }
133
-
134
- var setLineHeight = (lh) ? lh : 12,
135
- textLineHeight = element.currentStyle ? element.currentStyle.lineHeight :
136
- getComputedStyle(element, null).lineHeight;
137
-
138
- textLineHeight = (textLineHeight.indexOf("px") == -1) ? setLineHeight :
139
- parseInt(textLineHeight, 10);
140
-
141
- element.style.overflow = "hidden";
142
- element.addEventListener ? element.addEventListener('keyup', handler, false) :
143
- element.attachEvent('onkeyup', handler);
144
- };
145
-
146
- })(document);
@@ -1,61 +0,0 @@
1
- var imgSizer = {
2
- Config : {
3
- imgCache : []
4
- ,spacer : "/path/to/your/spacer.gif"
5
- }
6
-
7
- ,collate : function(aScope) {
8
- var isOldIE = (document.all && !window.opera && !window.XDomainRequest) ? 1 : 0;
9
- if (isOldIE && document.getElementsByTagName) {
10
- var c = imgSizer;
11
- var imgCache = c.Config.imgCache;
12
-
13
- var images = (aScope && aScope.length) ? aScope : document.getElementsByTagName("img");
14
- for (var i = 0; i < images.length; i++) {
15
- images[i].origWidth = images[i].offsetWidth;
16
- images[i].origHeight = images[i].offsetHeight;
17
-
18
- imgCache.push(images[i]);
19
- c.ieAlpha(images[i]);
20
- images[i].style.width = "100%";
21
- }
22
-
23
- if (imgCache.length) {
24
- c.resize(function() {
25
- for (var i = 0; i < imgCache.length; i++) {
26
- var ratio = (imgCache[i].offsetWidth / imgCache[i].origWidth);
27
- imgCache[i].style.height = (imgCache[i].origHeight * ratio) + "px";
28
- }
29
- });
30
- }
31
- }
32
- }
33
-
34
- ,ieAlpha : function(img) {
35
- var c = imgSizer;
36
- if (img.oldSrc) {
37
- img.src = img.oldSrc;
38
- }
39
- var src = img.src;
40
- img.style.width = img.offsetWidth + "px";
41
- img.style.height = img.offsetHeight + "px";
42
- img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
43
- img.oldSrc = src;
44
- img.src = c.Config.spacer;
45
- }
46
-
47
- // Ghettomodified version of Simon Willison's addLoadEvent() -- http://simonwillison.net/2004/May/26/addLoadEvent/
48
- ,resize : function(func) {
49
- var oldonresize = window.onresize;
50
- if (typeof window.onresize != 'function') {
51
- window.onresize = func;
52
- } else {
53
- window.onresize = function() {
54
- if (oldonresize) {
55
- oldonresize();
56
- }
57
- func();
58
- }
59
- }
60
- }
61
- }