effective_bootstrap 0.8.0 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/icons/microsoft.svg +1 -0
- data/app/assets/javascripts/effective_bootstrap/confirm.js.coffee.erb +10 -5
- data/app/assets/stylesheets/effective_bootstrap.scss +2 -0
- data/app/assets/stylesheets/effective_rich_text_area/input.scss +25 -0
- data/app/helpers/effective_bootstrap_helper.rb +5 -3
- data/app/models/effective/form_builder.rb +4 -0
- data/app/models/effective/form_input.rb +1 -1
- data/app/models/effective/form_inputs/file_field.rb +1 -1
- data/app/models/effective/form_inputs/rich_text_area.rb +11 -0
- data/lib/effective_bootstrap/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ade33f888106bb76e27393ff4df00caa77191edc2cc52a78b7fb4e493c9c9110
|
4
|
+
data.tar.gz: c0e9d1338dd33e388f6d6824bac883f4a3317378800cca7c387e153808452b1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 235ab74535c20e7d94bf83e2a28c7996fd4ff420b923a41de39046f4ff2e6ef36966bf71c5468e016a537a0a5ff88a5f3318ca554fec88dae8c045ddcdc58bf5
|
7
|
+
data.tar.gz: 3a249ed15f0047c90dffe53ea90d677a9c9905f6b3265db7a5c4c5c2093b75bf2600c9318ff0bb64bd834901b524bf78936f49b2390008a9a63aa71e57653197
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Microsoft Azure icon</title><path d="M5.483 21.3H24L14.025 4.013l-3.038 8.347 5.836 6.938L5.483 21.3zM13.23 2.7L6.105 8.677 0 19.253h5.505v.014L13.23 2.7z"/></svg>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
# These next three methods hijack jquery_ujs data-confirm and do it our own way with a double click confirm
|
1
|
+
# These next three methods hijack rails/ujs and jquery_ujs data-confirm and do it our own way with a double click confirm
|
2
2
|
|
3
|
-
if <%= !!EffectiveBootstrap.use_custom_data_confirm %> && $.rails
|
3
|
+
if <%= !!EffectiveBootstrap.use_custom_data_confirm %> && (window.Rails || $.rails)
|
4
4
|
$(document).on 'confirm', (event) ->
|
5
5
|
$obj = $(event.target)
|
6
6
|
|
@@ -18,6 +18,11 @@ if <%= !!EffectiveBootstrap.use_custom_data_confirm %> && $.rails
|
|
18
18
|
, 4000)
|
19
19
|
false # don't show the confirmation dialog
|
20
20
|
|
21
|
-
$.rails.confirm = (message) -> true
|
22
|
-
$.rails.effective_bootstrap_custom_data_confirm = true
|
23
|
-
|
21
|
+
(window.Rails || $.rails).confirm = (message) -> true
|
22
|
+
(window.Rails || $.rails).effective_bootstrap_custom_data_confirm = true
|
23
|
+
|
24
|
+
$(document).on 'confirm:complete', (event) -> $(event.target).data('confirmed')
|
25
|
+
|
26
|
+
$(document).on 'click', 'a.dropdown-item[data-confirm]', (event) ->
|
27
|
+
event.preventDefault()
|
28
|
+
false
|
@@ -0,0 +1,25 @@
|
|
1
|
+
.trix-content {
|
2
|
+
height: 100%;
|
3
|
+
border-color: #ccc;
|
4
|
+
|
5
|
+
&:hover,
|
6
|
+
&:active,
|
7
|
+
&:focus, {
|
8
|
+
border-color: #ccc;
|
9
|
+
outline: 0px !important;
|
10
|
+
-webkit-appearance: none;
|
11
|
+
box-shadow: none !important;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
// Bootstrap 4 Feedback client side
|
16
|
+
.was-validated .form-control:invalid ~ .trix-content, { border-color: #dc3545 !important; }
|
17
|
+
.was-validated .form-control:valid ~ .trix-content { border-color: #28a745 !important; }
|
18
|
+
.was-validated .form-control:invalid ~ trix-toolbar, { border-color: #dc3545 !important; }
|
19
|
+
.was-validated .form-control:valid ~ trix-toolbar { border-color: #28a745 !important; }
|
20
|
+
|
21
|
+
// Bootstrap 4 Server side feedback
|
22
|
+
.form-control.is-invalid ~ .trix-content { border-color: #dc3545 !important; }
|
23
|
+
.form-control.is-invalid ~ trix-toolbar { border-color: #dc3545 !important; }
|
24
|
+
.form-control.is-valid ~ .trix-content { border-color: #28a745 !important; }
|
25
|
+
.form-control.is-valid ~ trix-toolbar { border-color: #28a745 !important; }
|
@@ -154,11 +154,13 @@ module EffectiveBootstrapHelper
|
|
154
154
|
end
|
155
155
|
|
156
156
|
# Works with dots ao and dropdown do
|
157
|
-
def dropdown_divider
|
157
|
+
def dropdown_divider(options = {})
|
158
|
+
options[:class] = [options[:class], 'dropdown-divider'].compact.join(' ')
|
159
|
+
|
158
160
|
unless @_dropdown_link_tos
|
159
|
-
content_tag(:div, '',
|
161
|
+
content_tag(:div, '', options)
|
160
162
|
else
|
161
|
-
@_dropdown_link_tos << content_tag(:div, '',
|
163
|
+
@_dropdown_link_tos << content_tag(:div, '', options)
|
162
164
|
nil
|
163
165
|
end
|
164
166
|
end
|
@@ -100,6 +100,10 @@ module Effective
|
|
100
100
|
Effective::FormInputs::RemoteLinkTo.new(name, options, builder: self).to_html(&block)
|
101
101
|
end
|
102
102
|
|
103
|
+
def rich_text_area(name, options = {})
|
104
|
+
Effective::FormInputs::RichTextArea.new(name, options, builder: self).to_html { super(name, options) }
|
105
|
+
end
|
106
|
+
|
103
107
|
def search_field(name, options = {})
|
104
108
|
Effective::FormInputs::SearchField.new(name, options, builder: self).to_html { super(name, options) }
|
105
109
|
end
|
@@ -7,7 +7,7 @@ module Effective
|
|
7
7
|
EXCLUSIVE_CLASS_SUFFIXES = ['-primary', '-secondary', '-success', '-danger', '-warning', '-info', '-light', '-dark']
|
8
8
|
|
9
9
|
delegate :object, to: :@builder
|
10
|
-
delegate :capture, :content_tag, :link_to, :icon, :asset_path, to: :@template
|
10
|
+
delegate :capture, :content_tag, :image_tag, :link_to, :icon, :asset_path, to: :@template
|
11
11
|
|
12
12
|
# So this takes in the options for an entire form group.
|
13
13
|
def initialize(name, options, builder:, html_options: nil)
|
@@ -94,7 +94,7 @@ module Effective
|
|
94
94
|
content_tag(:div, class: 'card mb-3') do
|
95
95
|
if attachment.image?
|
96
96
|
content_tag(:div, class: 'card-body') do
|
97
|
-
|
97
|
+
image_tag(url, alt: attachment.filename.to_s, class: 'img-fluid') +
|
98
98
|
link_to(attachment.filename, url, class: 'card-link')
|
99
99
|
end
|
100
100
|
else
|
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.8.
|
4
|
+
version: 0.8.5
|
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: 2020-
|
11
|
+
date: 2020-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -262,6 +262,7 @@ files:
|
|
262
262
|
- app/assets/images/icons/message-square.svg
|
263
263
|
- app/assets/images/icons/mic-off.svg
|
264
264
|
- app/assets/images/icons/mic.svg
|
265
|
+
- app/assets/images/icons/microsoft.svg
|
265
266
|
- app/assets/images/icons/minimize-2.svg
|
266
267
|
- app/assets/images/icons/minimize.svg
|
267
268
|
- app/assets/images/icons/minus-circle.svg
|
@@ -581,6 +582,7 @@ files:
|
|
581
582
|
- app/assets/stylesheets/effective_editor/quill.scss
|
582
583
|
- app/assets/stylesheets/effective_file/input.scss
|
583
584
|
- app/assets/stylesheets/effective_radio/input.scss
|
585
|
+
- app/assets/stylesheets/effective_rich_text_area/input.scss
|
584
586
|
- app/assets/stylesheets/effective_select/bootstrap-theme.css
|
585
587
|
- app/assets/stylesheets/effective_select/input.scss
|
586
588
|
- app/assets/stylesheets/effective_select/overrides.scss
|
@@ -620,6 +622,7 @@ files:
|
|
620
622
|
- app/models/effective/form_inputs/radios.rb
|
621
623
|
- app/models/effective/form_inputs/remote_link_to.rb
|
622
624
|
- app/models/effective/form_inputs/reset.rb
|
625
|
+
- app/models/effective/form_inputs/rich_text_area.rb
|
623
626
|
- app/models/effective/form_inputs/save.rb
|
624
627
|
- app/models/effective/form_inputs/search_field.rb
|
625
628
|
- app/models/effective/form_inputs/select.rb
|
@@ -663,7 +666,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
663
666
|
- !ruby/object:Gem::Version
|
664
667
|
version: '0'
|
665
668
|
requirements: []
|
666
|
-
rubygems_version: 3.1.
|
669
|
+
rubygems_version: 3.1.4
|
667
670
|
signing_key:
|
668
671
|
specification_version: 4
|
669
672
|
summary: Everything you need to get set up with bootstrap 4.
|