netzke-basepack 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. data/CHANGELOG.rdoc +17 -0
  2. data/README.rdoc +1 -1
  3. data/Rakefile +3 -0
  4. data/TODO.rdoc +1 -4
  5. data/features/form_panel.feature +2 -1
  6. data/features/grid_panel.feature +134 -5
  7. data/features/nested_attributes.feature +4 -1
  8. data/features/paging_form_panel.feature +41 -0
  9. data/features/search_in_grid.feature +20 -7
  10. data/features/step_definitions/form_panel_steps.rb +35 -0
  11. data/features/step_definitions/generic_steps.rb +20 -1
  12. data/features/step_definitions/grid_panel_steps.rb +63 -0
  13. data/features/support/env.rb +4 -0
  14. data/features/validations_in_grid.feature +13 -0
  15. data/features/virtual_attributes.feature +5 -9
  16. data/javascripts/basepack.js +21 -650
  17. data/javascripts/datetimefield.js +24 -0
  18. data/lib/generators/netzke/basepack_generator.rb +10 -0
  19. data/{generators/netzke_basepack/templates/public_assets → lib/generators/netzke/templates/assets}/ts-checkbox.gif +0 -0
  20. data/{generators/netzke_basepack → lib/generators/netzke}/templates/create_netzke_field_lists.rb +0 -0
  21. data/lib/netzke-basepack.rb +3 -41
  22. data/lib/netzke/active_record/attributes.rb +17 -21
  23. data/lib/netzke/basepack.rb +6 -1
  24. data/lib/netzke/basepack/data_accessor.rb +166 -0
  25. data/lib/netzke/basepack/form_panel.rb +69 -20
  26. data/lib/netzke/basepack/form_panel/fields.rb +15 -17
  27. data/lib/netzke/basepack/form_panel/javascripts/comma_list_cbg.js +7 -0
  28. data/lib/netzke/basepack/form_panel/javascripts/display_mode.js +6 -0
  29. data/lib/netzke/basepack/form_panel/javascripts/{main.js → form_panel.js} +42 -8
  30. data/lib/netzke/basepack/form_panel/javascripts/n_radio_group.js +24 -7
  31. data/lib/netzke/basepack/form_panel/javascripts/readonly_mode.js +52 -0
  32. data/lib/netzke/basepack/form_panel/services.rb +28 -2
  33. data/lib/netzke/basepack/form_panel/stylesheets/readonly_mode.css +14 -0
  34. data/lib/netzke/basepack/grid_panel.rb +151 -181
  35. data/lib/netzke/basepack/grid_panel/columns.rb +122 -84
  36. data/lib/netzke/basepack/grid_panel/javascripts/advanced_search.js +22 -27
  37. data/lib/netzke/basepack/grid_panel/javascripts/{main.js → grid_panel.js} +182 -108
  38. data/lib/netzke/basepack/grid_panel/record_form_window.rb +7 -2
  39. data/lib/netzke/basepack/grid_panel/services.rb +58 -39
  40. data/lib/netzke/basepack/paging_form_panel.rb +86 -25
  41. data/lib/netzke/basepack/query_builder.rb +105 -0
  42. data/lib/netzke/basepack/query_builder/javascripts/query_builder.js +140 -0
  43. data/lib/netzke/basepack/search_panel.rb +61 -44
  44. data/lib/netzke/basepack/search_panel/javascripts/condition_field.js +153 -0
  45. data/lib/netzke/basepack/search_panel/javascripts/search_panel.js +64 -0
  46. data/lib/netzke/basepack/search_window.rb +64 -0
  47. data/lib/netzke/basepack/simple_app.rb +1 -1
  48. data/lib/netzke/basepack/simple_app/javascripts/{main.js → simple_app.js} +0 -0
  49. data/lib/netzke/basepack/tab_panel.rb +1 -2
  50. data/lib/netzke/basepack/tab_panel/javascripts/{main.js → tab_panel.js} +0 -0
  51. data/lib/netzke/basepack/version.rb +1 -1
  52. data/locales/en.yml +71 -4
  53. data/netzke-basepack.gemspec +47 -22
  54. data/spec/active_record/attributes_spec.rb +6 -6
  55. data/spec/components/form_panel_spec.rb +2 -13
  56. data/stylesheets/datetimefield.css +54 -0
  57. data/test/rails_app/Gemfile +3 -3
  58. data/test/rails_app/Gemfile.lock +67 -57
  59. data/test/rails_app/README +1 -256
  60. data/test/rails_app/app/components/book_form.rb +1 -3
  61. data/test/rails_app/app/components/book_form_with_custom_fields.rb +20 -0
  62. data/test/rails_app/app/components/book_form_with_nested_attributes.rb +18 -0
  63. data/test/rails_app/app/components/book_grid.rb +3 -1
  64. data/test/rails_app/app/components/book_grid_loader.rb +24 -0
  65. data/test/rails_app/app/components/book_grid_with_custom_columns.rb +28 -0
  66. data/test/rails_app/app/components/book_grid_with_default_values.rb +1 -1
  67. data/test/rails_app/app/components/book_grid_with_virtual_attributes.rb +0 -1
  68. data/test/rails_app/app/components/book_paging_form_panel.rb +3 -2
  69. data/test/rails_app/app/components/book_presentation.rb +3 -3
  70. data/test/rails_app/app/components/book_query_builder.rb +8 -0
  71. data/test/rails_app/app/components/book_search_panel.rb +5 -0
  72. data/test/rails_app/app/components/book_search_panel/javascripts/i18n_de.js +6 -0
  73. data/test/rails_app/app/components/double_book_grid.rb +18 -0
  74. data/test/rails_app/app/components/form_without_model.rb +1 -1
  75. data/test/rails_app/app/components/paging_form_with_search.rb +39 -0
  76. data/test/rails_app/app/components/user_grid.rb +1 -1
  77. data/test/rails_app/app/models/author.rb +1 -0
  78. data/test/rails_app/config/application.rb +6 -1
  79. data/test/rails_app/config/database.yml +7 -5
  80. data/test/rails_app/config/environments/test.rb +1 -1
  81. data/test/rails_app/config/locales/de.yml +35 -0
  82. data/test/rails_app/config/locales/es.yml +84 -8
  83. data/test/rails_app/db/migrate/20101026190021_create_books.rb +2 -2
  84. data/test/rails_app/db/migrate/20110213213050_create_netzke_component_states.rb +20 -0
  85. data/test/rails_app/db/schema.rb +2 -18
  86. data/test/rails_app/public/netzke/basepack/ts-checkbox.gif +0 -0
  87. data/test/unit/active_record_basepack_test.rb +1 -1
  88. metadata +46 -45
  89. data/generators/netzke_basepack/netzke_basepack_generator.rb +0 -13
  90. data/lib/netzke/basepack/grid_panel/search_window.rb +0 -56
  91. data/lib/netzke/data_accessor.rb +0 -113
  92. data/lib/netzke/ext.rb +0 -7
  93. data/lib/netzke/fields_configurator.rb +0 -170
  94. data/lib/netzke/json_array_editor.rb +0 -67
  95. data/lib/netzke/masquerade_selector.rb +0 -53
  96. data/test/rails_app/app/components/some_search_panel.rb +0 -34
  97. data/test/rails_app/db/development_structure.sql +0 -93
  98. data/test/rails_app/db/migrate/20100905214933_create_netzke_preferences.rb +0 -16
@@ -0,0 +1,64 @@
1
+ module Netzke
2
+ module Basepack
3
+ class SearchWindow < Netzke::Basepack::Window
4
+
5
+ action :search do
6
+ { :text => I18n.t('netzke.basepack.search_window.action.search') }
7
+ end
8
+
9
+ action :cancel do
10
+ { :text => I18n.t('netzke.basepack.search_window.action.search') }
11
+ end
12
+
13
+ js_properties :width => "50%",
14
+ :auto_height => true,
15
+ :close_action => "hide",
16
+ :buttons => [:search.action, :cancel.action],
17
+ :modal => true
18
+
19
+ def configuration
20
+ super.tap do |s|
21
+ s[:items] = [:search_panel.component(:header => false)]
22
+ s[:title] = I18n.t('netzke.basepack.search_window.title')
23
+ end
24
+ end
25
+
26
+ component :search_panel do
27
+ {
28
+ :class_name => "Netzke::Basepack::QueryBuilder",
29
+ :model => config[:model]
30
+ }
31
+ end
32
+
33
+ js_method :init_component, <<-JS
34
+ function(){
35
+ Netzke.classes.Basepack.SearchWindow.superclass.initComponent.call(this);
36
+
37
+ this.on('show', function(){
38
+ this.closeRes = 'cancel';
39
+ });
40
+ }
41
+ JS
42
+
43
+ js_method :get_query, <<-JS
44
+ function(){
45
+ return this.items.first().getQuery();
46
+ }
47
+ JS
48
+
49
+ js_method :on_search, <<-JS
50
+ function(){
51
+ this.closeRes = 'search';
52
+ this.hide();
53
+ }
54
+ JS
55
+
56
+ js_method :on_cancel, <<-JS
57
+ function(){
58
+ this.hide();
59
+ }
60
+ JS
61
+
62
+ end
63
+ end
64
+ end
@@ -14,7 +14,7 @@ module Netzke
14
14
 
15
15
  js_include Netzke::Core.ext_location.join("examples", "ux/statusbar/StatusBar.js"), :statusbar_ext
16
16
 
17
- js_mixin :main
17
+ js_mixin :simple_app
18
18
 
19
19
  def configuration
20
20
  super.merge(
@@ -4,7 +4,6 @@ module Netzke
4
4
  #
5
5
  # Features:
6
6
  # * Dynamically loads components for the tabs that get activated for the first time
7
- # * Is loaded along with the active component - saves a request to the server
8
7
  # * (TODO) Provides the method markTabsOutdated to mark all inactive tabs as 'outdated', and calls "update" method on components in tabs when they get activated
9
8
  # * (TODO) Stores the last active tab in persistent_config
10
9
  #
@@ -16,7 +15,7 @@ module Netzke
16
15
 
17
16
  js_base_class "Ext.TabPanel"
18
17
 
19
- js_mixin :main
18
+ js_mixin :tab_panel
20
19
  end
21
20
  end
22
21
  end
@@ -3,7 +3,7 @@ module Netzke
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 6
6
- PATCH = 3
6
+ PATCH = 4
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
9
9
  end
data/locales/en.yml CHANGED
@@ -1,9 +1,6 @@
1
1
  en:
2
2
  netzke:
3
3
  basepack:
4
- generic:
5
- confirm: Confirmation
6
- are_you_sure: Are you sure?
7
4
  grid_panel:
8
5
  actions:
9
6
  add: Add
@@ -13,10 +10,80 @@ en:
13
10
  add_in_form: Add in form
14
11
  edit_in_form: Edit in form
15
12
  search: Search
13
+
16
14
  deleted_n_records: "Deleted %{n} record(s)"
17
15
  cannot_delete: "You don't have permissions to delete data"
16
+ confirmation: Confirmation
17
+ are_you_sure: Are you sure?
18
+
19
+ empty_msg: Empty
20
+ first_text: First page
21
+ prev_text: Previous page
22
+ next_text: Next page
23
+ last_text: Last page
24
+ before_page_text: Page
25
+ after_page_text: "of {0}"
26
+ refresh_text: Refresh
27
+ display_msg: "Displaying {0} - {1} of {2}"
28
+
29
+ record_form_window:
30
+ actions:
31
+ ok: OK
32
+ cancel: Cancel
33
+
34
+ search_window:
35
+ title: Extended search
36
+ actions:
37
+ search: Search
38
+ cancel: Cancel
39
+
40
+ form_panel:
41
+ actions:
42
+ edit: Edit
43
+ edit_tooltip: Edit
44
+ cancel: Cancel
45
+ cancel_tooltip: Cancel editing
46
+ apply: Apply
47
+ apply_tooltip: Apply changes
48
+
49
+ search_panel:
50
+ presets: Presets
51
+ equals: Equals
52
+ greater_than: Greater than
53
+ less_than: Less than
54
+ contains: Contains
55
+ matches: Matches
56
+ date_equals: "On"
57
+ before: Before
58
+ after: After
59
+
60
+ paging_form_panel:
61
+ actions:
62
+ search: Search
63
+ search_tooltip: Extended search
64
+
65
+ query_builder:
66
+ presets: Presets
67
+ preset_saved: Preset successfully saved
68
+ preset_deleted: Preset successfully deleted
69
+ overwrite_confirm: "Are you sure you want to overwrite preset '{0}'?"
70
+ overwrite_confirm_title: "Overwriting preset"
71
+ delete_confirm: "Are you sure you want to delete preset '{0}'?"
72
+ delete_confirm_title: "Deleting preset"
73
+ actions:
74
+ clear_all: Clear
75
+ clear_all_tooltip: Clear all conditions
76
+ reset: Reset
77
+ reset_tooltip: Reset condition values
78
+ save_preset: Save preset
79
+ save_preset_tooltip: Save preset
80
+ delete_preset: Delete preset
81
+ delete_preset_tooltip: Delete preset
82
+ apply: Apply
83
+ apply_tooltip: Apply updated conditions
84
+
18
85
 
19
86
  formats:
20
87
  date: Y-m-d
21
88
  datetime: Y-m-d H:i:s
22
- time: H:i:s
89
+ time: H:i:s
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{netzke-basepack}
8
- s.version = "0.6.3"
8
+ s.version = "0.6.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sergei Kozlov"]
12
- s.date = %q{2011-01-14}
12
+ s.date = %q{2011-02-26}
13
13
  s.description = %q{A set of full-featured extendible Netzke components (such as FormPanel, GridPanel, Window, BorderLayoutPanel, etc) which can be used as building block for your RIA}
14
14
  s.email = %q{sergei@playcode.nl}
15
15
  s.extra_rdoc_files = [
@@ -34,10 +34,12 @@ Gem::Specification.new do |s|
34
34
  "features/grid_panel.feature",
35
35
  "features/i18n.feature",
36
36
  "features/nested_attributes.feature",
37
+ "features/paging_form_panel.feature",
37
38
  "features/search_in_grid.feature",
38
39
  "features/simple_app.feature",
39
40
  "features/simple_panel.feature",
40
41
  "features/step_definitions/accordion_steps.rb",
42
+ "features/step_definitions/form_panel_steps.rb",
41
43
  "features/step_definitions/generic_steps.rb",
42
44
  "features/step_definitions/grid_panel_steps.rb",
43
45
  "features/step_definitions/pickle_steps.rb",
@@ -46,15 +48,17 @@ Gem::Specification.new do |s|
46
48
  "features/support/paths.rb",
47
49
  "features/support/pickle.rb",
48
50
  "features/tab_panel.feature",
51
+ "features/validations_in_grid.feature",
49
52
  "features/virtual_attributes.feature",
50
53
  "features/window.feature",
51
54
  "from_05_to_06.rdoc",
52
- "generators/netzke_basepack/netzke_basepack_generator.rb",
53
- "generators/netzke_basepack/templates/create_netzke_field_lists.rb",
54
- "generators/netzke_basepack/templates/public_assets/ts-checkbox.gif",
55
55
  "init.rb",
56
56
  "install.rb",
57
57
  "javascripts/basepack.js",
58
+ "javascripts/datetimefield.js",
59
+ "lib/generators/netzke/basepack_generator.rb",
60
+ "lib/generators/netzke/templates/assets/ts-checkbox.gif",
61
+ "lib/generators/netzke/templates/create_netzke_field_lists.rb",
58
62
  "lib/netzke-basepack.rb",
59
63
  "lib/netzke/active_record.rb",
60
64
  "lib/netzke/active_record/attributes.rb",
@@ -65,42 +69,44 @@ Gem::Specification.new do |s|
65
69
  "lib/netzke/basepack/auth_app.rb",
66
70
  "lib/netzke/basepack/basic_app.rb",
67
71
  "lib/netzke/basepack/border_layout_panel.rb",
72
+ "lib/netzke/basepack/data_accessor.rb",
68
73
  "lib/netzke/basepack/form_panel.rb",
69
74
  "lib/netzke/basepack/form_panel/fields.rb",
70
75
  "lib/netzke/basepack/form_panel/javascripts/comma_list_cbg.js",
71
76
  "lib/netzke/basepack/form_panel/javascripts/display_mode.js",
72
- "lib/netzke/basepack/form_panel/javascripts/main.js",
77
+ "lib/netzke/basepack/form_panel/javascripts/form_panel.js",
73
78
  "lib/netzke/basepack/form_panel/javascripts/n_radio_group.js",
74
79
  "lib/netzke/basepack/form_panel/javascripts/netzkefileupload.js",
80
+ "lib/netzke/basepack/form_panel/javascripts/readonly_mode.js",
75
81
  "lib/netzke/basepack/form_panel/services.rb",
82
+ "lib/netzke/basepack/form_panel/stylesheets/readonly_mode.css",
76
83
  "lib/netzke/basepack/grid_panel.rb",
77
84
  "lib/netzke/basepack/grid_panel/columns.rb",
78
85
  "lib/netzke/basepack/grid_panel/javascripts/advanced_search.js",
79
86
  "lib/netzke/basepack/grid_panel/javascripts/edit_in_form.js",
80
- "lib/netzke/basepack/grid_panel/javascripts/main.js",
87
+ "lib/netzke/basepack/grid_panel/javascripts/grid_panel.js",
81
88
  "lib/netzke/basepack/grid_panel/javascripts/misc.js",
82
89
  "lib/netzke/basepack/grid_panel/javascripts/rows-dd.js",
83
90
  "lib/netzke/basepack/grid_panel/multi_edit_form.rb",
84
91
  "lib/netzke/basepack/grid_panel/record_form_window.rb",
85
- "lib/netzke/basepack/grid_panel/search_window.rb",
86
92
  "lib/netzke/basepack/grid_panel/services.rb",
87
93
  "lib/netzke/basepack/paging_form_panel.rb",
88
94
  "lib/netzke/basepack/panel.rb",
95
+ "lib/netzke/basepack/query_builder.rb",
96
+ "lib/netzke/basepack/query_builder/javascripts/query_builder.js",
89
97
  "lib/netzke/basepack/search_panel.rb",
98
+ "lib/netzke/basepack/search_panel/javascripts/condition_field.js",
99
+ "lib/netzke/basepack/search_panel/javascripts/search_panel.js",
100
+ "lib/netzke/basepack/search_window.rb",
90
101
  "lib/netzke/basepack/simple_app.rb",
91
- "lib/netzke/basepack/simple_app/javascripts/main.js",
102
+ "lib/netzke/basepack/simple_app/javascripts/simple_app.js",
92
103
  "lib/netzke/basepack/simple_app/javascripts/statusbar_ext.js",
93
104
  "lib/netzke/basepack/tab_panel.rb",
94
- "lib/netzke/basepack/tab_panel/javascripts/main.js",
105
+ "lib/netzke/basepack/tab_panel/javascripts/tab_panel.js",
95
106
  "lib/netzke/basepack/version.rb",
96
107
  "lib/netzke/basepack/window.rb",
97
108
  "lib/netzke/basepack/wrap_lazy_loaded.rb",
98
109
  "lib/netzke/basepack/wrapper.rb",
99
- "lib/netzke/data_accessor.rb",
100
- "lib/netzke/ext.rb",
101
- "lib/netzke/fields_configurator.rb",
102
- "lib/netzke/json_array_editor.rb",
103
- "lib/netzke/masquerade_selector.rb",
104
110
  "lib/tasks/netzke_basepack_tasks.rake",
105
111
  "locales/en.yml",
106
112
  "netzke-basepack.gemspec",
@@ -111,6 +117,7 @@ Gem::Specification.new do |s|
111
117
  "spec/factories.rb",
112
118
  "spec/spec_helper.rb",
113
119
  "stylesheets/basepack.css",
120
+ "stylesheets/datetimefield.css",
114
121
  "test/console_with_fixtures.rb",
115
122
  "test/fixtures/books.yml",
116
123
  "test/fixtures/categories.yml",
@@ -127,17 +134,26 @@ Gem::Specification.new do |s|
127
134
  "test/rails_app/Rakefile",
128
135
  "test/rails_app/app/components/author_grid.rb",
129
136
  "test/rails_app/app/components/book_form.rb",
137
+ "test/rails_app/app/components/book_form_with_custom_fields.rb",
138
+ "test/rails_app/app/components/book_form_with_nested_attributes.rb",
130
139
  "test/rails_app/app/components/book_grid.rb",
140
+ "test/rails_app/app/components/book_grid_loader.rb",
141
+ "test/rails_app/app/components/book_grid_with_custom_columns.rb",
131
142
  "test/rails_app/app/components/book_grid_with_default_values.rb",
132
143
  "test/rails_app/app/components/book_grid_with_nested_attributes.rb",
133
144
  "test/rails_app/app/components/book_grid_with_virtual_attributes.rb",
134
145
  "test/rails_app/app/components/book_paging_form_panel.rb",
135
146
  "test/rails_app/app/components/book_presentation.rb",
147
+ "test/rails_app/app/components/book_query_builder.rb",
148
+ "test/rails_app/app/components/book_search_panel.rb",
149
+ "test/rails_app/app/components/book_search_panel/javascripts/i18n_de.js",
136
150
  "test/rails_app/app/components/books_bound_to_author.rb",
151
+ "test/rails_app/app/components/double_book_grid.rb",
137
152
  "test/rails_app/app/components/form_without_model.rb",
138
153
  "test/rails_app/app/components/generic_user_form.rb",
139
154
  "test/rails_app/app/components/lockable_book_form.rb",
140
155
  "test/rails_app/app/components/lockable_user_form.rb",
156
+ "test/rails_app/app/components/paging_form_with_search.rb",
141
157
  "test/rails_app/app/components/simple_accordion.rb",
142
158
  "test/rails_app/app/components/simple_panel.rb",
143
159
  "test/rails_app/app/components/simple_tab_panel.rb",
@@ -146,7 +162,6 @@ Gem::Specification.new do |s|
146
162
  "test/rails_app/app/components/some_accordion_panel.rb",
147
163
  "test/rails_app/app/components/some_auth_app.rb",
148
164
  "test/rails_app/app/components/some_border_layout.rb",
149
- "test/rails_app/app/components/some_search_panel.rb",
150
165
  "test/rails_app/app/components/some_simple_app.rb",
151
166
  "test/rails_app/app/components/some_tab_panel.rb",
152
167
  "test/rails_app/app/components/user_form.rb",
@@ -182,15 +197,15 @@ Gem::Specification.new do |s|
182
197
  "test/rails_app/config/initializers/netzke.rb",
183
198
  "test/rails_app/config/initializers/secret_token.rb",
184
199
  "test/rails_app/config/initializers/session_store.rb",
200
+ "test/rails_app/config/locales/de.yml",
185
201
  "test/rails_app/config/locales/es.yml",
186
202
  "test/rails_app/config/routes.rb",
187
- "test/rails_app/db/development_structure.sql",
188
- "test/rails_app/db/migrate/20100905214933_create_netzke_preferences.rb",
189
203
  "test/rails_app/db/migrate/20100914104207_create_users.rb",
190
204
  "test/rails_app/db/migrate/20100914104236_create_roles.rb",
191
205
  "test/rails_app/db/migrate/20101026185816_create_authors.rb",
192
206
  "test/rails_app/db/migrate/20101026190021_create_books.rb",
193
207
  "test/rails_app/db/migrate/20110101143818_create_addresses.rb",
208
+ "test/rails_app/db/migrate/20110213213050_create_netzke_component_states.rb",
194
209
  "test/rails_app/db/schema.rb",
195
210
  "test/rails_app/db/seeds.rb",
196
211
  "test/rails_app/features/support/paths.rb",
@@ -207,6 +222,7 @@ Gem::Specification.new do |s|
207
222
  "test/rails_app/public/javascripts/effects.js",
208
223
  "test/rails_app/public/javascripts/prototype.js",
209
224
  "test/rails_app/public/javascripts/rails.js",
225
+ "test/rails_app/public/netzke/basepack/ts-checkbox.gif",
210
226
  "test/rails_app/public/robots.txt",
211
227
  "test/rails_app/public/stylesheets/.gitkeep",
212
228
  "test/rails_app/script/rails",
@@ -238,6 +254,9 @@ Gem::Specification.new do |s|
238
254
 
239
255
  Thanks for installing netzke-basepack!
240
256
 
257
+ Don't forget to run "rails generate netzke:baspack" to copy necessary
258
+ assets to your public folder!
259
+
241
260
  Netzke home page: http://netzke.org
242
261
  Netzke Google Groups: http://groups.google.com/group/netzke
243
262
  Netzke tutorials: http://blog.writelesscode.com
@@ -246,7 +265,7 @@ Gem::Specification.new do |s|
246
265
 
247
266
  }
248
267
  s.require_paths = ["lib"]
249
- s.rubygems_version = %q{1.3.7}
268
+ s.rubygems_version = %q{1.5.2}
250
269
  s.summary = %q{Pre-built Rails + ExtJS components for your RIA}
251
270
  s.test_files = [
252
271
  "spec/active_record/attributes_spec.rb",
@@ -258,17 +277,25 @@ Gem::Specification.new do |s|
258
277
  "test/console_with_fixtures.rb",
259
278
  "test/rails_app/app/components/author_grid.rb",
260
279
  "test/rails_app/app/components/book_form.rb",
280
+ "test/rails_app/app/components/book_form_with_custom_fields.rb",
281
+ "test/rails_app/app/components/book_form_with_nested_attributes.rb",
261
282
  "test/rails_app/app/components/book_grid.rb",
283
+ "test/rails_app/app/components/book_grid_loader.rb",
284
+ "test/rails_app/app/components/book_grid_with_custom_columns.rb",
262
285
  "test/rails_app/app/components/book_grid_with_default_values.rb",
263
286
  "test/rails_app/app/components/book_grid_with_nested_attributes.rb",
264
287
  "test/rails_app/app/components/book_grid_with_virtual_attributes.rb",
265
288
  "test/rails_app/app/components/book_paging_form_panel.rb",
266
289
  "test/rails_app/app/components/book_presentation.rb",
290
+ "test/rails_app/app/components/book_query_builder.rb",
291
+ "test/rails_app/app/components/book_search_panel.rb",
267
292
  "test/rails_app/app/components/books_bound_to_author.rb",
293
+ "test/rails_app/app/components/double_book_grid.rb",
268
294
  "test/rails_app/app/components/form_without_model.rb",
269
295
  "test/rails_app/app/components/generic_user_form.rb",
270
296
  "test/rails_app/app/components/lockable_book_form.rb",
271
297
  "test/rails_app/app/components/lockable_user_form.rb",
298
+ "test/rails_app/app/components/paging_form_with_search.rb",
272
299
  "test/rails_app/app/components/simple_accordion.rb",
273
300
  "test/rails_app/app/components/simple_panel.rb",
274
301
  "test/rails_app/app/components/simple_tab_panel.rb",
@@ -277,7 +304,6 @@ Gem::Specification.new do |s|
277
304
  "test/rails_app/app/components/some_accordion_panel.rb",
278
305
  "test/rails_app/app/components/some_auth_app.rb",
279
306
  "test/rails_app/app/components/some_border_layout.rb",
280
- "test/rails_app/app/components/some_search_panel.rb",
281
307
  "test/rails_app/app/components/some_simple_app.rb",
282
308
  "test/rails_app/app/components/some_tab_panel.rb",
283
309
  "test/rails_app/app/components/user_form.rb",
@@ -309,12 +335,12 @@ Gem::Specification.new do |s|
309
335
  "test/rails_app/config/initializers/secret_token.rb",
310
336
  "test/rails_app/config/initializers/session_store.rb",
311
337
  "test/rails_app/config/routes.rb",
312
- "test/rails_app/db/migrate/20100905214933_create_netzke_preferences.rb",
313
338
  "test/rails_app/db/migrate/20100914104207_create_users.rb",
314
339
  "test/rails_app/db/migrate/20100914104236_create_roles.rb",
315
340
  "test/rails_app/db/migrate/20101026185816_create_authors.rb",
316
341
  "test/rails_app/db/migrate/20101026190021_create_books.rb",
317
342
  "test/rails_app/db/migrate/20110101143818_create_addresses.rb",
343
+ "test/rails_app/db/migrate/20110213213050_create_netzke_component_states.rb",
318
344
  "test/rails_app/db/schema.rb",
319
345
  "test/rails_app/db/seeds.rb",
320
346
  "test/rails_app/features/support/paths.rb",
@@ -339,7 +365,6 @@ Gem::Specification.new do |s|
339
365
  ]
340
366
 
341
367
  if s.respond_to? :specification_version then
342
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
343
368
  s.specification_version = 3
344
369
 
345
370
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -13,14 +13,14 @@ describe Netzke::ActiveRecord::Attributes do
13
13
  end
14
14
 
15
15
  it "should return Netzke attributes including an association attribute represented by a virtual method" do
16
- Book.netzke_attributes.map{ |a| a[:name] }.should == %w(id author__name title exemplars digitized notes created_at updated_at tags rating)
16
+ Book.netzke_attributes.map{ |a| a[:name] }.should == %w(id author__name title exemplars digitized notes tags rating created_at updated_at)
17
17
  Book.netzke_attributes.detect{ |a| a[:name] == "author__name" }[:attr_type].should == :string
18
18
  end
19
19
 
20
- it "should be possible to read author name via a book using association attribute" do
20
+ it "should be possible to access author's id via a book using association attribute" do
21
21
  author = Factory(:author)
22
22
  book = Factory(:book, :author => author)
23
- book.value_for_attribute({:name => :author__first_name}).should == "Carlos"
23
+ book.value_for_attribute({:name => :author__first_name}).should == author.id
24
24
  end
25
25
 
26
26
  it "should be possible to assign author's name via a book using association attribute" do
@@ -34,11 +34,11 @@ describe Netzke::ActiveRecord::Attributes do
34
34
  author_carlos = Factory(:author, :first_name => "Carlos")
35
35
  author_herman = Factory(:author, :first_name => "Herman")
36
36
  book = Factory(:book, :author => author_carlos)
37
- book.set_value_for_attribute({:name => :author__first_name}, "Herman")
38
- book.author.should == author_herman
37
+ book.set_value_for_attribute({:name => :author__first_name}, author_herman.id)
38
+ book.author_id.should == author_herman.id
39
39
  end
40
40
 
41
- it "should be possible to change address of a user via association attribute (without specifying :nested_attribute)" do
41
+ it "should be possible to change address of a user (has_one association) via association attribute without specifying :nested_attribute => true" do
42
42
  address = Factory(:address)
43
43
  user = Factory(:user, :address => address)
44
44
  user.set_value_for_attribute({:name => :address__city}, "Hidden Treasures")