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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bd31fcb4d9de3777be3945d2888752d1ff32673dcf13ec041026f24d2f7424b
4
- data.tar.gz: 649c062a6bf86a56716835691ccfdf0ea4addf3f1bfa5eccf5ea2368afc26aea
3
+ metadata.gz: 3e000fd823856ec116f01fcaf09edbdd090bc53f2090ac1a4afbf22fdb9ecf19
4
+ data.tar.gz: 86c5fef6cbe9b16a23c600af522b08c9455c6f0c024b1a5bcf74d741b0e93c41
5
5
  SHA512:
6
- metadata.gz: e480af6f3c801dfc11467ec8cf27ace0d8f7f22f1606f36df0401eee146e76f7d284ed203e634051d506e86b21109a127d6b96224d50a2ec291458edd09b071f
7
- data.tar.gz: 0b6d87e769e33b08581adebd2f62a0dd3ba3e3ef043ce41037793391f753ad75d0a9816b02b9a461162ffdbaa4fe8cabe3aafc7ab0059f31a7e80aa3d07f29e8
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) %>
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egov_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr