egov_utils 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/common/_grid.html.coffee +19 -1
- data/config/locales/cs.yml +9 -0
- data/lib/egov_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e000fd823856ec116f01fcaf09edbdd090bc53f2090ac1a4afbf22fdb9ecf19
|
4
|
+
data.tar.gz: 86c5fef6cbe9b16a23c600af522b08c9455c6f0c024b1a5bcf74d741b0e93c41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc5a6ff405dfdccf06e21e1b3674876fdf99ee4b15c504089e5a0b774e93112efef47fa48e6f9aeda526eeca7c662e91507b621238203ebd3e478375119d3185
|
7
|
+
data.tar.gz: 27a9f9ca228d954cafef707ef0032102173de098e32a8be264dc56a83059f7b5ce8d1c0d78a784072233af254558559ddb2fa4f98c07a18891a12a45f92d83cd
|
@@ -1,6 +1,7 @@
|
|
1
1
|
$ ->
|
2
2
|
<%
|
3
3
|
grid ||= schema.outputs.grid
|
4
|
+
page_size ||= 50
|
4
5
|
additional_params ||= {}
|
5
6
|
create_attributes ||= {}
|
6
7
|
%>
|
@@ -45,6 +46,8 @@ $ ->
|
|
45
46
|
noRecordsText: '<%= t('label_no_records') %>'
|
46
47
|
dataSource: {
|
47
48
|
schema:
|
49
|
+
data: 'entities'
|
50
|
+
total: 'count'
|
48
51
|
fields:
|
49
52
|
<% schema.available_columns.each do |column| %>
|
50
53
|
<%= raw field_for_grid(column) %>
|
@@ -62,6 +65,13 @@ $ ->
|
|
62
65
|
type: 'GET'
|
63
66
|
url: '<%= polymorphic_path(schema.model, schema.to_param.merge(additional_params).merge(format: :json)) %>'
|
64
67
|
dataType: 'json'
|
68
|
+
data: (params)->
|
69
|
+
dataObject = $.extend({}, params)
|
70
|
+
dataObject.offset = params.skip if params.skip
|
71
|
+
dataObject.limit = params.take if params.take
|
72
|
+
delete dataObject.skip
|
73
|
+
delete dataObject.take
|
74
|
+
dataObject
|
65
75
|
}
|
66
76
|
modify: {
|
67
77
|
create: (items, success, error) ->
|
@@ -84,9 +94,17 @@ $ ->
|
|
84
94
|
# dataType: 'json'
|
85
95
|
# ).then(success, error)
|
86
96
|
}
|
87
|
-
operations: ['sort']
|
97
|
+
operations: ['sort', 'skip', 'take']
|
88
98
|
}
|
89
99
|
},
|
100
|
+
paging:
|
101
|
+
pageSize: <%= page_size %>
|
102
|
+
messages:
|
103
|
+
infoBarTemplate: "<%= t('schema_outputs.shield_grid.paging.info_bar') %>"
|
104
|
+
firstTooltip: "<%= t('schema_outputs.shield_grid.paging.tooltips.first') %>"
|
105
|
+
previousTooltip: "<%= t('schema_outputs.shield_grid.paging.tooltips.previous') %>"
|
106
|
+
nextTooltip: "<%= t('schema_outputs.shield_grid.paging.tooltips.next') %>"
|
107
|
+
lastTooltip: "<%= t('schema_outputs.shield_grid.paging.tooltips.last') %>"
|
90
108
|
columns: [
|
91
109
|
<% schema.columns.each do |col| %>
|
92
110
|
<%= raw column_for_grid(grid, col) %>
|
data/config/locales/cs.yml
CHANGED
@@ -9,6 +9,15 @@ cs:
|
|
9
9
|
file_input:
|
10
10
|
placeholder: 'Vyberte soubor...'
|
11
11
|
button_label: Procházet
|
12
|
+
schema_outputs:
|
13
|
+
shield_grid:
|
14
|
+
paging:
|
15
|
+
info_bar: "{0}-{1} položek z {2}"
|
16
|
+
tooltips:
|
17
|
+
previous: Předchozí
|
18
|
+
next: Následující
|
19
|
+
first: První stránka
|
20
|
+
last: Poslední stránka
|
12
21
|
cookies_eu:
|
13
22
|
cookies_text: K ukládání nastavení a správnému fungování využíváme soubory cookies. Používáním webu s jejich používáním souhlasíte.
|
14
23
|
ok: Rozumím
|
data/lib/egov_utils/version.rb
CHANGED