egov_utils 0.2.8 → 0.2.9

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: 8c2499139cfa8692403a74faeed87240dd10ebc2f3a7ac54bc31756d2b58aba0
4
- data.tar.gz: c4e10eca543b921d75615b0dd092ff7a498a77ee28a22149e3be1660c4f40dae
3
+ metadata.gz: cea8f8ad01817ea166660171bf8ef27587fa743a37cedff9bc6618f88327344a
4
+ data.tar.gz: 409abf0ab08682e6186d2d9a4481e1d7cd3e2fd9b457d8c30708ee48d2102502
5
5
  SHA512:
6
- metadata.gz: bd7164c382d9b2a55c95b421be0c93204c807403ac6f3ebdac510a8d6fd4d64232fff479535dd37a7b2380c5f7a98af90f9cfed0461a0eae21c6a9b03edb861f
7
- data.tar.gz: 0ad652a2bb582c9dd45bf3aea1d287b14dd0d00407d3945818a3e1ce50fd48daf08518ab4dcc8de0226287e7ed92b875a2317dd851d9f4a3a70de41974b54a58
6
+ metadata.gz: 44abc56dc80945834b428077e40cb71855ddd4ee642e92334c787475b66c4ed187aeec3989e33f193f87b17295ea42190319285ae10f97a9246e20f4a1754cb9
7
+ data.tar.gz: f76d4e1501e8886f44efb603d2d9679fd7225c0236aa157cc16b5d8b914fe6c4bf21c7ba1469c1574683e7371b87b2dac2eabbfb9a2fa9863a3fd90286f3f63d
@@ -22,4 +22,5 @@
22
22
  //= require egov_utils/eGovUtilities
23
23
  //= require egov_utils/roles
24
24
  //= require egov_utils/file_uid
25
+ //= require clipboard
25
26
  //= require cookies_eu
@@ -61,6 +61,19 @@ window.eGovUtilities =
61
61
  $container ||= $(document)
62
62
  $('[data-provide="select2"]', $container).select2('destroy')
63
63
 
64
+ addCopyToClipboardLink: ($node)->
65
+ $cpyBtn = $('<a href="javascript:void(0)" data-clipboard-text="'+$node.text()+'"><i class="fa fa-clipboard"></i></a>').insertAfter($node)
66
+ clipboard = new Clipboard($cpyBtn.get(0));
67
+ # clipboard.on('success', (e)->
68
+ # console.info('Action:', e.action);
69
+ # console.info('Text:', e.text);
70
+ # console.info('Trigger:', e.trigger);
71
+ # )
72
+ # clipboard.on('error', (e)->
73
+ # console.error('Action:', e.action);
74
+ # console.error('Trigger:', e.trigger);
75
+ # )
76
+ $cpyBtn
64
77
 
65
78
  initModal: (modalId, options)->
66
79
  options = options || {}
@@ -17,7 +17,6 @@ module EgovUtils
17
17
  end
18
18
 
19
19
  def field_for_grid(attribute)
20
- binding.pry if attribute.type.nil?
21
20
  s = "\'"
22
21
  s << attribute.name
23
22
  s << '\': {path: "'
@@ -9,6 +9,7 @@ $ ->
9
9
 
10
10
  after_modal_submit = (evt, data)->
11
11
  grid = $("#<%= grid_id %>").swidget()
12
+ $("#<%= grid_id %>").trigger('grid:inserted', [data]);
12
13
  grid.dataSource.read()
13
14
 
14
15
  $('body').off 'egov:submitted', after_modal_submit
@@ -9,6 +9,7 @@ require 'azahara_schema'
9
9
 
10
10
  require 'font-awesome-sass'
11
11
  require 'modernizr-rails'
12
+ require 'clipboard/rails'
12
13
 
13
14
  require 'cookies_eu'
14
15
 
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.2.8'
2
+ VERSION = '0.2.9'
3
3
  end
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.8
4
+ version: 0.2.9
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-12 00:00:00.000000000 Z
11
+ date: 2018-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -290,6 +290,20 @@ dependencies:
290
290
  - - "~>"
291
291
  - !ruby/object:Gem::Version
292
292
  version: '2.7'
293
+ - !ruby/object:Gem::Dependency
294
+ name: clipboard-rails
295
+ requirement: !ruby/object:Gem::Requirement
296
+ requirements:
297
+ - - "~>"
298
+ - !ruby/object:Gem::Version
299
+ version: '1.7'
300
+ type: :runtime
301
+ prerelease: false
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - "~>"
305
+ - !ruby/object:Gem::Version
306
+ version: '1.7'
293
307
  - !ruby/object:Gem::Dependency
294
308
  name: azahara_schema
295
309
  requirement: !ruby/object:Gem::Requirement