compass-jquery-plugin 0.3.0.beta.26 → 0.3.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (415) hide show
  1. data/README.textile +1 -52
  2. data/VERSION.yml +1 -1
  3. data/compass-jquery-plugin.gemspec +6 -407
  4. data/gem_tasks/jrails.rake +84 -85
  5. data/gem_tasks/rubygems.rake +9 -1
  6. data/templates/jqtouch/config/initializers/jqtouch.rb +1 -1
  7. data/templates/jrails/config/initializers/jrails.rb +3 -3
  8. data/templates/jrails/{jquery-ui-1.8.6.js → jquery-ui.js} +0 -0
  9. data/templates/jrails/{jquery-ui-1.8.6.min.js → jquery-ui.min.js} +0 -0
  10. data/templates/jrails/{jquery-1.4.4.js → jquery.js} +360 -284
  11. data/templates/jrails/jquery.min.js +151 -0
  12. data/templates/jrails/manifest.rb +4 -4
  13. metadata +9 -410
  14. data/gem_tasks/jqgrid.rake +0 -119
  15. data/gem_tasks/mobile.rake +0 -144
  16. data/gem_tasks/secret_sauce.rake +0 -64
  17. data/lib/jquery/gridify/assertions.rb +0 -37
  18. data/lib/jquery/gridify/grid.rb +0 -147
  19. data/lib/jquery/gridify/grid_column.rb +0 -134
  20. data/lib/jquery/gridify/grid_finder.rb +0 -223
  21. data/lib/jquery/gridify/grid_options.rb +0 -279
  22. data/lib/jquery/gridify/grid_view.rb +0 -435
  23. data/lib/jquery/gridify.rb +0 -42
  24. data/lib/jquery/jqgrid/jqgrid.rb +0 -438
  25. data/lib/jquery/jqgrid.rb +0 -5
  26. data/lib/jquery/mobile.rb +0 -3
  27. data/lib/jquery/secret_sauce/controller/ui_dialog_controls.rb +0 -14
  28. data/lib/jquery/secret_sauce/controller/ui_grid_controls.rb +0 -18
  29. data/lib/jquery/secret_sauce/helpers/ui_dialog_helper.rb +0 -6
  30. data/lib/jquery/secret_sauce/helpers/ui_form_helper.rb +0 -118
  31. data/lib/jquery/secret_sauce/helpers/ui_grid_helper.rb +0 -226
  32. data/lib/jquery/secret_sauce/model/find_for_grid.rb +0 -42
  33. data/lib/jquery/secret_sauce.rb +0 -9
  34. data/templates/jqgrid/config/initializers/jqgrid.rb +0 -4
  35. data/templates/jqgrid/config/locales/jquery/jqgrid/de.yml +0 -7
  36. data/templates/jqgrid/config/locales/jquery/jqgrid/en.yml +0 -7
  37. data/templates/jqgrid/i18n/jqgrid/locale-bg.js +0 -132
  38. data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +0 -6
  39. data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +0 -132
  40. data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +0 -6
  41. data/templates/jqgrid/i18n/jqgrid/locale-cat.js +0 -128
  42. data/templates/jqgrid/i18n/jqgrid/locale-cat.min.js +0 -6
  43. data/templates/jqgrid/i18n/jqgrid/locale-cn.js +0 -132
  44. data/templates/jqgrid/i18n/jqgrid/locale-cn.min.js +0 -5
  45. data/templates/jqgrid/i18n/jqgrid/locale-cs.js +0 -128
  46. data/templates/jqgrid/i18n/jqgrid/locale-cs.min.js +0 -6
  47. data/templates/jqgrid/i18n/jqgrid/locale-da.js +0 -128
  48. data/templates/jqgrid/i18n/jqgrid/locale-da.min.js +0 -6
  49. data/templates/jqgrid/i18n/jqgrid/locale-de.js +0 -133
  50. data/templates/jqgrid/i18n/jqgrid/locale-de.min.js +0 -7
  51. data/templates/jqgrid/i18n/jqgrid/locale-el.js +0 -126
  52. data/templates/jqgrid/i18n/jqgrid/locale-el.min.js +0 -7
  53. data/templates/jqgrid/i18n/jqgrid/locale-en.js +0 -128
  54. data/templates/jqgrid/i18n/jqgrid/locale-en.min.js +0 -6
  55. data/templates/jqgrid/i18n/jqgrid/locale-es.js +0 -128
  56. data/templates/jqgrid/i18n/jqgrid/locale-es.min.js +0 -7
  57. data/templates/jqgrid/i18n/jqgrid/locale-fa.js +0 -125
  58. data/templates/jqgrid/i18n/jqgrid/locale-fa.min.js +0 -6
  59. data/templates/jqgrid/i18n/jqgrid/locale-fi.js +0 -130
  60. data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +0 -6
  61. data/templates/jqgrid/i18n/jqgrid/locale-fr.js +0 -126
  62. data/templates/jqgrid/i18n/jqgrid/locale-fr.min.js +0 -7
  63. data/templates/jqgrid/i18n/jqgrid/locale-gl.js +0 -126
  64. data/templates/jqgrid/i18n/jqgrid/locale-gl.min.js +0 -7
  65. data/templates/jqgrid/i18n/jqgrid/locale-he.js +0 -127
  66. data/templates/jqgrid/i18n/jqgrid/locale-he.min.js +0 -6
  67. data/templates/jqgrid/i18n/jqgrid/locale-hu.js +0 -129
  68. data/templates/jqgrid/i18n/jqgrid/locale-hu.min.js +0 -6
  69. data/templates/jqgrid/i18n/jqgrid/locale-is.js +0 -126
  70. data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +0 -6
  71. data/templates/jqgrid/i18n/jqgrid/locale-it.js +0 -1
  72. data/templates/jqgrid/i18n/jqgrid/locale-it.min.js +0 -7
  73. data/templates/jqgrid/i18n/jqgrid/locale-ja.js +0 -155
  74. data/templates/jqgrid/i18n/jqgrid/locale-ja.min.js +0 -5
  75. data/templates/jqgrid/i18n/jqgrid/locale-nl.js +0 -149
  76. data/templates/jqgrid/i18n/jqgrid/locale-nl.min.js +0 -6
  77. data/templates/jqgrid/i18n/jqgrid/locale-no.js +0 -1
  78. data/templates/jqgrid/i18n/jqgrid/locale-no.min.js +0 -6
  79. data/templates/jqgrid/i18n/jqgrid/locale-pl.js +0 -127
  80. data/templates/jqgrid/i18n/jqgrid/locale-pl.min.js +0 -6
  81. data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +0 -127
  82. data/templates/jqgrid/i18n/jqgrid/locale-pt-br.min.js +0 -6
  83. data/templates/jqgrid/i18n/jqgrid/locale-pt.js +0 -125
  84. data/templates/jqgrid/i18n/jqgrid/locale-pt.min.js +0 -6
  85. data/templates/jqgrid/i18n/jqgrid/locale-ro.js +0 -139
  86. data/templates/jqgrid/i18n/jqgrid/locale-ro.min.js +0 -7
  87. data/templates/jqgrid/i18n/jqgrid/locale-ru.js +0 -127
  88. data/templates/jqgrid/i18n/jqgrid/locale-ru.min.js +0 -7
  89. data/templates/jqgrid/i18n/jqgrid/locale-sk.js +0 -127
  90. data/templates/jqgrid/i18n/jqgrid/locale-sk.min.js +0 -6
  91. data/templates/jqgrid/i18n/jqgrid/locale-sv.js +0 -127
  92. data/templates/jqgrid/i18n/jqgrid/locale-sv.min.js +0 -6
  93. data/templates/jqgrid/i18n/jqgrid/locale-tr.js +0 -126
  94. data/templates/jqgrid/i18n/jqgrid/locale-tr.min.js +0 -6
  95. data/templates/jqgrid/i18n/jqgrid/locale-ua.js +0 -127
  96. data/templates/jqgrid/i18n/jqgrid/locale-ua.min.js +0 -7
  97. data/templates/jqgrid/jquery/jqGrid.scss +0 -692
  98. data/templates/jqgrid/jquery.jqGrid.js +0 -11576
  99. data/templates/jqgrid/jquery.jqGrid.min.js +0 -472
  100. data/templates/jqgrid/manifest.rb +0 -70
  101. data/templates/jqgrid/public/stylesheets/ellipsis-xbl.xml +0 -13
  102. data/templates/jrails/jquery-1.4.4.min.js +0 -152
  103. data/templates/mobile/config/initializers/mobile.rb +0 -6
  104. data/templates/mobile/glyphish/Read me first - license.txt +0 -14
  105. data/templates/mobile/glyphish/icons/01-refresh.png +0 -0
  106. data/templates/mobile/glyphish/icons/02-redo.png +0 -0
  107. data/templates/mobile/glyphish/icons/03-loopback.png +0 -0
  108. data/templates/mobile/glyphish/icons/04-squiggle.png +0 -0
  109. data/templates/mobile/glyphish/icons/05-shuffle.png +0 -0
  110. data/templates/mobile/glyphish/icons/06-magnifying-glass.png +0 -0
  111. data/templates/mobile/glyphish/icons/07-map-marker.png +0 -0
  112. data/templates/mobile/glyphish/icons/08-chat.png +0 -0
  113. data/templates/mobile/glyphish/icons/09-chat2.png +0 -0
  114. data/templates/mobile/glyphish/icons/10-medical.png +0 -0
  115. data/templates/mobile/glyphish/icons/100-coffee.png +0 -0
  116. data/templates/mobile/glyphish/icons/101-gameplan.png +0 -0
  117. data/templates/mobile/glyphish/icons/102-walk.png +0 -0
  118. data/templates/mobile/glyphish/icons/103-map.png +0 -0
  119. data/templates/mobile/glyphish/icons/104-index-cards.png +0 -0
  120. data/templates/mobile/glyphish/icons/105-piano.png +0 -0
  121. data/templates/mobile/glyphish/icons/106-sliders.png +0 -0
  122. data/templates/mobile/glyphish/icons/107-widescreen.png +0 -0
  123. data/templates/mobile/glyphish/icons/108-badge.png +0 -0
  124. data/templates/mobile/glyphish/icons/109-chicken.png +0 -0
  125. data/templates/mobile/glyphish/icons/11-clock.png +0 -0
  126. data/templates/mobile/glyphish/icons/110-bug.png +0 -0
  127. data/templates/mobile/glyphish/icons/111-user.png +0 -0
  128. data/templates/mobile/glyphish/icons/112-group.png +0 -0
  129. data/templates/mobile/glyphish/icons/113-navigation.png +0 -0
  130. data/templates/mobile/glyphish/icons/114-balloon.png +0 -0
  131. data/templates/mobile/glyphish/icons/115-bow-and-arrow.png +0 -0
  132. data/templates/mobile/glyphish/icons/116-controller.png +0 -0
  133. data/templates/mobile/glyphish/icons/117-todo.png +0 -0
  134. data/templates/mobile/glyphish/icons/118-coathanger.png +0 -0
  135. data/templates/mobile/glyphish/icons/119-piggybank.png +0 -0
  136. data/templates/mobile/glyphish/icons/12-eye.png +0 -0
  137. data/templates/mobile/glyphish/icons/120-headphones.png +0 -0
  138. data/templates/mobile/glyphish/icons/121-lanscape.png +0 -0
  139. data/templates/mobile/glyphish/icons/122-stats.png +0 -0
  140. data/templates/mobile/glyphish/icons/123-id-card.png +0 -0
  141. data/templates/mobile/glyphish/icons/124-bullhorn.png +0 -0
  142. data/templates/mobile/glyphish/icons/125-food.png +0 -0
  143. data/templates/mobile/glyphish/icons/126-moon.png +0 -0
  144. data/templates/mobile/glyphish/icons/127-sock.png +0 -0
  145. data/templates/mobile/glyphish/icons/128-bone.png +0 -0
  146. data/templates/mobile/glyphish/icons/129-golf.png +0 -0
  147. data/templates/mobile/glyphish/icons/13-target.png +0 -0
  148. data/templates/mobile/glyphish/icons/130-dice.png +0 -0
  149. data/templates/mobile/glyphish/icons/14-tag.png +0 -0
  150. data/templates/mobile/glyphish/icons/15-tags.png +0 -0
  151. data/templates/mobile/glyphish/icons/16-line-chart.png +0 -0
  152. data/templates/mobile/glyphish/icons/17-bar-chart.png +0 -0
  153. data/templates/mobile/glyphish/icons/18-envelope.png +0 -0
  154. data/templates/mobile/glyphish/icons/19-gear.png +0 -0
  155. data/templates/mobile/glyphish/icons/20-gear2.png +0 -0
  156. data/templates/mobile/glyphish/icons/21-skull.png +0 -0
  157. data/templates/mobile/glyphish/icons/22-skull-n-crossbones.png +0 -0
  158. data/templates/mobile/glyphish/icons/23-bird.png +0 -0
  159. data/templates/mobile/glyphish/icons/24-gift.png +0 -0
  160. data/templates/mobile/glyphish/icons/25-weather.png +0 -0
  161. data/templates/mobile/glyphish/icons/26-bandaid.png +0 -0
  162. data/templates/mobile/glyphish/icons/27-planet.png +0 -0
  163. data/templates/mobile/glyphish/icons/28-star.png +0 -0
  164. data/templates/mobile/glyphish/icons/29-heart.png +0 -0
  165. data/templates/mobile/glyphish/icons/30-key.png +0 -0
  166. data/templates/mobile/glyphish/icons/31-ipod.png +0 -0
  167. data/templates/mobile/glyphish/icons/32-iphone.png +0 -0
  168. data/templates/mobile/glyphish/icons/33-cabinet.png +0 -0
  169. data/templates/mobile/glyphish/icons/34-coffee.png +0 -0
  170. data/templates/mobile/glyphish/icons/35-shopping-bag.png +0 -0
  171. data/templates/mobile/glyphish/icons/36-toolbox.png +0 -0
  172. data/templates/mobile/glyphish/icons/37-suitcase.png +0 -0
  173. data/templates/mobile/glyphish/icons/38-airplane.png +0 -0
  174. data/templates/mobile/glyphish/icons/39-spraycan.png +0 -0
  175. data/templates/mobile/glyphish/icons/40-inbox.png +0 -0
  176. data/templates/mobile/glyphish/icons/41-picture-frame.png +0 -0
  177. data/templates/mobile/glyphish/icons/42-photos.png +0 -0
  178. data/templates/mobile/glyphish/icons/43-film-roll.png +0 -0
  179. data/templates/mobile/glyphish/icons/44-shoebox.png +0 -0
  180. data/templates/mobile/glyphish/icons/45-movie1.png +0 -0
  181. data/templates/mobile/glyphish/icons/46-movie2.png +0 -0
  182. data/templates/mobile/glyphish/icons/47-fuel.png +0 -0
  183. data/templates/mobile/glyphish/icons/48-fork-and-knife.png +0 -0
  184. data/templates/mobile/glyphish/icons/49-battery.png +0 -0
  185. data/templates/mobile/glyphish/icons/50-beaker.png +0 -0
  186. data/templates/mobile/glyphish/icons/51-outlet.png +0 -0
  187. data/templates/mobile/glyphish/icons/52-pinetree.png +0 -0
  188. data/templates/mobile/glyphish/icons/53-house.png +0 -0
  189. data/templates/mobile/glyphish/icons/54-lock.png +0 -0
  190. data/templates/mobile/glyphish/icons/55-network.png +0 -0
  191. data/templates/mobile/glyphish/icons/56-cloud.png +0 -0
  192. data/templates/mobile/glyphish/icons/57-download.png +0 -0
  193. data/templates/mobile/glyphish/icons/58-bookmark.png +0 -0
  194. data/templates/mobile/glyphish/icons/59-flag.png +0 -0
  195. data/templates/mobile/glyphish/icons/60-signpost.png +0 -0
  196. data/templates/mobile/glyphish/icons/61-brightness.png +0 -0
  197. data/templates/mobile/glyphish/icons/62-contrast.png +0 -0
  198. data/templates/mobile/glyphish/icons/63-runner.png +0 -0
  199. data/templates/mobile/glyphish/icons/64-zap.png +0 -0
  200. data/templates/mobile/glyphish/icons/65-note.png +0 -0
  201. data/templates/mobile/glyphish/icons/66-microphone.png +0 -0
  202. data/templates/mobile/glyphish/icons/67-tshirt.png +0 -0
  203. data/templates/mobile/glyphish/icons/68-paperclip.png +0 -0
  204. data/templates/mobile/glyphish/icons/69-display.png +0 -0
  205. data/templates/mobile/glyphish/icons/70-tv.png +0 -0
  206. data/templates/mobile/glyphish/icons/71-compass.png +0 -0
  207. data/templates/mobile/glyphish/icons/72-pin.png +0 -0
  208. data/templates/mobile/glyphish/icons/73-radar.png +0 -0
  209. data/templates/mobile/glyphish/icons/74-location.png +0 -0
  210. data/templates/mobile/glyphish/icons/75-phone.png +0 -0
  211. data/templates/mobile/glyphish/icons/76-baby.png +0 -0
  212. data/templates/mobile/glyphish/icons/77-ekg.png +0 -0
  213. data/templates/mobile/glyphish/icons/78-stopwatch.png +0 -0
  214. data/templates/mobile/glyphish/icons/79-medical-bag.png +0 -0
  215. data/templates/mobile/glyphish/icons/80-shopping-cart.png +0 -0
  216. data/templates/mobile/glyphish/icons/81-dashboard.png +0 -0
  217. data/templates/mobile/glyphish/icons/82-dogpaw.png +0 -0
  218. data/templates/mobile/glyphish/icons/83-calendar.png +0 -0
  219. data/templates/mobile/glyphish/icons/84-lightbulb.png +0 -0
  220. data/templates/mobile/glyphish/icons/85-trophy.png +0 -0
  221. data/templates/mobile/glyphish/icons/86-camera.png +0 -0
  222. data/templates/mobile/glyphish/icons/87-wineglass.png +0 -0
  223. data/templates/mobile/glyphish/icons/88-beermug.png +0 -0
  224. data/templates/mobile/glyphish/icons/89-dumbbell.png +0 -0
  225. data/templates/mobile/glyphish/icons/90-lifebuoy.png +0 -0
  226. data/templates/mobile/glyphish/icons/91-beaker2.png +0 -0
  227. data/templates/mobile/glyphish/icons/92-testtube.png +0 -0
  228. data/templates/mobile/glyphish/icons/93-thermometer.png +0 -0
  229. data/templates/mobile/glyphish/icons/94-pill.png +0 -0
  230. data/templates/mobile/glyphish/icons/95-equalizer.png +0 -0
  231. data/templates/mobile/glyphish/icons/96-book.png +0 -0
  232. data/templates/mobile/glyphish/icons/97-puzzle.png +0 -0
  233. data/templates/mobile/glyphish/icons/98-palette.png +0 -0
  234. data/templates/mobile/glyphish/icons/99-umbrella.png +0 -0
  235. data/templates/mobile/glyphish/mini-icons/01-refresh.png +0 -0
  236. data/templates/mobile/glyphish/mini-icons/02-redo.png +0 -0
  237. data/templates/mobile/glyphish/mini-icons/03-loopback.png +0 -0
  238. data/templates/mobile/glyphish/mini-icons/04-squiggle.png +0 -0
  239. data/templates/mobile/glyphish/mini-icons/05-shuffle.png +0 -0
  240. data/templates/mobile/glyphish/mini-icons/06-magnifying-glass.png +0 -0
  241. data/templates/mobile/glyphish/mini-icons/07-map-marker.png +0 -0
  242. data/templates/mobile/glyphish/mini-icons/08-chat.png +0 -0
  243. data/templates/mobile/glyphish/mini-icons/09-chat2.png +0 -0
  244. data/templates/mobile/glyphish/mini-icons/10-medical.png +0 -0
  245. data/templates/mobile/glyphish/mini-icons/100-coffee.png +0 -0
  246. data/templates/mobile/glyphish/mini-icons/101-gameplan.png +0 -0
  247. data/templates/mobile/glyphish/mini-icons/102-walk.png +0 -0
  248. data/templates/mobile/glyphish/mini-icons/103-map.png +0 -0
  249. data/templates/mobile/glyphish/mini-icons/104-index-cards.png +0 -0
  250. data/templates/mobile/glyphish/mini-icons/105-piano.png +0 -0
  251. data/templates/mobile/glyphish/mini-icons/106-sliders.png +0 -0
  252. data/templates/mobile/glyphish/mini-icons/107-widescreen.png +0 -0
  253. data/templates/mobile/glyphish/mini-icons/108-badge.png +0 -0
  254. data/templates/mobile/glyphish/mini-icons/109-chicken.png +0 -0
  255. data/templates/mobile/glyphish/mini-icons/11-clock.png +0 -0
  256. data/templates/mobile/glyphish/mini-icons/110-bug.png +0 -0
  257. data/templates/mobile/glyphish/mini-icons/111-user.png +0 -0
  258. data/templates/mobile/glyphish/mini-icons/112-group.png +0 -0
  259. data/templates/mobile/glyphish/mini-icons/113-navigation.png +0 -0
  260. data/templates/mobile/glyphish/mini-icons/114-balloon.png +0 -0
  261. data/templates/mobile/glyphish/mini-icons/115-bow-and-arrow.png +0 -0
  262. data/templates/mobile/glyphish/mini-icons/116-controller.png +0 -0
  263. data/templates/mobile/glyphish/mini-icons/117-todo.png +0 -0
  264. data/templates/mobile/glyphish/mini-icons/118-coathanger.png +0 -0
  265. data/templates/mobile/glyphish/mini-icons/119-piggybank.png +0 -0
  266. data/templates/mobile/glyphish/mini-icons/12-eye.png +0 -0
  267. data/templates/mobile/glyphish/mini-icons/120-headphones.png +0 -0
  268. data/templates/mobile/glyphish/mini-icons/121-lanscape.png +0 -0
  269. data/templates/mobile/glyphish/mini-icons/122-stats.png +0 -0
  270. data/templates/mobile/glyphish/mini-icons/123-id-card.png +0 -0
  271. data/templates/mobile/glyphish/mini-icons/124-bullhorn.png +0 -0
  272. data/templates/mobile/glyphish/mini-icons/125-food.png +0 -0
  273. data/templates/mobile/glyphish/mini-icons/126-moon.png +0 -0
  274. data/templates/mobile/glyphish/mini-icons/127-sock.png +0 -0
  275. data/templates/mobile/glyphish/mini-icons/128-bone.png +0 -0
  276. data/templates/mobile/glyphish/mini-icons/129-golf.png +0 -0
  277. data/templates/mobile/glyphish/mini-icons/13-target.png +0 -0
  278. data/templates/mobile/glyphish/mini-icons/130-dice.png +0 -0
  279. data/templates/mobile/glyphish/mini-icons/14-tag.png +0 -0
  280. data/templates/mobile/glyphish/mini-icons/15-tags.png +0 -0
  281. data/templates/mobile/glyphish/mini-icons/16-line-chart.png +0 -0
  282. data/templates/mobile/glyphish/mini-icons/17-bar-chart.png +0 -0
  283. data/templates/mobile/glyphish/mini-icons/18-envelope.png +0 -0
  284. data/templates/mobile/glyphish/mini-icons/19-gear.png +0 -0
  285. data/templates/mobile/glyphish/mini-icons/20-gear2.png +0 -0
  286. data/templates/mobile/glyphish/mini-icons/21-skull.png +0 -0
  287. data/templates/mobile/glyphish/mini-icons/22-skull-n-crossbones.png +0 -0
  288. data/templates/mobile/glyphish/mini-icons/23-bird.png +0 -0
  289. data/templates/mobile/glyphish/mini-icons/24-gift.png +0 -0
  290. data/templates/mobile/glyphish/mini-icons/25-weather.png +0 -0
  291. data/templates/mobile/glyphish/mini-icons/26-bandaid.png +0 -0
  292. data/templates/mobile/glyphish/mini-icons/27-planet.png +0 -0
  293. data/templates/mobile/glyphish/mini-icons/28-star.png +0 -0
  294. data/templates/mobile/glyphish/mini-icons/29-heart.png +0 -0
  295. data/templates/mobile/glyphish/mini-icons/30-key.png +0 -0
  296. data/templates/mobile/glyphish/mini-icons/31-ipod.png +0 -0
  297. data/templates/mobile/glyphish/mini-icons/32-iphone.png +0 -0
  298. data/templates/mobile/glyphish/mini-icons/33-cabinet.png +0 -0
  299. data/templates/mobile/glyphish/mini-icons/34-coffee.png +0 -0
  300. data/templates/mobile/glyphish/mini-icons/35-shopping-bag.png +0 -0
  301. data/templates/mobile/glyphish/mini-icons/36-toolbox.png +0 -0
  302. data/templates/mobile/glyphish/mini-icons/37-suitcase.png +0 -0
  303. data/templates/mobile/glyphish/mini-icons/38-airplane.png +0 -0
  304. data/templates/mobile/glyphish/mini-icons/39-spraycan.png +0 -0
  305. data/templates/mobile/glyphish/mini-icons/40-inbox.png +0 -0
  306. data/templates/mobile/glyphish/mini-icons/41-picture-frame.png +0 -0
  307. data/templates/mobile/glyphish/mini-icons/42-photos.png +0 -0
  308. data/templates/mobile/glyphish/mini-icons/43-film-roll.png +0 -0
  309. data/templates/mobile/glyphish/mini-icons/44-shoebox.png +0 -0
  310. data/templates/mobile/glyphish/mini-icons/45-movie1.png +0 -0
  311. data/templates/mobile/glyphish/mini-icons/46-movie2.png +0 -0
  312. data/templates/mobile/glyphish/mini-icons/47-fuel.png +0 -0
  313. data/templates/mobile/glyphish/mini-icons/48-fork-and-knife.png +0 -0
  314. data/templates/mobile/glyphish/mini-icons/49-battery.png +0 -0
  315. data/templates/mobile/glyphish/mini-icons/50-beaker.png +0 -0
  316. data/templates/mobile/glyphish/mini-icons/51-outlet.png +0 -0
  317. data/templates/mobile/glyphish/mini-icons/52-pinetree.png +0 -0
  318. data/templates/mobile/glyphish/mini-icons/53-house.png +0 -0
  319. data/templates/mobile/glyphish/mini-icons/54-lock.png +0 -0
  320. data/templates/mobile/glyphish/mini-icons/55-network.png +0 -0
  321. data/templates/mobile/glyphish/mini-icons/56-cloud.png +0 -0
  322. data/templates/mobile/glyphish/mini-icons/57-download.png +0 -0
  323. data/templates/mobile/glyphish/mini-icons/58-bookmark.png +0 -0
  324. data/templates/mobile/glyphish/mini-icons/59-flag.png +0 -0
  325. data/templates/mobile/glyphish/mini-icons/60-signpost.png +0 -0
  326. data/templates/mobile/glyphish/mini-icons/61-brightness.png +0 -0
  327. data/templates/mobile/glyphish/mini-icons/62-contrast.png +0 -0
  328. data/templates/mobile/glyphish/mini-icons/63-runner.png +0 -0
  329. data/templates/mobile/glyphish/mini-icons/64-zap.png +0 -0
  330. data/templates/mobile/glyphish/mini-icons/65-note.png +0 -0
  331. data/templates/mobile/glyphish/mini-icons/66-microphone.png +0 -0
  332. data/templates/mobile/glyphish/mini-icons/67-tshirt.png +0 -0
  333. data/templates/mobile/glyphish/mini-icons/68-paperclip.png +0 -0
  334. data/templates/mobile/glyphish/mini-icons/69-display.png +0 -0
  335. data/templates/mobile/glyphish/mini-icons/70-tv.png +0 -0
  336. data/templates/mobile/glyphish/mini-icons/71-compass.png +0 -0
  337. data/templates/mobile/glyphish/mini-icons/72-pin.png +0 -0
  338. data/templates/mobile/glyphish/mini-icons/73-radar.png +0 -0
  339. data/templates/mobile/glyphish/mini-icons/74-location.png +0 -0
  340. data/templates/mobile/glyphish/mini-icons/75-phone.png +0 -0
  341. data/templates/mobile/glyphish/mini-icons/76-baby.png +0 -0
  342. data/templates/mobile/glyphish/mini-icons/77-ekg.png +0 -0
  343. data/templates/mobile/glyphish/mini-icons/78-stopwatch.png +0 -0
  344. data/templates/mobile/glyphish/mini-icons/79-medical-bag.png +0 -0
  345. data/templates/mobile/glyphish/mini-icons/80-shopping-cart.png +0 -0
  346. data/templates/mobile/glyphish/mini-icons/81-dashboard.png +0 -0
  347. data/templates/mobile/glyphish/mini-icons/82-dogpaw.png +0 -0
  348. data/templates/mobile/glyphish/mini-icons/83-calendar.png +0 -0
  349. data/templates/mobile/glyphish/mini-icons/84-lightbulb.png +0 -0
  350. data/templates/mobile/glyphish/mini-icons/85-trophy.png +0 -0
  351. data/templates/mobile/glyphish/mini-icons/86-camera.png +0 -0
  352. data/templates/mobile/glyphish/mini-icons/87-wineglass.png +0 -0
  353. data/templates/mobile/glyphish/mini-icons/88-beermug.png +0 -0
  354. data/templates/mobile/glyphish/mini-icons/89-dumbbell.png +0 -0
  355. data/templates/mobile/glyphish/mini-icons/90-lifebuoy.png +0 -0
  356. data/templates/mobile/glyphish/mini-icons/91-beaker2.png +0 -0
  357. data/templates/mobile/glyphish/mini-icons/92-testtube.png +0 -0
  358. data/templates/mobile/glyphish/mini-icons/93-thermometer.png +0 -0
  359. data/templates/mobile/glyphish/mini-icons/94-pill.png +0 -0
  360. data/templates/mobile/glyphish/mini-icons/95-equalizer.png +0 -0
  361. data/templates/mobile/glyphish/mini-icons/96-book.png +0 -0
  362. data/templates/mobile/glyphish/mini-icons/97-puzzle.png +0 -0
  363. data/templates/mobile/glyphish/mini-icons/98-palette.png +0 -0
  364. data/templates/mobile/glyphish/mini-icons/99-umbrella.png +0 -0
  365. data/templates/mobile/jquery/mobile/_base.scss +0 -1325
  366. data/templates/mobile/jquery/mobile/default/ajax-loader.png +0 -0
  367. data/templates/mobile/jquery/mobile/default/form-check-off.png +0 -0
  368. data/templates/mobile/jquery/mobile/default/form-check-on.png +0 -0
  369. data/templates/mobile/jquery/mobile/default/form-radio-off.png +0 -0
  370. data/templates/mobile/jquery/mobile/default/form-radio-on.png +0 -0
  371. data/templates/mobile/jquery/mobile/default/icon-arrow-white-down.png +0 -0
  372. data/templates/mobile/jquery/mobile/default/icon-arrow-white-left.png +0 -0
  373. data/templates/mobile/jquery/mobile/default/icon-arrow-white-right.png +0 -0
  374. data/templates/mobile/jquery/mobile/default/icon-arrow-white-up.png +0 -0
  375. data/templates/mobile/jquery/mobile/default/icon-delete.png +0 -0
  376. data/templates/mobile/jquery/mobile/default/icon-minus-white.png +0 -0
  377. data/templates/mobile/jquery/mobile/default/icon-plus-white.png +0 -0
  378. data/templates/mobile/jquery/mobile/default/icon-search-black.png +0 -0
  379. data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
  380. data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
  381. data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
  382. data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
  383. data/templates/mobile/jquery/mobile/default.scss +0 -742
  384. data/templates/mobile/jquery/mobile/valencia/ajax-loader.png +0 -0
  385. data/templates/mobile/jquery/mobile/valencia/form-check-off.png +0 -0
  386. data/templates/mobile/jquery/mobile/valencia/form-check-on.png +0 -0
  387. data/templates/mobile/jquery/mobile/valencia/form-radio-off.png +0 -0
  388. data/templates/mobile/jquery/mobile/valencia/form-radio-on.png +0 -0
  389. data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-down.png +0 -0
  390. data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-left.png +0 -0
  391. data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-right.png +0 -0
  392. data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-up.png +0 -0
  393. data/templates/mobile/jquery/mobile/valencia/icon-delete.png +0 -0
  394. data/templates/mobile/jquery/mobile/valencia/icon-minus-white.png +0 -0
  395. data/templates/mobile/jquery/mobile/valencia/icon-plus-white.png +0 -0
  396. data/templates/mobile/jquery/mobile/valencia/icon-search-black.png +0 -0
  397. data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
  398. data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
  399. data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
  400. data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
  401. data/templates/mobile/jquery/mobile/valencia/texture_05.png +0 -0
  402. data/templates/mobile/jquery/mobile/valencia/texture_075.png +0 -0
  403. data/templates/mobile/jquery/mobile/valencia.scss +0 -804
  404. data/templates/mobile/jquery.mobile.js +0 -3390
  405. data/templates/mobile/jquery.mobile.min.js +0 -28
  406. data/templates/mobile/lib/tasks/jquery.mobile.rake +0 -106
  407. data/templates/mobile/manifest.rb +0 -307
  408. data/templates/secret_sauce/app/views/shared/_ui_form_error_messages.html.haml +0 -6
  409. data/templates/secret_sauce/app/views/shared/_ui_grid_for_without_block.js.haml +0 -144
  410. data/templates/secret_sauce/app/views/shared/_ui_static_dialog.html.haml +0 -6
  411. data/templates/secret_sauce/config/initializers/secret_sauce.rb +0 -8
  412. data/templates/secret_sauce/jquery/secret_sauce.scss +0 -33
  413. data/templates/secret_sauce/manifest.rb +0 -10
  414. data/templates/secret_sauce/secret_sauce.js +0 -12
  415. data/templates/secret_sauce/secret_sauce.min.js +0 -1
@@ -1,144 +0,0 @@
1
- require 'fileutils'
2
- require 'lib/handle_js_files'
3
- require 'lib/jquery_mobile_theme'
4
-
5
- MOBILE_SRC = File.join(GEM_ROOT, 'src', 'mobile')
6
- MOBILE_SRC_IMAGES = File.join(MOBILE_SRC, 'images')
7
- MOBILE_SRC_THEMES = File.join(MOBILE_SRC, 'themes')
8
-
9
- MOBILE_DEST_TEMPLATES = File.join(GEM_ROOT, 'templates', 'mobile')
10
- MOBILE_DEST_THEMES = File.join(MOBILE_DEST_TEMPLATES, 'jquery', 'mobile')
11
- MOBILE_DEST_IMAGES = File.join(MOBILE_DEST_THEMES)
12
-
13
- all_scripts = [
14
- 'js/jquery.ui.widget.js',
15
- 'js/jquery.mobile.widget.js',
16
- 'js/jquery.mobile.support.js',
17
- 'js/jquery.mobile.event.js',
18
- 'js/jquery.mobile.hashchange.js',
19
- 'js/jquery.mobile.page.js',
20
- 'js/jquery.mobile.fixHeaderFooter.js',
21
- 'js/jquery.mobile.forms.checkboxradio.js',
22
- 'js/jquery.mobile.forms.textinput.js',
23
- 'js/jquery.mobile.forms.select.js',
24
- 'js/jquery.mobile.buttonMarkup.js',
25
- 'js/jquery.mobile.forms.button.js',
26
- 'js/jquery.mobile.forms.slider.js',
27
- 'js/jquery.mobile.collapsible.js',
28
- 'js/jquery.mobile.controlGroup.js',
29
- 'js/jquery.mobile.fieldContain.js',
30
- 'js/jquery.mobile.listview.js',
31
- 'js/jquery.mobile.listview.filter.js',
32
- 'js/jquery.mobile.dialog.js',
33
- 'js/jquery.mobile.navbar.js',
34
- 'js/jquery.mobile.grid.js',
35
- 'js/jquery.mobile.js',
36
- 'js/jquery.mobile.themeswitcher.js'
37
- ].collect {|filename| File.read(File.join(MOBILE_SRC, filename))}.join "\n\n"
38
-
39
- namespace :build do
40
- desc 'Build the stylesheets and templates for jquery.mobile.'
41
- task :mobile do
42
-
43
- FileUtils.remove_dir MOBILE_DEST_TEMPLATES if File.exists? MOBILE_DEST_TEMPLATES
44
- FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'config', 'initializers'))
45
- FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'lib', 'tasks'))
46
-
47
- open File.join(MOBILE_DEST_TEMPLATES, 'manifest.rb'), 'w' do |manifest|
48
- manifest.print MOBILE_MESSAGE1
49
-
50
- open File.join(MOBILE_DEST_TEMPLATES, 'config', 'initializers', 'mobile.rb'), 'w' do |f|
51
- f.print(File.read(File.join(MOBILE_SRC, 'config', 'initializers', 'mobile.rb')))
52
- end
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"
59
-
60
- #JavaScripts
61
-
62
- open File.join(MOBILE_DEST_TEMPLATES, 'jquery.mobile.js'), 'w' do |f|
63
- f.print concat_files(all_scripts)
64
- end
65
- manifest.print "javascript 'jquery.mobile.js'\n"
66
-
67
- open File.join(MOBILE_DEST_TEMPLATES, 'jquery.mobile.min.js'), 'w' do |f|
68
- f.print compress_js(all_scripts, "yui")
69
- end
70
- manifest.print "javascript 'jquery.mobile.min.js'\n"
71
-
72
- # jQuery Mobile Themes
73
- mobile = JqueryMobileTheme.new(File.join(MOBILE_SRC_THEMES, 'default'))
74
-
75
- base_stylesheets = [
76
- 'jquery.mobile.core.css',
77
- 'jquery.mobile.button.css',
78
- 'jquery.mobile.collapsible.css',
79
- 'jquery.mobile.controlgroup.css',
80
- 'jquery.mobile.dialog.css',
81
- 'jquery.mobile.forms.checkboxradio.css',
82
- 'jquery.mobile.forms.fieldcontain.css',
83
- 'jquery.mobile.forms.select.css',
84
- 'jquery.mobile.forms.slider.css',
85
- 'jquery.mobile.forms.textinput.css',
86
- 'jquery.mobile.grids.css',
87
- 'jquery.mobile.headerfooter.css',
88
- 'jquery.mobile.listview.css',
89
- 'jquery.mobile.navbar.css',
90
- 'jquery.mobile.transitions.css'
91
- ].collect {|filename| File.read(File.join(MOBILE_SRC_THEMES, 'default', filename))}.join "\n\n"
92
-
93
- FileUtils.mkdir_p(MOBILE_DEST_THEMES)
94
- open File.join(MOBILE_DEST_THEMES, '_base.scss'), 'w' do |f|
95
- sass = MOBILE_MESSAGE2
96
- IO.popen("sass-convert -F css -T scss", 'r+') { |ff| ff.print(base_stylesheets); ff.close_write; sass += ff.read }
97
- f.print sass
98
- end
99
- manifest.print "stylesheet 'jquery/mobile/_base.scss'\n"
100
-
101
- Dir.foreach MOBILE_SRC_THEMES do |theme|
102
- next if /^\./ =~ theme
103
- mobile.convert_theme(theme, File.join(MOBILE_SRC_THEMES, theme), File.join(MOBILE_DEST_THEMES))
104
- manifest.print "stylesheet 'jquery/mobile/#{theme}.scss'\n"
105
-
106
- # Copy the theme images directory
107
- src_dir = File.join(MOBILE_SRC_THEMES, theme, 'images')
108
- dest_dir = File.join(MOBILE_DEST_IMAGES, theme)
109
- FileUtils.mkdir_p dest_dir
110
-
111
- Dir.foreach(src_dir) do |image|
112
- next if /^\./ =~ image
113
- FileUtils.cp(File.join(src_dir, image), dest_dir)
114
- manifest.print "image 'jquery/mobile/#{theme}/#{image}'\n"
115
- end
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
-
142
- end
143
- end
144
- end
@@ -1,64 +0,0 @@
1
- require 'fileutils'
2
- require 'lib/handle_js_files'
3
-
4
- # Compass generator for jqGrid 3.5+
5
- SECRET_SAUCE_SRC = File.join(GEM_ROOT, 'src', 'secret_sauce')
6
- SECRET_SAUCE_SRC_SCRIPTS = SECRET_SAUCE_SRC + "/*.js"
7
-
8
- SECRET_SAUCE_DEST_TEMPLATES = File.join(GEM_ROOT, 'templates', 'secret_sauce')
9
- SECRET_SAUCE_DEST_STYLESHEETS = File.join(SECRET_SAUCE_DEST_TEMPLATES, 'jquery')
10
- SECRET_SAUCE_DEST_CONFIG = File.join(SECRET_SAUCE_DEST_TEMPLATES, 'config', 'initializers')
11
- SECRET_SAUCE_DEST_VIEWS = File.join(SECRET_SAUCE_DEST_TEMPLATES, 'app', 'views', 'shared')
12
-
13
- SECRET_SAUCE_MESSAGE1 = "# Generated by compass-jquery-plugin/gem-tasks/secret_sauce.rake\n# Install with: compass install jquery/secret_sauce\n\n"
14
- SECRET_SAUCE_MESSAGE2 = "// Generated by compass-jquery-pluginy/gem-tasks/secret_sauce.rake\n\n"
15
-
16
- namespace :build do
17
- desc 'Build the stylesheets and templates for jqGrid.'
18
- task :secret_sauce do
19
-
20
- FileUtils.remove_dir(SECRET_SAUCE_DEST_TEMPLATES) if File.exists? SECRET_SAUCE_DEST_TEMPLATES
21
- FileUtils.mkdir_p(SECRET_SAUCE_DEST_CONFIG)
22
- FileUtils.mkdir_p(SECRET_SAUCE_DEST_VIEWS)
23
-
24
- open File.join(SECRET_SAUCE_DEST_TEMPLATES, 'manifest.rb'), 'w' do |manifest|
25
- manifest.print SECRET_SAUCE_MESSAGE1
26
-
27
- Dir.foreach File.join(SECRET_SAUCE_SRC, 'app', 'views', 'shared') do |file|
28
- next unless /\.haml$/ =~ file
29
- html = File.read File.join(SECRET_SAUCE_SRC, 'app', 'views', 'shared', file)
30
- open File.join(SECRET_SAUCE_DEST_VIEWS, file), 'w' do |f|
31
- f.print(html)
32
- end
33
- manifest.print "file 'app/views/shared/#{file}'\n"
34
- end
35
-
36
- open File.join(SECRET_SAUCE_DEST_TEMPLATES, 'config', 'initializers', 'secret_sauce.rb'), 'w' do |f|
37
- f.print(File.read(File.join(SECRET_SAUCE_SRC, 'config', 'initializers', 'secret_sauce.rb')))
38
- end
39
- manifest.print "file 'config/initializers/secret_sauce.rb'\n"
40
-
41
- open File.join(SECRET_SAUCE_DEST_TEMPLATES, 'secret_sauce.js'), 'w' do |f|
42
- f.print concat_files(all_files(SECRET_SAUCE_SRC_SCRIPTS))
43
- end
44
- manifest.print "javascript 'secret_sauce.js'\n"
45
-
46
- open File.join(SECRET_SAUCE_DEST_TEMPLATES, 'secret_sauce.min.js'), 'w' do |f|
47
- f.print compress_js(all_files(SECRET_SAUCE_SRC_SCRIPTS), "google")
48
- end
49
- manifest.print "javascript 'secret_sauce.min.js'\n"
50
-
51
- FileUtils.mkdir_p(SECRET_SAUCE_DEST_STYLESHEETS)
52
- Dir.foreach File.join(SECRET_SAUCE_SRC, 'css') do |file|
53
- next unless /\.css$/ =~ file
54
- css = File.read File.join(SECRET_SAUCE_SRC, 'css', file)
55
- sass = ''
56
- IO.popen("sass-convert -F css -T scss", 'r+') { |f| f.print(css); f.close_write; sass = f.read }
57
- open(File.join(SECRET_SAUCE_DEST_STYLESHEETS, file.gsub(/\.css$/,'.scss')), 'w') do |f|
58
- f.write SECRET_SAUCE_MESSAGE2 + sass
59
- end
60
- manifest.print "stylesheet 'jquery/#{file.gsub(/\.css$/,'.scss')}'\n"
61
- end
62
- end
63
- end
64
- end
@@ -1,37 +0,0 @@
1
- # lifted from state_machine plugin
2
- module Gridify
3
- # Provides a set of helper methods for making assertions about the content
4
- # of various objects
5
- module Assertions
6
- # Validates that the given hash *only* includes the specified valid keys.
7
- # If any invalid keys are found, an ArgumentError will be raised.
8
- #
9
- # == Examples
10
- #
11
- # options = {:name => 'John Smith', :age => 30}
12
- #
13
- # assert_valid_keys(options, :name) # => ArgumentError: Invalid key(s): age
14
- # assert_valid_keys(options, 'name', 'age') # => ArgumentError: Invalid key(s): age, name
15
- # assert_valid_keys(options, :name, :age) # => nil
16
- def assert_valid_keys(hash, *valid_keys)
17
- invalid_keys = hash.keys - valid_keys
18
- raise ArgumentError, "Invalid key(s): #{invalid_keys.join(', ')}" unless invalid_keys.empty?
19
- end
20
-
21
- # Validates that the given hash only includes at *most* one of a set of
22
- # exclusive keys. If more than one key is found, an ArgumentError will be
23
- # raised.
24
- #
25
- # == Examples
26
- #
27
- # options = {:only => :on, :except => :off}
28
- # assert_exclusive_keys(options, :only) # => nil
29
- # assert_exclusive_keys(options, :except) # => nil
30
- # assert_exclusive_keys(options, :only, :except) # => ArgumentError: Conflicting keys: only, except
31
- # assert_exclusive_keys(options, :only, :except, :with) # => ArgumentError: Conflicting keys: only, except
32
- def assert_exclusive_keys(hash, *exclusive_keys)
33
- conflicting_keys = exclusive_keys & hash.keys
34
- raise ArgumentError, "Conflicting keys: #{conflicting_keys.join(', ')}" unless conflicting_keys.length <= 1
35
- end
36
- end
37
- end
@@ -1,147 +0,0 @@
1
- require 'jquery/gridify/assertions'
2
- require 'jquery/gridify/grid_options'
3
- require 'jquery/gridify/grid_view'
4
- require 'jquery/gridify/grid_column'
5
- require 'jquery/gridify/grid_finder'
6
-
7
- # NOTE: for readablity/clarity, native jqGrid options should be string; Ruby ones as syms
8
-
9
- module Gridify
10
- class Grid
11
- include Assertions
12
-
13
- # todo: change this so klass is optional, decouple from active record
14
- def initialize( klass, *args, &block )
15
- #debugger
16
- options = args.extract_options! # => args.last.is_a?(Hash) ? args.pop : {}
17
- assert_exclusive_keys( options, :only, :except)
18
-
19
- @resource = klass.to_s.tableize.pluralize
20
- @name = args.first || :grid
21
-
22
- # non-persistent options
23
- # generate model unless explicitly say no
24
- build_model = options.delete(:build_model) == false ? false : true
25
- only = options.delete(:only)
26
- except = options.delete(:except)
27
- col_presets = options.delete(:colModel)
28
- col_include = options[:colInclude]
29
-
30
- # assign options
31
- update options
32
-
33
- # build columns from ActiveRecord model (klass)
34
- if klass.present? && build_model
35
- @model = build_columns(klass, only, except, col_presets, col_include)
36
- end
37
-
38
- instance_eval(&block) if block
39
- #(note instance_eval cannot access things outside its scope; otherwise do this:
40
- #yield self if block_given?
41
- end
42
-
43
- def update( options )
44
- options.each {|atr, val| send( "#{atr}=", val )}
45
- # exception "invalid option..."
46
- end
47
-
48
- def column( name, options={} )
49
- name = name.to_s
50
- klass = resource.classify.constantize
51
- # TODO: set edit options based on ar_column
52
- # TODO: edit
53
- # TODO: handle file input types
54
- # TODO: custom input types
55
- if col = columns_hash[name]
56
- # update an existing column
57
- col.update options
58
-
59
- elsif ar = klass.columns.detect {|c| c.name==name}
60
- #debugger
61
- # create column from database schema
62
- edit = editable &&
63
- # only edit accessible attributes
64
- (klass.accessible_attributes.nil? || klass.accessible_attributes.include?(ar.name))
65
- args = {
66
- :ar_column => ar,
67
- :name => ar.name,
68
- :value_type => ar.type,
69
- :searchable => searchable,
70
- :sortable => sortable,
71
- :editable => edit
72
- }.merge(options)
73
- colModel << GridColumn.new( args)
74
-
75
- else
76
- # create column from scratch
77
- args = {
78
- :name => name,
79
- :value_type => :string,
80
- :searchable => searchable,
81
- :sortable => sortable,
82
- :editable => edit
83
- }.merge(options)
84
- colModel << GridColumn.new( args)
85
- end
86
- end
87
-
88
- def column_names
89
- colModel.collect {|col| col.name.titleize }
90
- end
91
-
92
- def column_model
93
- colModel.collect {|col| col.properties }
94
- end
95
-
96
- # normally we need to keep columns an ordered array, sometimes its convenient to have a hash
97
- def columns_hash
98
- colModel.inject({}) {|h, col| h[col.name] = col; h }
99
- end
100
-
101
- protected
102
-
103
- # # isnt there something in rails to do this already?
104
- # def parse_options( keys, options )
105
- # ops = keys.inject({}) do |h, k|
106
- # val = options.delete(k)
107
- # h[k] = val unless val.nil?
108
- # h
109
- # end
110
- # ops || {}
111
- # end
112
-
113
- # generate list of columns based on AR model
114
- # option: :only or :except
115
- # :col_options hash of hash of preset values for columns (eg from cookie) { :title => {:width => 98}}
116
- def build_columns( klass, only, except, presets, col_include )
117
- #debugger
118
- # stringify
119
- only = Array(only).map {|s| s.to_s }
120
- except = Array(except).map {|s| s.to_s }
121
- presets ||= {}
122
- presets.stringify_keys!
123
-
124
- self.colModel = klass.columns.collect do |ar|
125
- #debugger
126
- next if only.present? && !only.include?(ar.name)
127
- next if except.present? && except.include?(ar.name)
128
- is_key = (ar.name=='id')
129
- edit = editable && !is_key &&
130
- # only edit accessible attributes
131
- (klass.accessible_attributes.nil? || klass.accessible_attributes.include?(ar.name))
132
- args = {
133
- :ar_column => ar,
134
- :name => ar.name,
135
- :value_type => ar.type,
136
- :key => is_key,
137
- #:hidden => is_key,
138
- :searchable => searchable,
139
- :sortable => sortable,
140
- :editable => edit
141
- }
142
- # create column with default args merged with options given for this column
143
- GridColumn.new args.merge( presets[ar.name]||{} )
144
- end.compact
145
- end
146
- end
147
- end
@@ -1,134 +0,0 @@
1
- module Gridify
2
- class GridColumn
3
-
4
- attr_accessor :name, # attribute name (required)
5
- :label,
6
- :ar_column, # active_record column
7
- :value_type, # active_record data type :string, :text, :integer, :float, :boolean, + :currency
8
- :key, # true if this is the key (only :id)
9
-
10
- # column formatting
11
- :width, # initial width (150)
12
- :fixed_width, # true = not resized when recalc fit to width
13
- :formatter, # see jqGrid doc (based on value_type)
14
- :format_options, # hash, see jqGrid doc (based on value_type)
15
- :align, # 'left', 'right', 'center' (left for strings, right for numerics)
16
- #:classes, # optional classes to add to column
17
-
18
- # column actions
19
- :resizable, # t/f (true)
20
- :sortable, # t/f (true) or jqGrid sorttype: :integer, :float, :currency, :date, :text (true)
21
- :searchable, # true/false (true) or text or select
22
- #:search_options,
23
- :editable, # true/false (false),
24
- :edit_type, # text, textarea, select, checkbox, password, button, image and file (based on value_type)
25
- :edit_options, # html input field options, depends on editable type (eg {"size" => 10, "maxlength" => 15}) see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules
26
- :validations, # jqGrid editrules (TODO derive from AR model validations) see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules
27
- # "required" "integer" "email" "url" etc
28
- :form_options, # jqGrid formoptions for formatting input forms
29
- # select types
30
- #:select_url, # url to dynamically get select options
31
-
32
- # visiblity
33
- #:always_hidden, # (false)
34
- :sort_type,
35
- :summary_type,
36
- :summary_tpl,
37
- :hidden # initial hide state (false)
38
-
39
- def initialize(options)
40
- update options
41
- end
42
-
43
- def update(options)
44
- options.each {|atr, val| send( "#{atr}=", val )}
45
- end
46
-
47
- def to_json
48
- properties.to_json #_with_js
49
- end
50
-
51
- def properties
52
- jqgrid_properties
53
- end
54
-
55
- def resizable
56
- if @resizable==false
57
- false
58
- else
59
- # true or nil
60
- true
61
- end
62
- end
63
-
64
- def fixed_width
65
- if @fixed_width==false
66
- false
67
- elsif @fixed_width.nil?
68
- !resizable
69
- else
70
- @fixed_width
71
- end
72
- end
73
-
74
- # ----------------
75
- private
76
-
77
- def jqgrid_type
78
- return sortable unless sortable==true
79
- case value_type
80
- when :string : 'text'
81
- when :text : 'text'
82
- when :integer : 'integer'
83
- when :float : 'float'
84
- when :boolean : 'boolean'
85
- when :datetime : 'date'
86
- end
87
- end
88
-
89
- # note, we dont vals[:foo] = foo because dont want to bother generating key if its same as jqGrid default
90
- def jqgrid_properties
91
- vals = {
92
- :name => name,
93
- :index => name
94
- }
95
- #xmlmap not required when same as :name
96
- # vals[:xmlmap] = name if data_type == :xml
97
- # vals[:jsonmap] = name if data_type == :json
98
-
99
- vals[:label] = label || name.titleize
100
- vals[:resizable] = false if resizable==false
101
- vals[:fixed] = fixed_width unless fixed_width==false
102
- vals[:sortable] = false if sortable==false
103
- vals[:sort_type] = jqgrid_type if sortable
104
- vals[:search] = false if searchable==false
105
- vals[:editable] = true if editable
106
- vals[:align] = align if align
107
- #vals[:align] = 'right' if [:integer, :float, :currency].include?(value_type)
108
- case value_type
109
- when :datetime
110
- vals[:formatter] = 'date'
111
- vals[:formatoptions] = { :srcformat => 'UniversalSortableDateTime', :newformat => 'FullDateTime' }
112
- end
113
- vals[:hidden] = true if hidden
114
- vals[:width] = width if width
115
- vals[:formatter] = formatter if formatter
116
- vals[:formatoptions] = format_options if format_options
117
- vals[:edittype] = edit_type if editable && edit_type
118
- vals[:formoptions] = form_options if editable && form_options
119
- vals[:editoptions] = edit_options if editable && edit_options
120
- vals[:editrules] = validations if editable && validations
121
-
122
- vals[:sort_type] = sort_type if sort_type
123
- vals[:summaryType] = summary_type if summary_type
124
- vals[:summaryTpl] = summary_tpl if summary_tpl
125
- # and more...
126
-
127
- vals
128
- end
129
-
130
- end
131
- end
132
-
133
- #<ActiveRecord::ConnectionAdapters::SQLiteColumn:0x2515a98 @sql_type="varchar(255)", @name="title", @precision=nil, @primary=false, @default=nil, @limit=255, @null=true, @type=:string, @scale=nil>
134
-