egov_utils 0.2.7 → 0.2.8
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.
- checksums.yaml +4 -4
- data/app/views/common/_grid.html.coffee +5 -4
- data/lib/egov_utils/fileuid.rb +1 -1
- data/lib/egov_utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c2499139cfa8692403a74faeed87240dd10ebc2f3a7ac54bc31756d2b58aba0
|
|
4
|
+
data.tar.gz: c4e10eca543b921d75615b0dd092ff7a498a77ee28a22149e3be1660c4f40dae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd7164c382d9b2a55c95b421be0c93204c807403ac6f3ebdac510a8d6fd4d64232fff479535dd37a7b2380c5f7a98af90f9cfed0461a0eae21c6a9b03edb861f
|
|
7
|
+
data.tar.gz: 0ad652a2bb582c9dd45bf3aea1d287b14dd0d00407d3945818a3e1ce50fd48daf08518ab4dcc8de0226287e7ed92b875a2317dd851d9f4a3a70de41974b54a58
|
|
@@ -4,6 +4,7 @@ $ ->
|
|
|
4
4
|
page_size ||= 50
|
|
5
5
|
additional_params ||= {}
|
|
6
6
|
create_attributes ||= {}
|
|
7
|
+
create_model ||= schema.model
|
|
7
8
|
%>
|
|
8
9
|
|
|
9
10
|
after_modal_submit = (evt, data)->
|
|
@@ -15,7 +16,7 @@ $ ->
|
|
|
15
16
|
|
|
16
17
|
<%# would be a bit cleaner to give the filled form to the shield grid create method, then send the form by ajax %>
|
|
17
18
|
createRecord = (evt)->
|
|
18
|
-
$.ajax('<%= new_polymorphic_path(
|
|
19
|
+
$.ajax('<%= new_polymorphic_path(create_model, create_attributes.merge(format: :js)) %>')
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
editRecord = (index)->
|
|
@@ -74,10 +75,10 @@ $ ->
|
|
|
74
75
|
create: (items, success, error) ->
|
|
75
76
|
newItem = items[0]
|
|
76
77
|
$.ajax
|
|
77
|
-
url: '<%= polymorphic_path(
|
|
78
|
+
url: '<%= polymorphic_path(create_model, format: :json) %>'
|
|
78
79
|
type: 'POST'
|
|
79
80
|
dataType: 'json'
|
|
80
|
-
data: { <%=
|
|
81
|
+
data: { <%= create_model.model_name.name.underscore %>: newItem.data }
|
|
81
82
|
complete: (xhr) ->
|
|
82
83
|
if xhr.readyState == 4 and xhr.status == 201
|
|
83
84
|
newItem.data.id = xhr.responseJSON.id
|
|
@@ -136,7 +137,7 @@ $ ->
|
|
|
136
137
|
toolbar: [
|
|
137
138
|
{
|
|
138
139
|
buttons: [
|
|
139
|
-
{ cls: 'btn btn-primary', caption: '<%= t('helpers.submit.create', model:
|
|
140
|
+
{ cls: 'btn btn-primary', caption: '<%= t('helpers.submit.create', model: create_model.model_name.human) %>', click: createRecord }
|
|
140
141
|
],
|
|
141
142
|
position: 'top'
|
|
142
143
|
}
|
data/lib/egov_utils/fileuid.rb
CHANGED
|
@@ -84,7 +84,7 @@ module EgovUtils
|
|
|
84
84
|
COURT_SENAT_SNIPPET = Snippet.new('senat', :integer, :any)
|
|
85
85
|
|
|
86
86
|
TYPES = {
|
|
87
|
-
'court' => Type.new(
|
|
87
|
+
'court' => Type.new(COURT_SENAT_SNIPPET, DASH_SNIPPET, COURT_AGEND_SNIPPET, DASH_SNIPPET, BC_SNIPPET, SLASH_SNIPPET, YEAR_SNIPPET),
|
|
88
88
|
'msp' => Type.new(BC_SNIPPET, SLASH_SNIPPET, YEAR_SNIPPET, DASH_SNIPPET, REGISTER_SNIPPET)
|
|
89
89
|
}
|
|
90
90
|
|
data/lib/egov_utils/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: egov_utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ondřej Ezr
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-02-
|
|
11
|
+
date: 2018-02-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|