effective_bootstrap 0.6.16 → 0.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc535e621de5c8452a1fe9eb6fb5114b2a7b996a6f4d3c4094522403d457ece9
|
4
|
+
data.tar.gz: b32da0c613b18f72e8a1aa5ec75244e74570b81901ca791a0550eeb6111a065d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf9e3af2cd5f6c6e45f63dc83e899b3dea25ac577c182c3060975baaf7d885b4c18649e530b96d91714051497301917389975cac5c7d3321fc2eee086d04b0d9
|
7
|
+
data.tar.gz: 7728213c5431dc7ae8fc9c51f7271a9d971ea8bb0eadd179bc2ad05e622cc2e04d136f2e65e2f834a2b3a1adf2496abb0ebf720be36e15b3d2ca2b328fa7b666
|
@@ -0,0 +1,16 @@
|
|
1
|
+
let initTabs = function() {
|
2
|
+
let $tab_with_error = $(".form-control.is-invalid").first().closest('.tab-pane');
|
3
|
+
|
4
|
+
if ($tab_with_error.length > 0) {
|
5
|
+
$(".nav.nav-tabs").find("a[href^='#" + $tab_with_error.attr('id') + "']").tab('show');
|
6
|
+
} else if (document.location.hash.length > 0) {
|
7
|
+
let $tab_from_url = $(".nav.nav-tabs").find("a[href^='" + document.location.hash + "']");
|
8
|
+
|
9
|
+
if ($tab_from_url.length > 0) {
|
10
|
+
document.location.hash = ""; // This prevents scrolling to the wrong place in the page
|
11
|
+
$tab_from_url.tab("show");
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
$(document).ready(initTabs);
|
@@ -13,7 +13,7 @@ module EffectiveFormBuilderHelper
|
|
13
13
|
"new_#{class_name}"
|
14
14
|
end
|
15
15
|
|
16
|
-
options[:html] = (options[:html] || {}).merge(novalidate: true, onsubmit: 'return EffectiveForm.validate(this)
|
16
|
+
options[:html] = (options[:html] || {}).merge(novalidate: true, onsubmit: 'return EffectiveForm.validate(this)')
|
17
17
|
|
18
18
|
remote_index = options.except(:model).hash.abs
|
19
19
|
|
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.6.
|
4
|
+
version: 0.6.17
|
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-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -375,7 +375,7 @@ files:
|
|
375
375
|
- app/assets/javascripts/effective_bootstrap/form.js.coffee
|
376
376
|
- app/assets/javascripts/effective_bootstrap/logic.js.coffee
|
377
377
|
- app/assets/javascripts/effective_bootstrap/other.js.coffee
|
378
|
-
- app/assets/javascripts/effective_bootstrap/tabs.js
|
378
|
+
- app/assets/javascripts/effective_bootstrap/tabs.js
|
379
379
|
- app/assets/javascripts/effective_checks/initialize.js.coffee
|
380
380
|
- app/assets/javascripts/effective_checks/input.js
|
381
381
|
- app/assets/javascripts/effective_ck_editor/initialize.js.coffee
|