effective_form_inputs 1.1.12 → 1.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/effective_ckeditor_text_area/initialize.js.coffee +4 -2
- data/app/assets/javascripts/effective_date_picker/initialize.js.coffee +7 -4
- data/app/assets/javascripts/effective_date_time_picker/initialize.js.coffee +7 -3
- data/app/assets/javascripts/effective_email/initialize.js.coffee +3 -2
- data/app/assets/javascripts/effective_panel_select/initialize.js.coffee +3 -2
- data/app/assets/javascripts/effective_price/initialize.js.coffee +3 -2
- data/app/assets/javascripts/effective_select/initialize.js.coffee +8 -3
- data/app/assets/javascripts/effective_tel/initialize.js.coffee +3 -2
- data/app/assets/javascripts/effective_time_picker/initialize.js.coffee +7 -3
- data/app/assets/javascripts/effective_url/initialize.js.coffee +3 -2
- data/lib/effective_form_inputs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeb0181400a5d7e2f7cfdc65c37123497b73ea10
|
4
|
+
data.tar.gz: 8a1e97eb165696ed7b7e59b470bc775eba9d6837
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8d40052e83487c71edbd6f305660a3b965a2becc9bffe6243aba6f40441bc773c6fcdd4a4158aa15c92e427b20415fc49997ad32d656d38aa91bd453c99f8ed
|
7
|
+
data.tar.gz: a6c35017121e2308f56e004d0a6e20c9524de1ff564977ded55989939c635417631f4d021989cfb630b17268e38d4a3d9ef59313ed2af2210abdd209664f33e7
|
@@ -1,5 +1,5 @@
|
|
1
|
-
initialize = ->
|
2
|
-
$inputs = $('textarea.effective_ckeditor_text_area:not(.initialized)')
|
1
|
+
initialize = (target) ->
|
2
|
+
$inputs = $(target || document).find('textarea.effective_ckeditor_text_area:not(.initialized)')
|
3
3
|
setupCkeditor($inputs)
|
4
4
|
|
5
5
|
$inputs.each (i, element) ->
|
@@ -93,5 +93,7 @@ $(document).on 'page:change', -> initialize()
|
|
93
93
|
$(document).on 'turbolinks:load', -> initialize()
|
94
94
|
$(document).on 'turbolinks:render', -> initialize()
|
95
95
|
$(document).on 'cocoon:after-insert', -> initialize()
|
96
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
97
|
+
|
96
98
|
$(document).on 'turbolinks:before-cache', ->
|
97
99
|
CKEDITOR.instances[name].destroy() for name, _ of CKEDITOR.instances if CKEDITOR?
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# http://eonasdan.github.io/bootstrap-datetimepicker/Options/
|
2
2
|
|
3
|
-
initialize = ->
|
4
|
-
$('input.effective_date_picker:not(.initialized)').each (i, element) ->
|
3
|
+
initialize = (target) ->
|
4
|
+
$(target || document).find('input.effective_date_picker:not(.initialized)').each (i, element) ->
|
5
5
|
element = $(element)
|
6
6
|
options = element.data('input-js-options') || {}
|
7
7
|
|
@@ -13,6 +13,9 @@ $(document).on 'page:change', -> initialize()
|
|
13
13
|
$(document).on 'turbolinks:load', -> initialize()
|
14
14
|
$(document).on 'turbolinks:render', -> initialize()
|
15
15
|
$(document).on 'cocoon:after-insert', -> initialize()
|
16
|
-
$(document).on '
|
17
|
-
$('input.effective_date_picker.initialized').datetimepicker('destroy')
|
16
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
18
17
|
|
18
|
+
$(document).on 'turbolinks:before-cache', ->
|
19
|
+
$('input.effective_date_picker.initialized').each (i, element) ->
|
20
|
+
$input = $(element)
|
21
|
+
$input.datetimepicker('destroy') if $input.data('datetimepicker')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# http://eonasdan.github.io/bootstrap-datetimepicker/Options/
|
2
2
|
|
3
|
-
initialize = ->
|
4
|
-
$('input.effective_date_time_picker:not(.initialized)').each (i, element) ->
|
3
|
+
initialize = (target) ->
|
4
|
+
$(target || document).find('input.effective_date_time_picker:not(.initialized)').each (i, element) ->
|
5
5
|
element = $(element)
|
6
6
|
options = element.data('input-js-options') || {}
|
7
7
|
|
@@ -13,5 +13,9 @@ $(document).on 'page:change', -> initialize()
|
|
13
13
|
$(document).on 'turbolinks:load', -> initialize()
|
14
14
|
$(document).on 'turbolinks:render', -> initialize()
|
15
15
|
$(document).on 'cocoon:after-insert', -> initialize()
|
16
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
17
|
+
|
16
18
|
$(document).on 'turbolinks:before-cache', ->
|
17
|
-
$('input.effective_date_time_picker.initialized').
|
19
|
+
$('input.effective_date_time_picker.initialized').each (i, element) ->
|
20
|
+
$input = $(element)
|
21
|
+
$input.datetimepicker('destroy') if $input.data('datetimepicker')
|
@@ -1,5 +1,5 @@
|
|
1
|
-
initialize = ->
|
2
|
-
$('input.effective_email:not(.initialized)').each (i, element) ->
|
1
|
+
initialize = (target) ->
|
2
|
+
$(target || document).find('input.effective_email:not(.initialized)').each (i, element) ->
|
3
3
|
element = $(element)
|
4
4
|
options = element.data('input-js-options') || {}
|
5
5
|
|
@@ -11,3 +11,4 @@ $(document).on 'page:change', -> initialize()
|
|
11
11
|
$(document).on 'turbolinks:load', -> initialize()
|
12
12
|
$(document).on 'turbolinks:render', -> initialize()
|
13
13
|
$(document).on 'cocoon:after-insert', -> initialize()
|
14
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
@@ -1,5 +1,5 @@
|
|
1
|
-
initialize = ->
|
2
|
-
$('div.effective-panel-select:not(.initialized)').each (i, element) ->
|
1
|
+
initialize = (target) ->
|
2
|
+
$(target || document).find('div.effective-panel-select:not(.initialized)').each (i, element) ->
|
3
3
|
element = $(element)
|
4
4
|
options = element.data('input-js-options') || {}
|
5
5
|
|
@@ -10,3 +10,4 @@ $(document).on 'page:change', -> initialize()
|
|
10
10
|
$(document).on 'turbolinks:load', -> initialize()
|
11
11
|
$(document).on 'turbolinks:render', -> initialize()
|
12
12
|
$(document).on 'cocoon:after-insert', -> initialize()
|
13
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
@@ -1,5 +1,5 @@
|
|
1
|
-
initialize = ->
|
2
|
-
$('input.effective_price:not(.initialized)').each (i, element) ->
|
1
|
+
initialize = (target) ->
|
2
|
+
$(target || document).find('input.effective_price:not(.initialized)').each (i, element) ->
|
3
3
|
element = $(element)
|
4
4
|
options = element.data('input-js-options') || {}
|
5
5
|
|
@@ -11,6 +11,7 @@ $(document).on 'page:change', -> initialize()
|
|
11
11
|
$(document).on 'turbolinks:load', -> initialize()
|
12
12
|
$(document).on 'turbolinks:render', -> initialize()
|
13
13
|
$(document).on 'cocoon:after-insert', -> initialize()
|
14
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
14
15
|
|
15
16
|
# Prevent non-currency buttons from being pressed
|
16
17
|
$(document).on 'keydown', "input[type='text'].effective_price", (event) ->
|
@@ -6,8 +6,8 @@ formatWithGlyphicon = (data, container) ->
|
|
6
6
|
else
|
7
7
|
data.text
|
8
8
|
|
9
|
-
initialize = ->
|
10
|
-
$('select.effective_select:not(.initialized)').each (i, element) ->
|
9
|
+
initialize = (target) ->
|
10
|
+
$(target || document).find('select.effective_select:not(.initialized)').each (i, element) ->
|
11
11
|
element = $(element)
|
12
12
|
options = element.data('input-js-options') || {}
|
13
13
|
|
@@ -28,8 +28,13 @@ $ -> initialize()
|
|
28
28
|
$(document).on 'page:change', -> initialize()
|
29
29
|
$(document).on 'turbolinks:load', -> initialize()
|
30
30
|
$(document).on 'turbolinks:render', -> initialize()
|
31
|
-
$(document).on 'turbolinks:before-cache', -> $('select.effective_select.initialized').select2('destroy')
|
32
31
|
$(document).on 'cocoon:after-insert', -> initialize()
|
32
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
33
|
+
|
34
|
+
$(document).on 'turbolinks:before-render', ->
|
35
|
+
$('select.effective_select.initialized').each (i, element) ->
|
36
|
+
$input = $(element)
|
37
|
+
$input.select2('destroy') if $input.data('select2')
|
33
38
|
|
34
39
|
# If we're working with a polymorphic select, split out the ID and assign the hidden _type and _id fields
|
35
40
|
$(document).on 'change', "select.effective_select.polymorphic", (event) ->
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# http://digitalbush.com/projects/masked-input-plugin/
|
2
2
|
|
3
|
-
initialize = ->
|
4
|
-
$('input.effective_tel:not(.initialized)').each (i, element) ->
|
3
|
+
initialize = (target) ->
|
4
|
+
$(target || document).find('input.effective_tel:not(.initialized)').each (i, element) ->
|
5
5
|
element = $(element)
|
6
6
|
options = element.data('input-js-options') || {}
|
7
7
|
|
@@ -15,3 +15,4 @@ $(document).on 'page:change', -> initialize()
|
|
15
15
|
$(document).on 'turbolinks:load', -> initialize()
|
16
16
|
$(document).on 'turbolinks:render', -> initialize()
|
17
17
|
$(document).on 'cocoon:after-insert', -> initialize()
|
18
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# http://eonasdan.github.io/bootstrap-datetimepicker/Options/
|
2
2
|
|
3
|
-
initialize = ->
|
4
|
-
$('input.effective_time_picker:not(.initialized)').each (i, element) ->
|
3
|
+
initialize = (target) ->
|
4
|
+
$(target || document).find('input.effective_time_picker:not(.initialized)').each (i, element) ->
|
5
5
|
element = $(element)
|
6
6
|
options = element.data('input-js-options') || {}
|
7
7
|
|
@@ -13,6 +13,10 @@ $(document).on 'page:change', -> initialize()
|
|
13
13
|
$(document).on 'turbolinks:load', -> initialize()
|
14
14
|
$(document).on 'turbolinks:render', -> initialize()
|
15
15
|
$(document).on 'cocoon:after-insert', -> initialize()
|
16
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
17
|
+
|
16
18
|
$(document).on 'turbolinks:before-cache', ->
|
17
|
-
$('input.effective_time_picker.initialized').
|
19
|
+
$('input.effective_time_picker.initialized').each (i, element) ->
|
20
|
+
$input = $(element)
|
21
|
+
$input.datetimepicker('destroy') if $input.data('datetimepicker')
|
18
22
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# http://digitalbush.com/projects/masked-input-plugin/
|
2
2
|
|
3
|
-
initialize = ->
|
4
|
-
$('input.effective_url:not(.initialized)').each (i, element) ->
|
3
|
+
initialize = (target) ->
|
4
|
+
$(target || document).find('input.effective_url:not(.initialized)').each (i, element) ->
|
5
5
|
element = $(element)
|
6
6
|
options = element.data('input-js-options') || {}
|
7
7
|
|
@@ -13,3 +13,4 @@ $(document).on 'page:change', -> initialize()
|
|
13
13
|
$(document).on 'turbolinks:load', -> initialize()
|
14
14
|
$(document).on 'turbolinks:render', -> initialize()
|
15
15
|
$(document).on 'cocoon:after-insert', -> initialize()
|
16
|
+
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_form_inputs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|