compass-jquery-plugin 0.3.0.beta.24 → 0.3.0.beta.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. data/README.textile +10 -9
  2. data/VERSION.yml +1 -1
  3. data/compass-jquery-plugin.gemspec +292 -288
  4. data/gem_tasks/ical.rake +85 -0
  5. data/gem_tasks/jqtouch.rake +1 -25
  6. data/gem_tasks/jrails.rake +127 -94
  7. data/gem_tasks/jstree.rake +2 -1
  8. data/gem_tasks/mobile.rake +33 -2
  9. data/gem_tasks/rubygems.rake +1 -1
  10. data/gem_tasks/tools.rake +66 -0
  11. data/lib/{compiler.jar → google-compiler-20100917.jar} +0 -0
  12. data/lib/handle_js_files.rb +27 -30
  13. data/lib/jquery/ical.rb +7 -0
  14. data/lib/jquery/{jqical → ical}/calendar.rb +5 -5
  15. data/lib/jquery/{jqical → ical}/event.rb +117 -117
  16. data/lib/jquery/{jqical → ical}/helpers/ui_event_helper.rb +1 -1
  17. data/lib/jquery/tools.rb +2 -0
  18. data/lib/js.jar +0 -0
  19. data/lib/jslint-check.js +36 -0
  20. data/lib/jslint.js +5500 -0
  21. data/templates/dynatree/jquery.dynatree.js +1170 -784
  22. data/templates/dynatree/jquery.dynatree.min.js +77 -67
  23. data/templates/emulators/emulators/blackberry.landscape.scss +1 -0
  24. data/templates/emulators/emulators/blackberry.portrait.scss +2 -2
  25. data/templates/emulators/emulators/blackberry.torch.portrait.png +0 -0
  26. data/templates/emulators/emulators/iphone.landscape.scss +1 -0
  27. data/templates/emulators/emulators/iphone.portrait.png +0 -0
  28. data/templates/emulators/emulators/iphone.portrait.scss +2 -1
  29. data/templates/emulators/emulators/palm.landscape.scss +1 -0
  30. data/templates/emulators/emulators/palm.portrait.scss +3 -2
  31. data/templates/emulators/emulators/palm.pre.portrait.png +0 -0
  32. data/templates/{jqical → ical}/app/views/shared/_ui_event_for.js.haml +0 -0
  33. data/templates/ical/config/initializers/ical.rb +7 -0
  34. data/templates/{jqical/jquery.jqical.js → ical/jquery.ical.js} +0 -0
  35. data/templates/{jqical/jquery.jqical.min.js → ical/jquery.ical.min.js} +0 -0
  36. data/templates/{jqical/jquery/jqical.scss → ical/jquery/ical.scss} +1 -1
  37. data/templates/{jqical/jquery/jqical → ical/jquery/ical}/calendar.png +0 -0
  38. data/templates/{jqical/jquery/jqical → ical/jquery/ical}/clock.png +0 -0
  39. data/templates/ical/manifest.rb +10 -0
  40. data/templates/jqtouch/config/initializers/jqtouch.rb +1 -1
  41. data/templates/jqtouch/manifest.rb +0 -261
  42. data/templates/jrails/config/initializers/jrails.rb +3 -3
  43. data/templates/jrails/{jquery-1.4.3.js → jquery-1.4.4.js} +102 -47
  44. data/templates/jrails/jquery-1.4.4.min.js +152 -0
  45. data/templates/jrails/lib/tasks/haml.rake +55 -0
  46. data/templates/jrails/manifest.rb +4 -2
  47. data/templates/jstree/jquery.jstree.js +148 -64
  48. data/templates/jstree/jquery.jstree.min.js +219 -215
  49. data/templates/mobile/config/initializers/mobile.rb +1 -1
  50. data/templates/jqtouch/jquery/touch/glyphish/Read me first - license.txt b/data/templates/mobile/glyphish/Read me first - → license.txt +0 -0
  51. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/01-refresh.png +0 -0
  52. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/02-redo.png +0 -0
  53. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/03-loopback.png +0 -0
  54. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/04-squiggle.png +0 -0
  55. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/05-shuffle.png +0 -0
  56. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/06-magnifying-glass.png +0 -0
  57. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/07-map-marker.png +0 -0
  58. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/08-chat.png +0 -0
  59. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/09-chat2.png +0 -0
  60. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/10-medical.png +0 -0
  61. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/100-coffee.png +0 -0
  62. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/101-gameplan.png +0 -0
  63. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/102-walk.png +0 -0
  64. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/103-map.png +0 -0
  65. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/104-index-cards.png +0 -0
  66. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/105-piano.png +0 -0
  67. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/106-sliders.png +0 -0
  68. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/107-widescreen.png +0 -0
  69. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/108-badge.png +0 -0
  70. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/109-chicken.png +0 -0
  71. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/11-clock.png +0 -0
  72. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/110-bug.png +0 -0
  73. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/111-user.png +0 -0
  74. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/112-group.png +0 -0
  75. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/113-navigation.png +0 -0
  76. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/114-balloon.png +0 -0
  77. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/115-bow-and-arrow.png +0 -0
  78. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/116-controller.png +0 -0
  79. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/117-todo.png +0 -0
  80. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/118-coathanger.png +0 -0
  81. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/119-piggybank.png +0 -0
  82. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/12-eye.png +0 -0
  83. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/120-headphones.png +0 -0
  84. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/121-lanscape.png +0 -0
  85. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/122-stats.png +0 -0
  86. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/123-id-card.png +0 -0
  87. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/124-bullhorn.png +0 -0
  88. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/125-food.png +0 -0
  89. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/126-moon.png +0 -0
  90. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/127-sock.png +0 -0
  91. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/128-bone.png +0 -0
  92. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/129-golf.png +0 -0
  93. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/13-target.png +0 -0
  94. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/130-dice.png +0 -0
  95. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/14-tag.png +0 -0
  96. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/15-tags.png +0 -0
  97. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/16-line-chart.png +0 -0
  98. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/17-bar-chart.png +0 -0
  99. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/18-envelope.png +0 -0
  100. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/19-gear.png +0 -0
  101. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/20-gear2.png +0 -0
  102. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/21-skull.png +0 -0
  103. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/22-skull-n-crossbones.png +0 -0
  104. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/23-bird.png +0 -0
  105. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/24-gift.png +0 -0
  106. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/25-weather.png +0 -0
  107. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/26-bandaid.png +0 -0
  108. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/27-planet.png +0 -0
  109. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/28-star.png +0 -0
  110. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/29-heart.png +0 -0
  111. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/30-key.png +0 -0
  112. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/31-ipod.png +0 -0
  113. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/32-iphone.png +0 -0
  114. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/33-cabinet.png +0 -0
  115. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/34-coffee.png +0 -0
  116. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/35-shopping-bag.png +0 -0
  117. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/36-toolbox.png +0 -0
  118. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/37-suitcase.png +0 -0
  119. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/38-airplane.png +0 -0
  120. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/39-spraycan.png +0 -0
  121. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/40-inbox.png +0 -0
  122. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/41-picture-frame.png +0 -0
  123. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/42-photos.png +0 -0
  124. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/43-film-roll.png +0 -0
  125. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/44-shoebox.png +0 -0
  126. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/45-movie1.png +0 -0
  127. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/46-movie2.png +0 -0
  128. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/47-fuel.png +0 -0
  129. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/48-fork-and-knife.png +0 -0
  130. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/49-battery.png +0 -0
  131. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/50-beaker.png +0 -0
  132. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/51-outlet.png +0 -0
  133. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/52-pinetree.png +0 -0
  134. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/53-house.png +0 -0
  135. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/54-lock.png +0 -0
  136. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/55-network.png +0 -0
  137. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/56-cloud.png +0 -0
  138. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/57-download.png +0 -0
  139. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/58-bookmark.png +0 -0
  140. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/59-flag.png +0 -0
  141. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/60-signpost.png +0 -0
  142. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/61-brightness.png +0 -0
  143. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/62-contrast.png +0 -0
  144. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/63-runner.png +0 -0
  145. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/64-zap.png +0 -0
  146. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/65-note.png +0 -0
  147. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/66-microphone.png +0 -0
  148. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/67-tshirt.png +0 -0
  149. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/68-paperclip.png +0 -0
  150. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/69-display.png +0 -0
  151. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/70-tv.png +0 -0
  152. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/71-compass.png +0 -0
  153. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/72-pin.png +0 -0
  154. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/73-radar.png +0 -0
  155. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/74-location.png +0 -0
  156. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/75-phone.png +0 -0
  157. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/76-baby.png +0 -0
  158. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/77-ekg.png +0 -0
  159. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/78-stopwatch.png +0 -0
  160. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/79-medical-bag.png +0 -0
  161. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/80-shopping-cart.png +0 -0
  162. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/81-dashboard.png +0 -0
  163. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/82-dogpaw.png +0 -0
  164. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/83-calendar.png +0 -0
  165. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/84-lightbulb.png +0 -0
  166. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/85-trophy.png +0 -0
  167. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/86-camera.png +0 -0
  168. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/87-wineglass.png +0 -0
  169. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/88-beermug.png +0 -0
  170. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/89-dumbbell.png +0 -0
  171. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/90-lifebuoy.png +0 -0
  172. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/91-beaker2.png +0 -0
  173. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/92-testtube.png +0 -0
  174. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/93-thermometer.png +0 -0
  175. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/94-pill.png +0 -0
  176. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/95-equalizer.png +0 -0
  177. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/96-book.png +0 -0
  178. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/97-puzzle.png +0 -0
  179. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/98-palette.png +0 -0
  180. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/icons/99-umbrella.png +0 -0
  181. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/01-refresh.png +0 -0
  182. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/02-redo.png +0 -0
  183. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/03-loopback.png +0 -0
  184. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/04-squiggle.png +0 -0
  185. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/05-shuffle.png +0 -0
  186. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/06-magnifying-glass.png +0 -0
  187. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/07-map-marker.png +0 -0
  188. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/08-chat.png +0 -0
  189. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/09-chat2.png +0 -0
  190. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/10-medical.png +0 -0
  191. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/100-coffee.png +0 -0
  192. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/101-gameplan.png +0 -0
  193. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/102-walk.png +0 -0
  194. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/103-map.png +0 -0
  195. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/104-index-cards.png +0 -0
  196. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/105-piano.png +0 -0
  197. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/106-sliders.png +0 -0
  198. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/107-widescreen.png +0 -0
  199. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/108-badge.png +0 -0
  200. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/109-chicken.png +0 -0
  201. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/11-clock.png +0 -0
  202. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/110-bug.png +0 -0
  203. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/111-user.png +0 -0
  204. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/112-group.png +0 -0
  205. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/113-navigation.png +0 -0
  206. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/114-balloon.png +0 -0
  207. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/115-bow-and-arrow.png +0 -0
  208. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/116-controller.png +0 -0
  209. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/117-todo.png +0 -0
  210. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/118-coathanger.png +0 -0
  211. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/119-piggybank.png +0 -0
  212. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/12-eye.png +0 -0
  213. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/120-headphones.png +0 -0
  214. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/121-lanscape.png +0 -0
  215. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/122-stats.png +0 -0
  216. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/123-id-card.png +0 -0
  217. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/124-bullhorn.png +0 -0
  218. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/125-food.png +0 -0
  219. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/126-moon.png +0 -0
  220. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/127-sock.png +0 -0
  221. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/128-bone.png +0 -0
  222. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/129-golf.png +0 -0
  223. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/13-target.png +0 -0
  224. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/130-dice.png +0 -0
  225. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/14-tag.png +0 -0
  226. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/15-tags.png +0 -0
  227. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/16-line-chart.png +0 -0
  228. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/17-bar-chart.png +0 -0
  229. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/18-envelope.png +0 -0
  230. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/19-gear.png +0 -0
  231. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/20-gear2.png +0 -0
  232. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/21-skull.png +0 -0
  233. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/22-skull-n-crossbones.png +0 -0
  234. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/23-bird.png +0 -0
  235. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/24-gift.png +0 -0
  236. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/25-weather.png +0 -0
  237. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/26-bandaid.png +0 -0
  238. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/27-planet.png +0 -0
  239. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/28-star.png +0 -0
  240. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/29-heart.png +0 -0
  241. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/30-key.png +0 -0
  242. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/31-ipod.png +0 -0
  243. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/32-iphone.png +0 -0
  244. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/33-cabinet.png +0 -0
  245. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/34-coffee.png +0 -0
  246. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/35-shopping-bag.png +0 -0
  247. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/36-toolbox.png +0 -0
  248. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/37-suitcase.png +0 -0
  249. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/38-airplane.png +0 -0
  250. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/39-spraycan.png +0 -0
  251. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/40-inbox.png +0 -0
  252. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/41-picture-frame.png +0 -0
  253. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/42-photos.png +0 -0
  254. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/43-film-roll.png +0 -0
  255. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/44-shoebox.png +0 -0
  256. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/45-movie1.png +0 -0
  257. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/46-movie2.png +0 -0
  258. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/47-fuel.png +0 -0
  259. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/48-fork-and-knife.png +0 -0
  260. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/49-battery.png +0 -0
  261. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/50-beaker.png +0 -0
  262. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/51-outlet.png +0 -0
  263. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/52-pinetree.png +0 -0
  264. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/53-house.png +0 -0
  265. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/54-lock.png +0 -0
  266. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/55-network.png +0 -0
  267. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/56-cloud.png +0 -0
  268. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/57-download.png +0 -0
  269. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/58-bookmark.png +0 -0
  270. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/59-flag.png +0 -0
  271. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/60-signpost.png +0 -0
  272. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/61-brightness.png +0 -0
  273. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/62-contrast.png +0 -0
  274. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/63-runner.png +0 -0
  275. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/64-zap.png +0 -0
  276. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/65-note.png +0 -0
  277. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/66-microphone.png +0 -0
  278. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/67-tshirt.png +0 -0
  279. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/68-paperclip.png +0 -0
  280. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/69-display.png +0 -0
  281. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/70-tv.png +0 -0
  282. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/71-compass.png +0 -0
  283. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/72-pin.png +0 -0
  284. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/73-radar.png +0 -0
  285. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/74-location.png +0 -0
  286. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/75-phone.png +0 -0
  287. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/76-baby.png +0 -0
  288. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/77-ekg.png +0 -0
  289. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/78-stopwatch.png +0 -0
  290. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/79-medical-bag.png +0 -0
  291. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/80-shopping-cart.png +0 -0
  292. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/81-dashboard.png +0 -0
  293. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/82-dogpaw.png +0 -0
  294. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/83-calendar.png +0 -0
  295. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/84-lightbulb.png +0 -0
  296. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/85-trophy.png +0 -0
  297. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/86-camera.png +0 -0
  298. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/87-wineglass.png +0 -0
  299. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/88-beermug.png +0 -0
  300. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/89-dumbbell.png +0 -0
  301. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/90-lifebuoy.png +0 -0
  302. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/91-beaker2.png +0 -0
  303. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/92-testtube.png +0 -0
  304. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/93-thermometer.png +0 -0
  305. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/94-pill.png +0 -0
  306. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/95-equalizer.png +0 -0
  307. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/96-book.png +0 -0
  308. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/97-puzzle.png +0 -0
  309. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/98-palette.png +0 -0
  310. data/templates/{jqtouch/jquery/touch → mobile}/glyphish/mini-icons/99-umbrella.png +0 -0
  311. data/templates/mobile/jquery.mobile.js +380 -179
  312. data/templates/mobile/jquery.mobile.min.js +3 -3
  313. data/templates/mobile/jquery/mobile/_base.scss +9 -10
  314. data/templates/mobile/jquery/mobile/default/ajax-loader.png +0 -0
  315. data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
  316. data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
  317. data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
  318. data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
  319. data/templates/mobile/jquery/mobile/valencia/ajax-loader.png +0 -0
  320. data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
  321. data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
  322. data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
  323. data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
  324. data/templates/mobile/lib/tasks/jquery.mobile.rake +106 -0
  325. data/templates/mobile/manifest.rb +262 -2
  326. data/templates/{jqtools/config/initializers/jqtools.rb → tools/config/initializers/tools.rb} +2 -2
  327. data/templates/{jqtools → tools}/jquery.tools.js +0 -0
  328. data/templates/{jqtools → tools}/jquery.tools.min.js +0 -0
  329. data/templates/tools/lib/tasks/jquery.tools.rake +43 -0
  330. data/templates/tools/manifest.rb +7 -0
  331. metadata +293 -289
  332. data/gem_tasks/jqical.rake +0 -86
  333. data/gem_tasks/jqtools.rake +0 -60
  334. data/lib/jquery/jqical.rb +0 -7
  335. data/lib/jquery/jqtools.rb +0 -2
  336. data/templates/jqical/config/initializers/jqical.rb +0 -7
  337. data/templates/jqical/manifest.rb +0 -10
  338. data/templates/jqtools/manifest.rb +0 -6
  339. data/templates/jrails/jquery-1.4.3.min.js +0 -152
  340. data/templates/mobile/jquery/mobile/default/ajax-loader.gif +0 -0
  341. data/templates/mobile/jquery/mobile/valencia/ajax-loader.gif +0 -0
@@ -336,7 +336,7 @@ function baseTagTest(){
336
336
  $.extend( $.support, {
337
337
  orientation: "orientation" in window,
338
338
  touch: "ontouchend" in document,
339
- WebKitAnimationEvent: typeof WebKitTransitionEvent === "object",
339
+ cssTransitions: "WebKitTransitionEvent" in window,
340
340
  pushState: !!history.pushState,
341
341
  mediaquery: $.media('only all'),
342
342
  cssPseudoElement: !!propExists('content'),
@@ -418,11 +418,15 @@ $.event.special.tap = {
418
418
 
419
419
  var moved = false,
420
420
  touching = true,
421
+ origPos = [ event.pageX, event.pageY ],
421
422
  originalType,
422
423
  timer;
423
424
 
424
425
  function moveHandler() {
425
- moved = true;
426
+ if ((Math.abs(origPos[0] - event.pageX) > 10) ||
427
+ (Math.abs(origPos[1] - event.pageY) > 10)) {
428
+ moved = true;
429
+ }
426
430
  }
427
431
 
428
432
  timer = setTimeout(function() {
@@ -508,34 +512,71 @@ $.event.special.swipe = {
508
512
  }
509
513
  };
510
514
 
511
- $.event.special.orientationchange = {
512
- orientation: function( elem ) {
513
- return document.body && elem.width() / elem.height() < 1.1 ? "portrait" : "landscape";
514
- },
515
+ (function(jQuery){
516
+ // "Cowboy" Ben Alman
515
517
 
516
- setup: function() {
517
- var thisObject = this,
518
- $this = $( thisObject ),
519
- orientation = $.event.special.orientationchange.orientation( $this );
520
-
521
- function handler() {
522
- var newOrientation = $.event.special.orientationchange.orientation( $this );
518
+ var win = jQuery(window),
519
+ special_event,
520
+ get_orientation,
521
+ last_orientation;
522
+
523
+ jQuery.event.special.orientationchange = special_event = {
524
+ setup: function(){
525
+ // If the event is supported natively, return false so that jQuery
526
+ // will bind to the event using DOM methods.
527
+ if ( jQuery.support.orientation ) { return false; }
523
528
 
524
- if ( orientation !== newOrientation ) {
525
- $.event.handle.call( thisObject, "orientationchange", {
526
- orientation: newOrientation
527
- } );
528
- orientation = newOrientation;
529
- }
529
+ // Get the current orientation to avoid initial double-triggering.
530
+ last_orientation = get_orientation();
531
+
532
+ // Because the orientationchange event doesn't exist, simulate the
533
+ // event by testing window dimensions on resize.
534
+ win.bind( "resize", handler );
535
+ },
536
+ teardown: function(){
537
+ // If the event is not supported natively, return false so that
538
+ // jQuery will unbind the event using DOM methods.
539
+ if ( jQuery.support.orientation ) { return false; }
540
+
541
+ // Because the orientationchange event doesn't exist, unbind the
542
+ // resize event handler.
543
+ win.unbind( "resize", handler );
544
+ },
545
+ add: function( handleObj ) {
546
+ // Save a reference to the bound event handler.
547
+ var old_handler = handleObj.handler;
548
+
549
+ handleObj.handler = function( event ) {
550
+ // Modify event object, adding the .orientation property.
551
+ event.orientation = get_orientation();
552
+
553
+ // Call the originally-bound event handler and return its result.
554
+ return old_handler.apply( this, arguments );
555
+ };
530
556
  }
531
-
532
- if ( $.support.orientation ) {
533
- thisObject.addEventListener( "orientationchange", handler, false );
534
- } else {
535
- $this.bind( "resize", handler );
557
+ };
558
+
559
+ // If the event is not supported natively, this handler will be bound to
560
+ // the window resize event to simulate the orientationchange event.
561
+ function handler() {
562
+ // Get the current orientation.
563
+ var orientation = get_orientation();
564
+
565
+ if ( orientation !== last_orientation ) {
566
+ // The orientation has changed, so trigger the orientationchange event.
567
+ last_orientation = orientation;
568
+ win.trigger( "orientationchange" );
536
569
  }
537
- }
538
- };
570
+ };
571
+
572
+ // Get the current page orientation. This method is exposed publicly, should it
573
+ // be needed, as jQuery.event.special.orientationchange.orientation()
574
+ special_event.orientation = get_orientation = function() {
575
+ var elem = document.documentElement;
576
+ return elem && elem.clientWidth / elem.clientHeight < 1.1 ? "portrait" : "landscape";
577
+ };
578
+
579
+ })(jQuery);
539
580
 
540
581
  $.each({
541
582
  scrollstop: "scrollstart",
@@ -552,6 +593,7 @@ $.each({
552
593
 
553
594
  })( jQuery );
554
595
 
596
+
555
597
  /*!
556
598
  * jQuery hashchange event - v1.3 - 7/21/2010
557
599
  * http://benalman.com/projects/jquery-hashchange-plugin/
@@ -947,10 +989,29 @@ $.each({
947
989
  (function ( jQuery ) {
948
990
 
949
991
  jQuery.widget( "mobile.page", jQuery.mobile.widget, {
950
- options: {},
992
+ options: {
993
+ backBtnText: "Back",
994
+ addBackBtn: true,
995
+ degradeInputs: {
996
+ color: true,
997
+ date: true,
998
+ datetime: true,
999
+ "datetime-local": true,
1000
+ email: true,
1001
+ month: true,
1002
+ number: true,
1003
+ range: true,
1004
+ search: true,
1005
+ tel: true,
1006
+ time: true,
1007
+ url: true,
1008
+ week: true
1009
+ }
1010
+ },
951
1011
 
952
1012
  _create: function() {
953
- var $elem = this.element;
1013
+ var $elem = this.element,
1014
+ o = this.options;
954
1015
 
955
1016
  if ( this._trigger( "beforeCreate" ) === false ) {
956
1017
  return;
@@ -994,11 +1055,11 @@ jQuery.widget( "mobile.page", jQuery.mobile.widget, {
994
1055
  }
995
1056
 
996
1057
  // auto-add back btn on pages beyond first view
997
- if ( jQuery.mobile.addBackBtn && role === "header" &&
1058
+ if ( o.addBackBtn && role === "header" &&
998
1059
  (jQuery.mobile.urlStack.length > 1 || jQuery(".ui-page").length > 1) &&
999
1060
  !leftbtn && !$this.data( "noBackBtn" ) ) {
1000
1061
 
1001
- jQuery( "<a href='#' class='ui-btn-left' data-icon='arrow-l'>Back</a>" )
1062
+ jQuery( "<a href='#' class='ui-btn-left' data-icon='arrow-l'>"+ o.backBtnText +"</a>" )
1002
1063
  .click(function() {
1003
1064
  history.back();
1004
1065
  return false;
@@ -1059,10 +1120,11 @@ jQuery.widget( "mobile.page", jQuery.mobile.widget, {
1059
1120
  },
1060
1121
 
1061
1122
  _enchanceControls: function() {
1123
+ var o = this.options;
1062
1124
  // degrade inputs to avoid poorly implemented native functionality
1063
1125
  this.element.find( "input" ).each(function() {
1064
1126
  var type = this.getAttribute( "type" );
1065
- if ( jQuery.mobile.degradeInputs[ type ] ) {
1127
+ if ( o.degradeInputs[ type ] ) {
1066
1128
  jQuery( this ).replaceWith(
1067
1129
  jQuery( "<div>" ).html( jQuery(this).clone() ).html()
1068
1130
  .replace( /type="([a-zA-Z]+)"/, "data-type='$1'" ) );
@@ -1082,7 +1144,7 @@ jQuery.widget( "mobile.page", jQuery.mobile.widget, {
1082
1144
  this.element
1083
1145
  .find( "input, textarea" )
1084
1146
  .not( "[type='radio'], [type='checkbox'], button, [type='button'], [type='submit'], [type='reset'], [type='image']" )
1085
- .customTextInput();
1147
+ .textinput();
1086
1148
 
1087
1149
  this.element
1088
1150
  .find( "input, select" )
@@ -1120,7 +1182,7 @@ $.fixedToolbars = (function(){
1120
1182
  var currentstate = 'inline',
1121
1183
  delayTimer,
1122
1184
  ignoreTargets = 'a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed',
1123
- toolbarSelector = '.ui-page-active .ui-header-fixed:first, .ui-page-active .ui-footer-fixed:not(.ui-footer-duplicate):last',
1185
+ toolbarSelector = '.ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last',
1124
1186
  stickyFooter, //for storing quick references to duplicate footers
1125
1187
  supportTouch = $.support.touch,
1126
1188
  touchStartEvent = supportTouch ? "touchstart" : "mousedown",
@@ -1209,7 +1271,8 @@ $.fixedToolbars = (function(){
1209
1271
  return {
1210
1272
  show: function(immediately){
1211
1273
  currentstate = 'overlay';
1212
- return $( toolbarSelector ).each(function(){
1274
+ var $ap = $.activePage ? $.activePage : $(".ui-page-active");
1275
+ return $ap.children( toolbarSelector ).each(function(){
1213
1276
  var el = $(this),
1214
1277
  fromTop = $(window).scrollTop(),
1215
1278
  thisTop = el.offset().top,
@@ -1230,7 +1293,8 @@ $.fixedToolbars = (function(){
1230
1293
  },
1231
1294
  hide: function(immediately){
1232
1295
  currentstate = 'inline';
1233
- return $( toolbarSelector ).each(function(){
1296
+ var $ap = $.activePage ? $.activePage : $(".ui-page-active");
1297
+ return $ap.children( toolbarSelector ).each(function(){
1234
1298
  var el = $(this);
1235
1299
 
1236
1300
  //add state class
@@ -1376,20 +1440,30 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
1376
1440
 
1377
1441
 
1378
1442
  /*
1379
- * jQuery Mobile Framework : "customTextInput" plugin for text inputs, textareas (based on code from Filament Group,Inc)
1443
+ * jQuery Mobile Framework : "textinput" plugin for text inputs, textareas (based on code from Filament Group,Inc)
1380
1444
  * Copyright (c) jQuery Project
1381
1445
  * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
1382
1446
  * Note: Code is in draft form and is subject to change
1383
1447
  */
1384
- (function($){
1385
- jQuery.fn.customTextInput = function(options){
1386
- return $(this).each(function(){
1387
- var input = $(this);
1448
+ (function ( $ ) {
1449
+ $.widget( "mobile.textinput", $.mobile.widget, {
1450
+ options: {
1451
+ theme: undefined
1452
+ },
1453
+ _create: function(){
1454
+ var input = this.element,
1455
+ o = this.options,
1456
+ theme = o.theme,
1457
+ themeclass;
1458
+
1459
+ if ( !theme ) {
1460
+ var themedParent = this.element.closest("[class*='ui-bar-'],[class*='ui-body-']");
1461
+ theme = themedParent.length ?
1462
+ /ui-(bar|body)-([a-z])/.exec( themedParent.attr("class") )[2] :
1463
+ "c";
1464
+ }
1388
1465
 
1389
- var o = $.extend({
1390
- search: input.is('[type="search"],[data-type="search"]'),
1391
- theme: input.data("theme") || "c"
1392
- }, options);
1466
+ themeclass = " ui-body-" + theme;
1393
1467
 
1394
1468
  $('label[for='+input.attr('id')+']').addClass('ui-input-text');
1395
1469
 
@@ -1398,8 +1472,8 @@ jQuery.fn.customTextInput = function(options){
1398
1472
  var focusedEl = input;
1399
1473
 
1400
1474
  //"search" input widget
1401
- if(o.search){
1402
- focusedEl = input.wrap('<div class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-body-c ui-btn-shadow ui-icon-search"></div>').parent();
1475
+ if( input.is('[type="search"],[data-type="search"]') ){
1476
+ focusedEl = input.wrap('<div class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-search'+ themeclass +'"></div>').parent();
1403
1477
  var clearbtn = $('<a href="#" class="ui-input-clear" title="clear text">clear text</a>')
1404
1478
  .click(function(){
1405
1479
  input.val('').focus();
@@ -1423,7 +1497,7 @@ jQuery.fn.customTextInput = function(options){
1423
1497
  input.keyup(toggleClear);
1424
1498
  }
1425
1499
  else{
1426
- input.addClass('ui-corner-all ui-shadow-inset');
1500
+ input.addClass('ui-corner-all ui-shadow-inset' + themeclass);
1427
1501
  }
1428
1502
 
1429
1503
  input
@@ -1451,9 +1525,17 @@ jQuery.fn.customTextInput = function(options){
1451
1525
  keyupTimeout = setTimeout( keyup, keyupTimeoutBuffer );
1452
1526
  });
1453
1527
  }
1454
- });
1455
- };
1456
- })(jQuery);
1528
+ },
1529
+
1530
+ disable: function(){
1531
+ ( this.element.attr("disabled",true).is('[type="search"],[data-type="search"]') ? this.element.parent() : this.element ).addClass("ui-disabled");
1532
+ },
1533
+
1534
+ enable: function(){
1535
+ ( this.element.attr("disabled", false).is('[type="search"],[data-type="search"]') ? this.element.parent() : this.element ).removeClass("ui-disabled");
1536
+ }
1537
+ });
1538
+ })( jQuery );
1457
1539
 
1458
1540
 
1459
1541
  /*
@@ -1982,23 +2064,24 @@ $.fn.slider = function(options){
1982
2064
  * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
1983
2065
  * Note: Code is in draft form and is subject to change
1984
2066
  */
1985
- (function($){
1986
- $.fn.collapsible = function(options){
1987
- return $(this).each(function(){
1988
- var o = $.extend({
1989
- expandCueText: ' click to expand contents',
1990
- collapseCueText: ' click to collapse contents',
1991
- collapsed: $(this).is('[data-state="collapsed"]'),
1992
- heading: '>h1,>h2,>h3,>h4,>h5,>h6,>legend',
1993
- theme: $(this).data('theme'),
1994
- iconTheme: $(this).data('icontheme') || 'd'
1995
- },options);
2067
+ (function ( $ ) {
2068
+ $.widget( "mobile.collapsible", $.mobile.widget, {
2069
+ options: {
2070
+ expandCueText: ' click to expand contents',
2071
+ collapseCueText: ' click to collapse contents',
2072
+ collapsed: false,
2073
+ heading: '>:header,>legend',
2074
+ theme: undefined,
2075
+ iconTheme: 'd'
2076
+ },
2077
+ _create: function(){
1996
2078
 
1997
- //define
1998
- var collapsibleContain = $(this).addClass('ui-collapsible-contain'),
1999
- collapsibleHeading = $(this).find(o.heading).eq(0),
2079
+ var $el = this.element,
2080
+ o = this.options,
2081
+ collapsibleContain = $el.addClass('ui-collapsible-contain'),
2082
+ collapsibleHeading = $el.find(o.heading).eq(0),
2000
2083
  collapsibleContent = collapsibleContain.wrapInner('<div class="ui-collapsible-content"></div>').find('.ui-collapsible-content'),
2001
- collapsibleParent = $(this).closest('[data-role=collapsible-set]').addClass('ui-collapsible-set');
2084
+ collapsibleParent = $el.closest('[data-role="collapsible-set"]').addClass('ui-collapsible-set');
2002
2085
 
2003
2086
  //replace collapsibleHeading if it's a legend
2004
2087
  if(collapsibleHeading.is('legend')){
@@ -2119,9 +2202,9 @@ $.fn.collapsible = function(options){
2119
2202
  return false;
2120
2203
  });
2121
2204
 
2122
- });
2123
- };
2124
- })(jQuery);
2205
+ }
2206
+ });
2207
+ })( jQuery );
2125
2208
 
2126
2209
  /*
2127
2210
  * jQuery Mobile Framework : prototype for "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc
@@ -2364,7 +2447,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
2364
2447
  shadow: false,
2365
2448
  corners: false,
2366
2449
  iconpos: "right",
2367
- icon: item.data("icon") || "arrow-r",
2450
+ icon: a.length > 1 ? false : item.data("icon") || "arrow-r",
2368
2451
  theme: o.theme
2369
2452
  });
2370
2453
 
@@ -2373,7 +2456,8 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
2373
2456
  if ( a.length > 1 ) {
2374
2457
  itemClass += " ui-li-has-alt";
2375
2458
 
2376
- var last = a.last();
2459
+ var last = a.last(),
2460
+ splittheme = $list.data( "splittheme" ) || last.data( "theme" ) || o.splitTheme;
2377
2461
 
2378
2462
  last
2379
2463
  .attr( "title", last.text() )
@@ -2390,7 +2474,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
2390
2474
  .append( jQuery( "<span>" ).buttonMarkup({
2391
2475
  shadow: true,
2392
2476
  corners: true,
2393
- theme: $list.data( "splittheme" ) || last.data( "theme" ) || o.splitTheme,
2477
+ theme: splittheme,
2394
2478
  iconpos: "notext",
2395
2479
  icon: $list.data( "spliticon" ) || last.data( "icon" ) || o.splitIcon
2396
2480
  } ) );
@@ -2410,8 +2494,6 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
2410
2494
  }
2411
2495
 
2412
2496
  if ( pos === 0 ) {
2413
- item.find( "img" ).addClass( "ui-corner-tl" );
2414
-
2415
2497
  if ( o.inset ) {
2416
2498
  itemClass += " ui-corner-top";
2417
2499
 
@@ -2425,7 +2507,6 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
2425
2507
  }
2426
2508
 
2427
2509
  } else if ( pos === li.length - 1 ) {
2428
- item.find( "img" ).addClass( "ui-corner-bl" );
2429
2510
 
2430
2511
  if ( o.inset ) {
2431
2512
  itemClass += " ui-corner-bottom";
@@ -2540,12 +2621,18 @@ $( "[data-role='listview']" ).live( "listviewcreate", function() {
2540
2621
  $.widget( "mobile.dialog", $.mobile.widget, {
2541
2622
  options: {},
2542
2623
  _create: function(){
2543
- var $el = this.element,
2544
- $closeBtn = $('<a href="#" data-icon="delete" data-iconpos="notext">Close</a>')
2545
- .click(function(){
2546
- $.changePage([$el, $.activePage], undefined, true );
2547
- return false;
2548
- });
2624
+ var self = this,
2625
+ $el = self.element,
2626
+ $closeBtn = $('<a href="#" data-icon="delete" data-iconpos="notext">Close</a>');
2627
+
2628
+ $el.delegate("a, submit", "click submit", function(e){
2629
+ if( e.type == "click" && ( $(e.target).closest('[data-back]') || $(e.target).closest($closeBtn) ) ){
2630
+ self.close();
2631
+ return false;
2632
+ }
2633
+ //otherwise, assume we're headed somewhere new. set activepage to dialog so the transition will work
2634
+ $.activePage = this.element;
2635
+ });
2549
2636
 
2550
2637
  this.element
2551
2638
  .bind("pageshow",function(){
@@ -2562,6 +2649,9 @@ $.widget( "mobile.dialog", $.mobile.widget, {
2562
2649
  .last()
2563
2650
  .addClass('ui-corner-bottom ui-overlay-shadow');
2564
2651
 
2652
+ },
2653
+ close: function(){
2654
+ $.changePage([this.element, $.activePage], undefined, true );
2565
2655
  }
2566
2656
  });
2567
2657
  })( jQuery );
@@ -2644,63 +2734,116 @@ $.fn.grid = function(options){
2644
2734
  * Dual licensed under the MIT or GPL Version 2 licenses.
2645
2735
  * http://jquery.org/license
2646
2736
  */
2737
+
2647
2738
  (function( $, window, undefined ) {
2648
- //some critical feature tests should be placed here.
2649
- //if we're missing support for any of these, then we're a C-grade browser
2650
- //to-do: see if we need more qualifiers here.
2651
- if ( !jQuery.support.mediaquery ) {
2652
- return;
2653
- }
2654
2739
 
2655
- //these properties should be made easy to override externally
2656
- jQuery.mobile = {};
2740
+ //jQuery.mobile obj extendable options
2741
+ jQuery.mobile = jQuery.extend({
2742
+
2743
+ //define the url parameter used for referencing widget-generated sub-pages.
2744
+ //Translates to to example.html&ui-page=subpageIdentifier
2745
+ //hash segment before &ui-page= is used to make Ajax request
2746
+ subPageUrlKey: 'ui-page',
2747
+
2748
+ //anchor links that match these selectors will be untrackable in history
2749
+ //(no change in URL, not bookmarkable)
2750
+ nonHistorySelectors: '[data-rel=dialog]',
2751
+
2752
+ //class assigned to page currently in view, and during transitions
2753
+ activePageClass: 'ui-page-active',
2754
+
2755
+ //class used for "active" button state, from CSS framework
2756
+ activeBtnClass: 'ui-btn-active',
2757
+
2758
+ //available CSS transitions
2759
+ transitions: ['slide', 'slideup', 'slidedown', 'pop', 'flip', 'fade'],
2760
+
2761
+ //set default transition
2762
+ defaultTransition: 'slide',
2763
+
2764
+ //show loading message during Ajax requests
2765
+ //if false, message will not appear, but loading classes will still be toggled on html el
2766
+ loadingMessage: "loading",
2767
+
2768
+ //configure meta viewport tag's content attr:
2769
+ metaViewportContent: "width=device-width, minimum-scale=1, maximum-scale=1",
2770
+
2771
+ //additional markup to prepend to head
2772
+ headExtras: undefined,
2773
+
2774
+ //support conditions that must be met in order to proceed
2775
+ gradeA: function(){
2776
+ return jQuery.support.mediaquery;
2777
+ }
2778
+
2779
+ }, jQuery.mobile );
2657
2780
 
2658
- jQuery.extend(jQuery.mobile, {
2659
- subPageUrlKey: 'ui-page', //define the key used in urls for sub-pages. Defaults to &ui-page=
2660
- degradeInputs: {
2661
- color: true,
2662
- date: true,
2663
- datetime: true,
2664
- "datetime-local": true,
2665
- email: true,
2666
- month: true,
2667
- number: true,
2668
- range: true,
2669
- search: true,
2670
- tel: true,
2671
- time: true,
2672
- url: true,
2673
- week: true
2674
- },
2675
- addBackBtn: true
2676
- });
2781
+ //if device support condition(s) aren't met, leave things as they are -> a basic, usable experience,
2782
+ //otherwise, proceed with the enhancements
2783
+ if ( !jQuery.mobile.gradeA() ) {
2784
+ return;
2785
+ }
2677
2786
 
2787
+ //define vars for interal use
2678
2788
  var $window = jQuery(window),
2679
2789
  $html = jQuery('html'),
2680
2790
  $head = jQuery('head'),
2791
+
2792
+ //to be populated at DOM ready
2681
2793
  $body,
2682
- $loader = jQuery('<div class="ui-loader ui-body-a ui-corner-all"><span class="ui-icon ui-icon-loading spin"></span><h1>loading</h1></div>'),
2794
+
2795
+ //loading div which appears during Ajax requests
2796
+ //will not appear if $.mobile.loadingMessage is false
2797
+ $loader = $.mobile.loadingMessage ?
2798
+ jQuery('<div class="ui-loader ui-body-a ui-corner-all">'+
2799
+ '<span class="ui-icon ui-icon-loading spin"></span>'+
2800
+ '<h1>'+ $.mobile.loadingMessage +'</h1>'+
2801
+ '</div>')
2802
+ : undefined,
2803
+
2804
+ //define meta viewport tag, if content is defined
2805
+ $metaViewport = $.mobile.metaViewportContent ? $("<meta>", { name: "viewport", content: $.mobile.metaViewportContent}) : undefined,
2806
+
2807
+ //define baseUrl for use in relative url management
2808
+ baseUrl = getPathDir( location.protocol + '//' + location.host + location.pathname ),
2809
+
2810
+ //define base element, for use in routing asset urls that are referenced in Ajax-requested markup
2811
+ $base = $.support.dynamicBaseTag ? $("<base>", { href: baseUrl }) : undefined,
2812
+
2813
+ //will be defined as first page element in DOM
2683
2814
  $startPage,
2815
+
2816
+ //will be defined as $startPage.parent(), which is usually the body element
2817
+ //will receive ui-mobile-viewport class
2684
2818
  $pageContainer,
2685
- startPageId = 'ui-page-start',
2686
- activePageClass = 'ui-page-active',
2687
- activeBtnClass = 'ui-btn-active',
2819
+
2820
+ //will be defined when a link is clicked and given an active class
2688
2821
  activeClickedLink = null,
2689
- pageTransition,
2690
- forceBack,
2691
- transitions = 'slide slideup slidedown pop flip fade',
2692
- transitionDuration = 350,
2693
- backBtnText = "Back",
2822
+
2823
+ //array of pages that are visited during a single page load
2824
+ //length will grow as pages are visited, and shrink as "back" link/button is clicked
2825
+ //each item has a url (string matches ID), and transition (saved for reuse when "back" link/button is clicked)
2694
2826
  urlStack = [ {
2695
2827
  url: location.hash.replace( /^#/, "" ),
2696
- transition: "slide"
2828
+ transition: undefined
2697
2829
  } ],
2830
+
2831
+ //define first selector to receive focus when a page is shown
2698
2832
  focusable = "[tabindex],a,button:visible,select:visible,input",
2833
+
2834
+ //contains role for next page, if defined on clicked link via data-rel
2699
2835
  nextPageRole = null,
2836
+
2837
+ //enable/disable hashchange event listener
2838
+ //toggled internally when location.hash is updated to match the url of a successful page load
2700
2839
  hashListener = true,
2701
- unHashedSelectors = '[data-rel=dialog]',
2702
- baseUrl = getPathDir( location.protocol + '//' + location.host + location.pathname ),
2840
+
2841
+ //media-query-like width breakpoints, which are translated to classes on the html element
2703
2842
  resolutionBreakpoints = [320,480,768,1024];
2843
+
2844
+
2845
+ //prepend head markup additions
2846
+ $head.prepend( $.mobile.headExtras || {}, $metaViewport || {}, $base || {} );
2704
2847
 
2705
2848
  // TODO: don't expose (temporary during code reorg)
2706
2849
  $.mobile.urlStack = urlStack;
@@ -2736,13 +2879,16 @@ $.fn.grid = function(options){
2736
2879
 
2737
2880
  var setBaseURL = !$.support.dynamicBaseTag ? $.noop : function( nonHashPath ){
2738
2881
  //set base url for new page assets
2739
- $('#ui-base').attr('href', baseUrl + getBaseURL( nonHashPath ));
2882
+ $base.attr('href', baseUrl + getBaseURL( nonHashPath ));
2740
2883
  }
2741
2884
 
2742
2885
  var resetBaseURL = !$.support.dynamicBaseTag ? $.noop : function(){
2743
- $('#ui-base').attr('href', baseUrl);
2886
+ $base.attr('href', baseUrl);
2744
2887
  }
2745
2888
 
2889
+ //set base href to pathname
2890
+ resetBaseURL();
2891
+
2746
2892
  //for form submission
2747
2893
  $('form').live('submit', function(){
2748
2894
  var type = $(this).attr("method"),
@@ -2783,7 +2929,7 @@ $.fn.grid = function(options){
2783
2929
  return false;
2784
2930
  }
2785
2931
 
2786
- activeClickedLink = $this.closest( ".ui-btn" ).addClass( activeBtnClass );
2932
+ activeClickedLink = $this.closest( ".ui-btn" ).addClass( $.mobile.activeBtnClass );
2787
2933
 
2788
2934
  if( external ){
2789
2935
  //deliberately redirect, in case click was triggered
@@ -2791,9 +2937,9 @@ $.fn.grid = function(options){
2791
2937
  }
2792
2938
  else {
2793
2939
  //use ajax
2794
- var pageTransition = $this.data( "transition" ) || "slide",
2795
- forceBack = $this.data( "back" ) || undefined,
2796
- changeHashOnSuccess = !$this.is(unHashedSelectors);
2940
+ var transition = $this.data( "transition" ),
2941
+ back = $this.data( "back" ),
2942
+ changeHashOnSuccess = !$this.is( $.mobile.nonHistorySelectors );
2797
2943
 
2798
2944
  nextPageRole = $this.attr( "data-rel" );
2799
2945
 
@@ -2804,7 +2950,7 @@ $.fn.grid = function(options){
2804
2950
 
2805
2951
  href.replace(/^#/,'');
2806
2952
 
2807
- changePage(href, pageTransition, forceBack, changeHashOnSuccess);
2953
+ changePage(href, transition, back, changeHashOnSuccess);
2808
2954
  }
2809
2955
  event.preventDefault();
2810
2956
  });
@@ -2814,7 +2960,10 @@ $.fn.grid = function(options){
2814
2960
  if ( done ) {
2815
2961
  $html.removeClass( "ui-loading" );
2816
2962
  } else {
2817
- $loader.appendTo($pageContainer).css({top: $(window).scrollTop() + 75});
2963
+
2964
+ if( $.mobile.loadingMessage ){
2965
+ $loader.appendTo($pageContainer).css({top: $(window).scrollTop() + 75});
2966
+ }
2818
2967
  $html.addClass( "ui-loading" );
2819
2968
  }
2820
2969
  };
@@ -2854,12 +3003,12 @@ $.fn.grid = function(options){
2854
3003
 
2855
3004
  //remove active classes after page transition or error
2856
3005
  function removeActiveLinkClass(forceRemoval){
2857
- if(activeClickedLink && (!activeClickedLink.closest( '.ui-page-active' ).length) || forceRemoval ){
2858
- activeClickedLink.removeClass( activeBtnClass );
3006
+ if( !!activeClickedLink && (!activeClickedLink.closest( '.ui-page-active' ).length || forceRemoval )){
3007
+ activeClickedLink.removeClass( $.mobile.activeBtnClass );
2859
3008
  }
2860
3009
  activeClickedLink = null;
2861
3010
  }
2862
-
3011
+
2863
3012
 
2864
3013
  //for getting or creating a new page
2865
3014
  function changePage( to, transition, back, changeHash){
@@ -2871,23 +3020,22 @@ $.fn.grid = function(options){
2871
3020
  url = fileUrl = $.type(to) === "string" ? to.replace( /^#/, "" ) : null,
2872
3021
  data = undefined,
2873
3022
  type = 'get',
3023
+ isFormRequest = false,
3024
+ duplicateCachedPage = null,
2874
3025
  back = (back !== undefined) ? back : ( urlStack.length > 1 && urlStack[ urlStack.length - 2 ].url === url ),
2875
- transition = (transition !== undefined) ? transition : ( pageTransition || "slide" );
3026
+ transition = (transition !== undefined) ? transition : $.mobile.defaultTransition;
2876
3027
 
2877
- if( $.type(to) === "object" ){
3028
+ if( $.type(to) === "object" && to.url ){
2878
3029
  url = to.url,
2879
3030
  data = to.data,
2880
- type = to.type;
3031
+ type = to.type,
3032
+ isFormRequest = true;
2881
3033
  //make get requests bookmarkable
2882
3034
  if( data && type == 'get' ){
2883
3035
  url += "?" + data;
2884
3036
  data = undefined;
2885
3037
  }
2886
3038
  }
2887
-
2888
- //unset pageTransition, forceBack
2889
- pageTransition = undefined;
2890
- forceBack = undefined;
2891
3039
 
2892
3040
  //reset base to pathname for new request
2893
3041
  resetBaseURL();
@@ -2919,31 +3067,33 @@ $.fn.grid = function(options){
2919
3067
  if( changeHash && url ){
2920
3068
  hashListener = false;
2921
3069
  location.hash = url;
2922
- setTimeout(function(){
2923
- hashListener = true;
2924
- }, 500);
2925
3070
  }
2926
3071
  removeActiveLinkClass();
3072
+
3073
+ //if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
3074
+ if( duplicateCachedPage != null ){
3075
+ duplicateCachedPage.remove();
3076
+ }
2927
3077
  }
2928
3078
 
2929
3079
  if(transition){
2930
3080
  $pageContainer.addClass('ui-mobile-viewport-transitioning');
2931
3081
  // animate in / out
2932
3082
  from.addClass( transition + " out " + ( back ? "reverse" : "" ) );
2933
- to.addClass( activePageClass + " " + transition +
3083
+ to.addClass( $.mobile.activePageClass + " " + transition +
2934
3084
  " in " + ( back ? "reverse" : "" ) );
2935
3085
 
2936
3086
  // callback - remove classes, etc
2937
3087
  to.animationComplete(function() {
2938
- from.add( to ).removeClass(" out in reverse " + transitions );
2939
- from.removeClass( activePageClass );
3088
+ from.add( to ).removeClass(" out in reverse " + $.mobile.transitions.join(' ') );
3089
+ from.removeClass( $.mobile.activePageClass );
2940
3090
  loadComplete();
2941
3091
  $pageContainer.removeClass('ui-mobile-viewport-transitioning');
2942
3092
  });
2943
3093
  }
2944
3094
  else{
2945
- from.removeClass( activePageClass );
2946
- to.addClass( activePageClass );
3095
+ from.removeClass( $.mobile.activePageClass );
3096
+ to.addClass( $.mobile.activePageClass );
2947
3097
  loadComplete();
2948
3098
  }
2949
3099
  };
@@ -2974,13 +3124,18 @@ $.fn.grid = function(options){
2974
3124
  }
2975
3125
 
2976
3126
  // find the "to" page, either locally existing in the dom or by creating it through ajax
2977
- if ( to.length ) {
3127
+ if ( to.length && !isFormRequest ) {
2978
3128
  if( fileUrl ){
2979
3129
  setBaseURL(fileUrl);
2980
3130
  }
2981
3131
  enhancePage();
2982
3132
  transitionPages();
2983
3133
  } else {
3134
+
3135
+ //if to exists in DOM, save a reference to it in duplicateCachedPage for removal after page change
3136
+ if( to.length ){
3137
+ duplicateCachedPage = to;
3138
+ }
2984
3139
 
2985
3140
  pageLoading();
2986
3141
 
@@ -2998,7 +3153,7 @@ $.fn.grid = function(options){
2998
3153
  //rewrite src and href attrs to use a base url
2999
3154
  if( !$.support.dynamicBaseTag ){
3000
3155
  var baseUrl = getBaseURL(fileUrl);
3001
- to.find('[src],[href]').each(function(){
3156
+ to.find('[src],link[href]').each(function(){
3002
3157
  var thisAttr = $(this).is('[href]') ? 'href' : 'src',
3003
3158
  thisUrl = $(this).attr(thisAttr);
3004
3159
 
@@ -3047,10 +3202,13 @@ $.fn.grid = function(options){
3047
3202
 
3048
3203
  // needs to be bound at domready (for IE6)
3049
3204
  // find or load content, make it active
3050
- $window.bind( "hashchange", function(e, extras) {
3051
- if( !hashListener ){ return; }
3205
+ $window.bind( "hashchange", function(e, triggered) {
3206
+ if( !hashListener ){
3207
+ hashListener = true;
3208
+ return;
3209
+ }
3052
3210
  var to = location.hash,
3053
- transition = (extras && extras.manuallyTriggered) ? false : undefined;
3211
+ transition = triggered ? false : undefined;
3054
3212
 
3055
3213
  // either we've backed up to the root page url
3056
3214
  // or it's the first page load with no hash present
@@ -3061,12 +3219,12 @@ $.fn.grid = function(options){
3061
3219
  }
3062
3220
  //there's no hash, the active page is not the start page, and it's not manually triggered hashchange
3063
3221
  // > probably backed out to the first page visited
3064
- else if( $.activePage.length && !$startPage.is( $.activePage ) && !(extras && extras.manuallyTriggered) ) {
3222
+ else if( $.activePage.length && !$startPage.is( $.activePage ) && !triggered ) {
3065
3223
  changePage( $startPage, transition, true );
3066
3224
  }
3067
3225
  else{
3068
3226
  $startPage.trigger("pagebeforeshow", {prevPage: $('')});
3069
- $startPage.addClass( activePageClass );
3227
+ $startPage.addClass( $.mobile.activePageClass );
3070
3228
  pageLoading( true );
3071
3229
 
3072
3230
  if( $startPage.trigger("pageshow", {prevPage: $('')}) !== false ){
@@ -3081,8 +3239,8 @@ $.fn.grid = function(options){
3081
3239
  $html.addClass('ui-mobile');
3082
3240
 
3083
3241
  //add orientation class on flip/resize.
3084
- $window.bind( "orientationchange", function( event, data ) {
3085
- $html.removeClass( "portrait landscape" ).addClass( data.orientation );
3242
+ $window.bind( "orientationchange.htmlclass", function( event ) {
3243
+ $html.removeClass( "portrait landscape" ).addClass( event.orientation );
3086
3244
  });
3087
3245
 
3088
3246
  //add breakpoint classes for faux media-q support
@@ -3126,27 +3284,17 @@ $.fn.grid = function(options){
3126
3284
  resolutionBreakpoints.push( newbps );
3127
3285
  }
3128
3286
  detectResolutionBreakpoints();
3129
- }
3130
-
3131
- //insert mobile meta - these will need to be configurable somehow.
3132
- var headPrepends =
3133
- $head.prepend(
3134
- '<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />' +
3135
- ($.support.dynamicBaseTag ? '<base href="" id="ui-base" />' : '')
3136
- );
3137
-
3138
- //set base href to pathname
3139
- resetBaseURL();
3287
+ }
3140
3288
 
3141
- //incomplete fallback to workaround lack of animation callbacks.
3142
- //should this be extended into a full special event?
3143
- // note: Expects CSS animations use transitionDuration (350ms)
3289
+ //animation complete callback
3290
+ //TODO - update support test and create special event for transitions
3291
+ //check out transitionEnd (opera per Paul's request)
3144
3292
  jQuery.fn.animationComplete = function(callback){
3145
- if(jQuery.support.WebKitAnimationEvent){
3146
- return jQuery(this).one('webkitAnimationEnd', callback); //check out transitionEnd (opera per Paul's request)
3293
+ if(jQuery.support.cssTransitions){
3294
+ return jQuery(this).one('webkitAnimationEnd', callback);
3147
3295
  }
3148
3296
  else{
3149
- setTimeout(callback, transitionDuration);
3297
+ callback();
3150
3298
  }
3151
3299
  };
3152
3300
 
@@ -3169,21 +3317,74 @@ $.fn.grid = function(options){
3169
3317
  pageContainer: $pageContainer
3170
3318
  });
3171
3319
 
3172
- //make sure it has an ID - for finding it later
3173
- if(!$startPage.attr('id')){
3174
- $startPage.attr('id', startPageId);
3175
- }
3176
-
3177
3320
  //initialize all pages present
3178
3321
  $pages.page();
3179
3322
 
3180
3323
  //trigger a new hashchange, hash or not
3181
- $window.trigger( "hashchange", { manuallyTriggered: true } );
3324
+ $window.trigger( "hashchange", [ true ] );
3182
3325
 
3183
3326
  //update orientation
3184
- $html.addClass( jQuery.event.special.orientationchange.orientation( $window ) );
3327
+ $window.trigger( "orientationchange.htmlclass" );
3185
3328
  });
3186
3329
 
3187
- $window.load(hideBrowserChrome);
3330
+ $window
3331
+ .load(hideBrowserChrome)
3332
+ .unload(removeActiveLinkClass);
3188
3333
 
3189
3334
  })( jQuery, this );
3335
+
3336
+
3337
+ //quick & dirty theme switcher, written to potentially work as a bookmarklet
3338
+ (function($){
3339
+ $.themeswitcher = function(){
3340
+ var
3341
+ themesDir = '/stylesheets/compiled/jquery/mobile/',
3342
+ //themesDir = 'http://jquerymobile.com/test/themes/',
3343
+ themes = ['default','valencia'],
3344
+ currentPage = $.activePage,
3345
+ menuPage =
3346
+ $( '<div data-role=\'dialog\' data-theme=\'a\'>' +
3347
+ '<div data-role=\'header\' data-theme=\'b\'>' +
3348
+ '<div class=\'ui-title\'>Switch Theme:</div>'+
3349
+ '</div>'+
3350
+ '<div data-role=\'content\' data-theme=\'c\'><ul data-role=\'listview\' data-inset=\'true\'></ul></div>'+
3351
+ '</div>'
3352
+ ).appendTo( $.pageContainer ),
3353
+ menu = menuPage.find('ul');
3354
+
3355
+ //menu items
3356
+ $.each(themes, function( i ){
3357
+ $('<li><a href=\'#\'>' + themes[ i ].charAt(0).toUpperCase() + themes[ i ].substr(1) + '</a></li>')
3358
+ .click(function(){
3359
+ addTheme( themes[i] );
3360
+ done();
3361
+ return false;
3362
+ })
3363
+ .appendTo(menu);
3364
+ });
3365
+
3366
+ //remover, adder
3367
+ function addTheme(theme){
3368
+ $('head').append( '<link rel=\'stylesheet\' href=\''+ themesDir + theme +'.css\' />' );
3369
+ }
3370
+
3371
+ //finished with this
3372
+ function done(){
3373
+ $.changePage([menuPage, currentPage], 'pop', true);
3374
+ menuPage.bind('pagehide',function(){
3375
+ menuPage.remove();
3376
+ });
3377
+ return false;
3378
+ }
3379
+
3380
+ //destroy
3381
+ menuPage.find('.ui-btn-left').click(done);
3382
+
3383
+ //create page, listview
3384
+ menuPage.page();
3385
+
3386
+ //change page now
3387
+ $.changePage([currentPage, menuPage], 'pop', false);
3388
+ };
3389
+ })(jQuery);
3390
+