netzke-basepack 0.5.14 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. data/.gitignore +3 -2
  2. data/CHANGELOG.rdoc +15 -0
  3. data/README.rdoc +45 -50
  4. data/Rakefile +8 -8
  5. data/TODO.rdoc +1 -6
  6. data/app/components/netzke/basepack/accordion_panel.rb +37 -0
  7. data/app/components/netzke/basepack/basic_app.rb +267 -0
  8. data/{lib/netzke → app/components/netzke/basepack}/basic_app/statusbar_ext.js +0 -0
  9. data/app/components/netzke/basepack/border_layout_panel.rb +39 -0
  10. data/app/components/netzke/basepack/form_panel.rb +102 -0
  11. data/app/components/netzke/basepack/form_panel/fields.rb +206 -0
  12. data/{lib/netzke → app/components/netzke/basepack}/form_panel/javascripts/netzkefileupload.js +0 -0
  13. data/app/components/netzke/basepack/form_panel/javascripts/pre.js +76 -0
  14. data/{lib/netzke → app/components/netzke/basepack}/form_panel/javascripts/xcheckbox.js +0 -0
  15. data/app/components/netzke/basepack/form_panel/services.rb +99 -0
  16. data/app/components/netzke/basepack/grid_panel.rb +374 -0
  17. data/app/components/netzke/basepack/grid_panel/columns.rb +233 -0
  18. data/app/components/netzke/basepack/grid_panel/javascript.rb +69 -0
  19. data/app/components/netzke/basepack/grid_panel/javascripts/advanced_search.js +96 -0
  20. data/{lib/netzke → app/components/netzke/basepack}/grid_panel/javascripts/edit_in_form.js +5 -4
  21. data/{lib/netzke/grid_panel/javascripts/grid_panel_pre.js → app/components/netzke/basepack/grid_panel/javascripts/pre.js} +17 -37
  22. data/{lib/netzke → app/components/netzke/basepack}/grid_panel/javascripts/rows-dd.js +0 -0
  23. data/app/components/netzke/basepack/grid_panel/multi_edit_form.rb +16 -0
  24. data/app/components/netzke/basepack/grid_panel/record_form_window.rb +36 -0
  25. data/app/components/netzke/basepack/grid_panel/search_window.rb +56 -0
  26. data/app/components/netzke/basepack/grid_panel/services.rb +356 -0
  27. data/app/components/netzke/basepack/panel.rb +11 -0
  28. data/app/components/netzke/basepack/search_panel.rb +59 -0
  29. data/app/components/netzke/basepack/tab_panel.rb +32 -0
  30. data/app/components/netzke/basepack/window.rb +73 -0
  31. data/app/components/netzke/basepack/wrapper.rb +28 -0
  32. data/{lib/app → app}/models/netzke_field_list.rb +1 -1
  33. data/{lib/app → app}/models/netzke_model_attr_list.rb +0 -0
  34. data/{lib/app → app}/models/netzke_persistent_array_auto_model.rb +0 -0
  35. data/config/database.yml +35 -0
  36. data/features/accordion_panel.feature +15 -0
  37. data/features/basic_app.feature +12 -0
  38. data/features/form_panel.feature +40 -0
  39. data/features/grid_panel.feature +62 -0
  40. data/features/search_in_grid.feature +35 -0
  41. data/features/simple_panel.feature +15 -0
  42. data/features/step_definitions/accordion_steps.rb +9 -0
  43. data/features/step_definitions/generic_steps.rb +15 -0
  44. data/features/step_definitions/grid_panel_steps.rb +26 -0
  45. data/features/step_definitions/pickle_steps.rb +100 -0
  46. data/features/step_definitions/web_steps.rb +219 -0
  47. data/features/support/env.rb +66 -0
  48. data/features/support/paths.rb +59 -0
  49. data/features/support/pickle.rb +25 -0
  50. data/features/tab_panel.feature +15 -0
  51. data/features/window.feature +11 -0
  52. data/from_05_to_06.rdoc +2 -0
  53. data/javascripts/basepack.js +54 -2
  54. data/lib/netzke-basepack.rb +38 -25
  55. data/lib/netzke/active_record.rb +12 -4
  56. data/lib/netzke/active_record/attributes.rb +60 -5
  57. data/lib/netzke/active_record/combobox_options.rb +3 -2
  58. data/lib/netzke/active_record/relation_extensions.rb +35 -0
  59. data/lib/netzke/basepack.rb +27 -0
  60. data/lib/netzke/basepack/version.rb +11 -0
  61. data/lib/netzke/basepack/wrap_lazy_loaded.rb +26 -0
  62. data/lib/netzke/data_accessor.rb +60 -32
  63. data/lib/netzke/fields_configurator.rb +5 -9
  64. data/lib/netzke/masquerade_selector.rb +1 -1
  65. data/locale/en.yml +16 -0
  66. data/netzke-basepack.gemspec +298 -0
  67. data/spec/active_record/attributes_spec.rb +14 -0
  68. data/spec/active_record/relation_extensions_spec.rb +44 -0
  69. data/spec/components/form_panel_spec.rb +70 -0
  70. data/spec/components/grid_panel_spec.rb +10 -0
  71. data/spec/factories.rb +9 -0
  72. data/spec/spec_helper.rb +35 -0
  73. data/test/rails_app/.gitignore +4 -0
  74. data/test/rails_app/Gemfile +32 -0
  75. data/test/rails_app/Gemfile.lock +171 -0
  76. data/test/rails_app/README +256 -0
  77. data/test/rails_app/Rakefile +7 -0
  78. data/test/rails_app/app/components/generic_user_form.rb +12 -0
  79. data/test/rails_app/app/components/simple_accordion.rb +11 -0
  80. data/test/rails_app/app/components/simple_basic_app.rb +32 -0
  81. data/test/rails_app/app/components/simple_panel.rb +17 -0
  82. data/test/rails_app/app/components/simple_tab_panel.rb +11 -0
  83. data/test/rails_app/app/components/simple_wrapper.rb +7 -0
  84. data/test/rails_app/app/components/some_border_layout.rb +24 -0
  85. data/test/rails_app/app/components/some_search_panel.rb +34 -0
  86. data/test/rails_app/app/components/some_tab_panel.rb +15 -0
  87. data/test/rails_app/app/components/user_form.rb +21 -0
  88. data/test/rails_app/app/components/user_form_with_default_fields.rb +8 -0
  89. data/test/rails_app/app/components/user_grid.rb +4 -0
  90. data/test/rails_app/app/components/window_component_loader.rb +17 -0
  91. data/test/{app_root/app/controllers/application.rb → rails_app/app/controllers/application_controller.rb} +1 -0
  92. data/test/rails_app/app/controllers/components_controller.rb +6 -0
  93. data/test/rails_app/app/controllers/welcome_controller.rb +5 -0
  94. data/test/rails_app/app/helpers/application_helper.rb +2 -0
  95. data/test/{app_root → rails_app}/app/models/role.rb +0 -0
  96. data/test/rails_app/app/models/user.rb +6 -0
  97. data/test/rails_app/app/presenters/forms/generic_user.rb +6 -0
  98. data/test/rails_app/app/views/layouts/application.html.erb +13 -0
  99. data/test/rails_app/config.ru +4 -0
  100. data/test/rails_app/config/application.rb +45 -0
  101. data/test/rails_app/config/boot.rb +13 -0
  102. data/test/rails_app/config/database.yml +35 -0
  103. data/test/rails_app/config/environment.rb +6 -0
  104. data/test/rails_app/config/environments/development.rb +22 -0
  105. data/test/rails_app/config/environments/production.rb +49 -0
  106. data/test/rails_app/config/environments/test.rb +35 -0
  107. data/test/rails_app/config/initializers/backtrace_silencers.rb +8 -0
  108. data/test/rails_app/config/initializers/inflections.rb +10 -0
  109. data/test/rails_app/config/initializers/mime_types.rb +5 -0
  110. data/test/rails_app/config/initializers/netzke.rb +7 -0
  111. data/test/rails_app/config/initializers/secret_token.rb +7 -0
  112. data/test/rails_app/config/initializers/session_store.rb +8 -0
  113. data/test/rails_app/config/locales/es.yml +12 -0
  114. data/test/rails_app/config/routes.rb +65 -0
  115. data/test/rails_app/db/development_structure.sql +39 -0
  116. data/test/{app_root/db/migrate/20081222035855_create_netzke_preferences.rb → rails_app/db/migrate/20100905214933_create_netzke_preferences.rb} +2 -4
  117. data/test/{app_root/db/migrate/20090423222114_create_users.rb → rails_app/db/migrate/20100914104207_create_users.rb} +4 -1
  118. data/test/{app_root/db/migrate/20090423214303_create_roles.rb → rails_app/db/migrate/20100914104236_create_roles.rb} +2 -0
  119. data/test/rails_app/db/schema.rb +38 -0
  120. data/test/rails_app/db/seeds.rb +20 -0
  121. data/test/rails_app/features/support/paths.rb +47 -0
  122. data/test/{app_root/config/environments/in_memory.rb → rails_app/lib/tasks/.gitkeep} +0 -0
  123. data/test/rails_app/public/404.html +26 -0
  124. data/test/rails_app/public/422.html +26 -0
  125. data/test/rails_app/public/500.html +26 -0
  126. data/test/{app_root/config/environments/mysql.rb → rails_app/public/favicon.ico} +0 -0
  127. data/test/rails_app/public/images/header-deco.gif +0 -0
  128. data/test/rails_app/public/images/rails.png +0 -0
  129. data/test/rails_app/public/javascripts/application.js +2 -0
  130. data/test/rails_app/public/javascripts/controls.js +965 -0
  131. data/test/rails_app/public/javascripts/dragdrop.js +974 -0
  132. data/test/rails_app/public/javascripts/effects.js +1123 -0
  133. data/test/rails_app/public/javascripts/prototype.js +6001 -0
  134. data/test/rails_app/public/javascripts/rails.js +175 -0
  135. data/test/rails_app/public/robots.txt +5 -0
  136. data/test/{app_root/config/environments/postgresql.rb → rails_app/public/stylesheets/.gitkeep} +0 -0
  137. data/test/rails_app/script/rails +6 -0
  138. data/test/rails_app/spec/models/role_spec.rb +5 -0
  139. data/test/rails_app/spec/models/user_spec.rb +5 -0
  140. data/test/rails_app/test/performance/browsing_test.rb +9 -0
  141. data/test/rails_app/test/test_helper.rb +13 -0
  142. data/test/{app_root/config/environments/sqlite.rb → rails_app/vendor/plugins/.gitkeep} +0 -0
  143. data/test/unit/accordion_panel_test.rb +3 -3
  144. data/test/unit/active_record_basepack_test.rb +4 -4
  145. data/test/unit/tab_panel_test.rb +4 -4
  146. metadata +199 -119
  147. data/lib/netzke/accordion_panel.rb +0 -115
  148. data/lib/netzke/active_record/data_accessor.rb +0 -25
  149. data/lib/netzke/attributes_configurator.rb +0 -195
  150. data/lib/netzke/basic_app.rb +0 -368
  151. data/lib/netzke/border_layout_panel.rb +0 -130
  152. data/lib/netzke/configuration_panel.rb +0 -24
  153. data/lib/netzke/form_panel.rb +0 -138
  154. data/lib/netzke/form_panel/form_panel_api.rb +0 -81
  155. data/lib/netzke/form_panel/form_panel_fields.rb +0 -149
  156. data/lib/netzke/form_panel/form_panel_js.rb +0 -163
  157. data/lib/netzke/grid_panel.rb +0 -367
  158. data/lib/netzke/grid_panel/grid_panel_api.rb +0 -364
  159. data/lib/netzke/grid_panel/grid_panel_columns.rb +0 -232
  160. data/lib/netzke/grid_panel/grid_panel_js.rb +0 -73
  161. data/lib/netzke/grid_panel/javascripts/advanced_search.js +0 -65
  162. data/lib/netzke/grid_panel/multi_edit_form.rb +0 -14
  163. data/lib/netzke/grid_panel/record_form_window.rb +0 -50
  164. data/lib/netzke/panel.rb +0 -11
  165. data/lib/netzke/plugins/configuration_tool.rb +0 -121
  166. data/lib/netzke/property_editor.rb +0 -111
  167. data/lib/netzke/property_editor/helper_model.rb +0 -122
  168. data/lib/netzke/search_panel.rb +0 -199
  169. data/lib/netzke/tab_panel.rb +0 -174
  170. data/lib/netzke/table_editor.rb +0 -118
  171. data/lib/netzke/tree_panel.rb +0 -25
  172. data/lib/netzke/window.rb +0 -82
  173. data/lib/netzke/wrapper.rb +0 -42
  174. data/test/app_root/app/models/book.rb +0 -9
  175. data/test/app_root/app/models/category.rb +0 -2
  176. data/test/app_root/app/models/city.rb +0 -3
  177. data/test/app_root/app/models/continent.rb +0 -2
  178. data/test/app_root/app/models/country.rb +0 -3
  179. data/test/app_root/app/models/genre.rb +0 -3
  180. data/test/app_root/app/models/user.rb +0 -3
  181. data/test/app_root/config/boot.rb +0 -114
  182. data/test/app_root/config/database.yml +0 -21
  183. data/test/app_root/config/environment.rb +0 -14
  184. data/test/app_root/config/environments/sqlite3.rb +0 -0
  185. data/test/app_root/config/routes.rb +0 -4
  186. data/test/app_root/db/migrate/20081222033343_create_books.rb +0 -15
  187. data/test/app_root/db/migrate/20081222033440_create_genres.rb +0 -15
  188. data/test/app_root/db/migrate/20081223024935_create_categories.rb +0 -13
  189. data/test/app_root/db/migrate/20081223025635_create_countries.rb +0 -14
  190. data/test/app_root/db/migrate/20081223025653_create_continents.rb +0 -13
  191. data/test/app_root/db/migrate/20081223025732_create_cities.rb +0 -15
  192. data/test/app_root/db/migrate/20090102223630_create_netzke_field_lists.rb +0 -18
  193. data/test/app_root/script/console +0 -7
  194. data/test/app_root/vendor/plugins/acts_as_list/README +0 -23
  195. data/test/app_root/vendor/plugins/acts_as_list/init.rb +0 -3
  196. data/test/app_root/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +0 -256
@@ -0,0 +1,175 @@
1
+ (function() {
2
+ // Technique from Juriy Zaytsev
3
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
4
+ function isEventSupported(eventName) {
5
+ var el = document.createElement('div');
6
+ eventName = 'on' + eventName;
7
+ var isSupported = (eventName in el);
8
+ if (!isSupported) {
9
+ el.setAttribute(eventName, 'return;');
10
+ isSupported = typeof el[eventName] == 'function';
11
+ }
12
+ el = null;
13
+ return isSupported;
14
+ }
15
+
16
+ function isForm(element) {
17
+ return Object.isElement(element) && element.nodeName.toUpperCase() == 'FORM'
18
+ }
19
+
20
+ function isInput(element) {
21
+ if (Object.isElement(element)) {
22
+ var name = element.nodeName.toUpperCase()
23
+ return name == 'INPUT' || name == 'SELECT' || name == 'TEXTAREA'
24
+ }
25
+ else return false
26
+ }
27
+
28
+ var submitBubbles = isEventSupported('submit'),
29
+ changeBubbles = isEventSupported('change')
30
+
31
+ if (!submitBubbles || !changeBubbles) {
32
+ // augment the Event.Handler class to observe custom events when needed
33
+ Event.Handler.prototype.initialize = Event.Handler.prototype.initialize.wrap(
34
+ function(init, element, eventName, selector, callback) {
35
+ init(element, eventName, selector, callback)
36
+ // is the handler being attached to an element that doesn't support this event?
37
+ if ( (!submitBubbles && this.eventName == 'submit' && !isForm(this.element)) ||
38
+ (!changeBubbles && this.eventName == 'change' && !isInput(this.element)) ) {
39
+ // "submit" => "emulated:submit"
40
+ this.eventName = 'emulated:' + this.eventName
41
+ }
42
+ }
43
+ )
44
+ }
45
+
46
+ if (!submitBubbles) {
47
+ // discover forms on the page by observing focus events which always bubble
48
+ document.on('focusin', 'form', function(focusEvent, form) {
49
+ // special handler for the real "submit" event (one-time operation)
50
+ if (!form.retrieve('emulated:submit')) {
51
+ form.on('submit', function(submitEvent) {
52
+ var emulated = form.fire('emulated:submit', submitEvent, true)
53
+ // if custom event received preventDefault, cancel the real one too
54
+ if (emulated.returnValue === false) submitEvent.preventDefault()
55
+ })
56
+ form.store('emulated:submit', true)
57
+ }
58
+ })
59
+ }
60
+
61
+ if (!changeBubbles) {
62
+ // discover form inputs on the page
63
+ document.on('focusin', 'input, select, texarea', function(focusEvent, input) {
64
+ // special handler for real "change" events
65
+ if (!input.retrieve('emulated:change')) {
66
+ input.on('change', function(changeEvent) {
67
+ input.fire('emulated:change', changeEvent, true)
68
+ })
69
+ input.store('emulated:change', true)
70
+ }
71
+ })
72
+ }
73
+
74
+ function handleRemote(element) {
75
+ var method, url, params;
76
+
77
+ var event = element.fire("ajax:before");
78
+ if (event.stopped) return false;
79
+
80
+ if (element.tagName.toLowerCase() === 'form') {
81
+ method = element.readAttribute('method') || 'post';
82
+ url = element.readAttribute('action');
83
+ params = element.serialize();
84
+ } else {
85
+ method = element.readAttribute('data-method') || 'get';
86
+ url = element.readAttribute('href');
87
+ params = {};
88
+ }
89
+
90
+ new Ajax.Request(url, {
91
+ method: method,
92
+ parameters: params,
93
+ evalScripts: true,
94
+
95
+ onComplete: function(request) { element.fire("ajax:complete", request); },
96
+ onSuccess: function(request) { element.fire("ajax:success", request); },
97
+ onFailure: function(request) { element.fire("ajax:failure", request); }
98
+ });
99
+
100
+ element.fire("ajax:after");
101
+ }
102
+
103
+ function handleMethod(element) {
104
+ var method = element.readAttribute('data-method'),
105
+ url = element.readAttribute('href'),
106
+ csrf_param = $$('meta[name=csrf-param]')[0],
107
+ csrf_token = $$('meta[name=csrf-token]')[0];
108
+
109
+ var form = new Element('form', { method: "POST", action: url, style: "display: none;" });
110
+ element.parentNode.insert(form);
111
+
112
+ if (method !== 'post') {
113
+ var field = new Element('input', { type: 'hidden', name: '_method', value: method });
114
+ form.insert(field);
115
+ }
116
+
117
+ if (csrf_param) {
118
+ var param = csrf_param.readAttribute('content'),
119
+ token = csrf_token.readAttribute('content'),
120
+ field = new Element('input', { type: 'hidden', name: param, value: token });
121
+ form.insert(field);
122
+ }
123
+
124
+ form.submit();
125
+ }
126
+
127
+
128
+ document.on("click", "*[data-confirm]", function(event, element) {
129
+ var message = element.readAttribute('data-confirm');
130
+ if (!confirm(message)) event.stop();
131
+ });
132
+
133
+ document.on("click", "a[data-remote]", function(event, element) {
134
+ if (event.stopped) return;
135
+ handleRemote(element);
136
+ event.stop();
137
+ });
138
+
139
+ document.on("click", "a[data-method]", function(event, element) {
140
+ if (event.stopped) return;
141
+ handleMethod(element);
142
+ event.stop();
143
+ });
144
+
145
+ document.on("submit", function(event) {
146
+ var element = event.findElement(),
147
+ message = element.readAttribute('data-confirm');
148
+ if (message && !confirm(message)) {
149
+ event.stop();
150
+ return false;
151
+ }
152
+
153
+ var inputs = element.select("input[type=submit][data-disable-with]");
154
+ inputs.each(function(input) {
155
+ input.disabled = true;
156
+ input.writeAttribute('data-original-value', input.value);
157
+ input.value = input.readAttribute('data-disable-with');
158
+ });
159
+
160
+ var element = event.findElement("form[data-remote]");
161
+ if (element) {
162
+ handleRemote(element);
163
+ event.stop();
164
+ }
165
+ });
166
+
167
+ document.on("ajax:after", "form", function(event, element) {
168
+ var inputs = element.select("input[type=submit][disabled=true][data-disable-with]");
169
+ inputs.each(function(input) {
170
+ input.value = input.readAttribute('data-original-value');
171
+ input.removeAttribute('data-original-value');
172
+ input.disabled = false;
173
+ });
174
+ });
175
+ })();
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Role do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe User do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+ require 'rails/performance_test_help'
3
+
4
+ # Profiling results for each test method are written to tmp/performance.
5
+ class BrowsingTest < ActionDispatch::PerformanceTest
6
+ def test_homepage
7
+ get '/'
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
7
+ #
8
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
9
+ # -- they do not yet inherit this setting
10
+ fixtures :all
11
+
12
+ # Add more helper methods to be used by all tests here...
13
+ end
@@ -11,9 +11,9 @@ class AccordionPanelTest < ActiveSupport::TestCase
11
11
  :class_name => "Panel", :name => "second_panel", :active => true
12
12
  }])
13
13
 
14
- assert_equal(2, accordion.initial_aggregatees.keys.size)
15
- assert_equal("item0", accordion.aggregatees[:item0][:name])
16
- assert_equal("second_panel", accordion.aggregatees[:second_panel][:name])
14
+ assert_equal(2, accordion.initial_components.keys.size)
15
+ assert_equal("item0", accordion.components[:item0][:name])
16
+ assert_equal("second_panel", accordion.components[:second_panel][:name])
17
17
  assert_equal("Panel", accordion.js_config[:second_panel_config][:scoped_class_name])
18
18
  end
19
19
 
@@ -26,19 +26,19 @@ class ActiveRecordBasepackTest < ActiveSupport::TestCase
26
26
  # end
27
27
 
28
28
  test "choices for column" do
29
- cities = City.options_for("name")
29
+ cities = City.netzke_combo_options_for("name")
30
30
  assert_equal(3, cities.size)
31
31
  assert(cities.include?('Cordoba') && cities.include?('Buenos Aires'))
32
32
 
33
- countries = City.options_for("country__name")
33
+ countries = City.netzke_combo_options_for("country__name")
34
34
  assert_equal(2, countries.size)
35
35
  assert(countries.include?('Spain') && countries.include?('Argentina'))
36
36
 
37
- continents = City.options_for("country__continent__name")
37
+ continents = City.netzke_combo_options_for("country__continent__name")
38
38
  assert_equal(2, continents.size)
39
39
  assert(continents.include?('Europe') && continents.include?('South America'))
40
40
 
41
- cities = City.options_for("name", "Co")
41
+ cities = City.netzke_combo_options_for("name", "Co")
42
42
  assert_equal(2, cities.size)
43
43
  assert(cities.include?('Cordoba') && cities.include?('Concordia'))
44
44
  end
@@ -11,10 +11,10 @@ class TabPanelTest < ActiveSupport::TestCase
11
11
  :class_name => "Panel", :name => "second_panel", :active => true
12
12
  }])
13
13
 
14
- assert_equal(2, tab_panel.initial_aggregatees.keys.size)
15
- assert_equal("item0", tab_panel.aggregatees[:item0][:name])
16
- assert_equal("second_panel", tab_panel.aggregatees[:second_panel][:name])
17
- assert(tab_panel.aggregatees[:second_panel][:active])
14
+ assert_equal(2, tab_panel.initial_components.keys.size)
15
+ assert_equal("item0", tab_panel.components[:item0][:name])
16
+ assert_equal("second_panel", tab_panel.components[:second_panel][:name])
17
+ assert(tab_panel.components[:second_panel][:active])
18
18
  assert_equal("Panel", tab_panel.js_config[:second_panel_config][:scoped_class_name])
19
19
  end
20
20
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 5
8
- - 14
9
- version: 0.5.14
7
+ - 6
8
+ - 0
9
+ version: 0.6.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sergei Kozlov
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-08 00:00:00 +02:00
17
+ date: 2010-10-24 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -23,17 +23,17 @@ dependencies:
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ">="
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  segments:
29
29
  - 0
30
- - 5
31
- - 5
32
- version: 0.5.5
30
+ - 6
31
+ - 0
32
+ version: 0.6.0
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
35
  - !ruby/object:Gem::Dependency
36
- name: searchlogic
36
+ name: meta_where
37
37
  prerelease: false
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
@@ -41,10 +41,10 @@ dependencies:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  segments:
44
- - 2
45
44
  - 0
46
- - 0
47
- version: 2.0.0
45
+ - 9
46
+ - 3
47
+ version: 0.9.3
48
48
  type: :runtime
49
49
  version_requirements: *id002
50
50
  - !ruby/object:Gem::Dependency
@@ -53,13 +53,13 @@ dependencies:
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
56
- - - ">="
56
+ - - ~>
57
57
  - !ruby/object:Gem::Version
58
58
  segments:
59
- - 2
60
- - 0
59
+ - 3
61
60
  - 0
62
- version: 2.0.0
61
+ - pre2
62
+ version: 3.0.pre2
63
63
  type: :runtime
64
64
  version_requirements: *id003
65
65
  - !ruby/object:Gem::Dependency
@@ -72,12 +72,10 @@ dependencies:
72
72
  - !ruby/object:Gem::Version
73
73
  segments:
74
74
  - 0
75
- - 1
76
- - 2
77
- version: 0.1.2
75
+ version: "0"
78
76
  type: :runtime
79
77
  version_requirements: *id004
80
- description: A set of full-featured extendible Netzke widgets (such as FormPanel, GridPanel, Window, BorderLayoutPanel, etc) which can be used as building block for your RIA
78
+ description: 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
81
79
  email: sergei@playcode.nl
82
80
  executables: []
83
81
 
@@ -94,93 +92,84 @@ files:
94
92
  - README.rdoc
95
93
  - Rakefile
96
94
  - TODO.rdoc
95
+ - app/components/netzke/basepack/accordion_panel.rb
96
+ - app/components/netzke/basepack/basic_app.rb
97
+ - app/components/netzke/basepack/basic_app/statusbar_ext.js
98
+ - app/components/netzke/basepack/border_layout_panel.rb
99
+ - app/components/netzke/basepack/form_panel.rb
100
+ - app/components/netzke/basepack/form_panel/fields.rb
101
+ - app/components/netzke/basepack/form_panel/javascripts/netzkefileupload.js
102
+ - app/components/netzke/basepack/form_panel/javascripts/pre.js
103
+ - app/components/netzke/basepack/form_panel/javascripts/xcheckbox.js
104
+ - app/components/netzke/basepack/form_panel/services.rb
105
+ - app/components/netzke/basepack/grid_panel.rb
106
+ - app/components/netzke/basepack/grid_panel/columns.rb
107
+ - app/components/netzke/basepack/grid_panel/javascript.rb
108
+ - app/components/netzke/basepack/grid_panel/javascripts/advanced_search.js
109
+ - app/components/netzke/basepack/grid_panel/javascripts/edit_in_form.js
110
+ - app/components/netzke/basepack/grid_panel/javascripts/pre.js
111
+ - app/components/netzke/basepack/grid_panel/javascripts/rows-dd.js
112
+ - app/components/netzke/basepack/grid_panel/multi_edit_form.rb
113
+ - app/components/netzke/basepack/grid_panel/record_form_window.rb
114
+ - app/components/netzke/basepack/grid_panel/search_window.rb
115
+ - app/components/netzke/basepack/grid_panel/services.rb
116
+ - app/components/netzke/basepack/panel.rb
117
+ - app/components/netzke/basepack/search_panel.rb
118
+ - app/components/netzke/basepack/tab_panel.rb
119
+ - app/components/netzke/basepack/window.rb
120
+ - app/components/netzke/basepack/wrapper.rb
121
+ - app/models/netzke_field_list.rb
122
+ - app/models/netzke_model_attr_list.rb
123
+ - app/models/netzke_persistent_array_auto_model.rb
97
124
  - autotest/discover.rb
125
+ - config/database.yml
126
+ - features/accordion_panel.feature
127
+ - features/basic_app.feature
128
+ - features/form_panel.feature
129
+ - features/grid_panel.feature
130
+ - features/search_in_grid.feature
131
+ - features/simple_panel.feature
132
+ - features/step_definitions/accordion_steps.rb
133
+ - features/step_definitions/generic_steps.rb
134
+ - features/step_definitions/grid_panel_steps.rb
135
+ - features/step_definitions/pickle_steps.rb
136
+ - features/step_definitions/web_steps.rb
137
+ - features/support/env.rb
138
+ - features/support/paths.rb
139
+ - features/support/pickle.rb
140
+ - features/tab_panel.feature
141
+ - features/window.feature
142
+ - from_05_to_06.rdoc
98
143
  - generators/netzke_basepack/netzke_basepack_generator.rb
99
144
  - generators/netzke_basepack/templates/create_netzke_field_lists.rb
100
145
  - generators/netzke_basepack/templates/public_assets/ts-checkbox.gif
101
146
  - init.rb
102
147
  - install.rb
103
148
  - javascripts/basepack.js
104
- - lib/app/models/netzke_field_list.rb
105
- - lib/app/models/netzke_model_attr_list.rb
106
- - lib/app/models/netzke_persistent_array_auto_model.rb
107
149
  - lib/netzke-basepack.rb
108
- - lib/netzke/accordion_panel.rb
109
150
  - lib/netzke/active_record.rb
110
151
  - lib/netzke/active_record/association_attributes.rb
111
152
  - lib/netzke/active_record/attributes.rb
112
153
  - lib/netzke/active_record/combobox_options.rb
113
- - lib/netzke/active_record/data_accessor.rb
114
- - lib/netzke/attributes_configurator.rb
115
- - lib/netzke/basic_app.rb
116
- - lib/netzke/basic_app/statusbar_ext.js
117
- - lib/netzke/border_layout_panel.rb
118
- - lib/netzke/configuration_panel.rb
154
+ - lib/netzke/active_record/relation_extensions.rb
155
+ - lib/netzke/basepack.rb
156
+ - lib/netzke/basepack/version.rb
157
+ - lib/netzke/basepack/wrap_lazy_loaded.rb
119
158
  - lib/netzke/data_accessor.rb
120
159
  - lib/netzke/ext.rb
121
160
  - lib/netzke/fields_configurator.rb
122
- - lib/netzke/form_panel.rb
123
- - lib/netzke/form_panel/form_panel_api.rb
124
- - lib/netzke/form_panel/form_panel_fields.rb
125
- - lib/netzke/form_panel/form_panel_js.rb
126
- - lib/netzke/form_panel/javascripts/netzkefileupload.js
127
- - lib/netzke/form_panel/javascripts/xcheckbox.js
128
- - lib/netzke/grid_panel.rb
129
- - lib/netzke/grid_panel/grid_panel_api.rb
130
- - lib/netzke/grid_panel/grid_panel_columns.rb
131
- - lib/netzke/grid_panel/grid_panel_js.rb
132
- - lib/netzke/grid_panel/javascripts/advanced_search.js
133
- - lib/netzke/grid_panel/javascripts/edit_in_form.js
134
- - lib/netzke/grid_panel/javascripts/grid_panel_pre.js
135
- - lib/netzke/grid_panel/javascripts/rows-dd.js
136
- - lib/netzke/grid_panel/multi_edit_form.rb
137
- - lib/netzke/grid_panel/record_form_window.rb
138
161
  - lib/netzke/json_array_editor.rb
139
162
  - lib/netzke/masquerade_selector.rb
140
- - lib/netzke/panel.rb
141
- - lib/netzke/plugins/configuration_tool.rb
142
- - lib/netzke/property_editor.rb
143
- - lib/netzke/property_editor/helper_model.rb
144
- - lib/netzke/search_panel.rb
145
- - lib/netzke/tab_panel.rb
146
- - lib/netzke/table_editor.rb
147
- - lib/netzke/tree_panel.rb
148
- - lib/netzke/window.rb
149
- - lib/netzke/wrapper.rb
150
163
  - lib/tasks/netzke_basepack_tasks.rake
164
+ - locale/en.yml
165
+ - netzke-basepack.gemspec
166
+ - spec/active_record/attributes_spec.rb
167
+ - spec/active_record/relation_extensions_spec.rb
168
+ - spec/components/form_panel_spec.rb
169
+ - spec/components/grid_panel_spec.rb
170
+ - spec/factories.rb
171
+ - spec/spec_helper.rb
151
172
  - stylesheets/basepack.css
152
- - test/app_root/app/controllers/application.rb
153
- - test/app_root/app/models/book.rb
154
- - test/app_root/app/models/category.rb
155
- - test/app_root/app/models/city.rb
156
- - test/app_root/app/models/continent.rb
157
- - test/app_root/app/models/country.rb
158
- - test/app_root/app/models/genre.rb
159
- - test/app_root/app/models/role.rb
160
- - test/app_root/app/models/user.rb
161
- - test/app_root/config/boot.rb
162
- - test/app_root/config/database.yml
163
- - test/app_root/config/environment.rb
164
- - test/app_root/config/environments/in_memory.rb
165
- - test/app_root/config/environments/mysql.rb
166
- - test/app_root/config/environments/postgresql.rb
167
- - test/app_root/config/environments/sqlite.rb
168
- - test/app_root/config/environments/sqlite3.rb
169
- - test/app_root/config/routes.rb
170
- - test/app_root/db/migrate/20081222033343_create_books.rb
171
- - test/app_root/db/migrate/20081222033440_create_genres.rb
172
- - test/app_root/db/migrate/20081222035855_create_netzke_preferences.rb
173
- - test/app_root/db/migrate/20081223024935_create_categories.rb
174
- - test/app_root/db/migrate/20081223025635_create_countries.rb
175
- - test/app_root/db/migrate/20081223025653_create_continents.rb
176
- - test/app_root/db/migrate/20081223025732_create_cities.rb
177
- - test/app_root/db/migrate/20090102223630_create_netzke_field_lists.rb
178
- - test/app_root/db/migrate/20090423214303_create_roles.rb
179
- - test/app_root/db/migrate/20090423222114_create_users.rb
180
- - test/app_root/script/console
181
- - test/app_root/vendor/plugins/acts_as_list/README
182
- - test/app_root/vendor/plugins/acts_as_list/init.rb
183
- - test/app_root/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb
184
173
  - test/console_with_fixtures.rb
185
174
  - test/fixtures/books.yml
186
175
  - test/fixtures/categories.yml
@@ -190,6 +179,77 @@ files:
190
179
  - test/fixtures/genres.yml
191
180
  - test/fixtures/roles.yml
192
181
  - test/fixtures/users.yml
182
+ - test/rails_app/.gitignore
183
+ - test/rails_app/Gemfile
184
+ - test/rails_app/Gemfile.lock
185
+ - test/rails_app/README
186
+ - test/rails_app/Rakefile
187
+ - test/rails_app/app/components/generic_user_form.rb
188
+ - test/rails_app/app/components/simple_accordion.rb
189
+ - test/rails_app/app/components/simple_basic_app.rb
190
+ - test/rails_app/app/components/simple_panel.rb
191
+ - test/rails_app/app/components/simple_tab_panel.rb
192
+ - test/rails_app/app/components/simple_wrapper.rb
193
+ - test/rails_app/app/components/some_border_layout.rb
194
+ - test/rails_app/app/components/some_search_panel.rb
195
+ - test/rails_app/app/components/some_tab_panel.rb
196
+ - test/rails_app/app/components/user_form.rb
197
+ - test/rails_app/app/components/user_form_with_default_fields.rb
198
+ - test/rails_app/app/components/user_grid.rb
199
+ - test/rails_app/app/components/window_component_loader.rb
200
+ - test/rails_app/app/controllers/application_controller.rb
201
+ - test/rails_app/app/controllers/components_controller.rb
202
+ - test/rails_app/app/controllers/welcome_controller.rb
203
+ - test/rails_app/app/helpers/application_helper.rb
204
+ - test/rails_app/app/models/role.rb
205
+ - test/rails_app/app/models/user.rb
206
+ - test/rails_app/app/presenters/forms/generic_user.rb
207
+ - test/rails_app/app/views/layouts/application.html.erb
208
+ - test/rails_app/config.ru
209
+ - test/rails_app/config/application.rb
210
+ - test/rails_app/config/boot.rb
211
+ - test/rails_app/config/database.yml
212
+ - test/rails_app/config/environment.rb
213
+ - test/rails_app/config/environments/development.rb
214
+ - test/rails_app/config/environments/production.rb
215
+ - test/rails_app/config/environments/test.rb
216
+ - test/rails_app/config/initializers/backtrace_silencers.rb
217
+ - test/rails_app/config/initializers/inflections.rb
218
+ - test/rails_app/config/initializers/mime_types.rb
219
+ - test/rails_app/config/initializers/netzke.rb
220
+ - test/rails_app/config/initializers/secret_token.rb
221
+ - test/rails_app/config/initializers/session_store.rb
222
+ - test/rails_app/config/locales/es.yml
223
+ - test/rails_app/config/routes.rb
224
+ - test/rails_app/db/development_structure.sql
225
+ - test/rails_app/db/migrate/20100905214933_create_netzke_preferences.rb
226
+ - test/rails_app/db/migrate/20100914104207_create_users.rb
227
+ - test/rails_app/db/migrate/20100914104236_create_roles.rb
228
+ - test/rails_app/db/schema.rb
229
+ - test/rails_app/db/seeds.rb
230
+ - test/rails_app/features/support/paths.rb
231
+ - test/rails_app/lib/tasks/.gitkeep
232
+ - test/rails_app/public/404.html
233
+ - test/rails_app/public/422.html
234
+ - test/rails_app/public/500.html
235
+ - test/rails_app/public/favicon.ico
236
+ - test/rails_app/public/images/header-deco.gif
237
+ - test/rails_app/public/images/rails.png
238
+ - test/rails_app/public/javascripts/application.js
239
+ - test/rails_app/public/javascripts/controls.js
240
+ - test/rails_app/public/javascripts/dragdrop.js
241
+ - test/rails_app/public/javascripts/effects.js
242
+ - test/rails_app/public/javascripts/prototype.js
243
+ - test/rails_app/public/javascripts/rails.js
244
+ - test/rails_app/public/robots.txt
245
+ - test/rails_app/public/stylesheets/.gitkeep
246
+ - test/rails_app/script/rails
247
+ - test/rails_app/spec/models/role_spec.rb
248
+ - test/rails_app/spec/models/user_spec.rb
249
+ - test/rails_app/test/performance/browsing_test.rb
250
+ - test/rails_app/test/test_helper.rb
251
+ - test/rails_app/tmp/restart.txt
252
+ - test/rails_app/vendor/plugins/.gitkeep
193
253
  - test/schema.rb
194
254
  - test/test_helper.rb
195
255
  - test/unit/accordion_panel_test.rb
@@ -228,42 +288,62 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
288
  version: "0"
229
289
  requirements: []
230
290
 
231
- rubyforge_project: netzke-basepack
291
+ rubyforge_project:
232
292
  rubygems_version: 1.3.7
233
293
  signing_key:
234
294
  specification_version: 3
235
- summary: Pre-built Rails + ExtJS widgets for your RIA
295
+ summary: Pre-built Rails + ExtJS components for your RIA
236
296
  test_files:
237
- - test/app_root/app/controllers/application.rb
238
- - test/app_root/app/models/book.rb
239
- - test/app_root/app/models/category.rb
240
- - test/app_root/app/models/city.rb
241
- - test/app_root/app/models/continent.rb
242
- - test/app_root/app/models/country.rb
243
- - test/app_root/app/models/genre.rb
244
- - test/app_root/app/models/role.rb
245
- - test/app_root/app/models/user.rb
246
- - test/app_root/config/boot.rb
247
- - test/app_root/config/environment.rb
248
- - test/app_root/config/environments/in_memory.rb
249
- - test/app_root/config/environments/mysql.rb
250
- - test/app_root/config/environments/postgresql.rb
251
- - test/app_root/config/environments/sqlite.rb
252
- - test/app_root/config/environments/sqlite3.rb
253
- - test/app_root/config/routes.rb
254
- - test/app_root/db/migrate/20081222033343_create_books.rb
255
- - test/app_root/db/migrate/20081222033440_create_genres.rb
256
- - test/app_root/db/migrate/20081222035855_create_netzke_preferences.rb
257
- - test/app_root/db/migrate/20081223024935_create_categories.rb
258
- - test/app_root/db/migrate/20081223025635_create_countries.rb
259
- - test/app_root/db/migrate/20081223025653_create_continents.rb
260
- - test/app_root/db/migrate/20081223025732_create_cities.rb
261
- - test/app_root/db/migrate/20090102223630_create_netzke_field_lists.rb
262
- - test/app_root/db/migrate/20090423214303_create_roles.rb
263
- - test/app_root/db/migrate/20090423222114_create_users.rb
264
- - test/app_root/vendor/plugins/acts_as_list/init.rb
265
- - test/app_root/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb
297
+ - spec/active_record/attributes_spec.rb
298
+ - spec/active_record/relation_extensions_spec.rb
299
+ - spec/components/form_panel_spec.rb
300
+ - spec/components/grid_panel_spec.rb
301
+ - spec/factories.rb
302
+ - spec/spec_helper.rb
266
303
  - test/console_with_fixtures.rb
304
+ - test/rails_app/app/components/generic_user_form.rb
305
+ - test/rails_app/app/components/simple_accordion.rb
306
+ - test/rails_app/app/components/simple_basic_app.rb
307
+ - test/rails_app/app/components/simple_panel.rb
308
+ - test/rails_app/app/components/simple_tab_panel.rb
309
+ - test/rails_app/app/components/simple_wrapper.rb
310
+ - test/rails_app/app/components/some_border_layout.rb
311
+ - test/rails_app/app/components/some_search_panel.rb
312
+ - test/rails_app/app/components/some_tab_panel.rb
313
+ - test/rails_app/app/components/user_form.rb
314
+ - test/rails_app/app/components/user_form_with_default_fields.rb
315
+ - test/rails_app/app/components/user_grid.rb
316
+ - test/rails_app/app/components/window_component_loader.rb
317
+ - test/rails_app/app/controllers/application_controller.rb
318
+ - test/rails_app/app/controllers/components_controller.rb
319
+ - test/rails_app/app/controllers/welcome_controller.rb
320
+ - test/rails_app/app/helpers/application_helper.rb
321
+ - test/rails_app/app/models/role.rb
322
+ - test/rails_app/app/models/user.rb
323
+ - test/rails_app/app/presenters/forms/generic_user.rb
324
+ - test/rails_app/config/application.rb
325
+ - test/rails_app/config/boot.rb
326
+ - test/rails_app/config/environment.rb
327
+ - test/rails_app/config/environments/development.rb
328
+ - test/rails_app/config/environments/production.rb
329
+ - test/rails_app/config/environments/test.rb
330
+ - test/rails_app/config/initializers/backtrace_silencers.rb
331
+ - test/rails_app/config/initializers/inflections.rb
332
+ - test/rails_app/config/initializers/mime_types.rb
333
+ - test/rails_app/config/initializers/netzke.rb
334
+ - test/rails_app/config/initializers/secret_token.rb
335
+ - test/rails_app/config/initializers/session_store.rb
336
+ - test/rails_app/config/routes.rb
337
+ - test/rails_app/db/migrate/20100905214933_create_netzke_preferences.rb
338
+ - test/rails_app/db/migrate/20100914104207_create_users.rb
339
+ - test/rails_app/db/migrate/20100914104236_create_roles.rb
340
+ - test/rails_app/db/schema.rb
341
+ - test/rails_app/db/seeds.rb
342
+ - test/rails_app/features/support/paths.rb
343
+ - test/rails_app/spec/models/role_spec.rb
344
+ - test/rails_app/spec/models/user_spec.rb
345
+ - test/rails_app/test/performance/browsing_test.rb
346
+ - test/rails_app/test/test_helper.rb
267
347
  - test/schema.rb
268
348
  - test/test_helper.rb
269
349
  - test/unit/accordion_panel_test.rb