effective_bootstrap 0.5.1 → 0.5.2

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: 749c6eac407a8fd876e7670f4d2383a662001e78
4
- data.tar.gz: 40d6162703c6beea2754367463a7352b69b035d5
3
+ metadata.gz: 414f98769a02f734a5fadf2836a52d68c2c65484
4
+ data.tar.gz: 28d606b988da8a8ce4446fc95ba51cb203502125
5
5
  SHA512:
6
- metadata.gz: 4bcc5cc2e67a2359785ff91f662190283fd0714ed36c8f693ae672d47841c67690920108bcac9ddf9d94f78bd5c457c82097badf75fe7c4f41889dc80b54b277
7
- data.tar.gz: 356a9b163c2465efc79df11274911ffeb65f72a2af1bb855be3761e02f4d08017d41432e06674a9cc81d13fc9e5f073b467af3fcd86b9ec53091cbab3f779d0d
6
+ metadata.gz: 9ae3da9c073dac7889c66ecbfd376a35489aab1b0ffafa870ef7c8af5c5794b06d77ea4c00c680cf3ff4020d7057adbd28bee630c83b62454fdec5d29c5a4a31
7
+ data.tar.gz: e530b5b21de9ef12feaf392165fe2bfaea69568b31e0d02a0e90575e07b4963deacc006ecc338aa7c600a652e40a1e4630e65c505bc03c4e39d13a958248c7d0
@@ -144,13 +144,13 @@ this.EffectiveForm ||= new class
144
144
  # Sets EffectiveBootstrap. current_click.
145
145
  # This displays the spinner here, and directs any flash messages before and after loadRemoteForm
146
146
  $(document).on 'click', '.form-actions a[data-remote],.form-actions button[type=submit]', (event) ->
147
- $submit = $(@)
148
- $form = $submit.closest('form')
147
+ $submits = $(@).parent()
148
+ $form = $submits.closest('form')
149
149
 
150
- if ($form.attr('method') || '').toLowerCase() == 'get'
151
- setTimeout((-> EffectiveForm.reset($form)), 2000)
150
+ if $submits.hasClass('form-actions-reset') || ($form.attr('method') || '').toLowerCase() == 'get'
151
+ setTimeout((-> EffectiveForm.reset($form)), 2500)
152
152
 
153
- EffectiveForm.setCurrentSubmit($submit.parent())
153
+ EffectiveForm.setCurrentSubmit($submits)
154
154
  EffectiveForm.spin()
155
155
 
156
156
  # This actually attached the handlers to a remote ajax form when it or an action inside it triggers a remote thing.
@@ -33,6 +33,7 @@ module Effective
33
33
  'form-group form-actions',
34
34
  ('form-actions-inline' if inline?),
35
35
  ('form-actions-bordered' if border?),
36
+ ('form-actions-reset' if reset?),
36
37
  ('justify-content-start' if left? && layout == :vertical),
37
38
  ('justify-content-center' if center? && layout == :vertical),
38
39
  ('justify-content-end' if right? && layout == :vertical)
@@ -77,6 +78,11 @@ module Effective
77
78
  @right = (options.delete(:right) || false)
78
79
  end
79
80
 
81
+ def reset?
82
+ return @reset unless @reset.nil?
83
+ @reset = (options.delete(:reset) || false)
84
+ end
85
+
80
86
  def icon_name
81
87
  return @icon unless @icon.nil?
82
88
  @icon = options[:input].delete(:icon) || ''.html_safe
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.5.1'.freeze
2
+ VERSION = '0.5.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect