netzke-core 0.12.3 → 1.0.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/CHANGELOG.md +65 -607
  2. data/Gemfile +1 -1
  3. data/LICENSE +2 -6
  4. data/README.md +77 -145
  5. data/javascripts/base.js +582 -96
  6. data/javascripts/core.js +62 -0
  7. data/javascripts/notifications.js +43 -0
  8. data/javascripts/remoting_provider.js +29 -0
  9. data/javascripts/routing.js +63 -0
  10. data/lib/netzke/base.rb +16 -83
  11. data/lib/netzke/core/action_config.rb +1 -5
  12. data/lib/netzke/core/actions.rb +59 -21
  13. data/lib/netzke/core/{client_class.rb → client_class_config.rb} +81 -73
  14. data/lib/netzke/core/client_code.rb +157 -0
  15. data/lib/netzke/core/component_config.rb +2 -2
  16. data/lib/netzke/core/composition.rb +85 -65
  17. data/lib/netzke/core/configuration.rb +26 -14
  18. data/lib/netzke/core/core_i18n.rb +17 -0
  19. data/lib/netzke/core/css_config.rb +6 -6
  20. data/lib/netzke/core/dynamic_assets.rb +17 -24
  21. data/lib/netzke/core/embedding.rb +2 -2
  22. data/lib/netzke/core/endpoint_response.rb +8 -2
  23. data/lib/netzke/core/inheritance.rb +33 -0
  24. data/lib/netzke/core/plugins.rb +1 -4
  25. data/lib/netzke/core/railz/action_view_ext.rb +1 -1
  26. data/lib/netzke/core/railz/controller_extensions.rb +21 -15
  27. data/lib/netzke/core/services.rb +61 -48
  28. data/lib/netzke/core/session.rb +0 -2
  29. data/lib/netzke/core/state.rb +11 -9
  30. data/lib/netzke/core/stylesheets.rb +3 -3
  31. data/lib/netzke/core/version.rb +1 -1
  32. data/lib/netzke/core.rb +3 -3
  33. data/lib/netzke/plugin.rb +2 -6
  34. data/stylesheets/core.css +2 -2
  35. metadata +11 -10
  36. data/TODO.md +0 -9
  37. data/javascripts/ext.js +0 -518
  38. data/lib/netzke/core/config_to_dsl_delegator.rb +0 -62
  39. data/lib/netzke/core/dsl_support.rb +0 -70
  40. data/lib/netzke/core/html.rb +0 -29
  41. data/lib/netzke/core/javascript.rb +0 -123
data/CHANGELOG.md CHANGED
@@ -1,649 +1,107 @@
1
- # v0.12.3 - 2015-08-09
2
- * Get rid of Ext's viewport warning
3
- * Uglify components' JS when not in the test/development env
4
- * Fix stack overflow issue in certain cases
5
- * Implement inline nesting of components
6
- * xtype of Netzke components receives additional "netzke" prefix (may potentially break things if you explicitely refer to xtypes)
7
-
8
- # v0.12.2 - 2015-06-06
9
- * Fix loading multi-instance components
10
-
11
- # v0.12.1 - 2015-05-31
12
-
13
- * Add `Base#client_config` shortcut to `config.client_config`, make it ActiveSupport::OrderedOptions
14
- * Rename `clientConfig` to `netzkeClientConfig` on client
1
+ ### New stuff
15
2
 
16
- # v0.12.0 - 2015-03-16
17
-
18
- * ExtJS 5.1
19
- * More reliable implementation of netzkeGetParentComponent()
20
- * Callback passed to netzkeLoadComponent() will receive a second parameter with config object passed to netzkeLoadComponent()
3
+ * Routing (see README)
21
4
 
22
- # v0.11.0 - 2015-02-05
5
+ * `Base::Plugin` won't set `this.cmp` for you any longer, but rather receive it as a parameter for `init()`
23
6
 
24
- * Rails 4.2
7
+ * The `action` DSL method now also accepts a list of endpoints, e.g.:
25
8
 
26
- # v0.10.1 - 2014-05-24
9
+ action :do_something, :do_something_else
27
10
 
28
- * Fix an IE8 issue (@AlexKovynev)
29
- * Fix issue with multi-instance loading
11
+ * `netzkeNotify` (former `netzkeFeedback`) may now accept the `title` option
30
12
 
31
- # v0.10.0 - 2014-04-02
13
+ ### Breaking changes
32
14
 
33
- * Rails 4
15
+ * A component's subfolders for client-class scripts and stylesheets have been consolidated from `javascripts`/`stylesheets` into `client`
34
16
 
35
- # v0.9.0 - 2014-02-08
36
- * Introduce `Base#validate_config` that can be overridden to validate a component's configuration
37
- * Fix icon detection
38
- * Back to Rails 3 (use 0.10.x with Rails 4)
17
+ * The client methods for endpoints are now created on the `this.server` object, so, you need to prefix the endpoint calls with `.server`, e.g. `this.server.doSomething()`. For details, see the updated "Client-server interaction" section in the README.
39
18
 
40
- # v0.9.0.rc1 - 2013-12-01
41
- * Rails 4
42
- * Ext JS 4.2
43
- * Ext JS Neptune scheme is default
19
+ * `Base#js_configure` has been renamed to `Base#configure_client`
44
20
 
45
- # v0.8.4 - 2013-05-22
46
- * bug fix
47
- * Re-enable session expiration detection
48
- * Do not crash on a rare situation when an endpoint is being called on an non-existing child component
49
- * improvements
50
- * Add `serverexception` event on `Netzke.directProvider`, subscribe to it to handle server exceptions
51
- * Endpoint calls will now pass Ext.direct.Exception to the provided callback function in case of server exception
52
- * A component will clean-up the loading mask when a server exception occurs during dynamic component loading
53
- * `netzkeFeedback` now shows multiple messages in a single slide banner
54
- * Implement multi-instance child component loading with different configuration (see MultiInstanceLoading in the test app)
21
+ * `Base.js_configure` has been renamed to `Base.client_class`. There's also no longer need to call it just for the purpose of including the default mixin (which is now `<component_name>/client/<component_name>.js`).
55
22
 
56
- # v0.8.3 - 2013-03-22
57
- * support Rails 3.2.13
23
+ * `Base.css_configure` has been renamed to `Base.client_styles`.
58
24
 
59
- # v0.8.2 - 2013-03-12
60
- * bug fix
61
- * RuntimeError "can't add a new key into hash during iteration" in Composition in some scenarious (thanks @wupdiwup)
62
- * netzkeReload works again
25
+ * The `mixin` method in the former `js_configure` block (now `client_class`) has been renamed to `include`.
63
26
 
64
- * improvements
65
- * minimize core Ruby class extensions
66
- * tests can now be run by simply executing `rake` from the gem's root (thanks @allomov)
67
- * feedback delay is now globally configurable
68
- * netzkeFeedback now understands {delay: seconds} as second parameter
69
- * add support for arbitrary controllers replacing NetzkeController
70
- * add support for HAML templates
71
- * some code refactoring
72
- * tests are rewritten with Mocha.js and CoffeeScript
27
+ * Changes to endpoints API.
73
28
 
74
- # v0.8.1 - 2012-12-15
75
- * bug fix
76
- * in production, JS comment stripping could cause modification of form_authenticity_token (issue #43) (thanks @scho)
29
+ * Droped the `this` parameter from endpoint block on server side. Instead, use the `client` accessor, implicitely defined for you, for example:
77
30
 
78
- # v0.8.0 - 2012-12-09
79
- ## Misc
80
- * many backward-incompatible API changes, see below
81
- * major code clean-up and refactor
82
- * introduce `Netzke::Core::Panel` - a simple panel with defaults, that can be immediately rendered
83
- * Netzke child components can now be referred anywhere (e.g. dockedItems), not only in items
84
- * drop support for Ruby 1.8.7
85
- * rename `netzke_init` view helper method to `load_netzke`
86
- * `before_load` is gone; if necessary, do preload stuff in the overridden `Base#js_configure`
87
- * rename `global_id` to `js_id`
88
- * `load_nezke` (previously `netzke_init`) now understands the `minified` option
89
- * implement referring to config methods declared in JavaScript from Ruby by using :symbols (see `Netzke::Base`)
90
- * i18n of actions takes into account ancestor classes
91
- * child component and action config now understand `excluded` option (handy for authorization)
92
- * `Base#update_state` and `#clear_state` are gone. Use `state` directly.
31
+ endpoint :do_something do |arg1|
32
+ client.set_title("Recieved #{arg1}")
33
+ end
93
34
 
94
- ## Component self-configuration
35
+ * Endpoint calls now accept any number of arguments (including zero), with client-side signature matching the server-side `endpoint` block, for example:
95
36
 
96
- Often when extending an existing component (e.g. from `Netzke::Basepack`), there's a need to tune its behaviour by modifying its configuration. There are 2 methods that can be overridden in order to achieve that: `Base#configure` and `Base#js_configure`. The former is used to configure a component as whole. The latter - exclusively the component's JavaScript class instance. `js_configure` is being called only when the component is being rendered in the browser, and not when a component is instantiated, for example, for invoking its endpoint.
37
+ # server side
38
+ endpoint :assign_user do |user_id, table_id|
39
+ end
97
40
 
98
- Both methods receive as the only argument a `ActiveSupport::OrderedOptions`, which allows for syntax like this:
41
+ // client side
42
+ this.server.assignUser(userId, tableId)
99
43
 
100
- def configure(c)
101
- c.some_config_option = 42
102
- c.merge!(option_one: 1, option_two: 2)
103
- super
104
- end
44
+ ---
105
45
 
106
- Calling `super` is essential for the super-component to do its own configuration (for example, `Netzke::Base#configure` would mix in the passed config options).
46
+ # server side (0 arguments)
47
+ endpoint :clear_data do
48
+ end
107
49
 
108
- The `Base#default_config` method and any other `Base#*_config` methods are gone and should be replaced with `Base#configure` or `Base#js_configure` - depending on the goal.
50
+ // client side
51
+ this.server.clearData()
109
52
 
110
- ### Base#configure
53
+ * Whatever endpoint's server-side block returns will become the argument for the client-side callback function, for example:
111
54
 
112
- The `configure` method must be used to override the configuration of a component as whole (influencing component's both Ruby and JavaScript behaviour). For example, if the super component implements the `persistence` option, we may want to enable it in our component like this:
55
+ # server side
56
+ endpoint :get_data do |params|
57
+ [1, 2, 3]
58
+ end
113
59
 
114
- def configure(c)
115
- c.persistence = true
116
- super
117
- end
60
+ // client side
61
+ this.server.getData(params, function(result) {
62
+ // result equals [1, 2, 3]
63
+ })
118
64
 
119
- The place to call `super` is important. In the provided example, the `persistence` option can be overridden by this component's user. However, if we put it after `super`, it will override the user's setting. Another example of overriding a user's setting might be, for example, extending a component bottom bar depending on the `mode` config:
65
+ * Internal rework of component loading, which also changes some API and behavior.
120
66
 
121
- def configure(c)
122
- super
123
- c.bbar = [*c.bbar, '-', :admin] if c.mode == :admin
124
- end
67
+ * If the loaded component is a window, its `show` method is called after loading. This can be prevented by the callback function returning `false` (which will also prevent other types of loaded components to be inserted into the container).
125
68
 
126
- The `configure` method is useful for (dynamically) defining toolbars, titles, and other properties of a component's instance.
69
+ * On the client, the `clientConfig` config option has been renamed to `serverConfig`.
127
70
 
128
- ### Access to component's config
71
+ * To specify that a child component is eagerly loaded, the option is moved out of the block into the DSL `component` method parameter (also renamed to `eager_load`):
129
72
 
130
- The result of `Base#configure` can be accessed through `Base#config` method from anywhere in the class.
73
+ # BEFORE
74
+ component :foo do |c|
75
+ c.eager_loading = true
76
+ ...
77
+ end
131
78
 
132
- ### Base#js_configure
79
+ # NOW
80
+ component :foo, eager_load: true do |c|
81
+ ...
82
+ end
133
83
 
134
- The `js_configure' method should be used to override the JS-side component configuration. It is called by the framework when the configuration for the JS instantiating of the component should be retrieved. Thus, it's *not* being called when a component is being instantiated to process an endpoint call. Override it when you need to extend/modify the config for the JS component intance.
84
+ Unless a component is declared as eagerly loaded, its config is no longer accessible on the client side (which means component is meant to be dynamically loadable).
135
85
 
136
- The execution of `js_configure` does not influence the content of the `Base#config` method.
86
+ * Specifying `bbar` and other toolbars in `configure_client` (former `js_configure`) no longer works. Move them to the main `configure` method.
137
87
 
138
- ## JavaScript class configuration
88
+ * Default handler name for actions is now prefixed with `netzkeOn` instead of `on`. E.g., for `action :do_something`, the handler
89
+ must be called `netzkeOnDoSomething`.
139
90
 
140
- The following DSL methods are gone: `js_include`, `js_mixin`, `js_base_class`, `js_method`, `js_property`, `js_properties`. Instead, use the `js_configure` class method (not to be confused with the previously mentioned *intstance* method `Base#js_configure`):
91
+ * `netzkeFeedback` has been renamed to `netzkeNotify`
141
92
 
142
- class MyComponent < Netzke::Base
143
- js_configure do |c|
144
- c.mixin # replaces js_mixin preserving the signature
145
- c.require # replaces js_include preserving the signature
146
- c.extend = "Ext.tab.Panel" # replaces js_base_class
93
+ * `Core.js_feedback_delay` has been renamed to `Core.client_notification_delay`
147
94
 
148
- c.title = "My Component" # use instead of js_property :title, "My Component"
95
+ * `onNetzkeSessionExpired` has been renamed to `netzkeOnSessionExpired`
149
96
 
150
- c.on_my_action = <<-JS # use instead of js_method :on_my_action, ...
151
- function(){
152
- // ...
153
- }
154
- JS
155
- end
97
+ * Experimental support for HAML removed
156
98
 
157
- # ...
158
- end
99
+ * Drop possibility to list panel tools merely as symbols, as this was too limiting (e.g. Netzke was overriding the handler signature). As of now, use the `Base#f` method to specify the handler (will no longer be automatically set for you); see `spec/rails_app/app/components/tools.rb` for an example.
159
100
 
160
- As you see, assignement must be used to define the JS class's properties, including functions.
101
+ ### Other changes
161
102
 
162
- ## Actions
103
+ * Introduce `Base#f` method that defines an inline wrapper for the client-side function that gets called in the scope of the component. This simplifies, for example, specifying handlers for buttons and tools, but also can be used in a few other occasions, where an Ext JS configuration option requires a function. See `spec/rails_app/app/components/actions.rb` for an example.
163
104
 
164
- The `action` DSL method does not accept a hash as an optional second parameter any longer, but rather a block, which receives a configuration object:
105
+ * Calling `callParent` in JS functions from the "mixins" will now properly call the previous override if that was defined; see `spec/rails_app/app/components/js_mixins.rb` for an example.
165
106
 
166
- action :destroy do |c|
167
- c.text = "Destroy!"
168
- c.tooltip = "Destroying it all"
169
- c.icon = :delete
170
- end
171
-
172
- The following is still valid:
173
-
174
- action :my_action # it will use default (eventually localized) values for text and tooltip
175
-
176
- ### Overriding actions in inherited classes
177
-
178
- Overriding an action while extending a component is possible by using the same `acton` method. To receive the action config from the superclass, use the `super` method, passing to it the block parameter:
179
-
180
- action :destroy do |c|
181
- super(c) # do the config from the superclass
182
- c.text = "Destroy if you dare" # overriding the text
183
- end
184
-
185
- ### Referring to actions in toolbars/menus
186
-
187
- `Symbol#action` is no longer defined. Refer to actions in toolbars/menus by simply using symbols:
188
-
189
- def configure(c)
190
- super
191
- c.bbar = [:my_action, :destroy]
192
- end
193
-
194
- Another way (useful when re-configuring the toolbars of a child component) is by using hashes that have the `netzke_action` key:
195
-
196
- def configure(c)
197
- super
198
-
199
- c.bbar = [
200
- { netzke_action: :my_action, title: "My cool action" },
201
- { netzke_action: :destroy, title: "Destroy!" }
202
- ]
203
- end
204
-
205
- Referring to actions on the class level (e.g. with `js_property :bbar`) will no longer work. Define the toolbars inside the `configure` method.
206
-
207
- ### I18n of actions
208
-
209
- +text+, +tooltip+ and +icon+ for an action will be picked up from a locale file (if located there) whenever they are not specified in the config.
210
- E.g., an action `some_action` defined in the component +MyComponents::CoolComponent+, will look for its text in:
211
-
212
- I18n.t('my_components.cool_component.actions.some_action.text')
213
-
214
- for its tooltip in:
215
-
216
- I18n.t('my_components.cool_component.actions.some_action.tooltip')
217
-
218
- and for its icon in:
219
-
220
- I18n.t('my_components.cool_component.actions.some_action.icon')
221
-
222
- ## Child components
223
-
224
- ### Defining child components
225
-
226
- A child component gets defined with the `component` method receiving a block:
227
-
228
- component :east_center_panel do |c|
229
- c.klass = SimpleComponent
230
- c.title = "A panel"
231
- c.border = false
232
- end
233
-
234
- Child component's class is now specified as the `klass` option and is actually a Class, not a String. When no `klass` or no block is given, the component's class will be derived from its name, e.g.:
235
-
236
- component :simple_component
237
-
238
- is equivalent to:
239
-
240
- component :simple_component do |c|
241
- c.klass = SimpleComponent
242
- end
243
-
244
- Defining a component in a block gives an advantage of accessing the `config` method of the parent component, e.g.:
245
-
246
- component :east_center_panel do |c|
247
- c.klass = SimpleComponent
248
- c.title = config.east_center_panel_title # something that could be passed as a config option to the parent component
249
- end
250
-
251
- If no `klass` is specified, `Netzke::Core::Panel` is assumed.
252
-
253
- ### Overriding child components
254
-
255
- Overriding a child component while extending a component is possible by using the same `component` method. To receive the child component config from the superclass, use the `super` method, passing to it the block parameter:
256
-
257
- component :simple_component do |c|
258
- super(c) # do the config from the superclass
259
- c.klass = LessSimpleComponent # use a different class
260
- end
261
-
262
- ### Lazy vs eager component loading
263
-
264
- All child components now by default are being lazily loaded on request from the parent, unless they are referred in the layout (see the **Layout** section). You can override this behavior by setting `eager_loading` to `true`, so that the child component's config and class are instantly available at the parent.
265
-
266
- ## Layout
267
-
268
- ### Referring to Netzke components
269
-
270
- The `Symbol#component` method is no longer defined. The preferred way of referring to child components in (docked) items is by using symbols:
271
-
272
- # provided child_one and child_two components are defined in the class
273
- def configure(c)
274
- super
275
-
276
- c.items = [:child_one, :child_two]
277
- end
278
-
279
- Another way (useful when re-configuring the layout of a child component) is by using hashes that have the `component` key:
280
-
281
- def configure(c)
282
- super
283
-
284
- c.items = [
285
- { xtype: :panel, title: "Simple Ext panel" },
286
- { component: :child_one, title: "First child" },
287
- { component: :child_two, title: "Second child" }
288
- ]
289
- end
290
-
291
- ### Implicitly defined components in items
292
-
293
- Previously there was a way to specify a component class directly in items (by using the `class_name` option), which would implicitly define a child component. This is no longer possible. The layout can now only refer to explicitly defined components.
294
-
295
- ### Specifying items in config
296
-
297
- It is possible to specify the items in the config in the same format as it is done in the `items` method. If `config.items` is provided, it takes precedence over the `items` method. This can be useful for modifying the default layout of a child component by means of configuring it.
298
-
299
- It's advised to override the `items` method when a component needs to define it's layout, and not use the `configure` method for that (see the **Self-configuration** section).
300
-
301
- ### DSL-delegated methods are gone
302
-
303
- No more `title` and `items` are defined as DSL methods. Include `Netzke::ConfigToDslDelegator` and use `delegate_to_dsl` method if you need that functionality in a component.
304
- Thus, `Netzke::ConfigToDslDelegator` is not included in Netzke::Base anymore.
305
-
306
- ## Defining client class
307
-
308
- Client class (JavaScript part of the component) has been refactored.
309
-
310
- ### Methods renamed
311
-
312
- The following public method name changes took place for the sake of consistence:
313
-
314
- * localId => netzkeLocalId
315
- * setResult => netzkeSetResult
316
- * endpointUrl => netzkeEndpointUrl
317
- * loadNetzkeComponent => netzkeLoadComponent (signature changed, see "javascripts/ext.js")
318
- * componentDelivered => netzkeComponentDelivered
319
- * componentDeliveryFailed => netzkeComponentDeliveryFailed
320
- * getParentNetzkeComponent => netzkeGetParentComponent
321
- * reload => netzkeReload
322
- * instantiateChildNetzkeComponent => netzkeInstantiateComponent
323
- * getChildNetzkeComponent => netzkeGetComponent
324
-
325
- # v0.7.7 - 2012-10-21
326
- * Ext JS required version bump (4.1.x)
327
-
328
- # v0.7.6 - 2012-07-27
329
- * Rails 3.2
330
-
331
- # v0.7.5 - 2012-03-05
332
- * API changes
333
- * The `:class_name` option must *always* include the full class name now. So, `Basepack::GridPanel` won't work, instead do `Netzke::Basepack::GridPanel`
334
-
335
- * enhancements
336
- * Set default Ext.Direct retry attempts to 0, as more than 0 may only be needed in special cases.
337
-
338
- # v0.7.4 - 2011-10-20
339
- * enhancements
340
- * Less aggressive rescuing at constantizing a string, to let more descriptive exceptions get through.
341
- * New `delegates_to_dsl` class method to degelate default config options to class level. See the `ConfigToDslDelegator` module.
342
-
343
- # v0.7.3 - 2011-09-04
344
- * Rails 3.1 compatibility. Really. Hopefully.
345
-
346
- # v0.7.2 - 2011-08-31
347
- * Rails 3.1
348
- * bug fix
349
- * When a component is dynamically loaded in a container, the load mask is now limited to that container
350
- * enhancements
351
- * New u config option for loadNetzkeComponent, which prevents emptying the container when inserting the newly loaded component; can be used for loading components into layouts different from 'fit'
352
-
353
- # v0.7.1 - 2011-08-17
354
- * bug fix
355
- * Multiple compound Netzke components in the same Rails view were causing JS errors
356
-
357
- # v0.7.0 - 2011-08-09
358
- * Ext JS 4 compatibility
359
-
360
- * API changes
361
- * New `ext_uri` config option (defaults to "extjs") - relative URI to the Ext JS library on the server.
362
- * New `ext3_compat_uri` config option (defaults to `nil`) - relative URI to the Ext 3 compatibility layer. When nil, no compatibility layer is loaded.
363
- * New `current_user_method` config option (defaults to :current_user) to let Netzke::Core know which method to call on Rails controller to retrieve the current user.
364
- * New `Netzke::Core.current_user` method to retrieve the current user.
365
- * Passing instructions from server back to the client now is only meant for single-argument methods on client; arrays are not expanded into arguments any longer.
366
- * New `instantiateChildNetzkeComponent` method to instantiate a Netzke component by name.
367
- * Default component height (400) and border (false) are no longer set.
368
-
369
- * broken API
370
- * The `ext_location` config option renamed to `ext_path`
371
- * loadNetzkeComponent (ex loadComponent) won't automatically show a component with xtype 'window' any longer; use the callback to do that manually
372
-
373
- * enhancements
374
- * `js_mixin` without parameters will assume :component_class_name_underscored
375
- * Ext locale file is automatically included when I18n.locale is not :en
376
- * Child components now have `itemId` set to component's name, so that `getComponent(component_name)` can be used to retrieve immediate child components
377
- * `loadNetzkeComponent` that should be used instead of loadComponent won't render the loaded component unless the container is specified (which can be an id or an instance)
378
- * JS: `componentDeliveryFailed` method added that is called by the `deliver_component` endpoint
379
-
380
- * bug fix
381
- * Tolerate relative_url_root when calculating the URI to icons in actions
382
-
383
- * deprecations
384
- * instantiateAndRenderComponent
385
- * getParent in favor of getParentNetzkeComponent
386
- * getChildComponent in favor of getChildNetzkeComponent
387
- * loadComponent in favor of loadNetzkeComponent
388
- * feedback in favor of netzkeFeedback
389
- * Ext.container.Container#instantiateChild should not be used
390
-
391
- # v0.6.7 - 2011-08-16
392
- * enhancements
393
- * No more using `method_missing` for invoking endpoints.
394
- * New "cache" option for `netzke_init` which gets passed to `javascript_include_tag` (no support for css caching of this type yet)
395
- * Netzke dynamic js and css-files such as ext.js, touch.css, now get generated at the application start, and put into "public/netzke". Solves a long standing problem with serving those files by HTTP servers in some cases. Enables caching naturally.
396
- * Moved features and specs to test/core_test_app (tests should be run from that folder from now on)
397
- * Introduced plugin functionality. We can create Netzke components that are pluggable into other components as Ext JS plugins.
398
-
399
- # v0.6.6 - 2011-02-26
400
- * enhancements
401
- * Client-server communication is updated to use Ext.Direct (many thanks to @pschyska)
402
- * Introduced `js_translate` class method that allows specifying i18n properties used in the JavaScript class
403
- * Better handling of actions i18n
404
- * New `Netzke::Base.class_config_option` method to specify a class-level configuration options for a component, e.g. (in GridPanel): `class_config_option :column_filters_available, true`. This option then can be set in Rails application configuration, e.g.: `config.netzke.basepack.grid_panel.column_filters_available = false`, or directly on `Netzke::Core.config`, e.g.: `Netzke::Core.config.netzke.basepack.grid_panel.column_filters_available = false`.
405
-
406
- # v0.6.5 - 2011-01-14
407
- * enhancements
408
- * Various fixes for IE
409
- * Support for Sencha Touch
410
- * An endpoint can now "call" JavaScript functions that accept multiple parameters, by specifying an array, e.g.:
411
- {:some_js_function => [arg1, arg2]}
412
- * New API: `js_mixin` method to "mixin" JavaScript objects from external files (see RDocs).
413
- * New JS class `componentLoadMask` property to configure a mask when a component gets dynamically loaded with `loadComponent`. Accepts the same configuration as Ext.LoadMask.
414
- * `js_include` and `css_include` accept both symbols and strings, where strings would contain full paths to the included file, whereas symbols get expanded to full paths following simple conventions (see RDocs for details).
415
- * Make some of `Netzke::Core` setup happen earlier in the loading process, so that we can safely use it while defining components.
416
- * Performance improvements by memoizing `Base.constantize_class_name`.
417
- * I18n for actions, see `Netzke::Actions`.
418
-
419
- * bug fix
420
- * The "componentload" event now gets fired after a component is dynamically loaded. The handler receives the instance of the loaded component.
421
- * Feedback does not insert a new div every time being called
422
- * JS class caching was broken for name-scoped classes
423
- * When a component was dynamically loaded into a hidden container, it wasn't shown when the container got shown next time
424
-
425
- # v0.6.4 - 2010-11-05
426
- * enhancements
427
- * Implemented Netzke.isLoading(), useful for testing
428
- * Persistence support
429
-
430
- * API change
431
- * `endpoint` DSL call now results in a method called <endpoint_name>_endpoint, _not_ just <endpoint_name> (beware when overriding endpoint definitions, or calling endpoint methods on child components)
432
- * Using `api` for endpoint declaration is gone
433
-
434
- # v0.6.3 - 2010-11-02
435
- * The `ext_config` option is back, deprecated.
436
-
437
- # v0.6.2 - 2010-10-27
438
- * Introduced the Symbol#component method to declare components in the config (instead of now deprecated js_component).
439
-
440
- # v0.6.1 - 2010-10-26
441
- * Disabled buggy implementation of rendering on-page JS classes in netzke.js instead of main page.
442
-
443
- # v0.6.0 - 2010-10-24
444
- * Rails3 compatibility, thorough rewrite
445
- * Much more thorough testing
446
-
447
- * API backward incompatibility
448
- * `ext_config` config level is removed; put all that configuration in the top level
449
- * mentioning actions in the `bbar`, `tbar`, etc, should be explicit, e.g.:
450
-
451
- :bbar => [:apply.action, :delete.action]
452
-
453
- * `late_aggregatee` is now `lazy_loading`
454
- * `aggregatees` are now `components`
455
- * `widgets` are now `components`, too
456
- * `api` is now `endpoint`
457
- * `persistent_config_enabled?` is now `persistence_enabled?`
458
- * Using the `js_extend_properties` class method in your components in deprecated (and maybe even broken). Use `js_property` (or `js_properties`) and `js_method` instead (see multiple examples in test/core_test_app)
459
- * the `load_component_with_cache` endpoint renamed to `deliver_component`
460
-
461
- * New
462
- * `ext` helper in the views to embed any (pure) Ext component into a view
463
- * `component` DSL method to declare child components
464
- * `config` DSL method to set the configuration of an instance
465
- * `action` DSL method to configure actions
466
- * `js_method` DSL method to define (public) methods in JS class
467
- * `js_property` DSL method to define (public) properties in JS class
468
- * `endpoint` DSL method to define server endpoints
469
-
470
- * Different deprecations throughout the code
471
-
472
- # v0.5.3 - 2010-06-14
473
- * Fix: Getting rid of deprecation warnings about tasks not sitting in lib.
474
-
475
- # v0.5.2 - 2010-06-11
476
- * Ext 3.2.1
477
- * Fix: Netzke::Base.before_load is now also called for the widgets embedded directly into a view.
478
- * New: support for external stylesheets.
479
- * Fix: the "value" column type has been changed to text to prevent migration problems is some cases
480
- * New: global_persistent_config method allows accessing persistent storage with no owner (widget) assigned
481
- * New: any widget can now implement <tt>before_api_call</tt> interceptor. If it returns anything but empty hash, it'll be used as the result of *any* API call to this widget. The interceptor receives as parameter the name of the API call issued and the arguments. Use it to implement authorization.
482
- * Fix: got the Ext's state provider out of the way (thank you for all the confusion)
483
-
484
- # v0.5.1 - 2010-02-26
485
- * Compatibility with Ext 3.1.1
486
- * New: <tt>Netzke.page</tt> object now contains all the widgets declared on the page
487
- * Code: replaced (references to) deprecated function names
488
-
489
- # v0.5.0 - 2010-01-10
490
- * Compatibility with Ext 3.1.0
491
- * API change: Netzke widget's now should be declared directly in the views instead of controllers.
492
- * API change: all ExtJS and Netzke JavaScript and styles are now loaded with the help of <tt>netzke_init</tt> helper.
493
- * API change: <tt>persistence_key</tt> option replaces <tt>persistent_config_id</tt> option.
494
- * Impr: headers in panels in the "config" mode now show the widget's global ID.
495
- * New: required ExtJS version check introduced at initial Netzke load.
496
- * Depr: :widget_class_name option is deprecated, use :class_name.
497
- * DRY: now there's no need to always define "actions" method, use it to override the defaults, which are automatically calculated based on configuration for toolbars/menu.
498
- * Impr: each generated JS class now has its unique xtype, e.g. "netzkegridpanel".
499
- * Fix: FeedbackGhost moved over from netzke-basepack.
500
-
501
- # v0.4.5.2 - 2009-11-09
502
- * Fix: Hash#convert_keys and Array#convert_keys in core extensions are now renamed into deep_convert_keys, and now always plainly do what they're expected to do: recursively convert keys according to given block.
503
-
504
- # v0.4.5.1 - 2009-11-09
505
- * Regression: fixing inheritance and caching.
506
- * FeedbackGhost is too simple to be a Netzke widget (having no server part), so, moved to static JavaScript.
507
-
508
- # v0.4.5 - 2009-11-08
509
- * API change: Netzke::Base: <tt>id_name</tt> accessor renamed to <tt>global_id</tt>
510
- * Code: several internal code changes
511
- * Code: lightly better test coverage
512
- * New: <tt>Netzke::Base#global_id_by_reference</tt> method
513
- * Compatibility: resolving conflicts with the <tt>api</tt> property in some Ext v3.0 components
514
- * Fix: <tt>deliver_component</tt> was throwing exception when the requested component wasn't defined
515
- * New: <tt>persistent_config_id</tt> configuration option allows specifying an id by which persistent configuration is identified for the widget. Handy if different homogeneous widgets need to share the same persistent configuration.
516
- * New: <tt>Netzke::Base#persistent_config</tt> method now accepts an optional boolean parameter signalizing that the configuration is global (not bound to a widget)
517
- * Impr: cleaner handling of actions and toolbars; fbar configuration introduced.
518
- * Impr: calling an API method now provides for the result value (if return by the server) in the callback.
519
- * Impr: allows name spaced creation of Netzke widgets, e.g. widgets can now be defined under any module under Netzke, not only *directly* under Netzke.
520
- * New: support for Ext.Window-based widgets (it'll call show() on them when the "*_widget_render" helper is used).
521
-
522
- # v0.4.4 - 2009-10-12
523
- * API change: default handlers for actions and tools are now supposed to be prefixed with "on". E.g.: if you declare an action named <tt>clear_table</tt>, the handler must be called (in Ruby) <tt>on_clear_table</tt> (mapped to <tt>onClearTable</tt> in JavaScript).
524
- * Internal: the JavaScript instance now knows if persistent config is enabled (by checking this.persistentConfig).
525
- * Fix: solving the "Node cannot be inserted at the specified point in the hierarchy" problem by being more strict with duplicated IDs for elements on the same page.
526
- * Fix: Ext 3.0 compatibility.
527
- * Impr: <tt>getChildComponent</tt> now allows referring to a widget like this: "parent__parent__some_widget__some_nested_widget"
528
-
529
- # v0.4.3
530
- * Fix: reworking loadComponent()-related code, closing a security flaw when a malicious browser could send any configuration options to instantiate the widget being loaded.
531
-
532
- # v0.4.2 - 2009-09-11
533
- * Fix: the API call (at the JavaScript side) was ignoring the callback parameter.
534
- * Impr: if the array of API points is empty, it's not added into js_config anymore.
535
- * New: new testing widgets in netzke_controller.
536
- * Fix: extra CSS includes now take effect.
537
- * New: Support for masquerading as "World". In this mode all the "touched" persistent preferences will be overwritten for all roles and users.
538
-
539
- # v0.4.1 - 2009-09-06
540
- * Version bumb to force github rebuild the gem (Manifest is now included)
541
-
542
- # v0.4.0 - 2009-09-05
543
- * Major refactoring.
544
-
545
- # v0.3.2 - 2009-06-05
546
- * Netzke doesn't overwrite session[:user] anymore to not cause authentication-related problems.
547
-
548
- # v0.3.1 - 2009-05-07
549
- * Fix: persistent_config_manager can now be set to nil, and it will work fine
550
-
551
- # v0.3.0 - 2009-05-07
552
- * Refactor: got rid of NetzkeLayout model, now all layouts are stored in netzke_preferences
553
- * New: persistent_config now has a method for_widget that accepts a block
554
- * autotest compatibility
555
- * New: String#to_b converts a string to true/false
556
- * New: Netzke::Base.session introduced for session data
557
- * New: weak_children_config and strong_children_config can now be declared by a widget, which specifies weak and strong configuration that every child of this widget will receive (e.g. display/hide configuration tool)
558
- * Fix: (degradation) flash message is now shown again in case of erroneous attempt to load a widge
559
- * New: widgets now can check session[:netzke_just_logged_in] and session[:netzke_just_logged_out] automatically set by Netzke after login/logout
560
-
561
- # v0.2.11
562
- * Introduction of getOwnerComponent()-method to Ext.Component. It provides the Netzke widget this Component belongs to.
563
-
564
- # v0.2.10
565
- * Removed dependency on 'json' gem.
566
- * Rails v2.3.2 compatibility.
567
-
568
- # v0.2.9
569
- * Actions, toolbars and tools reworked for easier configuration.
570
- * Menus introduced (based on actions).
571
- * Significant code clean-up.
572
- * Bug fix (nasty one): Ext.widgetMixIn was getting messed up along with dynamic widget loading.
573
- * Must work in IE now.
574
-
575
- # v0.2.8
576
- * Support for extra javascripts and stylesheets per widget.
577
-
578
- # v0.2.7
579
- * QuickTips get initialized now, as otherwise Ext 2.2.1 doesn't properly destroy() BoxComponents for me.
580
-
581
- # v0.2.6
582
- * FeedackGhost is now capable of displaying multiple flash messages.
583
- * Dependencies slightly refactored.
584
- * An informative exception added to Base#component_instance.
585
- * JS-level inheritance enabled.
586
- * Work-around for the problem with Ext 2.2.1 in loadComponent.
587
- * Events "<action_id>click" added to the widgets along with the actions.
588
- * component_missing method added to Netzke::Base - called when a non-existing aggregate of a widget is tried to be invoked
589
- * Code readability improvements.
590
-
591
- # v0.2.5
592
- * Minor code restructuring.
593
-
594
- # v0.2.4
595
- * Some minor improvements.
596
-
597
- # v0.2.3
598
- * FeedbackGhost will show the feedback on the top of the screen independent of the page scrolling.
599
- * Ext.Panel#loadComponent will accept null as url to delete the currently loaded widget
600
- * Bug fix: persistent_config works again
601
-
602
- # v0.2.2
603
- * js_ext_config instance method added for overwriting
604
- * Multiuser support
605
- * Using Rails.logger for logging
606
- * "config"-class method for every class inheriting Netzke::Base - for class-level configurations
607
-
608
- # v0.2.1
609
- * Fixed the path to ext-base-min.js for production mode.
610
- * Also works in Safari now.
611
-
612
- # v0.2.0
613
- * Some re-factoring and redesign. Now simple compound widgets can be created on the fly in the controller
614
- * Added ext_widget[:quiet] configuration option to suppress widget's feedback
615
- * Support for extra CSS sources, similar to JS
616
- * NETZKE_BOOT_CONFIG introduced to specify which Netzke functionality should be disabled to reduce the size of /netzke/netzke.[js|css]
617
- * FeedbackGhost widget added - invisible widget providing feedback to the user
618
- * netzke_widget controller class-method renamed into netzke
619
- * JS-comments now get stripped also from the extra files that get included in the netzke-* gems.
620
- * Permissions joined js_config
621
- * Bug fixes
622
-
623
- # v0.1.4
624
- * Helpers added to facilitate ExtJS/netzke.js inclusion
625
- * The route defined for netzke_controller
626
- * netzke.html.erb-layout is not needed anymore, so not produced by the generator
627
- * Now compliant with Rails' forgery protection
628
-
629
- # v0.1.3
630
- * Generators fixed
631
-
632
- # v0.1.2
633
- * Fixed the bug with <widget>_class_definition returning empty string on sequential loading.
634
-
635
- # v0.1.1.1
636
- * Meta: moving from GitHub to RubyForge
637
-
638
- # v0.1.1
639
- * Inter-widget dependencies code reworked
640
- * JS-class code generation code slightly reworked
641
-
642
- # v0.1.0.2
643
- * Meta: fix outdated Manifest
644
-
645
- # v0.1.0.1
646
- * Meta work: replacing underscore with dash in the name
647
-
648
- # v0.1.0 - 2008-12-11
649
- * Initial release
107
+ Please check [0-12](https://github.com/netzke/netzke-core/blob/0-12/CHANGELOG.md) for previous changes.