netzke-core 0.6.7 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +36 -1
- data/{README.markdown → README.md} +17 -15
- data/Rakefile +1 -1
- data/TODO +4 -4
- data/app/controllers/netzke_controller.rb +8 -3
- data/javascripts/base.js +71 -68
- data/javascripts/ext.js +182 -111
- data/lib/netzke/actions.rb +2 -1
- data/lib/netzke/base.rb +5 -1
- data/lib/netzke/composition.rb +2 -2
- data/lib/netzke/configuration.rb +1 -1
- data/lib/netzke/core/dynamic_assets.rb +7 -7
- data/lib/netzke/core/session.rb +4 -0
- data/lib/netzke/core/version.rb +2 -2
- data/lib/netzke/core.rb +23 -30
- data/lib/netzke/core_ext/symbol.rb +1 -1
- data/lib/netzke/embedding.rb +1 -1
- data/lib/netzke/ext_component.rb +2 -2
- data/lib/netzke/javascript.rb +70 -39
- data/lib/netzke/plugin.rb +15 -0
- data/lib/netzke/plugins.rb +29 -0
- data/lib/netzke/railz/action_view_ext/ext.rb +13 -16
- data/lib/netzke/railz/action_view_ext/touch.rb +3 -3
- data/lib/netzke/railz/action_view_ext.rb +0 -3
- data/lib/netzke/railz/engine.rb +34 -29
- data/lib/netzke/services.rb +1 -1
- data/lib/netzke/state.rb +2 -2
- data/lib/netzke-core.rb +1 -0
- data/netzke-core.gemspec +108 -9
- data/stylesheets/core.css +25 -5
- data/test/rails_app/Gemfile +1 -1
- data/test/rails_app/Gemfile.lock +37 -36
- data/test/rails_app/app/components/component_loader.rb +36 -24
- data/test/rails_app/app/components/component_with_js_mixin/javascripts/component_with_js_mixin.js +5 -0
- data/test/rails_app/app/components/component_with_js_mixin.rb +3 -1
- data/test/rails_app/app/components/component_with_nested_through.rb +28 -0
- data/test/rails_app/app/components/component_with_session_persistence.rb +7 -5
- data/test/rails_app/app/components/dynamic_tab_panel/javascripts/dynamic_tab_panel.js +9 -0
- data/test/rails_app/app/components/dynamic_tab_panel.rb +19 -0
- data/test/rails_app/app/components/extended_server_caller.rb +6 -5
- data/test/rails_app/app/components/loader_of_component_with_custom_css.rb +7 -8
- data/test/rails_app/app/components/localized_panel.rb +10 -1
- data/test/rails_app/app/components/nested_component.rb +18 -0
- data/test/rails_app/app/components/panel_with_plugin.rb +4 -0
- data/test/rails_app/app/components/panel_with_tools.rb +19 -0
- data/test/rails_app/app/components/plugin_with_components.rb +14 -0
- data/test/rails_app/app/components/server_caller.rb +1 -1
- data/test/rails_app/app/components/server_counter.rb +1 -1
- data/test/rails_app/app/components/simple_component.rb +2 -0
- data/test/rails_app/app/components/simple_tab_panel.rb +21 -21
- data/test/rails_app/app/components/simple_window.rb +1 -1
- data/test/rails_app/app/components/some_composite.rb +3 -2
- data/test/rails_app/app/components/some_plugin.rb +39 -0
- data/test/rails_app/app/controllers/application_controller.rb +1 -1
- data/test/rails_app/app/controllers/components_controller.rb +1 -1
- data/test/rails_app/app/views/layouts/touch.html.erb +1 -1
- data/test/rails_app/config/application.rb +0 -2
- data/test/rails_app/config/initializers/netzke.rb +2 -1
- data/test/rails_app/config/locales/es.yml +1 -0
- data/test/rails_app/features/{actions.feature → actions_and_tools.feature} +8 -0
- data/test/rails_app/features/client-server.feature +0 -1
- data/test/rails_app/features/complex_component.feature +1 -1
- data/test/rails_app/features/component_loader.feature +7 -0
- data/test/rails_app/features/composition.feature +2 -2
- data/test/rails_app/features/custom_css.feature +1 -1
- data/test/rails_app/features/i18n.feature +3 -0
- data/test/rails_app/features/js_include.feature +2 -0
- data/test/rails_app/features/nested_views.feature +5 -4
- data/test/rails_app/features/plugin.feature +16 -0
- data/test/rails_app/features/step_definitions/generic_steps.rb +21 -2
- data/test/rails_app/features/touch.feature +10 -10
- data/test/rails_app/spec/component/component_spec.rb +20 -0
- metadata +106 -10
- data/app/models/netzke_preference.rb +0 -170
data/netzke-core.gemspec
CHANGED
@@ -5,16 +5,16 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{netzke-core}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.7.0"
|
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-08-
|
12
|
+
s.date = %q{2011-08-09}
|
13
13
|
s.description = %q{Allows building ExtJS/Rails reusable code in a DRY way}
|
14
14
|
s.email = %q{sergei@playcode.nl}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
"README.
|
17
|
+
"README.md",
|
18
18
|
"TODO"
|
19
19
|
]
|
20
20
|
s.files = [
|
@@ -22,11 +22,10 @@ Gem::Specification.new do |s|
|
|
22
22
|
"CHANGELOG.rdoc",
|
23
23
|
"LICENSE",
|
24
24
|
"Manifest",
|
25
|
-
"README.
|
25
|
+
"README.md",
|
26
26
|
"Rakefile",
|
27
27
|
"TODO",
|
28
28
|
"app/controllers/netzke_controller.rb",
|
29
|
-
"app/models/netzke_preference.rb",
|
30
29
|
"config/database.yml",
|
31
30
|
"init.rb",
|
32
31
|
"install.rb",
|
@@ -56,6 +55,8 @@ Gem::Specification.new do |s|
|
|
56
55
|
"lib/netzke/inheritance.rb",
|
57
56
|
"lib/netzke/javascript.rb",
|
58
57
|
"lib/netzke/javascript/scopes.rb",
|
58
|
+
"lib/netzke/plugin.rb",
|
59
|
+
"lib/netzke/plugins.rb",
|
59
60
|
"lib/netzke/railz.rb",
|
60
61
|
"lib/netzke/railz/action_view_ext.rb",
|
61
62
|
"lib/netzke/railz/action_view_ext/ext.rb",
|
@@ -84,12 +85,16 @@ Gem::Specification.new do |s|
|
|
84
85
|
"test/rails_app/app/components/component_with_custom_css/stylesheets/custom.css",
|
85
86
|
"test/rails_app/app/components/component_with_included_js.rb",
|
86
87
|
"test/rails_app/app/components/component_with_js_mixin.rb",
|
88
|
+
"test/rails_app/app/components/component_with_js_mixin/javascripts/component_with_js_mixin.js",
|
87
89
|
"test/rails_app/app/components/component_with_js_mixin/javascripts/extra_one.js",
|
88
90
|
"test/rails_app/app/components/component_with_js_mixin/javascripts/extra_two.js",
|
89
91
|
"test/rails_app/app/components/component_with_js_mixin/javascripts/method_set_one.js",
|
90
92
|
"test/rails_app/app/components/component_with_js_mixin/javascripts/method_set_two.js",
|
93
|
+
"test/rails_app/app/components/component_with_nested_through.rb",
|
91
94
|
"test/rails_app/app/components/component_with_session_persistence.rb",
|
92
95
|
"test/rails_app/app/components/deprecated/server_caller.rb",
|
96
|
+
"test/rails_app/app/components/dynamic_tab_panel.rb",
|
97
|
+
"test/rails_app/app/components/dynamic_tab_panel/javascripts/dynamic_tab_panel.js",
|
93
98
|
"test/rails_app/app/components/ext_direct/composite.rb",
|
94
99
|
"test/rails_app/app/components/ext_direct/details.rb",
|
95
100
|
"test/rails_app/app/components/ext_direct/selector.rb",
|
@@ -106,6 +111,10 @@ Gem::Specification.new do |s|
|
|
106
111
|
"test/rails_app/app/components/kinda_complex_component/extra_stuff.rb",
|
107
112
|
"test/rails_app/app/components/loader_of_component_with_custom_css.rb",
|
108
113
|
"test/rails_app/app/components/localized_panel.rb",
|
114
|
+
"test/rails_app/app/components/nested_component.rb",
|
115
|
+
"test/rails_app/app/components/panel_with_plugin.rb",
|
116
|
+
"test/rails_app/app/components/panel_with_tools.rb",
|
117
|
+
"test/rails_app/app/components/plugin_with_components.rb",
|
109
118
|
"test/rails_app/app/components/scoped_components/deep_scoped_components/some_deep_scoped_component.rb",
|
110
119
|
"test/rails_app/app/components/scoped_components/extended_scoped_component.rb",
|
111
120
|
"test/rails_app/app/components/scoped_components/some_scoped_component.rb",
|
@@ -117,6 +126,7 @@ Gem::Specification.new do |s|
|
|
117
126
|
"test/rails_app/app/components/simple_window.rb",
|
118
127
|
"test/rails_app/app/components/some_composite.rb",
|
119
128
|
"test/rails_app/app/components/some_ext_component.rb",
|
129
|
+
"test/rails_app/app/components/some_plugin.rb",
|
120
130
|
"test/rails_app/app/components/touch/hello_world_component.rb",
|
121
131
|
"test/rails_app/app/components/touch/server_caller.rb",
|
122
132
|
"test/rails_app/app/components/touch/simple_carousel.rb",
|
@@ -154,7 +164,7 @@ Gem::Specification.new do |s|
|
|
154
164
|
"test/rails_app/db/migrate/20110110132720_create_netzke_component_states.rb",
|
155
165
|
"test/rails_app/db/schema.rb",
|
156
166
|
"test/rails_app/db/seeds.rb",
|
157
|
-
"test/rails_app/features/
|
167
|
+
"test/rails_app/features/actions_and_tools.feature",
|
158
168
|
"test/rails_app/features/basic.feature",
|
159
169
|
"test/rails_app/features/client-server.feature",
|
160
170
|
"test/rails_app/features/complex_component.feature",
|
@@ -169,6 +179,7 @@ Gem::Specification.new do |s|
|
|
169
179
|
"test/rails_app/features/js_include.feature",
|
170
180
|
"test/rails_app/features/nested_views.feature",
|
171
181
|
"test/rails_app/features/persistence.feature",
|
182
|
+
"test/rails_app/features/plugin.feature",
|
172
183
|
"test/rails_app/features/scopes.feature",
|
173
184
|
"test/rails_app/features/step_definitions/custom_css_steps.rb",
|
174
185
|
"test/rails_app/features/step_definitions/generic_steps.rb",
|
@@ -187,6 +198,7 @@ Gem::Specification.new do |s|
|
|
187
198
|
"test/rails_app/script/rails",
|
188
199
|
"test/rails_app/spec/component/actions_spec.rb",
|
189
200
|
"test/rails_app/spec/component/base_spec.rb",
|
201
|
+
"test/rails_app/spec/component/component_spec.rb",
|
190
202
|
"test/rails_app/spec/component/composition_spec.rb",
|
191
203
|
"test/rails_app/spec/component/configuration_spec.rb",
|
192
204
|
"test/rails_app/spec/component/javascript_spec.rb",
|
@@ -217,17 +229,104 @@ Gem::Specification.new do |s|
|
|
217
229
|
s.require_paths = ["lib"]
|
218
230
|
s.rubygems_version = %q{1.6.2}
|
219
231
|
s.summary = %q{Build ExtJS/Rails components with minimum effort}
|
232
|
+
s.test_files = [
|
233
|
+
"test/rails_app/app/components/border_layout_panel.rb",
|
234
|
+
"test/rails_app/app/components/component_loader.rb",
|
235
|
+
"test/rails_app/app/components/component_with_actions.rb",
|
236
|
+
"test/rails_app/app/components/component_with_custom_css.rb",
|
237
|
+
"test/rails_app/app/components/component_with_included_js.rb",
|
238
|
+
"test/rails_app/app/components/component_with_js_mixin.rb",
|
239
|
+
"test/rails_app/app/components/component_with_nested_through.rb",
|
240
|
+
"test/rails_app/app/components/component_with_session_persistence.rb",
|
241
|
+
"test/rails_app/app/components/deprecated/server_caller.rb",
|
242
|
+
"test/rails_app/app/components/dynamic_tab_panel.rb",
|
243
|
+
"test/rails_app/app/components/ext_direct/composite.rb",
|
244
|
+
"test/rails_app/app/components/ext_direct/details.rb",
|
245
|
+
"test/rails_app/app/components/ext_direct/selector.rb",
|
246
|
+
"test/rails_app/app/components/ext_direct/statistics.rb",
|
247
|
+
"test/rails_app/app/components/extended_component_with_actions.rb",
|
248
|
+
"test/rails_app/app/components/extended_component_with_js_mixin.rb",
|
249
|
+
"test/rails_app/app/components/extended_localized_panel.rb",
|
250
|
+
"test/rails_app/app/components/extended_server_caller.rb",
|
251
|
+
"test/rails_app/app/components/hello_world_component.rb",
|
252
|
+
"test/rails_app/app/components/kinda_complex_component.rb",
|
253
|
+
"test/rails_app/app/components/kinda_complex_component/basic_stuff.rb",
|
254
|
+
"test/rails_app/app/components/kinda_complex_component/extra_stuff.rb",
|
255
|
+
"test/rails_app/app/components/loader_of_component_with_custom_css.rb",
|
256
|
+
"test/rails_app/app/components/localized_panel.rb",
|
257
|
+
"test/rails_app/app/components/nested_component.rb",
|
258
|
+
"test/rails_app/app/components/panel_with_plugin.rb",
|
259
|
+
"test/rails_app/app/components/panel_with_tools.rb",
|
260
|
+
"test/rails_app/app/components/plugin_with_components.rb",
|
261
|
+
"test/rails_app/app/components/scoped_components/deep_scoped_components/some_deep_scoped_component.rb",
|
262
|
+
"test/rails_app/app/components/scoped_components/extended_scoped_component.rb",
|
263
|
+
"test/rails_app/app/components/scoped_components/some_scoped_component.rb",
|
264
|
+
"test/rails_app/app/components/server_caller.rb",
|
265
|
+
"test/rails_app/app/components/server_counter.rb",
|
266
|
+
"test/rails_app/app/components/simple_component.rb",
|
267
|
+
"test/rails_app/app/components/simple_panel.rb",
|
268
|
+
"test/rails_app/app/components/simple_tab_panel.rb",
|
269
|
+
"test/rails_app/app/components/simple_window.rb",
|
270
|
+
"test/rails_app/app/components/some_composite.rb",
|
271
|
+
"test/rails_app/app/components/some_ext_component.rb",
|
272
|
+
"test/rails_app/app/components/some_plugin.rb",
|
273
|
+
"test/rails_app/app/components/touch/hello_world_component.rb",
|
274
|
+
"test/rails_app/app/components/touch/server_caller.rb",
|
275
|
+
"test/rails_app/app/components/touch/simple_carousel.rb",
|
276
|
+
"test/rails_app/app/controllers/application_controller.rb",
|
277
|
+
"test/rails_app/app/controllers/components_controller.rb",
|
278
|
+
"test/rails_app/app/controllers/multiple_components_controller.rb",
|
279
|
+
"test/rails_app/app/controllers/touch_controller.rb",
|
280
|
+
"test/rails_app/app/controllers/welcome_controller.rb",
|
281
|
+
"test/rails_app/app/helpers/application_helper.rb",
|
282
|
+
"test/rails_app/app/helpers/touch_helper.rb",
|
283
|
+
"test/rails_app/config/application.rb",
|
284
|
+
"test/rails_app/config/boot.rb",
|
285
|
+
"test/rails_app/config/environment.rb",
|
286
|
+
"test/rails_app/config/environments/development.rb",
|
287
|
+
"test/rails_app/config/environments/production.rb",
|
288
|
+
"test/rails_app/config/environments/test.rb",
|
289
|
+
"test/rails_app/config/initializers/backtrace_silencers.rb",
|
290
|
+
"test/rails_app/config/initializers/inflections.rb",
|
291
|
+
"test/rails_app/config/initializers/mime_types.rb",
|
292
|
+
"test/rails_app/config/initializers/netzke.rb",
|
293
|
+
"test/rails_app/config/initializers/secret_token.rb",
|
294
|
+
"test/rails_app/config/initializers/session_store.rb",
|
295
|
+
"test/rails_app/config/routes.rb",
|
296
|
+
"test/rails_app/db/migrate/20110110132720_create_netzke_component_states.rb",
|
297
|
+
"test/rails_app/db/schema.rb",
|
298
|
+
"test/rails_app/db/seeds.rb",
|
299
|
+
"test/rails_app/features/step_definitions/custom_css_steps.rb",
|
300
|
+
"test/rails_app/features/step_definitions/generic_steps.rb",
|
301
|
+
"test/rails_app/features/step_definitions/touch_steps.rb",
|
302
|
+
"test/rails_app/features/step_definitions/web_steps.rb",
|
303
|
+
"test/rails_app/features/support/env.rb",
|
304
|
+
"test/rails_app/features/support/paths.rb",
|
305
|
+
"test/rails_app/spec/component/actions_spec.rb",
|
306
|
+
"test/rails_app/spec/component/base_spec.rb",
|
307
|
+
"test/rails_app/spec/component/component_spec.rb",
|
308
|
+
"test/rails_app/spec/component/composition_spec.rb",
|
309
|
+
"test/rails_app/spec/component/configuration_spec.rb",
|
310
|
+
"test/rails_app/spec/component/javascript_spec.rb",
|
311
|
+
"test/rails_app/spec/component/state_spec.rb",
|
312
|
+
"test/rails_app/spec/core_ext_spec.rb",
|
313
|
+
"test/rails_app/spec/spec_helper.rb",
|
314
|
+
"test/test_helper.rb",
|
315
|
+
"test/unit/core_ext_test.rb",
|
316
|
+
"test/unit/netzke_core_test.rb",
|
317
|
+
"test/unit/netzke_preference_test.rb"
|
318
|
+
]
|
220
319
|
|
221
320
|
if s.respond_to? :specification_version then
|
222
321
|
s.specification_version = 3
|
223
322
|
|
224
323
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
225
|
-
s.add_runtime_dependency(%q<activesupport>, ["
|
324
|
+
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
|
226
325
|
else
|
227
|
-
s.add_dependency(%q<activesupport>, ["
|
326
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
|
228
327
|
end
|
229
328
|
else
|
230
|
-
s.add_dependency(%q<activesupport>, ["
|
329
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
|
231
330
|
end
|
232
331
|
end
|
233
332
|
|
data/stylesheets/core.css
CHANGED
@@ -2,11 +2,31 @@
|
|
2
2
|
This file gets loaded along with the rest of Ext library at the initial load
|
3
3
|
*/
|
4
4
|
|
5
|
-
/*
|
6
|
-
.
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
/* FeedbackGhost */
|
6
|
+
.msg .x-box-mc {
|
7
|
+
font-size:14px;
|
8
|
+
}
|
9
|
+
#msg-div {
|
10
|
+
position:absolute;
|
11
|
+
left:35%;
|
12
|
+
top:10px;
|
10
13
|
width:300px;
|
11
14
|
z-index:20000;
|
12
15
|
}
|
16
|
+
#msg-div .msg {
|
17
|
+
border-radius: 8px;
|
18
|
+
-moz-border-radius: 8px;
|
19
|
+
background: #F6F6F6;
|
20
|
+
border: 2px solid #ccc;
|
21
|
+
margin-top: 2px;
|
22
|
+
padding: 10px 15px;
|
23
|
+
color: #555;
|
24
|
+
}
|
25
|
+
#msg-div .msg h3 {
|
26
|
+
margin: 0 0 8px;
|
27
|
+
font-weight: bold;
|
28
|
+
font-size: 15px;
|
29
|
+
}
|
30
|
+
#msg-div .msg p {
|
31
|
+
margin: 0;
|
32
|
+
}
|
data/test/rails_app/Gemfile
CHANGED
data/test/rails_app/Gemfile.lock
CHANGED
@@ -7,32 +7,32 @@ GEM
|
|
7
7
|
remote: http://rubygems.org/
|
8
8
|
specs:
|
9
9
|
abstract (1.0.0)
|
10
|
-
actionmailer (3.0.
|
11
|
-
actionpack (= 3.0.
|
10
|
+
actionmailer (3.0.7)
|
11
|
+
actionpack (= 3.0.7)
|
12
12
|
mail (~> 2.2.15)
|
13
|
-
actionpack (3.0.
|
14
|
-
activemodel (= 3.0.
|
15
|
-
activesupport (= 3.0.
|
13
|
+
actionpack (3.0.7)
|
14
|
+
activemodel (= 3.0.7)
|
15
|
+
activesupport (= 3.0.7)
|
16
16
|
builder (~> 2.1.2)
|
17
17
|
erubis (~> 2.6.6)
|
18
|
-
i18n (~> 0.
|
18
|
+
i18n (~> 0.5.0)
|
19
19
|
rack (~> 1.2.1)
|
20
|
-
rack-mount (~> 0.6.
|
20
|
+
rack-mount (~> 0.6.14)
|
21
21
|
rack-test (~> 0.5.7)
|
22
22
|
tzinfo (~> 0.3.23)
|
23
|
-
activemodel (3.0.
|
24
|
-
activesupport (= 3.0.
|
23
|
+
activemodel (3.0.7)
|
24
|
+
activesupport (= 3.0.7)
|
25
25
|
builder (~> 2.1.2)
|
26
|
-
i18n (~> 0.
|
27
|
-
activerecord (3.0.
|
28
|
-
activemodel (= 3.0.
|
29
|
-
activesupport (= 3.0.
|
26
|
+
i18n (~> 0.5.0)
|
27
|
+
activerecord (3.0.7)
|
28
|
+
activemodel (= 3.0.7)
|
29
|
+
activesupport (= 3.0.7)
|
30
30
|
arel (~> 2.0.2)
|
31
31
|
tzinfo (~> 0.3.23)
|
32
|
-
activeresource (3.0.
|
33
|
-
activemodel (= 3.0.
|
34
|
-
activesupport (= 3.0.
|
35
|
-
activesupport (3.0.
|
32
|
+
activeresource (3.0.7)
|
33
|
+
activemodel (= 3.0.7)
|
34
|
+
activesupport (= 3.0.7)
|
35
|
+
activesupport (3.0.7)
|
36
36
|
arel (2.0.10)
|
37
37
|
builder (2.1.2)
|
38
38
|
capybara (1.0.0)
|
@@ -45,24 +45,25 @@ GEM
|
|
45
45
|
childprocess (0.1.9)
|
46
46
|
ffi (~> 1.0.6)
|
47
47
|
configuration (1.3.1)
|
48
|
-
cucumber (1.0.
|
48
|
+
cucumber (1.0.0)
|
49
49
|
builder (>= 2.1.2)
|
50
50
|
diff-lcs (>= 1.1.2)
|
51
|
-
gherkin (~> 2.4.
|
51
|
+
gherkin (~> 2.4.1)
|
52
52
|
json (>= 1.4.6)
|
53
53
|
term-ansicolor (>= 1.0.5)
|
54
|
-
cucumber-rails (1.0.
|
54
|
+
cucumber-rails (1.0.0)
|
55
55
|
capybara (>= 1.0.0)
|
56
56
|
cucumber (~> 1.0.0)
|
57
|
-
nokogiri (>= 1.4.
|
57
|
+
nokogiri (>= 1.4.4)
|
58
|
+
rack-test (>= 0.5.7)
|
58
59
|
database_cleaner (0.6.7)
|
59
60
|
diff-lcs (1.1.2)
|
60
61
|
erubis (2.6.6)
|
61
62
|
abstract (>= 1.0.0)
|
62
63
|
ffi (1.0.9)
|
63
|
-
gherkin (2.4.
|
64
|
+
gherkin (2.4.1)
|
64
65
|
json (>= 1.4.6)
|
65
|
-
i18n (0.
|
66
|
+
i18n (0.5.0)
|
66
67
|
json (1.5.3)
|
67
68
|
json_pure (1.5.3)
|
68
69
|
launchy (0.4.0)
|
@@ -74,24 +75,24 @@ GEM
|
|
74
75
|
mime-types (~> 1.16)
|
75
76
|
treetop (~> 1.4.8)
|
76
77
|
mime-types (1.16)
|
77
|
-
nokogiri (1.
|
78
|
+
nokogiri (1.4.6)
|
78
79
|
polyglot (0.3.1)
|
79
80
|
rack (1.2.3)
|
80
81
|
rack-mount (0.6.14)
|
81
82
|
rack (>= 1.0.0)
|
82
83
|
rack-test (0.5.7)
|
83
84
|
rack (>= 1.0)
|
84
|
-
rails (3.0.
|
85
|
-
actionmailer (= 3.0.
|
86
|
-
actionpack (= 3.0.
|
87
|
-
activerecord (= 3.0.
|
88
|
-
activeresource (= 3.0.
|
89
|
-
activesupport (= 3.0.
|
85
|
+
rails (3.0.7)
|
86
|
+
actionmailer (= 3.0.7)
|
87
|
+
actionpack (= 3.0.7)
|
88
|
+
activerecord (= 3.0.7)
|
89
|
+
activeresource (= 3.0.7)
|
90
|
+
activesupport (= 3.0.7)
|
90
91
|
bundler (~> 1.0)
|
91
|
-
railties (= 3.0.
|
92
|
-
railties (3.0.
|
93
|
-
actionpack (= 3.0.
|
94
|
-
activesupport (= 3.0.
|
92
|
+
railties (= 3.0.7)
|
93
|
+
railties (3.0.7)
|
94
|
+
actionpack (= 3.0.7)
|
95
|
+
activesupport (= 3.0.7)
|
95
96
|
rake (>= 0.8.7)
|
96
97
|
thor (~> 0.14.4)
|
97
98
|
rake (0.9.2)
|
@@ -122,7 +123,7 @@ GEM
|
|
122
123
|
thor (0.14.6)
|
123
124
|
treetop (1.4.9)
|
124
125
|
polyglot (>= 0.3.1)
|
125
|
-
tzinfo (0.3.
|
126
|
+
tzinfo (0.3.28)
|
126
127
|
xpath (0.1.4)
|
127
128
|
nokogiri (~> 1.3)
|
128
129
|
|
@@ -136,7 +137,7 @@ DEPENDENCIES
|
|
136
137
|
database_cleaner
|
137
138
|
launchy
|
138
139
|
netzke-persistence!
|
139
|
-
rails (= 3.0.
|
140
|
+
rails (= 3.0.7)
|
140
141
|
rspec-rails
|
141
142
|
spork
|
142
143
|
sqlite3-ruby
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# TODO: some functionality (one that is calling doNothing) does not belong here, as it loads no componens, but rather to ServerCaller. Move it there.
|
1
2
|
class ComponentLoader < Netzke::Base
|
2
3
|
component :simple_component, :title => "Simple Component", :lazy_loading => true
|
3
4
|
|
@@ -9,6 +10,8 @@ class ComponentLoader < Netzke::Base
|
|
9
10
|
|
10
11
|
component :window_with_simple_component, {
|
11
12
|
:class_name => "SimpleWindow",
|
13
|
+
:width => 400,
|
14
|
+
:height => 300,
|
12
15
|
:items => [{
|
13
16
|
:class_name => "SimpleComponent",
|
14
17
|
:title => "Simple Component Inside Window"
|
@@ -18,15 +21,15 @@ class ComponentLoader < Netzke::Base
|
|
18
21
|
|
19
22
|
component :some_composite, :lazy_loading => true
|
20
23
|
|
21
|
-
# this action is using
|
24
|
+
# this action is using loadNetzkeComponent "special" callback
|
22
25
|
js_method :on_load_with_feedback, <<-JS
|
23
26
|
function(){
|
24
|
-
this.
|
27
|
+
this.loadNetzkeComponent({name: 'simple_component', callback: function(){
|
25
28
|
this.setTitle("Callback" + " invoked!");
|
26
29
|
}, scope: this});
|
27
30
|
}
|
28
31
|
JS
|
29
|
-
|
32
|
+
|
30
33
|
# this action is using generic endpoint callback
|
31
34
|
action :load_with_generic_callback
|
32
35
|
js_method :on_load_with_generic_callback, <<-JS
|
@@ -36,7 +39,7 @@ class ComponentLoader < Netzke::Base
|
|
36
39
|
});
|
37
40
|
}
|
38
41
|
JS
|
39
|
-
|
42
|
+
|
40
43
|
# this action is using generic endpoint callback with scope
|
41
44
|
action :load_with_generic_callback_and_scope
|
42
45
|
js_method :on_load_with_generic_callback_and_scope, <<-JS
|
@@ -58,6 +61,9 @@ class ComponentLoader < Netzke::Base
|
|
58
61
|
# {}
|
59
62
|
end
|
60
63
|
|
64
|
+
action :load_component
|
65
|
+
|
66
|
+
action :load_in_window
|
61
67
|
|
62
68
|
action :load_with_feedback
|
63
69
|
|
@@ -67,47 +73,53 @@ class ComponentLoader < Netzke::Base
|
|
67
73
|
|
68
74
|
action :load_with_params
|
69
75
|
|
76
|
+
action :non_existing_component, :text => "Non-existing component"
|
77
|
+
|
70
78
|
js_properties(
|
71
79
|
:title => "Component Loader",
|
72
80
|
:layout => "fit",
|
73
|
-
:bbar => [
|
81
|
+
:bbar => [:load_component.action, :load_in_window.action, :load_with_feedback.action, :load_window_with_simple_component.action, :load_composite.action, :load_with_params.action, :load_with_generic_callback.action, :load_with_generic_callback_and_scope.action, :non_existing_component.action]
|
74
82
|
)
|
75
83
|
|
76
84
|
js_method :on_load_window_with_simple_component, <<-JS
|
77
85
|
function(params){
|
78
|
-
this.
|
86
|
+
this.loadNetzkeComponent({name: "window_with_simple_component", callback: function(w){
|
87
|
+
w.show();
|
88
|
+
}});
|
79
89
|
}
|
80
90
|
JS
|
81
91
|
|
82
92
|
js_method :on_load_composite, <<-JS
|
83
93
|
function(params){
|
84
|
-
this.
|
94
|
+
this.loadNetzkeComponent({name: "some_composite", container: this});
|
85
95
|
}
|
86
96
|
JS
|
87
97
|
|
88
98
|
js_method :on_load_with_params, <<-JS
|
89
99
|
function(params){
|
90
|
-
this.
|
100
|
+
this.loadNetzkeComponent({name: "simple_component", params: {html: "Simple Component" + " with changed HTML"}, container: this});
|
91
101
|
}
|
92
102
|
JS
|
93
103
|
|
94
|
-
js_method :
|
104
|
+
js_method :on_load_component, <<-JS
|
95
105
|
function(){
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
this.
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
}
|
106
|
+
this.loadNetzkeComponent({name: 'simple_component', container: this});
|
107
|
+
}
|
108
|
+
JS
|
109
|
+
|
110
|
+
js_method :on_non_existing_component, <<-JS
|
111
|
+
function(){
|
112
|
+
this.loadNetzkeComponent({name: 'non_existing_component', container: this});
|
113
|
+
}
|
114
|
+
JS
|
115
|
+
|
116
|
+
js_method :on_load_in_window, <<-JS
|
117
|
+
function(){
|
118
|
+
var w = new Ext.window.Window({
|
119
|
+
width: 500, height: 400, modal: false, layout:'fit', title: 'A window'
|
120
|
+
});
|
121
|
+
w.show();
|
122
|
+
this.loadNetzkeComponent({name: 'component_loaded_in_window', container: w});
|
111
123
|
}
|
112
124
|
JS
|
113
125
|
|
@@ -2,7 +2,9 @@ class ComponentWithJsMixin < Netzke::Base
|
|
2
2
|
js_property :title, "ComponentWithJsMixin"
|
3
3
|
js_include :extra_one, :extra_two
|
4
4
|
js_mixin :method_set_one, :method_set_two
|
5
|
+
js_mixin # with no parameters, it'll assume :component_with_js_mixin
|
5
6
|
action :action_one
|
6
7
|
action :action_two
|
7
|
-
|
8
|
+
action :action_three
|
9
|
+
js_property :bbar, [:action_one.action, :action_two.action, :action_three.action]
|
8
10
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Here the child component some_window gets declared with items being Netzke components in their turn
|
2
|
+
class ComponentWithNestedThrough < Netzke::Base
|
3
|
+
js_property :layout, :fit
|
4
|
+
js_property :border, true
|
5
|
+
|
6
|
+
js_method :init_component, <<-JS
|
7
|
+
function(){
|
8
|
+
this.tools = [{type: 'gear', handler: this.onGear, scope: this}];
|
9
|
+
this.callParent();
|
10
|
+
}
|
11
|
+
JS
|
12
|
+
|
13
|
+
component :some_window, :class_name => "SimpleWindow", :width => 500, :layout => :fit, :modal => true,
|
14
|
+
:items => [{
|
15
|
+
:class_name => "SimpleTabPanel",
|
16
|
+
:prevent_header => true,
|
17
|
+
:items => [{:class_name => "ServerCaller"}, {:class_name => "ExtendedServerCaller"}]
|
18
|
+
}]
|
19
|
+
|
20
|
+
js_method :on_gear, <<-JS
|
21
|
+
function(){
|
22
|
+
this.loadNetzkeComponent({name: 'some_window', callback: function(w){
|
23
|
+
w.show();
|
24
|
+
}});
|
25
|
+
}
|
26
|
+
JS
|
27
|
+
|
28
|
+
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
class ComponentWithSessionPersistence < Netzke::Base
|
2
2
|
js_property :title, "Default Title"
|
3
|
-
js_property :bbar, [
|
3
|
+
js_property :bbar, [:bug_server.action]
|
4
|
+
|
5
|
+
action :bug_server, :text => "Tell server to store new title"
|
4
6
|
|
5
7
|
def default_config
|
6
8
|
super.merge(:session_persistence => true)
|
@@ -16,17 +18,17 @@ class ComponentWithSessionPersistence < Netzke::Base
|
|
16
18
|
}
|
17
19
|
JS
|
18
20
|
|
19
|
-
js_method :
|
21
|
+
js_method :on_bug_server, <<-JS
|
20
22
|
function(){
|
21
|
-
|
22
|
-
this.button.on('click', this.bugServer, this);
|
23
|
+
this.bugServer();
|
23
24
|
}
|
24
25
|
JS
|
25
26
|
|
27
|
+
|
26
28
|
endpoint :whats_up do |params|
|
27
29
|
update_session_options(:title => "Title From Session") # setting a value in session_options, which will get auto-merged into +config+
|
28
30
|
component_session[:html_content] = "HTML from session" # setting some custom session key/value, which we use manually in +configuration+
|
29
31
|
{}
|
30
32
|
end
|
31
33
|
|
32
|
-
end
|
34
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class DynamicTabPanel < Netzke::Base
|
2
|
+
js_base_class "Ext.TabPanel"
|
3
|
+
js_mixin
|
4
|
+
|
5
|
+
action :add_tab
|
6
|
+
|
7
|
+
def default_config
|
8
|
+
super.tap do |c|
|
9
|
+
c[:items] = [{
|
10
|
+
:title => "Tab One"
|
11
|
+
}]
|
12
|
+
|
13
|
+
c[:bbar] = [:add_tab.action]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
component :tab_two, :class_name => "SimplePanel", :title => "Tab Two (dynamic)", :lazy_loading => true
|
18
|
+
|
19
|
+
end
|
@@ -3,15 +3,16 @@ class ExtendedServerCaller < ServerCaller
|
|
3
3
|
|
4
4
|
js_method :on_bug_server, <<-JS
|
5
5
|
function(){
|
6
|
-
|
7
|
-
this.
|
8
|
-
|
6
|
+
this.callParent();
|
7
|
+
var bottomBar = this.getDockedItems()[1] || this.getDockedItems()[0]; // Hacky-hacky... better way to surely get the bottom bar?
|
8
|
+
bottomBar.add({text: "Added" + " by extended Server Caller"});
|
9
9
|
}
|
10
10
|
JS
|
11
11
|
|
12
12
|
def whats_up_endpoint(params)
|
13
|
-
|
14
|
-
|
13
|
+
super.tap do |s|
|
14
|
+
s[:set_title] = s[:set_title] + ", shiny weather"
|
15
|
+
end
|
15
16
|
end
|
16
17
|
|
17
18
|
end
|