netzke-basepack 0.12.2 → 0.12.3

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.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.12.3 - 2015-06-16
2
+ * Fix bug preventing primary key column from being overridden in a specific case
3
+ * Fix grid freeze when `prohibit_read` is set to true
4
+
1
5
  # 0.12.2 - 2015-06-06
2
6
  * Fix exception when nesting a grid with action column
3
7
  * Fix Tree for Ruby 1.9.3
@@ -15,7 +15,7 @@ Ext.define("Netzke.mixins.Basepack.Columns", {
15
15
  this.fields = [];
16
16
 
17
17
  // Run through columns and set up different configuration for each
18
- Ext.each(this.columns, function(c, i){
18
+ Ext.each(this.columns.items, function(c, i){
19
19
 
20
20
  this.netzkeNormalizeRenderer(c);
21
21
 
@@ -88,7 +88,7 @@ Ext.define("Netzke.mixins.Basepack.Columns", {
88
88
  Ext.each(this.columnsOrder, function(c) {
89
89
  var mainColConfig;
90
90
 
91
- Ext.each(this.columns, function(oc) {
91
+ Ext.each(this.columns.items, function(oc) {
92
92
  if (c.name === oc.name) {
93
93
  mainColConfig = Ext.apply({}, oc);
94
94
  return false;
@@ -99,10 +99,10 @@ Ext.define("Netzke.mixins.Basepack.Columns", {
99
99
  }, this);
100
100
 
101
101
  // We don't need original columns any longer
102
- delete this.columns;
102
+ delete this.columns.items;
103
103
 
104
104
  // ... instead, define own column model
105
- this.columns = colModelConfig;
105
+ this.columns.items = colModelConfig;
106
106
  },
107
107
 
108
108
  // Normalizes the renderer for a column.
@@ -107,6 +107,7 @@ module Netzke
107
107
  primary_key = data_adapter.primary_key
108
108
  raise "Model #{data_adapter.model_class.name} does not have a primary column" if primary_key.blank?
109
109
  c = ColumnConfig.new(data_adapter.primary_key, data_adapter)
110
+ send(:"#{c.name}_column", c) if respond_to?(:"#{c.name}_column")
110
111
  augment_column_config(c)
111
112
  cols.insert(0, c)
112
113
  end
@@ -102,6 +102,7 @@ module Netzke
102
102
  res
103
103
  else
104
104
  this.netzke_feedback I18n.t("netzke.basepack.grid.cannot_#{op}")
105
+ this.netzke_set_result(data: [], total: 0)
105
106
  end
106
107
  end
107
108
  end
@@ -26,7 +26,7 @@
26
26
 
27
27
  Ext.each(this.columnsOrder, function(c) {
28
28
  var mainColConfig;
29
- Ext.each(this.columns, function(oc) {
29
+ Ext.each(this.columns.items, function(oc) {
30
30
  if (c.name === oc.name) {
31
31
  mainColConfig = Ext.apply({}, oc);
32
32
  return false;
@@ -36,11 +36,7 @@
36
36
  colModelConfig.push(Ext.apply(mainColConfig, c));
37
37
  }, this);
38
38
 
39
- // We don't need original columns any longer
40
- delete this.columns;
41
-
42
- // ... instead, define own column model
43
- this.columns = colModelConfig;
39
+ this.columns.items = colModelConfig;
44
40
 
45
41
  // data store
46
42
  this.store = this.netzkeBuildStore();
@@ -396,7 +396,7 @@ module Netzke
396
396
  c.title = c.title || self.class.js_config.properties[:title] || data_class.name.pluralize
397
397
  c.bbar = bbar
398
398
  c.context_menu = context_menu
399
- c.columns = js_columns
399
+ c.columns = {items: js_columns}
400
400
  c.columns_order = columns_order
401
401
  c.inline_data = read if c.load_inline_data
402
402
  c.pri = data_adapter.primary_key
@@ -408,7 +408,7 @@ module Netzke
408
408
  def populate_cols_with_filters(c)
409
409
  c.default_filters.each do |f|
410
410
 
411
- c.columns.each do |col|
411
+ c.columns[:items].each do |col|
412
412
  if col[:name].to_sym == f[:column].to_sym
413
413
  if f[:value].is_a?(Hash)
414
414
  val = {}
@@ -1,5 +1,5 @@
1
1
  module Netzke
2
2
  module Basepack
3
- VERSION = "0.12.2"
3
+ VERSION = "0.12.3"
4
4
  end
5
5
  end
data/locales/uk.yml ADDED
@@ -0,0 +1,101 @@
1
+ ru:
2
+ netzke:
3
+ basepack:
4
+ grid:
5
+ actions:
6
+ add:
7
+ text: Додати
8
+ edit:
9
+ text: Редагувати
10
+ del:
11
+ text: Видалити
12
+ tooltip: Видалити
13
+ apply:
14
+ text: Зберегти
15
+ add_in_form:
16
+ text: Додати у вікні
17
+ edit_in_form:
18
+ text: Редагувати у вікні
19
+ search:
20
+ text: Пошук
21
+
22
+ deleted_n_records:
23
+ one: "1 запис видалено"
24
+ other: "Записів видалено: %{count}"
25
+ cannot_delete: "У вас недостатньо прав для видалення"
26
+ confirmation: Підтвердження
27
+ are_you_sure: Ви впевнені?
28
+
29
+ record_form_window:
30
+ actions:
31
+ ok:
32
+ text: Гаразд
33
+ cancel:
34
+ text: Скасувати
35
+
36
+ search_window:
37
+ title: Розширений пошук
38
+ actions:
39
+ search:
40
+ text: Пошук
41
+ cancel:
42
+ text: Скасувати
43
+
44
+ form:
45
+ actions:
46
+ edit:
47
+ text: Редагувати
48
+ tooltip: Редагувати
49
+ cancel:
50
+ text: Скасувати
51
+ tooltip: Скасувати редагування
52
+ apply:
53
+ text: Застосувати
54
+ tooltip: Застосувати зміни
55
+
56
+ search_panel:
57
+ presets: Шаблони
58
+ equals: Дорівнює
59
+ greater_than: Більше ніж
60
+ less_than: Більше ніж
61
+ contains: Містить
62
+ matches: Співпадає
63
+ date_equals: "на дату"
64
+ before: Перед
65
+ after: Після
66
+
67
+ paging_form:
68
+ actions:
69
+ search:
70
+ text: Пошук
71
+ tooltip: Розширений пошук
72
+
73
+ query_builder:
74
+ presets: Шаблони
75
+ preset_saved: Шаблон успішно збережено
76
+ preset_deleted: Шаблон успішно видалено
77
+ overwrite_confirm: "Ви дійсно хочете змінити шаблон '{0}'?"
78
+ overwrite_confirm_title: "Зміна шаблону"
79
+ delete_confirm: "Ви дійсно хочете видалити шаблон '{0}'?"
80
+ delete_confirm_title: "Видалення шаблону"
81
+ actions:
82
+ clear_all:
83
+ text: Видалити все
84
+ tooltip: Видалити всі умови
85
+ reset:
86
+ text: Очистити
87
+ tooltip: Очистити всі поля
88
+ save_preset:
89
+ text: Зберегти шаблон
90
+ tooltip: Зберегти шаблон
91
+ delete_preset:
92
+ text: Видалити шаблон
93
+ tooltip: Видалити шаблон
94
+ apply:
95
+ text: Застосувати
96
+ tooltip: Застосувати зміни
97
+
98
+ formats:
99
+ date: d.m.Y
100
+ datetime: d.m.Y H:i:s
101
+ time: H:i:s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netzke-basepack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-06 00:00:00.000000000 Z
12
+ date: 2015-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: netzke-core
@@ -116,6 +116,7 @@ files:
116
116
  - locales/es.yml
117
117
  - locales/nl.yml
118
118
  - locales/ru.yml
119
+ - locales/uk.yml
119
120
  - stylesheets/basepack.css
120
121
  - stylesheets/datetimefield.css
121
122
  - CHANGELOG.md