netzke-basepack 1.0.0.0 → 1.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/Gemfile +4 -1
- data/lib/netzke/basepack/version.rb +1 -1
- data/lib/netzke/grid/base.rb +3 -3
- data/lib/netzke/grid/base/client/extensions.js +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17d0bd6e0726aa0b3f85371b133cf6fb26681725
|
4
|
+
data.tar.gz: f267c481ea25fa5704236a1b0468d01a1a3f7f1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9930275347cfe17caa4425f00c193b6b01fd8c17c79f5dd3811b53c45fa1fd4fd0519b8e4a9203c70db4de3fb061b655ea0e5cba20992bebddb792aa0772bc4
|
7
|
+
data.tar.gz: f5a96607236e83fb049f6fe5094e790865cec6c2950f76b2a98374d844ba5bb31d6b7ef820b0813002677d9b4fbb5f726dcfa07ff2a10d8e5022564139507a9c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# v1.0.0.1 - 2016-03-07
|
2
|
+
|
3
|
+
* Grid: fix showing validation errors on inline update
|
4
|
+
|
5
|
+
*Mike (firemind)*
|
6
|
+
|
1
7
|
# v1.0.0.0 - 2016-01-04
|
2
8
|
|
3
9
|
## Components changed/renamed
|
@@ -16,6 +22,10 @@
|
|
16
22
|
|
17
23
|
* The new `attribute` DSL method and the accompanying `attribute_overrides` config option allow reconfiguring the way specific model attributes are presented by both the grid and the form. The `column` DSL method has been left for configuring what's specific for a column. For details, see [Netzke::Basepack::Attributes](http://www.rubydoc.info/github/netzke/netzke-basepack/Netzke/Basepack/Attributes).
|
18
24
|
|
25
|
+
* `data_adapter` method has been renamed to `model_adapter`
|
26
|
+
|
27
|
+
* `model_class` method in `AbstractAdapter` has been renamed to `model`
|
28
|
+
|
19
29
|
## Form
|
20
30
|
|
21
31
|
### Breaking changes
|
@@ -54,6 +64,26 @@
|
|
54
64
|
|
55
65
|
* `enable_extended_search` option is gone.
|
56
66
|
|
67
|
+
### I18n
|
68
|
+
|
69
|
+
* Before to localize association attribute it was needed to specify the attribute in the doubre-underscore notation,
|
70
|
+
for example:
|
71
|
+
|
72
|
+
|
73
|
+
es:
|
74
|
+
activerecord:
|
75
|
+
attributes:
|
76
|
+
book:
|
77
|
+
author__name: Autor
|
78
|
+
|
79
|
+
Now it should be cut down to the association name:
|
80
|
+
|
81
|
+
es:
|
82
|
+
activerecord:
|
83
|
+
attributes:
|
84
|
+
book:
|
85
|
+
author: Autor
|
86
|
+
|
57
87
|
### New and improved
|
58
88
|
|
59
89
|
* By default, Grid now uses form to add/edit records. Set `edit_inline` to true to use inline editing when possible (implicitly sets `paging` to `true`).
|
data/Gemfile
CHANGED
@@ -19,8 +19,11 @@ group :test do
|
|
19
19
|
gem 'database_cleaner'
|
20
20
|
end
|
21
21
|
|
22
|
-
group :development
|
22
|
+
group :development do
|
23
23
|
gem 'web-console', '~> 2.0'
|
24
|
+
end
|
25
|
+
|
26
|
+
group :development, :test do
|
24
27
|
# gem 'spring' # troubles...
|
25
28
|
gem 'pry-rails'
|
26
29
|
gem 'netzke-core', github: 'netzke/netzke-core', branch: 'master'
|
data/lib/netzke/grid/base.rb
CHANGED
@@ -54,7 +54,7 @@ module Netzke
|
|
54
54
|
# be specified as either a symbol (attribute name), or a hash containing the +name+ key pointing to the attribute
|
55
55
|
# name, as well as additional configuration keys.
|
56
56
|
#
|
57
|
-
# class Users < Netzke::
|
57
|
+
# class Users < Netzke::Grid::Base
|
58
58
|
# def configure(c)
|
59
59
|
# super
|
60
60
|
# c.model = User
|
@@ -82,7 +82,7 @@ module Netzke
|
|
82
82
|
# A Proc or a Hash used to scope out grid data. The Proc will receive the current relation as a parameter and must
|
83
83
|
# return the modified relation. For example:
|
84
84
|
#
|
85
|
-
# class Books < Netzke::
|
85
|
+
# class Books < Netzke::Grid::Base
|
86
86
|
# def configure(c)
|
87
87
|
# super
|
88
88
|
# c.model = Book
|
@@ -92,7 +92,7 @@ module Netzke
|
|
92
92
|
#
|
93
93
|
# Hash is being accepted for conivience, it will be directly passed to `where`. So the above can be rewritten as:
|
94
94
|
#
|
95
|
-
# class Books < Netzke::
|
95
|
+
# class Books < Netzke::Grid::Base
|
96
96
|
# def configure(c)
|
97
97
|
# super
|
98
98
|
# c.model = Book
|
@@ -95,11 +95,12 @@ Ext.define('Netzke.Grid.Proxy', {
|
|
95
95
|
},
|
96
96
|
|
97
97
|
update: function(op, callback, scope) {
|
98
|
-
var
|
98
|
+
var records = op.getRecords();
|
99
|
+
var data = Ext.Array.map(records, function(r) { return r.getData(); });
|
99
100
|
|
100
101
|
this.grid.server.update(data, function(res) {
|
101
102
|
var errors = [];
|
102
|
-
Ext.each(
|
103
|
+
Ext.each(records, function(r) {
|
103
104
|
var rid = r.getId(),
|
104
105
|
recordData = res[rid].record,
|
105
106
|
error = res[rid].error;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-basepack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Gorin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A set of feature-rich extendible Netzke components (such as Grid, Tree,
|
14
14
|
Form, Window) and component extensions which can be used as building blocks for
|