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

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -33,7 +33,8 @@ all_scripts = [
33
33
  'js/plugins/themeroller.js',
34
34
  'js/plugins/unique.js',
35
35
  'js/plugins/radio.js',
36
- 'js/plugins/wholerow.js'
36
+ 'js/plugins/wholerow.js',
37
+ 'js/plugins/model.js'
37
38
  ].collect {|filename| File.read(File.join(JSTREE_SRC, filename))}.join "\n\n"
38
39
 
39
40
  namespace :build do
@@ -32,8 +32,8 @@ all_scripts = [
32
32
  'js/jquery.mobile.dialog.js',
33
33
  'js/jquery.mobile.navbar.js',
34
34
  'js/jquery.mobile.grid.js',
35
- 'js/jquery.mobile.js'#,
36
- #'js/jquery.mobile.themeswitcher.js'
35
+ 'js/jquery.mobile.js',
36
+ 'js/jquery.mobile.themeswitcher.js'
37
37
  ].collect {|filename| File.read(File.join(MOBILE_SRC, filename))}.join "\n\n"
38
38
 
39
39
  namespace :build do
@@ -42,6 +42,7 @@ namespace :build do
42
42
 
43
43
  FileUtils.remove_dir MOBILE_DEST_TEMPLATES if File.exists? MOBILE_DEST_TEMPLATES
44
44
  FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'config', 'initializers'))
45
+ FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'lib', 'tasks'))
45
46
 
46
47
  open File.join(MOBILE_DEST_TEMPLATES, 'manifest.rb'), 'w' do |manifest|
47
48
  manifest.print MOBILE_MESSAGE1
@@ -50,6 +51,11 @@ namespace :build do
50
51
  f.print(File.read(File.join(MOBILE_SRC, 'config', 'initializers', 'mobile.rb')))
51
52
  end
52
53
  manifest.print "file 'config/initializers/mobile.rb'\n"
54
+
55
+ open File.join(MOBILE_DEST_TEMPLATES, 'lib', 'tasks', 'jquery.mobile.rake'), 'w' do |f|
56
+ f.print(File.read(File.join(MOBILE_SRC, 'lib', 'tasks', 'jquery.mobile.rake')))
57
+ end
58
+ manifest.print "file 'lib/tasks/jquery.mobile.rake'\n"
53
59
 
54
60
  #JavaScripts
55
61
 
@@ -108,6 +114,31 @@ namespace :build do
108
114
  manifest.print "image 'jquery/mobile/#{theme}/#{image}'\n"
109
115
  end
110
116
  end
117
+
118
+ # glyphish Images
119
+ FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'icons'))
120
+
121
+ src_dir = File.join(MOBILE_SRC_IMAGES, 'glyphish', 'icons')
122
+ dest_dir = File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'icons')
123
+ Dir.foreach(src_dir) do |image|
124
+ next if /^\./ =~ image
125
+ FileUtils.cp(File.join(src_dir, image), dest_dir)
126
+ manifest.print "image 'glyphish/icons/#{image}'\n"
127
+ end
128
+ FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'mini-icons'))
129
+ src_dir = File.join(MOBILE_SRC_IMAGES, 'glyphish', 'icons')
130
+ dest_dir = File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'mini-icons')
131
+ Dir.foreach(src_dir) do |image|
132
+ next if /^\./ =~ image
133
+ FileUtils.cp(File.join(src_dir, image), dest_dir)
134
+ manifest.print "image 'glyphish/mini-icons/#{image}'\n"
135
+ end
136
+
137
+ open File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'Read me first - license.txt'), 'w' do |f|
138
+ f.print(File.read(File.join(MOBILE_SRC_IMAGES, 'glyphish', 'Read me first - license.txt')))
139
+ end
140
+ manifest.print "image 'glyphish/Read me first - license.txt'\n"
141
+
111
142
  end
112
143
  end
113
144
  end
@@ -1,6 +1,6 @@
1
1
  desc 'Build all stylesheets and templates.'
2
2
 
3
3
  namespace :build do
4
- task :all => ["build:jrails", "build:jqtools", "build:dynatree", "build:jstree", "build:jqgrid", "build:secret_sauce", "build:ribbon", "build:jqical", "build:jqtouch", "build:mobile", "build:emulators"] do
4
+ task :all => ["build:jrails", "build:tools", "build:dynatree", "build:jstree", "build:jqgrid", "build:secret_sauce", "build:ribbon", "build:ical", "build:jqtouch", "build:mobile", "build:emulators"] do
5
5
  end
6
6
  end
@@ -0,0 +1,66 @@
1
+ require 'fileutils'
2
+ require 'lib/handle_js_files'
3
+
4
+ # Compass generator for tools 3.5+
5
+ TOOLS_SRC = File.join(GEM_ROOT, 'src', 'tools')
6
+
7
+ TOOLS_DEST_TEMPLATES = File.join(GEM_ROOT, 'templates', 'tools')
8
+
9
+ TOOLS_MESSAGE1 = "# Generated by compass-jquery-plugin/gem-tasks/tools.rake\n# Install with: compass install jquery/tools\n\n"
10
+ TOOLS_MESSAGE2 = "// Generated by compass-jquery-plugin/gem-tasks/tools.rake\n\n"
11
+
12
+ all_scripts = [
13
+ 'js/dateinput.js',
14
+ 'js/overlay.js',
15
+ 'js/overlay.apple.js',
16
+ 'js/rangeinput.js',
17
+ 'js/scrollable.js',
18
+ 'js/scrollable.autoscroll.js',
19
+ 'js/scrollable.navigator.js',
20
+ 'js/tabs.js',
21
+ 'js/tabs.slideshow.js',
22
+ 'js/toolbox.expose.js',
23
+ 'js/toolbox.flashembed.js',
24
+ 'js/toolbox.history.js',
25
+ 'js/toolbox.mousewheel.js',
26
+ 'js/tooltip.js',
27
+ 'js/tooltip.dynamic.js',
28
+ 'js/tooltip.slide.js',
29
+ 'js/validator.js'
30
+ ].collect {|filename| File.read(File.join(TOOLS_SRC, filename))}.join "\n\n"
31
+
32
+ namespace :build do
33
+ desc 'Build the stylesheets and templates for tools.'
34
+ task :tools do
35
+
36
+ FileUtils.remove_dir TOOLS_DEST_TEMPLATES if File.exists? TOOLS_DEST_TEMPLATES
37
+ FileUtils.mkdir_p(File.join(TOOLS_DEST_TEMPLATES, 'config', 'initializers'))
38
+ FileUtils.mkdir_p(File.join(TOOLS_DEST_TEMPLATES, 'lib', 'tasks'))
39
+
40
+ open File.join(TOOLS_DEST_TEMPLATES, 'manifest.rb'), 'w' do |manifest|
41
+ manifest.print TOOLS_MESSAGE1
42
+
43
+ open File.join(TOOLS_DEST_TEMPLATES, 'config', 'initializers', 'tools.rb'), 'w' do |f|
44
+ f.print(File.read(File.join(TOOLS_SRC, 'config', 'initializers', 'tools.rb')))
45
+ end
46
+ manifest.print "file 'config/initializers/tools.rb'\n"
47
+
48
+ open File.join(TOOLS_DEST_TEMPLATES, 'lib', 'tasks', 'jquery.tools.rake'), 'w' do |f|
49
+ f.print(File.read(File.join(TOOLS_SRC, 'lib', 'tasks', 'jquery.tools.rake')))
50
+ end
51
+ manifest.print "file 'lib/tasks/jquery.tools.rake'\n"
52
+
53
+ #JavaScripts
54
+
55
+ open File.join(TOOLS_DEST_TEMPLATES, 'jquery.tools.js'), 'w' do |f|
56
+ f.print concat_files(all_scripts)
57
+ end
58
+ manifest.print "javascript 'jquery.tools.js'\n"
59
+
60
+ open File.join(TOOLS_DEST_TEMPLATES, 'jquery.tools.min.js'), 'w' do |f|
61
+ f.print compress_js(all_scripts, "google")
62
+ end
63
+ manifest.print "javascript 'jquery.tools.min.js'\n"
64
+ end
65
+ end
66
+ end
File without changes
@@ -1,30 +1,27 @@
1
- GEM_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
2
- GOOGLE_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'compiler.jar')
3
- YUI_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'yuicompressor-2.4.2.jar')
4
-
5
- def compress_js(scripts, compressor)
6
- min_js = ''
7
- if (compressor.downcase == "google")
8
- cmd = %Q/java -jar "#{GOOGLE_JS_COMPRESSOR}" --charset utf8/
9
- else
10
- cmd = %Q/java -jar "#{YUI_JS_COMPRESSOR}" --type js --charset utf8/
11
- end
12
- IO.popen(cmd, 'r+') { |f| f.print(scripts); f.close_write; min_js = f.read }
13
- min_js
14
- end
15
-
16
- def concat_files(files)
17
- out = ''
18
- files.each do |file|
19
- out += file
20
- end
21
- out
22
- end
23
-
24
- def all_files(pattern)
25
- FileList[pattern].collect {|filename| File.read(filename)}.join "\n\n"
26
- end
27
-
28
-
29
-
30
-
1
+ GEM_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
2
+ GOOGLE_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'google-compiler-20100917.jar')
3
+ YUI_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'yuicompressor-2.4.2.jar')
4
+
5
+ def compress_js(scripts, compressor)
6
+ min_js = ''
7
+ if (compressor.downcase == "google")
8
+ cmd = %Q/java -jar "#{GOOGLE_JS_COMPRESSOR}" --charset utf8/
9
+ else
10
+ cmd = %Q/java -jar "#{YUI_JS_COMPRESSOR}" --type js --charset utf8/
11
+ end
12
+ IO.popen(cmd, 'r+') { |f| f.print(scripts); f.close_write; min_js = f.read }
13
+ min_js
14
+ end
15
+
16
+ def concat_files(files)
17
+ out = ''
18
+ files.each do |file|
19
+ out += file
20
+ end
21
+ out
22
+ end
23
+
24
+ def all_files(pattern)
25
+ FileList[pattern].collect {|filename| File.read(filename)}.join "\n\n"
26
+ end
27
+
@@ -0,0 +1,7 @@
1
+ require 'ri_cal'
2
+
3
+ module Ical
4
+ end
5
+
6
+ require 'jquery/ical/calendar'
7
+ require 'jquery/ical/event'
@@ -1,5 +1,5 @@
1
- module Jqical
2
- module Calendar
3
-
4
- end
5
- end
1
+ module Ical
2
+ module Calendar
3
+
4
+ end
5
+ end
@@ -1,118 +1,118 @@
1
- module Jqical
2
- module Event
3
-
4
- def ical_event
5
- @ical_event ||= RiCal.parse_string(ical_string || '').first || RiCal.Event
6
- end
7
-
8
- def starts_at
9
- @starts_at ||= ical_event.dtstart ? ical_event.dtstart.to_datetime : DateTime.now
10
- end
11
-
12
- def starts_at=(date_time)
13
- @start_time = @start_date = nil
14
- @starts_at = date_time
15
- end
16
-
17
- def start_date
18
- @start_date ||= I18n.l(Date.parse(starts_at.to_s))
19
- end
20
-
21
- def start_date=(string_date)
22
- if parsed = DateTime.parse("#{string_date} #{start_time}") rescue nil
23
- @starts_at = parsed
24
- end
25
- @start_date = string_date
26
- end
27
-
28
- def start_time
29
- @start_time ||= I18n.l(Time.parse(starts_at.to_s), :format => :time)
30
- end
31
-
32
- def start_time=(string_time)
33
- if parsed = DateTime.parse("#{start_date} #{string_time}") rescue nil
34
- @starts_at = parsed
35
- end
36
- @start_time = string_time
37
- end
38
-
39
- def ends_at
40
- @ends_at ||= ical_event.dtend ? ical_event.dtend.to_datetime : starts_at + 60.minutes
41
- end
42
-
43
- def ends_at=(date_time)
44
- @end_time = @end_date = nil
45
- @ends_at = date_time
46
- end
47
-
48
- def end_date
49
- @end_date ||= I18n.l(Date.parse(ends_at.to_s))
50
- end
51
-
52
- def end_date=(string_date)
53
- if parsed = DateTime.parse("#{string_date} #{end_time}") rescue nil
54
- @ends_at = parsed
55
- end
56
- @end_date = string_date
57
- end
58
-
59
- def end_time
60
- @end_time ||= I18n.l(Time.parse(ends_at.to_s), :format => :time)
61
- end
62
-
63
- def end_time=(string_time)
64
- if parsed = DateTime.parse("#{end_date} #{string_time}") rescue nil
65
- @ends_at = parsed
66
- end
67
- @end_time = string_time
68
- end
69
-
70
- def summary
71
- @summary ||= ical_event.summary
72
- end
73
- attr_writer :summary
74
-
75
- def location
76
- @location ||= ical_event.location
77
- end
78
- attr_writer :location
79
-
80
- def description
81
- @description ||= ical_event.description
82
- end
83
- attr_writer :description
84
-
85
- def all_day
86
- @all_day ||= ical_event.x_properties["X-MICROSOFT-CDO-ALLDAYEVENT"][0] ? 1 : 0
87
- end
88
- attr_writer :all_day
89
-
90
- private
91
- def serialize_ical_event
92
- ical_event.summary = summary
93
- ical_event.location = location
94
- ical_event.description = description
95
- ical_event.x_properties["X-MICROSOFT-CDO-ALLDAYEVENT"] = []
96
-
97
- if all_day == "1"
98
- ical_event.add_x_property("X-MICROSOFT-CDO-ALLDAYEVENT", "1")
99
- if starts_at <= ends_at
100
- ical_event.dtstart = DateTime.parse("#{start_date}T00:00")
101
- ical_event.dtend = DateTime.parse("#{end_date}T23:59")
102
- else
103
- ical_event.dtstart = DateTime.parse("#{start_date}T00:00")
104
- ical_event.dtend = ical_event.dtstart+1.day-1.minute
105
- end
106
- else
107
- if starts_at <= ends_at
108
- ical_event.dtstart = DateTime.parse("#{start_date}T#{start_time}")
109
- ical_event.dtend = DateTime.parse("#{end_date}T#{end_time}")
110
- else
111
- ical_event.dtstart = DateTime.parse("#{start_date}T#{start_time}")
112
- ical_event.dtend = ical_event.dtstart+1.hour
113
- end
114
- end
115
- self.ical_string = ical_event.to_s
116
- end
117
- end
1
+ module Ical
2
+ module Event
3
+
4
+ def ical_event
5
+ @ical_event ||= RiCal.parse_string(ical_string || '').first || RiCal.Event
6
+ end
7
+
8
+ def starts_at
9
+ @starts_at ||= ical_event.dtstart ? ical_event.dtstart.to_datetime : DateTime.now
10
+ end
11
+
12
+ def starts_at=(date_time)
13
+ @start_time = @start_date = nil
14
+ @starts_at = date_time
15
+ end
16
+
17
+ def start_date
18
+ @start_date ||= I18n.l(Date.parse(starts_at.to_s))
19
+ end
20
+
21
+ def start_date=(string_date)
22
+ if parsed = DateTime.parse("#{string_date} #{start_time}") rescue nil
23
+ @starts_at = parsed
24
+ end
25
+ @start_date = string_date
26
+ end
27
+
28
+ def start_time
29
+ @start_time ||= I18n.l(Time.parse(starts_at.to_s), :format => :time)
30
+ end
31
+
32
+ def start_time=(string_time)
33
+ if parsed = DateTime.parse("#{start_date} #{string_time}") rescue nil
34
+ @starts_at = parsed
35
+ end
36
+ @start_time = string_time
37
+ end
38
+
39
+ def ends_at
40
+ @ends_at ||= ical_event.dtend ? ical_event.dtend.to_datetime : starts_at + 60.minutes
41
+ end
42
+
43
+ def ends_at=(date_time)
44
+ @end_time = @end_date = nil
45
+ @ends_at = date_time
46
+ end
47
+
48
+ def end_date
49
+ @end_date ||= I18n.l(Date.parse(ends_at.to_s))
50
+ end
51
+
52
+ def end_date=(string_date)
53
+ if parsed = DateTime.parse("#{string_date} #{end_time}") rescue nil
54
+ @ends_at = parsed
55
+ end
56
+ @end_date = string_date
57
+ end
58
+
59
+ def end_time
60
+ @end_time ||= I18n.l(Time.parse(ends_at.to_s), :format => :time)
61
+ end
62
+
63
+ def end_time=(string_time)
64
+ if parsed = DateTime.parse("#{end_date} #{string_time}") rescue nil
65
+ @ends_at = parsed
66
+ end
67
+ @end_time = string_time
68
+ end
69
+
70
+ def summary
71
+ @summary ||= ical_event.summary
72
+ end
73
+ attr_writer :summary
74
+
75
+ def location
76
+ @location ||= ical_event.location
77
+ end
78
+ attr_writer :location
79
+
80
+ def description
81
+ @description ||= ical_event.description
82
+ end
83
+ attr_writer :description
84
+
85
+ def all_day
86
+ @all_day ||= ical_event.x_properties["X-MICROSOFT-CDO-ALLDAYEVENT"][0] ? 1 : 0
87
+ end
88
+ attr_writer :all_day
89
+
90
+ private
91
+ def serialize_ical_event
92
+ ical_event.summary = summary
93
+ ical_event.location = location
94
+ ical_event.description = description
95
+ ical_event.x_properties["X-MICROSOFT-CDO-ALLDAYEVENT"] = []
96
+
97
+ if all_day == "1"
98
+ ical_event.add_x_property("X-MICROSOFT-CDO-ALLDAYEVENT", "1")
99
+ if starts_at <= ends_at
100
+ ical_event.dtstart = DateTime.parse("#{start_date}T00:00")
101
+ ical_event.dtend = DateTime.parse("#{end_date}T23:59")
102
+ else
103
+ ical_event.dtstart = DateTime.parse("#{start_date}T00:00")
104
+ ical_event.dtend = ical_event.dtstart+1.day-1.minute
105
+ end
106
+ else
107
+ if starts_at <= ends_at
108
+ ical_event.dtstart = DateTime.parse("#{start_date}T#{start_time}")
109
+ ical_event.dtend = DateTime.parse("#{end_date}T#{end_time}")
110
+ else
111
+ ical_event.dtstart = DateTime.parse("#{start_date}T#{start_time}")
112
+ ical_event.dtend = ical_event.dtstart+1.hour
113
+ end
114
+ end
115
+ self.ical_string = ical_event.to_s
116
+ end
117
+ end
118
118
  end