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,223 +0,0 @@
1
- module Gridify
2
- class Grid
3
-
4
- attr_accessor :search_rules, # current search/filter rules, as hash
5
- :search_rules_op # :and, :or
6
-
7
- # finds records based on request params
8
- # e.g. params from jqGrid
9
- # :_search do search (true/false) ["false"]
10
- # :sidx sort index (column to search on) [""]
11
- # :sord sort direction (desc/asc) ["asc"]
12
- # :nd ?
13
- # :rows number of items to get ["20"]
14
- # :page page number (starts at 1) ["1"]
15
-
16
- def update_from_params( params )
17
- params.symbolize_keys!
18
- params_to_rules params
19
- self.data_type = params[:datatype] if params[:datatype]
20
- self.sort_by = params[:sidx] if params[:sidx]
21
- self.sort_order = params[:sord] if params[:sord]
22
- self.current_page = params[:page].to_i if params[:page]
23
- self.rows_per_page = params[:rows].to_i if params[:rows]
24
- self.total_rows = params[:total_rows].to_i if params[:total_rows]
25
- end
26
-
27
- # return find args (scope) for current settings
28
- def current_scope
29
- #debugger
30
- find_args = {}
31
- find_args[:include] = colInclude if colInclude
32
- if sort_by.present? && col = columns_hash[sort_by]
33
- if (sort_by.include? ".")
34
- # Workaround for :include and nested attributes
35
- field = sort_by.split('.', 2)
36
- if field.length == 2
37
- self.sort_by = field[0].pluralize + "." + field[1]
38
- end
39
- end
40
- if case_sensitive || !([:string, :text].include?(col.value_type))
41
- find_args[:order] = "#{sort_by} #{sort_order}"
42
- else
43
- find_args[:order] = "upper(#{sort_by}) #{sort_order}"
44
- end
45
- end
46
- if total_rows.present? && total_rows > 0
47
- find_args[:limit] = total_rows
48
- offset = (current_page.to_i-1) * rows_per_page if current_page.present?
49
- find_args[:offset] = offset if offset && offset > 0
50
- elsif rows_per_page.present? && rows_per_page > 0
51
- find_args[:limit] = rows_per_page
52
- offset = (current_page.to_i-1) * rows_per_page if current_page.present?
53
- find_args[:offset] = offset if offset && offset > 0
54
- end
55
- cond = rules_to_conditions
56
- find_args[:conditions] = cond unless cond.blank?
57
- find_args
58
- end
59
-
60
- def find( params )
61
- #debugger
62
- update_from_params params
63
- klass = resource.classify.constantize
64
- records = klass.send( finder, :all, current_scope )
65
- end
66
-
67
- def encode_records( records, userdata=nil, total_count=nil )
68
- #debugger
69
- klass = resource.classify.constantize
70
- total_count ||= klass.count
71
- total_pages = total_count / rows_per_page + 1
72
- #TODO: :only => [attributes], :methods => [virtual attributes]
73
- case data_type
74
- when :xml
75
- if colInclude
76
- xml = records.to_xml( :include => colInclude, :skip_types => true, :dasherize => false ) do |xml|
77
- if rows_per_page > 0
78
- xml.page current_page
79
- xml.total total_pages
80
- xml.records total_count
81
- end
82
- end
83
- else
84
- xml = records.to_xml( :skip_types => true, :dasherize => false ) do |xml|
85
- if rows_per_page > 0
86
- xml.page current_page
87
- xml.total total_pages
88
- xml.records total_count
89
- end
90
- end
91
- end
92
- when :json
93
- #debugger
94
- data = { resource => records }
95
- if rows_per_page > 0
96
- data.merge!(
97
- :page => current_page,
98
- :total => total_pages,
99
- :records => total_count
100
- )
101
- end
102
- data.merge!( :userdata => userdata ) if userdata
103
- save = ActiveRecord::Base.include_root_in_json
104
- ActiveRecord::Base.include_root_in_json = false
105
- if colInclude
106
- json = data.to_json(:include => colInclude)
107
- else
108
- json = data.to_json
109
- end
110
- ActiveRecord::Base.include_root_in_json = save
111
- json
112
- #others...
113
- else #nop ?
114
- records.to_s
115
- end
116
- end
117
-
118
- def find_and_encode( params )
119
- encode_records( find( params ) )
120
- end
121
-
122
- # grid doesnt nest attributes inside the resource
123
- # could change this behavior in jqGrid, see grid.postext.js ?
124
- # http://www.trirand.com/jqgridwiki/doku.php?id=wiki:post_data_module
125
- #
126
- def member_params( params )
127
- params.inject({}) {|h, (name, value)| h[name] = value if columns_hash[name]; h }
128
- end
129
-
130
- protected
131
-
132
- OPS = { 'eq' => '=', 'lt' => '<', 'le' => '<=', 'gt' => '>', 'ge' => '>=', 'ne' => '!=' }
133
- #['eq','ne','lt','le','gt','ge',
134
- # 'bw','bn','in','ni','ew','en','cn','nc']
135
- #['equal','not equal', 'less', 'less or equal','greater','greater or equal',
136
- # 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain']
137
-
138
- OPS_PATTERN = {
139
- 'bw' => '?%',
140
- 'bn' => '?%',
141
- # 'in'
142
- # 'ni'
143
- 'ew' => '%?',
144
- 'en' => '%?',
145
- 'cn' => '%?%',
146
- 'nc' => '%?%',
147
- }
148
-
149
- STRING_OPS = {
150
- 'bw' => 'LIKE',
151
- 'bn' => 'NOT LIKE',
152
- 'ew' => 'LIKE',
153
- 'en' => 'NOT LIKE',
154
- 'cn' => 'LIKE',
155
- 'nc' => 'NOT LIKE',
156
- }
157
-
158
- # params[:filters] => {"groupOp"=>"AND",
159
- # "rules"=>[{"data"=>"b", "op"=>"ge", "field"=>"title"}, {"data"=>"f", "op"=>"le", "field"=>"title"}] }
160
- def params_to_rules( params )
161
- #debugger
162
- if params[:_search]=='true' || params[:_search]==true
163
- if params[:filters]
164
- # advanced search
165
- filters = ActiveSupport::JSON.decode( params[:filters] )
166
- self.search_rules = filters['rules']
167
- self.search_rules_op = filters['groupOp']
168
- elsif params[:searchField]
169
- # simple search
170
- self.search_rules = [{ "field" => params[:searchField], "op" => params[:searchOper], "data" => params[:searchString]}]
171
- else
172
- # toolbar search
173
- self.search_rules = []
174
- self.search_rules_op = :and
175
- colModel.each do |col|
176
- name = col.name
177
- data = params[name.to_sym]
178
- self.search_rules << { "field" => name, "op" => "cn", "data" => data } if data
179
- end
180
- end
181
- end
182
- search_rules
183
- end
184
-
185
- def rules_to_conditions
186
- # note: ignoring case_sensitive as an option, ActiveRecord find is insensitive by default (have to model the db to let it be case sensitive?)
187
- return nil if search_rules.blank?
188
- cond = nil
189
- expr = ''
190
- vals = []
191
- search_rules.each do |rule|
192
-
193
- # Workaround for :include and nested attributes
194
- field = rule['field'].split('.', 2)
195
- if field.length == 2
196
- rule['field'] = field[0].pluralize + "." + field[1]
197
- end
198
-
199
- expr << " #{search_rules_op} " unless expr.blank?
200
- if op = OPS[rule['op']]
201
- expr << "#{rule['field']} #{op} ?"
202
- vals << rule['data']
203
- elsif op = STRING_OPS[rule['op']]
204
- expr << "#{rule['field']} #{op} ?"
205
- vals << OPS_PATTERN[rule['op']].gsub('?', rule['data'])
206
- end
207
- end
208
- cond = [ expr ] + vals
209
- end
210
- end
211
- end
212
-
213
- # # If you need to display error messages
214
- # err = ""
215
- # if user
216
- # user.errors.entries.each do |error|
217
- # err << "<strong>#{error[0]}</strong> : #{error[1]}<br/>"
218
- # end
219
- # end
220
- #
221
- # render :text => "#{err}"
222
-
223
- # { :add => true, :edit => true, :inline_edit => false, :delete => true, :edit_url => "/users/post_data", :error_handler => "after_submit" }
@@ -1,279 +0,0 @@
1
- module Gridify
2
- class Grid
3
- # non persistent options:
4
- # :build_model
5
- # :only
6
- # :except
7
-
8
- attr_accessor :name, # name of the table (required)
9
- :resource, # based on AR model class (assume tableized, plural, string)
10
- # used as basis for all RESTful requests and data format
11
- # model
12
- :colModel, # incoming: hash of presets (native jqGrid); internally: array of GridColumn objects
13
- # { :body => { "title" => {"width" => 98} }}
14
- :colNames, # Column names
15
- :colInclude, # included submodels
16
- #:widths, # hash of column width (key = data type)
17
- :searchable, # default: true (used in generating columns, changing has no effect on existing cols)
18
- :sortable, # default: true (used in generating columns, changing has no effect on existing cols)
19
- :editable, # default: false (used in generating columns, changing has no effect on existing cols)
20
- :inline_edit,
21
- :inline_edit_handler,
22
- # grid
23
- :dom_id, # defaults to #{resource}_#{name} eg "notes_grid"
24
- :grid_view,
25
- :jqgrid_options, # hash of additional jqGrid options that override any other settings
26
- :ajax_grid_options,
27
- #subgrid
28
- :sub_grid,
29
- :sub_grid_url,
30
- :sub_grid_model,
31
- # grid layout options
32
- :width, # in pixels, or nil (nil means calculated based on overflow setting)
33
- :width_fit, # :fluid, :scroll, or :visible
34
- # :fluid will always fit container (presently ignores width option)
35
- # :scroll uses horizontal scrollbars
36
- # :fitted scales columns to fit in width, not fluid
37
- :height, # in pixels, '100%', or :auto (150)
38
- # :auto means makes it as tall as needed per number of rows
39
- :resizable, # allow gride resize with mouse, (true) (or {}) for default options;
40
- # nil or false for disabled; or hash of jqUI options
41
- # see http://jqueryui.com/demos/resizable/
42
- # defaults (differ from jqUI ones) "minWidth" => 150, "minHeight" => 80
43
- # when overflow is fluid, "handles" => 's', otherwise 'e, s, se'
44
- :arranger, # :sortable, :hide_show, :chooser, or nil for none (nil) ,
45
- # can combine with array of options
46
- # or can be a hash with options
47
- # see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:show_hide_columns
48
- # rows
49
- :alt_rows, # true for odd/even row classes, or odd row style name string (nil)
50
- :row_numbers, # true to display row numbers in left column; or numeric width in pixels (nil)
51
- :select_rows, # true for rows are selectable (eg for pager buttons); or js function when row is selected, false disables hover (true if pager buttons else false)
52
- :multi_select,
53
- :sortable_rows,
54
- # header layer
55
- :title, # title string (aka caption), or true for resource.titleize, nil for no title (nil)
56
- :collapsible, # when true generates collapse icon (false)
57
- :collapsed, # when true initial state is collapsed (false)
58
-
59
- # pager layer
60
- :pager, # id of the pager, or true => dom_id+"_pager", false or nil for no pager (nil)
61
- :paging_controls, # false to disable all (true); or hash with native jqGrid options
62
- :paging_choices, # array of rows_per_page choices ([10,25,50,100])
63
- # nav buttons
64
- :view_button, # true, or hash of native jqGrid parameters and events for the action
65
- :add_button,
66
- :edit_button,
67
- :delete_button,
68
- :search_button, # enable search button and dialog
69
- :search_advanced, # instead of search_button
70
- :search_toolbar, # toggleable search bar, true or :visible, :hidden (other options?) (nil)
71
- :refresh_button,
72
- :jqgrid_nav_options, # native jqGrid button options (added to 2nd arg in navGrid method)
73
- # data
74
- :restful, # use restful url and mtype (true) for all actions
75
- :finder, # default: :find
76
- :url, # request url (required unless table_to_grid or derived from resource)
77
- # if nil, uses "/#{resource}" eg "/notes"
78
- # note, to force "editurl" use jqgrid_options
79
-
80
- :data_type, # :xml, :json, and other defined in jqGrid options doc (xml)
81
- :data_format, # (defaults to rails conventin based on resource) <chickens><chicken><title><body> format
82
- # set false for jqGrid default <rows><records><row><cell> format
83
- :sort_by, # name of sort column of next request
84
- :sort_order, # sort direction of next request, 'asc' or 'desc' ('asc')
85
- :case_sensitive, # sort and search are case sensitive (false)
86
- :current_page, # current page requested
87
- :rows_per_page, # number of items to be requested in the next request (paging_choices.first or -1 if pager false)
88
- :total_rows, # number of rows to read
89
- :table_to_grid, # when true generates tableToGrid (false) from html table, then use as local data
90
- # note, we assume table rows are not selectable.
91
- # (tableToGrid sets multiselect when first col has checkboxes or radio buttons,
92
- # we dont know to preserve this so you also need to set in options)
93
- :load_once, # true to use local data after first load (false)
94
- :error_handler, # javacript: method for crud error handling (default to "after_submit")
95
- :error_container, # selector for posting error/flash messages (.errorExplanation)
96
- # events
97
- #:on_dbl_click_row,
98
- #:on_sort_col,
99
- #:serialize_grid_data,
100
-
101
- :z
102
-
103
- # ----------------------
104
- # attribute defaults and special value handling
105
- # (sure it'd be easier to initialize defaults using a hash but we want nil to mean the jqGrid default - might be true - and not pass a value at all)
106
-
107
- def inline_edit
108
- @inline_edit==true ? true : false
109
- end
110
-
111
- def inline_edit_handler
112
- @inline_edit_handler || 'null'
113
- end
114
-
115
- def finder
116
- @finder || :find
117
- end
118
-
119
- def searchable
120
- @searchable==false ? false : true
121
- end
122
-
123
- def sortable
124
- @sortable==false ? false : true
125
- end
126
-
127
- def sortable_rows
128
- @sortable_rows==true ? true : false
129
- end
130
-
131
- def dom_id
132
- @dom_id || "#{resource}_#{name}"
133
- end
134
-
135
- def grid_view
136
- @grid_view==false ? false : true
137
- end
138
-
139
- def jqgrid_options
140
- @jqgrid_options || {}
141
- end
142
-
143
- def ajax_grid_options
144
- @ajax_grid_options || {}
145
- end
146
-
147
- def width_fit
148
- @width_fit || :fluid
149
- end
150
-
151
- def resizable
152
- return false if @resizable == false
153
- rs = { "minWidth" => 150, "minHeight" => 80 }
154
- rs.merge!({ "handles" => 's' }) if width_fit == :fluid
155
- rs.merge!( @resizable ) if @resizable.is_a?(Hash)
156
- rs
157
- end
158
-
159
- def arranger_type #read-only
160
- if arranger.is_a?(Hash)
161
- arranger.keys
162
- else
163
- Array(arranger)
164
- end
165
- end
166
-
167
- def arranger_options(type) #read-only
168
- (arranger[type] if arranger.is_a?(Hash)) || {}
169
- end
170
-
171
- def select_rows
172
- if @select_rows
173
- @select_rows
174
- else
175
- pager && (view_button || edit_button || delete_button)
176
- end
177
- end
178
-
179
- # header layer
180
- def title
181
- case @title
182
- when String: @title
183
- when true: resource.titleize
184
- else
185
- ('&nbsp;' if collapsible || collapsed) #show header with blank title
186
- end
187
- end
188
-
189
- def collapsible
190
- @collapsible || @collapsed
191
- end
192
-
193
- # pager layer
194
- def pager
195
- case @pager
196
- when String: @pager
197
- when true: dom_id+'_pager'
198
- end
199
- end
200
-
201
- def paging_controls
202
- @paging_controls.nil? ? true : @paging_controls
203
- end
204
-
205
- def paging_choices
206
- @paging_choices || [10,25,50,100]
207
- end
208
-
209
- def restful
210
- @restful==false ? false : true
211
- end
212
-
213
- # data
214
- def url
215
- @url || "/#{resource}"
216
- end
217
-
218
- def rows_per_page
219
- #debugger
220
- # all rows when pager controls or rows per page are off
221
- if !pager || paging_controls==false || @rows_per_page==false || @rows_per_page==-1
222
- -1
223
- elsif @rows_per_page.nil?
224
- paging_choices.first
225
- else
226
- @rows_per_page
227
- end
228
- end
229
-
230
- def data_type
231
- @data_type || :json
232
- end
233
-
234
- def data_format
235
- if @data_format || @data_format==false #explicit false for no param
236
- @data_format
237
- elsif resource && data_type == :xml
238
- {
239
- :root => resource,
240
- :page => resource+'>page',
241
- :total => resource+'>total',
242
- :records => resource+'>records',
243
- :row => resource.singularize,
244
- :repeatitems => false,
245
- :id => :id
246
- }
247
- elsif resource && data_type == :json
248
- {
249
- :root => resource,
250
- :page => 'page',
251
- :total => 'total',
252
- :records => 'records',
253
- :row => resource.singularize,
254
- :repeatitems => false,
255
- :id => :id
256
- }
257
- end
258
- end
259
-
260
- # events
261
-
262
- # def serialize_grid_data
263
- # @serialize_grid_data || {}
264
- # end
265
-
266
- def error_handler
267
- @error_handler || 'gridify_action_error_handler'
268
- end
269
-
270
- def error_handler_return_value
271
- error_handler ? error_handler : 'true;'
272
- end
273
-
274
- def error_container
275
- @error_container || '.errorExplanation'
276
- end
277
-
278
- end
279
- end