active_scaffold 3.0.26 → 3.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. data/CHANGELOG +1 -1
  2. data/{frontends/default → app/assets}/images/add.gif +0 -0
  3. data/{frontends/default → app/assets}/images/arrow_down.gif +0 -0
  4. data/{frontends/default → app/assets}/images/arrow_up.gif +0 -0
  5. data/{frontends/default → app/assets}/images/close.gif +0 -0
  6. data/{frontends/default → app/assets}/images/close_touch.png +0 -0
  7. data/{frontends/default → app/assets}/images/config.png +0 -0
  8. data/{frontends/default → app/assets}/images/cross.png +0 -0
  9. data/{frontends/default → app/assets}/images/gears.png +0 -0
  10. data/{frontends/default → app/assets}/images/indicator-small.gif +0 -0
  11. data/{frontends/default → app/assets}/images/indicator.gif +0 -0
  12. data/{frontends/default → app/assets}/images/magnifier.png +0 -0
  13. data/app/assets/javascripts/active_scaffold.js.erb +16 -0
  14. data/{frontends/default → app/assets}/javascripts/jquery/active_scaffold.js +16 -28
  15. data/app/assets/javascripts/jquery/active_scaffold.js~ +1036 -0
  16. data/{lib/active_scaffold/bridges/date_picker/public/javascripts/date_picker_bridge.js → app/assets/javascripts/jquery/date_picker_bridge.js.erb} +3 -1
  17. data/{frontends/default → app/assets}/javascripts/jquery/jquery.editinplace.js +0 -0
  18. data/app/assets/javascripts/prototype/active_scaffold.js +1033 -0
  19. data/{frontends/default/javascripts/prototype/active_scaffold.js → app/assets/javascripts/prototype/active_scaffold.js~} +1 -0
  20. data/{frontends/default → app/assets}/javascripts/prototype/dhtml_history.js +0 -0
  21. data/{frontends/default → app/assets}/javascripts/prototype/form_enhancements.js +0 -0
  22. data/{frontends/default → app/assets}/javascripts/prototype/rico_corner.js +0 -0
  23. data/{frontends/default/stylesheets/stylesheet-ie.css → app/assets/stylesheets/active_scaffold-ie.css} +0 -0
  24. data/{frontends/default/stylesheets/stylesheet.css → app/assets/stylesheets/active_scaffold.css.erb} +29 -24
  25. data/{lib/active_scaffold/locale → config/locales}/de.yml +3 -0
  26. data/{lib/active_scaffold/locale → config/locales}/en.yml +3 -0
  27. data/{lib/active_scaffold/locale → config/locales}/es.yml +5 -0
  28. data/{lib/active_scaffold/locale → config/locales}/fr.yml +3 -0
  29. data/{lib/active_scaffold/locale → config/locales}/hu.yml +13 -2
  30. data/{lib/active_scaffold/locale → config/locales}/ja.yml +9 -0
  31. data/{lib/active_scaffold/locale → config/locales}/ru.yml +3 -0
  32. data/frontends/default/views/_form.html.erb +1 -1
  33. data/frontends/default/views/_form_association.html.erb +1 -5
  34. data/frontends/default/views/_horizontal_subform.html.erb +7 -4
  35. data/frontends/default/views/_horizontal_subform.html.erb~ +2 -5
  36. data/frontends/default/views/_horizontal_subform_footer.html.erb +0 -0
  37. data/frontends/default/views/_horizontal_subform_header.html.erb +1 -1
  38. data/frontends/default/views/_horizontal_subform_header.html.erb~ +1 -1
  39. data/frontends/default/views/_horizontal_subform_record.html.erb~ +1 -1
  40. data/frontends/default/views/_list_actions.html.erb +1 -1
  41. data/frontends/default/views/_list_messages.html.erb +1 -3
  42. data/frontends/default/views/_render_field.js.erb +20 -0
  43. data/frontends/default/views/_row.html.erb +3 -9
  44. data/frontends/default/views/_show.html.erb +2 -2
  45. data/frontends/default/views/add_existing.js.erb +20 -0
  46. data/frontends/default/views/destroy.js.erb +24 -0
  47. data/frontends/default/views/{edit_associated.js.rjs → edit_associated.js.erb} +3 -2
  48. data/frontends/default/views/form_messages.js.erb +1 -0
  49. data/frontends/default/views/list.js.erb +1 -0
  50. data/frontends/default/views/mark.js.rjs +6 -0
  51. data/frontends/default/views/on_action_update.js.erb +13 -0
  52. data/frontends/default/views/{on_create.js.erb~ → on_create.js.erb} +0 -0
  53. data/frontends/default/views/on_mark_all.js.erb +12 -0
  54. data/frontends/default/views/{on_update.js.erb~ → on_update.js.erb} +0 -0
  55. data/frontends/default/views/render_field.js.erb +1 -0
  56. data/frontends/default/views/search.html.erb +1 -1
  57. data/frontends/default/views/{update_column.js.erb~ → update_column.js.erb} +3 -3
  58. data/frontends/default/views/update_row.js.erb +1 -0
  59. data/lib/active_scaffold.rb +22 -46
  60. data/lib/active_scaffold/actions/core.rb +14 -6
  61. data/lib/active_scaffold/actions/core.rb~ +3 -3
  62. data/lib/active_scaffold/actions/create.rb +2 -5
  63. data/lib/active_scaffold/actions/create.rb~ +3 -2
  64. data/lib/active_scaffold/actions/delete.rb +1 -0
  65. data/lib/active_scaffold/actions/field_search.rb +1 -1
  66. data/lib/active_scaffold/actions/list.rb +10 -6
  67. data/lib/active_scaffold/actions/list.rb~ +3 -3
  68. data/lib/active_scaffold/actions/mark.rb +8 -8
  69. data/lib/active_scaffold/actions/nested.rb +2 -9
  70. data/lib/active_scaffold/actions/nested.rb~ +5 -7
  71. data/lib/active_scaffold/actions/search.rb +2 -1
  72. data/lib/active_scaffold/actions/subform.rb +1 -5
  73. data/lib/active_scaffold/actions/update.rb +1 -4
  74. data/lib/active_scaffold/actions/update.rb~ +5 -5
  75. data/lib/active_scaffold/attribute_params.rb +15 -26
  76. data/lib/active_scaffold/attribute_params.rb~ +1 -2
  77. data/lib/active_scaffold/bridges.rb +61 -0
  78. data/lib/active_scaffold/bridges/ancestry.rb +5 -0
  79. data/lib/active_scaffold/bridges/ancestry/{lib/ancestry_bridge.rb → ancestry_bridge.rb} +3 -3
  80. data/lib/active_scaffold/bridges/{calendar_date_select/bridge.rb → calendar_date_select.rb} +13 -5
  81. data/lib/active_scaffold/bridges/calendar_date_select/{lib/as_cds_bridge.rb → as_cds_bridge.rb} +4 -20
  82. data/lib/active_scaffold/bridges/cancan.rb +15 -0
  83. data/lib/active_scaffold/bridges/cancan/{lib/cancan_bridge.rb → cancan_bridge.rb} +2 -2
  84. data/lib/active_scaffold/bridges/carrierwave.rb +12 -0
  85. data/lib/active_scaffold/bridges/carrierwave/carrierwave_bridge.rb +31 -0
  86. data/lib/active_scaffold/bridges/carrierwave/carrierwave_bridge_helpers.rb +10 -0
  87. data/lib/active_scaffold/bridges/carrierwave/{lib/form_ui.rb → form_ui.rb} +0 -0
  88. data/lib/active_scaffold/bridges/carrierwave/{lib/list_ui.rb → list_ui.rb} +1 -1
  89. data/lib/active_scaffold/bridges/country_helper.rb +9 -0
  90. data/lib/active_scaffold/bridges/country_helper/{lib/country_helper_bridge.rb → country_helper_bridge.rb} +5 -5
  91. data/lib/active_scaffold/bridges/date_picker.rb +23 -0
  92. data/lib/active_scaffold/bridges/date_picker/ext.rb +54 -0
  93. data/lib/active_scaffold/bridges/date_picker/helper.rb +188 -0
  94. data/lib/active_scaffold/bridges/dragonfly.rb +9 -0
  95. data/lib/active_scaffold/bridges/dragonfly/dragonfly_bridge.rb +34 -0
  96. data/lib/active_scaffold/bridges/dragonfly/dragonfly_bridge_helpers.rb +10 -0
  97. data/lib/active_scaffold/bridges/dragonfly/{lib/form_ui.rb → form_ui.rb} +0 -0
  98. data/lib/active_scaffold/bridges/dragonfly/{lib/list_ui.rb → list_ui.rb} +2 -2
  99. data/lib/active_scaffold/bridges/file_column.rb +11 -0
  100. data/lib/active_scaffold/bridges/file_column/{lib/as_file_column_bridge.rb → as_file_column_bridge.rb} +2 -2
  101. data/lib/active_scaffold/bridges/file_column/file_column_helpers.rb +57 -0
  102. data/lib/active_scaffold/bridges/file_column/{lib/form_ui.rb → form_ui.rb} +2 -2
  103. data/lib/active_scaffold/bridges/file_column/{lib/list_ui.rb → list_ui.rb} +0 -0
  104. data/lib/active_scaffold/bridges/paperclip.rb +12 -0
  105. data/lib/active_scaffold/bridges/paperclip/{lib/form_ui.rb → form_ui.rb} +0 -0
  106. data/lib/active_scaffold/bridges/paperclip/{lib/list_ui.rb → list_ui.rb} +3 -3
  107. data/lib/active_scaffold/bridges/paperclip/paperclip_bridge.rb +36 -0
  108. data/lib/active_scaffold/bridges/paperclip/paperclip_bridge_helpers.rb +24 -0
  109. data/lib/active_scaffold/bridges/record_select.rb +11 -0
  110. data/lib/active_scaffold/bridges/record_select/{lib/record_select_bridge.rb → helpers.rb} +5 -16
  111. data/lib/active_scaffold/bridges/record_select/helpers.rb~ +9 -14
  112. data/lib/active_scaffold/bridges/semantic_attributes.rb +5 -0
  113. data/lib/active_scaffold/bridges/semantic_attributes/{lib/semantic_attributes_bridge.rb → column.rb} +3 -3
  114. data/lib/active_scaffold/bridges/tiny_mce.rb +5 -0
  115. data/lib/active_scaffold/bridges/tiny_mce/{lib/tiny_mce_bridge.rb → helpers.rb} +16 -8
  116. data/lib/active_scaffold/config/base.rb +9 -1
  117. data/lib/active_scaffold/config/core.rb +1 -1
  118. data/lib/active_scaffold/config/create.rb +3 -10
  119. data/lib/active_scaffold/config/delete.rb +1 -2
  120. data/lib/active_scaffold/config/field_search.rb +1 -2
  121. data/lib/active_scaffold/config/form.rb +2 -6
  122. data/lib/active_scaffold/config/list.rb +8 -2
  123. data/lib/active_scaffold/config/nested.rb +2 -6
  124. data/lib/active_scaffold/config/search.rb +6 -2
  125. data/lib/active_scaffold/config/show.rb +1 -4
  126. data/lib/active_scaffold/config/subform.rb +1 -1
  127. data/lib/active_scaffold/config/update.rb +1 -6
  128. data/lib/active_scaffold/data_structures/action_columns.rb +3 -0
  129. data/lib/active_scaffold/data_structures/action_link.rb +14 -10
  130. data/lib/active_scaffold/data_structures/bridge.rb +22 -0
  131. data/lib/active_scaffold/data_structures/column.rb +36 -4
  132. data/lib/active_scaffold/data_structures/nested_info.rb +4 -4
  133. data/lib/active_scaffold/data_structures/set.rb +1 -6
  134. data/lib/active_scaffold/data_structures/sorting.rb +2 -2
  135. data/lib/active_scaffold/engine.rb +4 -0
  136. data/lib/active_scaffold/extensions/action_controller_rendering.rb +2 -2
  137. data/lib/active_scaffold/extensions/action_controller_rendering.rb~ +1 -1
  138. data/lib/active_scaffold/extensions/action_view_rendering.rb +90 -93
  139. data/lib/active_scaffold/extensions/action_view_rendering.rb~ +1 -13
  140. data/lib/active_scaffold/extensions/active_association_reflection.rb +16 -7
  141. data/lib/active_scaffold/extensions/cache_association.rb +16 -0
  142. data/lib/active_scaffold/extensions/reverse_associations.rb +15 -13
  143. data/lib/active_scaffold/extensions/unsaved_associated.rb +1 -1
  144. data/lib/active_scaffold/finder.rb +40 -23
  145. data/lib/active_scaffold/finder.rb~ +3 -11
  146. data/lib/active_scaffold/helpers/association_helpers.rb +1 -1
  147. data/lib/active_scaffold/helpers/controller_helpers.rb +9 -1
  148. data/lib/active_scaffold/helpers/controller_helpers.rb~ +12 -5
  149. data/lib/active_scaffold/helpers/form_column_helpers.rb +20 -21
  150. data/lib/active_scaffold/helpers/form_column_helpers.rb~ +2 -1
  151. data/lib/active_scaffold/helpers/id_helpers.rb +5 -5
  152. data/lib/active_scaffold/helpers/list_column_helpers.rb +14 -24
  153. data/lib/active_scaffold/helpers/list_column_helpers.rb~ +15 -20
  154. data/lib/active_scaffold/helpers/search_column_helpers.rb +10 -1
  155. data/lib/active_scaffold/helpers/search_column_helpers.rb~ +1 -1
  156. data/lib/active_scaffold/helpers/view_helpers.rb +14 -40
  157. data/lib/active_scaffold/helpers/view_helpers.rb~ +3 -3
  158. data/lib/active_scaffold/version.rb +2 -2
  159. data/lib/active_scaffold_env.rb +0 -2
  160. data/test/bridges/active_scaffold_dependent_protect_test.rb +34 -0
  161. data/test/bridges/bridge_test.rb +43 -0
  162. data/test/bridges/company.rb +81 -0
  163. data/test/bridges/paperclip_test.rb +68 -0
  164. data/test/bridges/tiny_mce_test.rb +27 -0
  165. data/test/bridges/unobtrusive_date_picker_test.rb +49 -0
  166. data/test/bridges/validation_reflection_test.rb +57 -0
  167. data/test/config/base_test.rb +1 -1
  168. data/test/config/core_test.rb +58 -0
  169. data/test/config/create_test.rb +8 -5
  170. data/test/config/delete_test.rb +33 -0
  171. data/test/config/field_search_test.rb +47 -0
  172. data/test/config/list_test.rb +64 -9
  173. data/test/config/nested_test.rb +62 -0
  174. data/test/config/search_test.rb +60 -0
  175. data/test/config/show_test.rb +5 -5
  176. data/test/config/subform_test.rb +17 -0
  177. data/test/config/update_test.rb +27 -4
  178. data/test/helpers/list_column_helpers_test.rb +16 -5
  179. data/test/helpers/pagination_helpers_test.rb +4 -0
  180. data/test/misc/attribute_params_test.rb +37 -1
  181. data/test/misc/finder_test.rb +0 -1
  182. data/test/misc/lang_test.rb +2 -3
  183. data/test/mock_app/public/javascripts/active_scaffold/default/active_scaffold.js +2 -2
  184. data/test/mock_app/public/stylesheets/active_scaffold/default/stylesheet.css +13 -7
  185. metadata +137 -154
  186. data/frontends/default/views/_list_with_header.html.erb~ +0 -32
  187. data/frontends/default/views/_render_field.js.rjs +0 -14
  188. data/frontends/default/views/_show.html.erb~ +0 -8
  189. data/frontends/default/views/_update_form.html.erb~ +0 -6
  190. data/frontends/default/views/add_existing.js.erb~ +0 -18
  191. data/frontends/default/views/add_existing.js.rjs +0 -17
  192. data/frontends/default/views/destroy.js.rjs +0 -23
  193. data/frontends/default/views/form_messages.js.rjs +0 -1
  194. data/frontends/default/views/list.js.rjs +0 -1
  195. data/frontends/default/views/on_action_update.js.rjs +0 -10
  196. data/frontends/default/views/on_create.js.rjs +0 -41
  197. data/frontends/default/views/on_mark_all.js.rjs +0 -12
  198. data/frontends/default/views/on_update.js.rjs +0 -28
  199. data/frontends/default/views/render_field.js.rjs +0 -1
  200. data/frontends/default/views/update_column.js.rjs +0 -13
  201. data/frontends/default/views/update_row.js.rjs +0 -1
  202. data/lib/active_scaffold.rb~ +0 -362
  203. data/lib/active_scaffold/bridges/ancestry/bridge.rb +0 -5
  204. data/lib/active_scaffold/bridges/bridge.rb +0 -59
  205. data/lib/active_scaffold/bridges/cancan/bridge.rb +0 -12
  206. data/lib/active_scaffold/bridges/carrierwave/bridge.rb +0 -9
  207. data/lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge.rb +0 -33
  208. data/lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge_helpers.rb +0 -12
  209. data/lib/active_scaffold/bridges/country_helper/bridge.rb +0 -9
  210. data/lib/active_scaffold/bridges/date_picker/bridge.rb +0 -24
  211. data/lib/active_scaffold/bridges/date_picker/lib/datepicker_bridge.rb +0 -234
  212. data/lib/active_scaffold/bridges/dragonfly/bridge.rb +0 -9
  213. data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge.rb +0 -36
  214. data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge_helpers.rb +0 -12
  215. data/lib/active_scaffold/bridges/file_column/bridge.rb +0 -11
  216. data/lib/active_scaffold/bridges/file_column/lib/file_column_helpers.rb +0 -59
  217. data/lib/active_scaffold/bridges/paperclip/bridge.rb +0 -12
  218. data/lib/active_scaffold/bridges/paperclip/lib/paperclip_bridge.rb +0 -38
  219. data/lib/active_scaffold/bridges/paperclip/lib/paperclip_bridge_helpers.rb +0 -26
  220. data/lib/active_scaffold/bridges/record_select/bridge.rb +0 -5
  221. data/lib/active_scaffold/bridges/semantic_attributes/bridge.rb +0 -5
  222. data/lib/active_scaffold/bridges/shared/date_bridge.rb~ +0 -209
  223. data/lib/active_scaffold/bridges/tiny_mce/bridge.rb +0 -5
  224. data/lib/active_scaffold/bridges/validation_reflection/bridge.rb +0 -8
  225. data/lib/active_scaffold/bridges/validation_reflection/lib/validation_reflection_bridge.rb +0 -21
  226. data/lib/active_scaffold/config/base.rb~ +0 -70
  227. data/lib/active_scaffold/config/nested.rb~ +0 -41
  228. data/lib/active_scaffold/constraints.rb~ +0 -186
  229. data/lib/active_scaffold/data_structures/action_link.rb~ +0 -179
  230. data/lib/active_scaffold/data_structures/nested_info.rb~ +0 -123
  231. data/lib/active_scaffold/extensions/action_view_resolver.rb +0 -7
  232. data/lib/active_scaffold/extensions/active_association_reflection.rb~ +0 -22
  233. data/lib/active_scaffold/extensions/unsaved_associated.rb~ +0 -62
  234. data/lib/active_scaffold_assets.rb +0 -45
  235. data/lib/generators/active_scaffold_setup/USAGE +0 -10
  236. data/lib/generators/active_scaffold_setup/active_scaffold_setup_generator.rb +0 -59
@@ -596,6 +596,7 @@ var ActiveScaffold = {
596
596
  },
597
597
 
598
598
  update_column: function(element, url, send_form, source_id, val) {
599
+ if (!element) element = $(source_id);
599
600
  var as_form = element.up('form.as_form');
600
601
  var params = null;
601
602
 
@@ -5,6 +5,7 @@
5
5
  ActiveScaffold is freely distributable under the terms of an MIT-style license.
6
6
 
7
7
  For details, see the ActiveScaffold web site: http://www.activescaffold.com/
8
+
8
9
  */
9
10
 
10
11
  .active-scaffold form,
@@ -63,6 +64,10 @@ padding: 5px 20px 5px 5px;
63
64
  color: #333;
64
65
  }
65
66
 
67
+ .active-scaffold .mark_record_column {
68
+ width: 1px;
69
+ }
70
+
66
71
  /* Header
67
72
  ======================== */
68
73
 
@@ -171,20 +176,21 @@ background-repeat: no-repeat;
171
176
  }
172
177
 
173
178
  .active-scaffold-header div.actions div.action_group div {
174
- background-image: url(../../../images/active_scaffold/default/gears.png); /* default icon for actions or override with css */
179
+ background-image: url(<%= asset_path 'gears.png' %>); /* default icon for actions or override with css */
175
180
  }
176
181
 
177
182
  .active-scaffold-header div.actions a.show_config_list {
178
- background-image: url(../../../images/active_scaffold/default/config.png);
183
+ background-image: url(<%= asset_path 'config.png' %>);
179
184
  }
180
185
 
181
186
  .active-scaffold-header div.actions a.new,
182
187
  .active-scaffold-header div.actions a.new_existing {
183
- background-image: url(../../../images/active_scaffold/default/add.gif);
188
+ background-image: url(<%= asset_path 'add.gif' %>);
184
189
  }
185
190
 
186
191
  .active-scaffold-header div.actions a.show_search {
187
- background-image: url(../../../images/active_scaffold/default/magnifier.png);
192
+
193
+ background-image: url(<%= asset_path 'magnifier.png' %>);
188
194
  }
189
195
 
190
196
  .blue-theme .active-scaffold-header div.actions a:hover {
@@ -243,17 +249,17 @@ padding-right: 18px;
243
249
 
244
250
  .active-scaffold th.asc a,
245
251
  .active-scaffold th.asc a:hover {
246
- background: #333 url(../../../images/active_scaffold/default/arrow_up.gif) right 50% no-repeat;
252
+ background: #333 url(<%= asset_path 'arrow_up.gif' %>) right 50% no-repeat;
247
253
  }
248
254
 
249
255
  .active-scaffold th.desc a,
250
256
  .active-scaffold th.desc a:hover {
251
- background: #333 url(../../../images/active_scaffold/default/arrow_down.gif) right 50% no-repeat;
257
+ background: #333 url(<%= asset_path 'arrow_down.gif' %>) right 50% no-repeat;
252
258
  }
253
259
 
254
260
  .active-scaffold th.loading a,
255
261
  .active-scaffold th.loading a:hover {
256
- background: #333 url(../../../images/active_scaffold/default/indicator-small.gif) right 50% no-repeat;
262
+ background: #333 url(<%= asset_path 'indicator-small.gif' %>) right 50% no-repeat;
257
263
  }
258
264
 
259
265
  .active-scaffold th .mark_heading {
@@ -436,7 +442,7 @@ float: right;
436
442
  text-indent: -4000px;
437
443
  width: 16px;
438
444
  height: 17px;
439
- background: url(../../../images/active_scaffold/default/close.gif) 0 0 no-repeat;
445
+ background: url(<%= asset_path 'close.gif' %>) 0 0 no-repeat;
440
446
  }
441
447
 
442
448
  /* Nested
@@ -450,7 +456,7 @@ background: transparent;
450
456
  }
451
457
 
452
458
  .active-scaffold .active-scaffold .active-scaffold-header {
453
- margin-right: 15px;
459
+ margin-right: 25px;
454
460
  }
455
461
 
456
462
  .active-scaffold .active-scaffold .active-scaffold-header h2 {
@@ -680,7 +686,7 @@ margin: 0;
680
686
  }
681
687
 
682
688
  .active-scaffold .active-scaffold-header .loading-indicator {
683
- margin-bottom: 3px;
689
+ margin-top: 3px;
684
690
  }
685
691
 
686
692
  /* Show
@@ -689,6 +695,9 @@ margin-bottom: 3px;
689
695
  .active-scaffold .show-view dl {
690
696
  margin-left: 5px;
691
697
  }
698
+ .active-scaffold .show-view dl dl {
699
+ margin-left: 0px;
700
+ }
692
701
 
693
702
  .active-scaffold .show-view dt {
694
703
  width: 12em;
@@ -709,6 +718,10 @@ margin-bottom: 5px;
709
718
  /* Form
710
719
  ============================== */
711
720
 
721
+ .active-scaffold dl {
722
+ margin: 0;
723
+ }
724
+
712
725
  .active-scaffold .submit {
713
726
  font-weight: bold;
714
727
  font-size: 14px;
@@ -959,7 +972,7 @@ height: 16px;
959
972
  padding: 0;
960
973
  width: 16px;
961
974
  text-indent: -4000px;
962
- background: url(../../../images/active_scaffold/default/cross.png) 0 0 no-repeat;
975
+ background: url(<%= asset_path 'cross.png' %>) 0 0 no-repeat;
963
976
  }
964
977
 
965
978
  .active-scaffold .sub-form .locked a.destroy {
@@ -1001,22 +1014,10 @@ font-size: 100%;
1001
1014
  float:left;
1002
1015
  }
1003
1016
 
1004
-
1005
- .active-scaffold-component > .active-scaffold-header h2 {
1006
- border: none;
1007
- }
1008
- .active-scaffold-component > .active-scaffold-header h2 a,
1009
- .active-scaffold-component > .active-scaffold-header h2 a:active,
1010
- .active-scaffold-component > .active-scaffold-header h2 a:visited {
1011
- text-decoration: none;
1012
- color: inherit;
1013
- }
1014
-
1015
-
1016
1017
  .as_touch a.inline-adapter-close {
1017
1018
  width: 25px;
1018
1019
  height: 27px;
1019
- background: url(../../../images/active_scaffold/default/close_touch.png) 0 0 no-repeat;
1020
+ background: url(<%= asset_path 'close_touch.png' %>) 0 0 no-repeat;
1020
1021
  }
1021
1022
 
1022
1023
  .as_touch .as_paginate {
@@ -1091,3 +1092,7 @@ padding: 5px 2px 5px 5px;
1091
1092
  .as_touch tr.record td {
1092
1093
  padding: 5px 10px;
1093
1094
  }
1095
+
1096
+ <% require_asset "jquery-ui" %>
1097
+ <% ActiveScaffold.stylesheets.each {|css| require_asset css} %>
1098
+ <% ActiveScaffold::Bridges.all_stylesheets.each {|css| require_asset css} %>
@@ -1,4 +1,7 @@
1
1
  de:
2
+ time:
3
+ formats:
4
+ picker: "%a, %d %b %Y %H:%M:%S"
2
5
  active_scaffold:
3
6
  add: 'Hinzufügen'
4
7
  add_existing: 'Existierenden Eintrag hinzufügen'
@@ -1,4 +1,7 @@
1
1
  en:
2
+ time:
3
+ formats:
4
+ picker: "%a, %d %b %Y %H:%M:%S"
2
5
  active_scaffold:
3
6
  add: 'Add'
4
7
  add_existing: 'Add Existing'
@@ -1,4 +1,7 @@
1
1
  es:
2
+ time:
3
+ formats:
4
+ picker: "%a, %d %b %Y %H:%M:%S"
2
5
  active_scaffold:
3
6
  add: 'Añadir'
4
7
  add_existing: 'Añadir Existente'
@@ -64,6 +67,8 @@ es:
64
67
  '<': '<'
65
68
  '!=': '!='
66
69
  between: 'Entre'
70
+ is_null: 'Es nulo'
71
+ is_not_null: 'No es nulo'
67
72
  contains: 'Contiene'
68
73
  begins_with: 'Empieza con'
69
74
  ends_with: 'Termina con'
@@ -1,4 +1,7 @@
1
1
  fr:
2
+ time:
3
+ formats:
4
+ picker: "%a, %d %b %Y %H:%M:%S"
2
5
  active_scaffold:
3
6
  add: 'Ajouter'
4
7
  add_existing: 'Ajouter un(e) existant(e)'
@@ -1,4 +1,7 @@
1
1
  hu:
2
+ time:
3
+ formats:
4
+ picker: "%a, %d %b %Y %H:%M:%S"
2
5
  active_scaffold:
3
6
  add: 'Hozzáadás'
4
7
  add_existing: 'Meglevő hozzáadása'
@@ -6,6 +9,7 @@ hu:
6
9
  are_you_sure_to_delete: 'Biztos vagy benne?'
7
10
  cancel: 'Mégse'
8
11
  click_to_edit: 'Kattints a szerkesztéshez'
12
+ click_to_reset: 'Kattints az alapállapothoz'
9
13
  close: 'Bezárás'
10
14
  create: 'Létrehozás'
11
15
  create_model: '%{model} létrehozása'
@@ -28,8 +32,8 @@ hu:
28
32
  loading: 'Betöltés…'
29
33
  next: 'Következő'
30
34
  no_entries: 'Nincs elem'
31
- no_options: 'nincsenek'
32
- omit_header: 'Fejléc nélkül'
35
+ no_options: 'nincsenek opciók'
36
+ omit_header: 'Fejléc mellőzése'
33
37
  options: 'Opciók'
34
38
  pdf: 'PDF'
35
39
  previous: 'Előző'
@@ -57,7 +61,14 @@ hu:
57
61
  '<': '<'
58
62
  '!=': '!='
59
63
  between: 'Között'
64
+ is_null: 'Is null'
65
+ is_not_null: 'Is not null'
66
+ contains: 'Contains'
67
+ begins_with: 'Begins with'
68
+ ends_with: 'Ends with'
60
69
 
61
70
  # error_messages
71
+ cant_destroy_record: "nem törölhető: %{record}"
62
72
  internal_error: 'A lekérés sikertelen (code 500, Internal Error)'
63
73
  version_inconsistency: 'Verzió ütközés - ezt a rekordot módosították mióta elkezdted szerkeszteni.'
74
+ failed_to_save_record: 'Failed to save record cause of an unknown error'
@@ -1,4 +1,7 @@
1
1
  ja:
2
+ time:
3
+ formats:
4
+ picker: "%a, %d %b %Y %H:%M:%S"
2
5
  active_scaffold:
3
6
  add: '追加'
4
7
  add_existing: '既存のものを追加'
@@ -57,8 +60,14 @@ ja:
57
60
  '<': '<'
58
61
  '!=': '!='
59
62
  between: 'Between' # needed?
63
+ is_null: 'Is null'
64
+ is_not_null: 'Is not null'
65
+ contains: 'Contains'
66
+ begins_with: 'Begins with'
67
+ ends_with: 'Ends with'
60
68
 
61
69
  # error_messages
62
70
  cant_destroy_record: "%{record}を削除で来ません"
63
71
  internal_error: 'リクエストが失敗しました(コード500: 内部エラー)'
64
72
  version_inconsistency: 'バージョンが一致しません - あなたが編集している間にこのレコードが変更されました。'
73
+ failed_to_save_record: 'Failed to save record cause of an unknown error'
@@ -1,4 +1,7 @@
1
1
  ru:
2
+ time:
3
+ formats:
4
+ picker: "%a, %d %b %Y %H:%M:%S"
2
5
  active_scaffold:
3
6
  add: 'Добавить запись'
4
7
  add_existing: 'Добавить существующую запись'
@@ -6,7 +6,7 @@
6
6
  <% renders_as = column_renders_as(column) %>
7
7
  <% if renders_as == :subsection -%>
8
8
  <% subsection_id = sub_section_id(:sub_section => column.label) %>
9
- <li class="sub-section">
9
+ <li class="sub-section <%= column.css_class %>">
10
10
  <h5><%= column.label %></h5>
11
11
  <%= render :partial => 'form', :locals => { :columns => column, :subsection_id => subsection_id, :form_action => form_action } %>
12
12
  <%= link_to_visibility_toggle(subsection_id, {:default_visible => !column.collapsed}) -%>
@@ -3,11 +3,7 @@ parent_record = @record
3
3
  associated = column.singular_association? ? [parent_record.send(column.name)].compact : parent_record.send(column.name).to_a
4
4
  associated = associated.sort_by {|r| r.new_record? ? 99999999999 : r.id} unless column.association.options.has_key?(:order)
5
5
  if show_blank_record = column.show_blank_record?(associated)
6
- associated << if column.singular_association?
7
- parent_record.send("build_#{column.name}".to_sym)
8
- else
9
- parent_record.send(column.name).build
10
- end
6
+ associated << build_associated(column, parent_record)
11
7
  end
12
8
  subform_div_id = "#{sub_form_id({:association => column.name, :id => parent_record.id || 99999999999})}-div"
13
9
  -%>
@@ -1,16 +1,16 @@
1
1
  <table cellpadding="0" cellspacing="0">
2
2
  <%
3
- if associated.empty?
4
- @record = if column.singular_association?
3
+ record = if associated.empty?
4
+ if column.singular_association?
5
5
  parent_record.send("build_#{column.name}".to_sym)
6
6
  else
7
7
  parent_record.send(column.name).build
8
8
  end
9
9
  else
10
- @record = associated.last
10
+ associated.last
11
11
  end
12
12
  -%>
13
- <%= render :partial => 'horizontal_subform_header', :locals => {:parent_record => parent_record} %>
13
+ <%= render :partial => 'horizontal_subform_header', :locals => {:parent_record => parent_record, :record => record} %>
14
14
 
15
15
  <tbody id="<%= sub_form_list_id(:association => column.name) %>">
16
16
  <% associated.each_index do |index| %>
@@ -25,5 +25,8 @@
25
25
  <%= render :partial => 'horizontal_subform_record', :locals => {:scope => column_scope(column), :parent_record => parent_record, :column => column, :locked => show_blank_record && @record.new_record? && @record == associated.last} %>
26
26
  <% end -%>
27
27
  </tbody>
28
+ <tfooter>
29
+ <%= render :partial => 'horizontal_subform_footer', :locals => {:scope => column_scope(column), :parent_record => parent_record, :column => column} %>
30
+ </tfooter>
28
31
  </table>
29
32
  <%= render :partial => 'form_association_footer', :locals => {:parent_record => parent_record, :column => column, :associated => associated} -%>
@@ -1,6 +1,6 @@
1
1
  <table cellpadding="0" cellspacing="0">
2
2
  <%
3
- @record = if associated.empty?
3
+ record = if associated.empty?
4
4
  if column.singular_association?
5
5
  parent_record.send("build_#{column.name}".to_sym)
6
6
  else
@@ -10,7 +10,7 @@
10
10
  associated.last
11
11
  end
12
12
  -%>
13
- <%= render :partial => 'horizontal_subform_header', :locals => {:parent_record => parent_record, :record => @record} %>
13
+ <%= render :partial => 'horizontal_subform_header', :locals => {:parent_record => parent_record, :record => record} %>
14
14
 
15
15
  <tbody id="<%= sub_form_list_id(:association => column.name) %>">
16
16
  <% associated.each_index do |index| %>
@@ -25,8 +25,5 @@
25
25
  <%= render :partial => 'horizontal_subform_record', :locals => {:scope => column_scope(column), :parent_record => parent_record, :column => column, :locked => show_blank_record && @record.new_record? && @record == associated.last} %>
26
26
  <% end -%>
27
27
  </tbody>
28
- <tfooter>
29
- <%= render :partial => 'horizontal_subform_footer', :locals => {:scope => column_scope(column), :parent_record => parent_record, :column => column} %>
30
- </tfooter>
31
28
  </table>
32
29
  <%= render :partial => 'form_association_footer', :locals => {:parent_record => parent_record, :column => column, :associated => associated} -%>
@@ -1,7 +1,7 @@
1
1
  <thead>
2
2
  <tr>
3
3
  <%
4
- active_scaffold_config_for(@record.class).subform.columns.each :for => @record.class, :flatten => true do |column|
4
+ active_scaffold_config_for(record.class).subform.columns.each :for => record.class, :flatten => true do |column|
5
5
  hidden = column_renders_as(column) == :hidden
6
6
  next unless in_subform?(column, parent_record)
7
7
  -%>
@@ -1,7 +1,7 @@
1
1
  <thead>
2
2
  <tr>
3
3
  <%
4
- active_scaffold_config_for(record.class).subform.columns.each :for => record.class, :flatten => true do |column|
4
+ active_scaffold_config_for(@record.class).subform.columns.each :for => @record.class, :flatten => true do |column|
5
5
  hidden = column_renders_as(column) == :hidden
6
6
  next unless in_subform?(column, parent_record)
7
7
  -%>
@@ -15,7 +15,7 @@
15
15
  column = column.clone
16
16
  column.form_ui ||= :select if column.association
17
17
  -%>
18
- <td<%= ' class="hidden"'.html_safe if column_renders_as(column) == :hidden %>>
18
+ <td class="<%= 'hidden' if column_renders_as(column) == :hidden %>">
19
19
  <% unless readonly and not @record.new_record? or not @record.authorized_for?(:crud_type => crud_type, :column => column.name) -%>
20
20
  <%= render :partial => form_partial_for_column(column), :locals => { :column => column, :scope => scope } -%>
21
21
  <% else -%>
@@ -6,7 +6,7 @@
6
6
  <%= render :partial => 'action_group', :locals => {:action_links => action_links || active_scaffold_config.action_links.member,
7
7
  :url_options => url_options,
8
8
  :record => record,
9
- :traverse_options => {:for => record},
9
+ :traverse_options => {:for => record.persisted? ? record : record.class},
10
10
  :start_level_0_tag => '<td>',
11
11
  :end_level_0_tag => '</td>'} %>
12
12
  </tr>
@@ -18,10 +18,8 @@
18
18
  <% if active_scaffold_config.list.show_search_reset && @filtered -%>
19
19
  <% search_link = ActiveScaffold::DataStructures::ActionLink.new('index', :label => :click_to_reset, :type => :member, :position => false)
20
20
  action_links = ActiveScaffold::DataStructures::ActionLinks.new
21
- record = new_model
22
- record.id = 0
23
21
  action_links.add(search_link) -%>
24
- <%= render :partial => 'list_actions', :locals => {:record => record, :url_options => params_for(:escape => false, :search => ''), :action_links => action_links.member} %>
22
+ <%= render :partial => 'list_actions', :locals => {:record => new_model, :url_options => params_for(:escape => false, :search => ''), :action_links => action_links.member} %>
25
23
  <% else %>
26
24
  <td class='actions'><%= '<p class="empty-message">&nbsp;</p>'.html_safe if @page.items.empty? %></td>
27
25
  <% end -%>
@@ -0,0 +1,20 @@
1
+ <%
2
+ column = if render_field.is_a? ActiveScaffold::DataStructures::Column
3
+ render_field
4
+ else
5
+ active_scaffold_config.columns[render_field.to_sym] unless render_field.is_a? ActiveScaffold::DataStructures::Column
6
+ end
7
+ @rendered ||= Set.new
8
+ return if @rendered.include? column.name
9
+ @rendered << column.name
10
+ if column_renders_as(column) == :subform
11
+ options = {:is_subform => true, :field_class => "#{column.name}-sub-form"}
12
+ else
13
+ options = {:is_subform => false, :field_class => "#{column.name}-input"}
14
+ end
15
+ -%>
16
+
17
+ ActiveScaffold.render_form_field('<%= source_id %>','<%= escape_javascript(render(:partial => form_partial_for_column(column), :locals => { :column => column, :scope => scope })) %>', <%= options.to_json.html_safe %>);
18
+ <%if column.update_columns && !column.update_columns.empty?%>
19
+ <%= render(:partial => "render_field", :collection => column.update_columns, :locals => {:source_id => source_id, :scope => scope})%>
20
+ <%end%>
@@ -1,12 +1,6 @@
1
1
  <%= render :partial => 'list_record', :locals => {:record => record}%>
2
- <% if active_scaffold_config.list.columns.any? {|c| c.calculation?} %>
3
- <script type="text/javascript">
4
- //<![CDATA[
5
- <%= update_page do |page|
6
- page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations')
7
- end %>
8
- //]]>
9
- </script>
10
- <% end %>
2
+ <%= javascript_tag do %>
3
+ ActiveScaffold.replace('<%= active_scaffold_calculations_id %>', '<%= escape_javascript render(:partial => 'list_calculations') %>');
4
+ <% end if active_scaffold_config.list.columns.any? {|c| c.calculation?} %>
11
5
 
12
6