effective_bootstrap 0.9.45 → 0.9.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/effective_bootstrap/logic.js.coffee +9 -10
  3. data/app/helpers/effective_editor_helper.rb +2 -0
  4. data/app/helpers/effective_form_builder_helper.rb +2 -0
  5. data/app/helpers/effective_icons_helper.rb +2 -0
  6. data/app/models/effective/form_builder.rb +2 -0
  7. data/app/models/effective/form_input.rb +1 -1
  8. data/app/models/effective/form_inputs/article_editor.rb +2 -0
  9. data/app/models/effective/form_inputs/check_box.rb +2 -0
  10. data/app/models/effective/form_inputs/checks.rb +2 -0
  11. data/app/models/effective/form_inputs/ck_editor.rb +2 -0
  12. data/app/models/effective/form_inputs/clear.rb +2 -0
  13. data/app/models/effective/form_inputs/collection_input.rb +2 -0
  14. data/app/models/effective/form_inputs/date_field.rb +2 -0
  15. data/app/models/effective/form_inputs/datetime_field.rb +2 -0
  16. data/app/models/effective/form_inputs/delete.rb +2 -0
  17. data/app/models/effective/form_inputs/editor.rb +2 -0
  18. data/app/models/effective/form_inputs/email_cc_field.rb +2 -0
  19. data/app/models/effective/form_inputs/email_field.rb +2 -0
  20. data/app/models/effective/form_inputs/error_field.rb +3 -1
  21. data/app/models/effective/form_inputs/file_field.rb +2 -0
  22. data/app/models/effective/form_inputs/float_field.rb +2 -0
  23. data/app/models/effective/form_inputs/form_group.rb +2 -0
  24. data/app/models/effective/form_inputs/has_many.rb +2 -0
  25. data/app/models/effective/form_inputs/hidden_field.rb +2 -0
  26. data/app/models/effective/form_inputs/integer_field.rb +2 -0
  27. data/app/models/effective/form_inputs/number_field.rb +2 -0
  28. data/app/models/effective/form_inputs/number_text_field.rb +2 -0
  29. data/app/models/effective/form_inputs/password_field.rb +2 -0
  30. data/app/models/effective/form_inputs/percent_field.rb +2 -0
  31. data/app/models/effective/form_inputs/phone_field.rb +2 -0
  32. data/app/models/effective/form_inputs/price_field.rb +2 -0
  33. data/app/models/effective/form_inputs/radios.rb +2 -0
  34. data/app/models/effective/form_inputs/remote_link_to.rb +2 -0
  35. data/app/models/effective/form_inputs/reset.rb +2 -0
  36. data/app/models/effective/form_inputs/rich_text_area.rb +2 -0
  37. data/app/models/effective/form_inputs/save.rb +2 -0
  38. data/app/models/effective/form_inputs/search_field.rb +2 -0
  39. data/app/models/effective/form_inputs/select.rb +2 -0
  40. data/app/models/effective/form_inputs/select_or_text.rb +2 -0
  41. data/app/models/effective/form_inputs/static_field.rb +2 -0
  42. data/app/models/effective/form_inputs/submit.rb +4 -1
  43. data/app/models/effective/form_inputs/text_area.rb +2 -0
  44. data/app/models/effective/form_inputs/text_field.rb +2 -0
  45. data/app/models/effective/form_inputs/time_field.rb +2 -0
  46. data/app/models/effective/form_inputs/time_zone_select.rb +2 -0
  47. data/app/models/effective/form_inputs/url_field.rb +2 -0
  48. data/app/models/effective/form_logic.rb +2 -0
  49. data/app/models/effective/form_logics/hide_if.rb +2 -0
  50. data/app/models/effective/form_logics/show_if.rb +2 -0
  51. data/app/models/effective/form_logics/show_if_any.rb +2 -0
  52. data/lib/effective_bootstrap/version.rb +1 -1
  53. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33fc32e5f8a20002ec07cc4cab552f7bd2e7386b162ce3043b9d2ba73771d2cb
4
- data.tar.gz: d28055c2b76376a8efb83c2d89632883c4c599ccca5b5337eabb42f1242d8e6c
3
+ metadata.gz: fb1974ae9373cb7598952c9268026c2e05b0d21e25f3d7022646aca63b8a72ef
4
+ data.tar.gz: f1400e0cfd13ddb003a00142c2150e756c565408275e110be183d04d741a1ab7
5
5
  SHA512:
6
- metadata.gz: b748f7cabd901caa3b9626c5bf4a0bc5d00cbc8269c8db15b809708895ac4e08104ec9f75cdf0dd5da0314c8182d882212beedb1aaf9ef72e0c9db43ad8dc0dc
7
- data.tar.gz: 6c8259a2cf99443611d197da78129382d1a6c4f870d7678458bf71a49f3ed60cbc64c7c8876482fa93244fdb2b139cb9396af4b8276fa0b858d25431cfad766f
6
+ metadata.gz: cdf878720dca75c2ae3633099df420defa12ed38661be78ce4189d337bcda6e19c192c4318a5192ba3f207c9ead8aa72f506669b79bd52a105151f80d61dbad7
7
+ data.tar.gz: 8d18535bc868173d7ba3c3876887f9f9f76b022c0771127c3bb6d52338b650b223447d5ea65022dc51d7bc1de1a44b13a6892cf3bf1dbba0f1882671dce2bee6
@@ -11,14 +11,14 @@
11
11
 
12
12
  if matches
13
13
  $element.hide()
14
- $element.find('input,textarea,select').prop('disabled', true)
14
+ $element.find('input,textarea,select,button').prop('disabled', true)
15
15
  else
16
16
  $element.fadeIn()
17
- $element.find('input,textarea,select').removeAttr('disabled')
17
+ $element.find('input,textarea,select,button').removeAttr('disabled')
18
18
 
19
19
  # Maybe disable it now
20
20
  if options.needDisable
21
- $element.find('input,textarea,select').prop('disabled', true)
21
+ $element.find('input,textarea,select,button').prop('disabled', true)
22
22
 
23
23
 
24
24
  (this.EffectiveBootstrap || {}).effective_show_if = ($element, options) ->
@@ -34,14 +34,14 @@
34
34
 
35
35
  if matches
36
36
  $element.fadeIn()
37
- $element.find('input,textarea,select').removeAttr('disabled')
37
+ $element.find('input,textarea,select,button').removeAttr('disabled')
38
38
  else
39
39
  $element.hide()
40
- $element.find('input,textarea,select').prop('disabled', true)
40
+ $element.find('input,textarea,select,button').prop('disabled', true)
41
41
 
42
42
  # Maybe disable it now
43
43
  if options.needDisable
44
- $element.find('input,textarea,select').prop('disabled', true)
44
+ $element.find('input,textarea,select,button').prop('disabled', true)
45
45
 
46
46
  (this.EffectiveBootstrap || {}).effective_show_if_any = ($element, options) ->
47
47
  $affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']")
@@ -53,12 +53,11 @@
53
53
 
54
54
  if found
55
55
  $element.fadeIn()
56
- $element.find('input,textarea,select').removeAttr('disabled')
56
+ $element.find('input,textarea,select,button').removeAttr('disabled')
57
57
  else
58
58
  $element.hide()
59
- $element.find('input,textarea,select').prop('disabled', true)
59
+ $element.find('input,textarea,select,button').prop('disabled', true)
60
60
 
61
61
  # Maybe disable it now
62
62
  if options.needDisable
63
- $element.find('input,textarea,select').prop('disabled', true)
64
-
63
+ $element.find('input,textarea,select,button').prop('disabled', true)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EffectiveEditorHelper
2
4
 
3
5
  def effective_editor_tag(content, options = {})
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EffectiveFormBuilderHelper
2
4
  def effective_form_with(**options, &block)
3
5
  # Compute the default ID
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EffectiveIconsHelper
2
4
 
3
5
  # icon('check', class: 'big-4')
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  class FormBuilder < ActionView::Helpers::FormBuilder
3
5
 
@@ -8,7 +8,7 @@ module Effective
8
8
  EMPTY_HASH = {}
9
9
 
10
10
  EXCLUSIVE_CLASS_PREFIXES = [] # None
11
- EXCLUSIVE_CLASS_SUFFIXES = ['-primary', '-secondary', '-success', '-danger', '-warning', '-info', '-light', '-dark']
11
+ EXCLUSIVE_CLASS_SUFFIXES = ['-primary', '-secondary', '-success', '-danger', '-warning', '-info', '-light', '-dark', '-link']
12
12
 
13
13
  DEFAULT_INPUT_GROUP_OPTIONS = { input_group: { class: 'input-group' }, prepend: false, append: false }
14
14
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class ArticleEditor < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class CheckBox < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
 
3
5
  module FormInputs
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class CkEditor < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class Clear < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class CollectionInput < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class DateField < DatetimeField
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class DatetimeField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class Delete < Submit
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class Editor < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class EmailCcField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class EmailField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class ErrorField < Effective::FormInput
@@ -32,7 +34,7 @@ module Effective
32
34
  end
33
35
  )
34
36
 
35
- content_tag(:div, content, options[:input])
37
+ content_tag(:div, content.html_safe, options[:input])
36
38
  end
37
39
 
38
40
  private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class FileField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class FloatField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class FormGroup < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class HasMany < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class HiddenField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class IntegerField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class NumberField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class NumberTextField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class PasswordField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class PercentField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class PhoneField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class PriceField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-select
2
4
 
3
5
  # buttons: true
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class RemoteLinkTo < Submit
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class Reset < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class RichTextArea < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class Save < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class SearchField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-select
2
4
  # select(object, method, choices = nil, options = {}, html_options = {}, &block)
3
5
  # ActionView::Helpers::FormBuilder.instance_method(:check_box).bind(self).call(m, opts, v)`
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class SelectOrText < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class StaticField < Effective::FormInput
@@ -1,9 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class Submit < Effective::FormInput
4
6
 
5
7
  def to_html(&block)
6
- return super unless (form_readonly? || form_disabled?)
8
+ return nil if form_readonly?
9
+ super()
7
10
  end
8
11
 
9
12
  def build_input(&block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class TextArea < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class TextField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class TimeField < DatetimeField
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class TimeZoneSelect < Select
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormInputs
3
5
  class UrlField < Effective::FormInput
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  class FormLogic
3
5
  attr_accessor :args, :options
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormLogics
3
5
  class HideIf < Effective::FormLogic
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormLogics
3
5
  class ShowIf < Effective::FormLogic
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Effective
2
4
  module FormLogics
3
5
  class ShowIfAny < Effective::FormLogic
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.9.45'.freeze
2
+ VERSION = '0.9.49'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.45
4
+ version: 0.9.49
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: 2021-10-15 00:00:00.000000000 Z
11
+ date: 2021-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails