kono_utils 0.15.10 → 0.15.11

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
  SHA1:
3
- metadata.gz: 93a0139b1f7691a89a813b1815a19cef9290248d
4
- data.tar.gz: 2514a8d1256fba03954d81d0624dbee8a8196249
3
+ metadata.gz: fa908781b92ab7ffee58cb7579da7184ab3caaa0
4
+ data.tar.gz: 5120270fa884ca616c8ed1ffbe70b9a2c3d3eba5
5
5
  SHA512:
6
- metadata.gz: 87d3676288d71b6c5602c75e6f76f824929a06c53158cdf3fe6b2aa1c23f0df8c18ec9e20b3a4d6f9b28fb49b4d66bd27601a0419b0fddc01c83efe032c618fd
7
- data.tar.gz: 2744ea8896d44db7037645a772ead72ec9186253e9add465f7a5db1440c58eef74030bbc5060a2b2be2578b758c76f5b211853ba3ee17853e328658c4fa94ce0
6
+ metadata.gz: 09c427f717885461540faa0a76b20c24a457181dc0ded4348edcd7b67905c4e7fc3a4b6e53e5c0032af3e87ca7179e048e560efd421eb7f2a26805a1ea4d5368
7
+ data.tar.gz: 14fcbd7a7ad985015439ac111047c03fd771cc79096c6098c953cd80e5f227c7d3de74c653eb8b4a014fcd761394cd1ea2618d321695ef854bce5c99fb6590e6
@@ -197,6 +197,9 @@ elaborate_buttons = (tabella)->
197
197
 
198
198
 
199
199
  ## Gestione elementi multipli
200
+ # Eventi sulla tabella:
201
+ # - row_append : lanciato quando viene appeso una nuova riga, parametri: tabella,riga appena aggiunta
202
+ # - row_removed : lanciato quando viene rimossa una nuova riga, parametri: tabella,riga appena rimossa
200
203
  $.fn.extend
201
204
  multiple_table: (options) ->
202
205
  # settings =
@@ -211,9 +214,11 @@ $.fn.extend
211
214
 
212
215
  $(tabella).on 'click', '.remove_row', (e)->
213
216
  e.preventDefault()
214
- $(@).closest('tr').hide().addClass('multiple_table_remove_row')
217
+ row = $(@).closest('tr')
218
+ row.hide().addClass('multiple_table_remove_row')
215
219
  $(@).find('[type="hidden"]').val('true')
216
220
  elaborate_buttons(tabella)
221
+ $(tabella).trigger("row_removed", [tabella, row]);
217
222
 
218
223
  $(tabella).on 'click', '.add_one_more', (e)->
219
224
  e.preventDefault()
@@ -226,6 +231,7 @@ $.fn.extend
226
231
 
227
232
  row.appendTo($(@).closest('tbody'))
228
233
  elaborate_buttons(tabella)
234
+ $(tabella).trigger("row_append", [tabella, row]);
229
235
 
230
236
  ##fine
231
237
 
@@ -3,11 +3,13 @@
3
3
  # Without it, only regular (second precise) DATETIME columns are created.
4
4
  if defined?(ActiveRecord)
5
5
  module ActiveRecord::ConnectionAdapters
6
- if ActiveRecord::Base.connection.instance_of? Mysql2Adapter
7
- version = Gem::Version.new(Mysql2::Client.info.fetch(:version))
8
- min_vresion = Gem::Version.new('5.6.4')
9
- if version>=min_vresion
10
- AbstractMysqlAdapter::NATIVE_DATABASE_TYPES[:datetime][:limit] = 6
6
+ if defined?(Mysql2Adapter)
7
+ if ActiveRecord::Base.connection.instance_of? Mysql2Adapter
8
+ version = Gem::Version.new(Mysql2::Client.info.fetch(:version))
9
+ min_vresion = Gem::Version.new('5.6.4')
10
+ if version>=min_vresion
11
+ AbstractMysqlAdapter::NATIVE_DATABASE_TYPES[:datetime][:limit] = 6
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -1,3 +1,3 @@
1
1
  module KonoUtils
2
- VERSION = '0.15.10'
2
+ VERSION = '0.15.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kono_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.10
4
+ version: 0.15.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-04 00:00:00.000000000 Z
11
+ date: 2017-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview