netzke-core 1.0.0.0.pre4 → 1.0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -15
- data/LICENSE +1 -1
- data/README.md +8 -3
- data/lib/netzke/base.rb +1 -1
- data/lib/netzke/core/action_config.rb +0 -1
- data/lib/netzke/core/component_config.rb +0 -5
- data/lib/netzke/core/composition.rb +1 -1
- data/lib/netzke/core/configuration.rb +1 -1
- data/lib/netzke/core/dsl_config_base.rb +1 -1
- data/lib/netzke/core/railz/controller_extensions.rb +1 -1
- data/lib/netzke/core/ruby_ext/hash.rb +1 -0
- data/lib/netzke/core/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a30d44ea57bebd319158780498fdb886e9286052
|
4
|
+
data.tar.gz: 0a0c59a054c5aa70f343dfd91ba15c2484aa7370
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fb4de64f99e93c3141f33b574c707d756d9d82821b11b81a594135e0eb538398288d378aa556c2c1aab9fe488e4cca62b160b3b6b110759f30db280fa5a726e
|
7
|
+
data.tar.gz: 0ed2b42ee41182db0a51040d3ab136cf87a1f7ddcbd3d565b22d9d51e8bef66f1a3d160cbcbd40dc28c2ad34f76be20134149bcee77e15361596256690da6fc4
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,25 @@
|
|
1
|
-
|
1
|
+
# v1.0.0.0 - 2016-01-04
|
2
|
+
|
3
|
+
## New and improved
|
2
4
|
|
3
5
|
* Routing (see README)
|
4
6
|
|
5
|
-
* `Base
|
7
|
+
* 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.
|
8
|
+
|
9
|
+
* Introduce `Base#l` method that converts the passed string to JSON literal; useful for asigning JS functions inline
|
10
|
+
(see below).
|
11
|
+
|
12
|
+
* There's no longer need to call `netzke` in routes.rb unless you want to modify routing defaults.
|
6
13
|
|
7
14
|
* The `action` DSL method now also accepts a list of endpoints, e.g.:
|
8
15
|
|
9
16
|
action :do_something, :do_something_else
|
10
17
|
|
11
|
-
* `netzkeNotify` (former `netzkeFeedback`)
|
18
|
+
* `netzkeNotify` (former `netzkeFeedback`) now accepts the `title` option
|
19
|
+
|
20
|
+
* 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.
|
12
21
|
|
13
|
-
|
22
|
+
## Breaking changes
|
14
23
|
|
15
24
|
* A component's subfolders for client-class scripts and stylesheets have been consolidated from `javascripts`/`stylesheets` into `client`
|
16
25
|
|
@@ -20,11 +29,11 @@
|
|
20
29
|
|
21
30
|
* `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`).
|
22
31
|
|
23
|
-
* Assigning inline JS functions inside the `client_class` (former `js_configure`) block no longer makes a JSON literal
|
24
|
-
of them; instead, wrap it with the `l` method accessible for all components:
|
32
|
+
* Assigning inline JS functions inside the `client_class` (former `js_configure`) block no longer automatically makes a JSON literal
|
33
|
+
of them; instead, you need to wrap it with the `l` method accessible for all components:
|
25
34
|
|
26
35
|
client_class do |c|
|
27
|
-
c.
|
36
|
+
c.netzke_on_refresh = l(<<-JS)
|
28
37
|
function(){
|
29
38
|
this.setTitle("Refresh tool clicked");
|
30
39
|
}
|
@@ -94,7 +103,7 @@
|
|
94
103
|
|
95
104
|
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).
|
96
105
|
|
97
|
-
* Specifying `bbar` and other toolbars in `configure_client` (former `js_configure`) no longer works.
|
106
|
+
* Specifying `bbar` and other toolbars in `configure_client` (former `js_configure`) no longer works. They must now be in the main `configure` method.
|
98
107
|
|
99
108
|
* Default handler name for actions is now prefixed with `netzkeOn` instead of `on`. E.g., for `action :do_something`, the handler
|
100
109
|
must be called `netzkeOnDoSomething`.
|
@@ -109,12 +118,7 @@
|
|
109
118
|
|
110
119
|
* 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.
|
111
120
|
|
112
|
-
|
113
|
-
|
114
|
-
* 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.
|
115
|
-
|
116
|
-
* 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.
|
117
|
-
|
118
|
-
* There's no longer need to call `netzke` in routes.rb unless you want to modify routing defaults.
|
121
|
+
* `Base::Plugin` won't set `this.cmp` for you any longer, but rather receive it as a parameter for `init()`
|
119
122
|
|
123
|
+
---
|
120
124
|
Please check [0-12](https://github.com/netzke/netzke-core/blob/0-12/CHANGELOG.md) for previous changes.
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -257,11 +257,16 @@ hash on the client class, similarly to how Ext JS handles routes in its controll
|
|
257
257
|
If a component gets loaded dynamically and it figures out that one of its routes is currently active, it'll trigger the
|
258
258
|
corresponding handler after being rendered.
|
259
259
|
|
260
|
+
## Authentication and authorization
|
261
|
+
|
262
|
+
You can access the instance of the Netzke controller via `Netzke::Base.controller`. As it inherits from
|
263
|
+
`ApplicationController`, it also has the access to the `current_user` if that is defined.
|
264
|
+
|
260
265
|
## Requirements
|
261
266
|
|
262
|
-
* Ruby >=
|
267
|
+
* Ruby >= 1.9.3
|
263
268
|
* Rails ~> 4.2.0
|
264
|
-
* Ext JS = 5.1.
|
269
|
+
* Ext JS = 5.1.1
|
265
270
|
|
266
271
|
## Installation
|
267
272
|
|
@@ -312,4 +317,4 @@ If you feel particularily generous, you can support the author by donating a cou
|
|
312
317
|
* [Twitter](http://twitter.com/netzke) - latest news about the framework
|
313
318
|
|
314
319
|
---
|
315
|
-
Copyright (c) 2009-
|
320
|
+
Copyright (c) 2009-2016 [Good Bit Labs](http://goodbitlabs.com/), released under the same license as [Ext JS](https://www.sencha.com/legal/#Sencha_Ext_JS)
|
data/lib/netzke/base.rb
CHANGED
@@ -83,7 +83,7 @@ module Netzke
|
|
83
83
|
@item_id = conf[:item_id] || @name
|
84
84
|
|
85
85
|
# Make +client_config+ accessible in +configure+ before calling +super+
|
86
|
-
config.client_config = (conf.delete(:client_config)
|
86
|
+
config.client_config = HashWithIndifferentAccess.new(conf.delete(:client_config))
|
87
87
|
|
88
88
|
# Build complete component configuration
|
89
89
|
configure(config)
|
@@ -1,10 +1,5 @@
|
|
1
1
|
module Netzke::Core
|
2
2
|
class ComponentConfig < DslConfigBase
|
3
|
-
def initialize(name, component)
|
4
|
-
self.name = name.to_s
|
5
|
-
self.client_config = {}
|
6
|
-
end
|
7
|
-
|
8
3
|
def set_defaults!
|
9
4
|
self.item_id ||= name
|
10
5
|
self.klass ||= self.class_name.try(:constantize) || name.camelize.constantize
|
@@ -156,7 +156,7 @@ module Netzke::Core
|
|
156
156
|
component_name = component_name.to_sym
|
157
157
|
|
158
158
|
ComponentConfig.new(component_name, self).tap do |cfg|
|
159
|
-
cfg.client_config = overrides[:client_config]
|
159
|
+
cfg.client_config = HashWithIndifferentAccess.new(overrides[:client_config])
|
160
160
|
cfg.item_id = overrides[:item_id]
|
161
161
|
|
162
162
|
if respond_to?(:"#{component_name}_component")
|
@@ -95,7 +95,7 @@ module Netzke::Core
|
|
95
95
|
# c.scope = { author_id: client_config.author_id }
|
96
96
|
# end
|
97
97
|
def client_config
|
98
|
-
|
98
|
+
@client_config ||= HashWithIndifferentAccess.new(config.client_config)
|
99
99
|
end
|
100
100
|
|
101
101
|
protected
|
data/lib/netzke/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.0
|
4
|
+
version: 1.0.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Gorin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uglifier
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description:
|
41
|
+
description: Netzke helps you build complex web UI in a modular way
|
42
42
|
email: max@goodbitlabs.com
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
@@ -120,6 +120,6 @@ rubyforge_project:
|
|
120
120
|
rubygems_version: 2.5.1
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
|
-
summary: Client-server
|
123
|
+
summary: Client-server UI components with Sencha Ext JS and Ruby on Rails
|
124
124
|
test_files: []
|
125
125
|
has_rdoc:
|