bootstrap_builders 1.0.1 → 1.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 778ac130bc4ea3ac5e8982558919a7c5e40479ab
|
4
|
+
data.tar.gz: f4406b4e6ad5682020db3b3af09c6edeff03cfee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c3a62922429251026e92ef8abeaff8a40596aafb9d8f952f0e77e46cd21fcbfc90b17b48f3cce1bb414e6eebb2220eb3795df93980fc237d07b7c3f17d33be9
|
7
|
+
data.tar.gz: ad09dc5126c420d51bb4a8f4a8bdec385cfa35a899255ca40bae01c1b62b1eb72e791bec39019b07d88499732e3ea77a8e3c75c9e2df859733f31ca893b48062
|
@@ -1,4 +1,7 @@
|
|
1
1
|
function loadAjaxTab(li) {
|
2
|
+
if (li.data("ajax-loaded"))
|
3
|
+
return
|
4
|
+
|
2
5
|
var link = $("a", li)
|
3
6
|
var content_id = link.attr("href").substring(1, 999)
|
4
7
|
var content = $(".bb-tabs-container #" + content_id + " .bb-tab-container")
|
@@ -7,14 +10,14 @@ function loadAjaxTab(li) {
|
|
7
10
|
content.fadeOut(0, function() {
|
8
11
|
$.get(li.data("ajax-url"), function(data) {
|
9
12
|
content.html(data)
|
10
|
-
content.
|
13
|
+
content.show()
|
11
14
|
})
|
12
15
|
})
|
13
16
|
}
|
14
17
|
|
15
18
|
// Makes sure the correct tab is loaded on page load
|
16
19
|
function loadActiveAjaxTabOnPageLoad() {
|
17
|
-
//Loads the dynamic content of a tab when activated and sets the URL to the tab ID
|
20
|
+
// Loads the dynamic content of a tab when activated and sets the URL to the tab ID
|
18
21
|
$("body").on("click", ".bb-tabs-container .nav li", function() {
|
19
22
|
var li = $(this)
|
20
23
|
|
@@ -23,12 +26,11 @@ function loadActiveAjaxTabOnPageLoad() {
|
|
23
26
|
} else if(li.data("specific-id-given")) {
|
24
27
|
var urlb = new UrlBuilder(window.location.href)
|
25
28
|
urlb.queryParameters["bb_selected_tab"] = $(this).data("tab-container-id")
|
26
|
-
window.history.pushState({active_tab: li.data("tab-container-id"), event: "bb-tab-change"}, null, urlb.pathWithQueryParameters())
|
29
|
+
window.history.pushState({active_tab: li.data("tab-container-id"), event: "bb-tab-change", turbolinks: {}}, null, urlb.pathWithQueryParameters())
|
27
30
|
}
|
28
31
|
|
29
|
-
if (li.data("ajax-url")
|
32
|
+
if (li.data("ajax-url"))
|
30
33
|
loadAjaxTab(li)
|
31
|
-
}
|
32
34
|
})
|
33
35
|
|
34
36
|
var activeTabLink = $(".bb-tabs-container .nav li[data-ajax-url] a.active")
|
@@ -47,9 +49,8 @@ $(document).ready(function() {
|
|
47
49
|
var selected_tab = urlb.queryParameters["bb_selected_tab"]
|
48
50
|
}
|
49
51
|
|
50
|
-
if (!selected_tab)
|
52
|
+
if (!selected_tab)
|
51
53
|
selected_tab = $($(".bb-tabs-container .nav li").first()).data("tab-container-id")
|
52
|
-
}
|
53
54
|
|
54
55
|
var li = null
|
55
56
|
var link = null
|
@@ -58,7 +59,7 @@ $(document).ready(function() {
|
|
58
59
|
link = $("a", li)
|
59
60
|
}
|
60
61
|
|
61
|
-
if (link && !link.hasClass("active")) {
|
62
|
+
if (link && link.length > 0 && !link.hasClass("active")) {
|
62
63
|
li.data("ignore-next-history-push", true)
|
63
64
|
link.click()
|
64
65
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap_builders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html_gen
|