asset_box 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +60 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +35 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/asset_box.gemspec +42 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/fonts/font-awesome/fa-brands-400.eot +0 -0
- data/assets/fonts/font-awesome/fa-brands-400.svg +3717 -0
- data/assets/fonts/font-awesome/fa-brands-400.ttf +0 -0
- data/assets/fonts/font-awesome/fa-brands-400.woff +0 -0
- data/assets/fonts/font-awesome/fa-brands-400.woff2 +0 -0
- data/assets/fonts/font-awesome/fa-regular-400.eot +0 -0
- data/assets/fonts/font-awesome/fa-regular-400.svg +801 -0
- data/assets/fonts/font-awesome/fa-regular-400.ttf +0 -0
- data/assets/fonts/font-awesome/fa-regular-400.woff +0 -0
- data/assets/fonts/font-awesome/fa-regular-400.woff2 +0 -0
- data/assets/fonts/font-awesome/fa-solid-900.eot +0 -0
- data/assets/fonts/font-awesome/fa-solid-900.svg +5028 -0
- data/assets/fonts/font-awesome/fa-solid-900.ttf +0 -0
- data/assets/fonts/font-awesome/fa-solid-900.woff +0 -0
- data/assets/fonts/font-awesome/fa-solid-900.woff2 +0 -0
- data/assets/images/bootstrap/bg.png +0 -0
- data/assets/images/bootstrap/bg_2.png +0 -0
- data/assets/images/bootstrap/bg_3.png +0 -0
- data/assets/images/bootstrap/bg_4.png +0 -0
- data/assets/images/bootstrap/bg_5.png +0 -0
- data/assets/images/bootstrap/dark_dots.png +0 -0
- data/assets/images/bootstrap/light_dots.png +0 -0
- data/assets/images/bootstrap/line.png +0 -0
- data/assets/images/bootstrap/line_detail.png +0 -0
- data/assets/images/bootstrap/note_dot.png +0 -0
- data/assets/images/bootstrap/timer-piece.png +0 -0
- data/assets/javascripts/app/bootstrap-datepicker.js +1395 -0
- data/assets/javascripts/app/bootstrap-fileupload.min.js +7 -0
- data/assets/javascripts/app/bootstrap-modal.js +378 -0
- data/assets/javascripts/app/bootstrap-modalmanager.js +423 -0
- data/assets/javascripts/app/bootstrap-switch.min.js +22 -0
- data/assets/javascripts/app/daterangepicker.js +1635 -0
- data/assets/javascripts/app/debounce.js +1492 -0
- data/assets/javascripts/app/jquery.appear.js +101 -0
- data/assets/javascripts/app/jquery.inputlimiter.1.3.1.min.js +11 -0
- data/assets/javascripts/app/jquery.mousewheel.js +84 -0
- data/assets/javascripts/app/jquery.serialScroll.min.js +7 -0
- data/assets/javascripts/app/moment.min.js +7 -0
- data/assets/javascripts/app/perfect-scrollbar.js +584 -0
- data/assets/javascripts/app/subview.js +392 -0
- data/assets/javascripts/app/velocity.min.js +8 -0
- data/assets/javascripts/asset_box.js +16 -0
- data/assets/javascripts/bootstrap-sprockets.js +12 -0
- data/assets/javascripts/bootstrap.js +2580 -0
- data/assets/javascripts/bootstrap.min.js +6 -0
- data/assets/javascripts/bootstrap/affix.js +164 -0
- data/assets/javascripts/bootstrap/alert.js +95 -0
- data/assets/javascripts/bootstrap/button.js +125 -0
- data/assets/javascripts/bootstrap/carousel.js +246 -0
- data/assets/javascripts/bootstrap/collapse.js +212 -0
- data/assets/javascripts/bootstrap/dropdown.js +165 -0
- data/assets/javascripts/bootstrap/modal.js +358 -0
- data/assets/javascripts/bootstrap/popover.js +123 -0
- data/assets/javascripts/bootstrap/scrollspy.js +172 -0
- data/assets/javascripts/bootstrap/tab.js +155 -0
- data/assets/javascripts/bootstrap/tooltip.js +677 -0
- data/assets/javascripts/bootstrap/transition.js +59 -0
- data/assets/stylesheets/_asset_box.scss +760 -0
- data/assets/stylesheets/_bootstrap-compass.scss +9 -0
- data/assets/stylesheets/_bootstrap-mincer.scss +19 -0
- data/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
- data/assets/stylesheets/_bootstrap.scss +56 -0
- data/assets/stylesheets/_bootstrap_login.scss +166 -0
- data/assets/stylesheets/_font-awesome-compass.scss +5 -0
- data/assets/stylesheets/_font-awesome-sprockets.scss +5 -0
- data/assets/stylesheets/_font-awesome.scss +17 -0
- data/assets/stylesheets/_font-awesome_v4-shims.scss +6 -0
- data/assets/stylesheets/_load_bootstrap.scss +12 -0
- data/assets/stylesheets/app/_base.scss +136 -0
- data/assets/stylesheets/app/_buttons.scss +1149 -0
- data/assets/stylesheets/app/_calendar.scss +343 -0
- data/assets/stylesheets/app/_ckeditor.scss +123 -0
- data/assets/stylesheets/app/_date-picker.scss +193 -0
- data/assets/stylesheets/app/_daterangepicker.scss +269 -0
- data/assets/stylesheets/app/_dropdown-menu.scss +137 -0
- data/assets/stylesheets/app/_error.scss +84 -0
- data/assets/stylesheets/app/_file-upload.scss +16 -0
- data/assets/stylesheets/app/_footer.scss +59 -0
- data/assets/stylesheets/app/_form-elements.scss +273 -0
- data/assets/stylesheets/app/_gallery.scss +205 -0
- data/assets/stylesheets/app/_header.scss +158 -0
- data/assets/stylesheets/app/_horizontal-menu.scss +169 -0
- data/assets/stylesheets/app/_icons.scss +47 -0
- data/assets/stylesheets/app/_inputlimiter.scss +34 -0
- data/assets/stylesheets/app/_invoice.scss +53 -0
- data/assets/stylesheets/app/_lock-screen.scss +72 -0
- data/assets/stylesheets/app/_login.scss +105 -0
- data/assets/stylesheets/app/_main-container.scss +297 -0
- data/assets/stylesheets/app/_messages.scss +311 -0
- data/assets/stylesheets/app/_pageslide_left.scss +283 -0
- data/assets/stylesheets/app/_pageslide_right.scss +350 -0
- data/assets/stylesheets/app/_pagination.scss +254 -0
- data/assets/stylesheets/app/_panels.scss +589 -0
- data/assets/stylesheets/app/_perfect-scrollbar.scss +111 -0
- data/assets/stylesheets/app/_slidingbar.scss +42 -0
- data/assets/stylesheets/app/_subview.scss +342 -0
- data/assets/stylesheets/app/_tables.scss +68 -0
- data/assets/stylesheets/app/_tabs.scss +251 -0
- data/assets/stylesheets/app/_tags-input.scss +46 -0
- data/assets/stylesheets/app/_theme-style8.scss +308 -0
- data/assets/stylesheets/app/_timeline.scss +359 -0
- data/assets/stylesheets/app/_user-profile.scss +99 -0
- data/assets/stylesheets/app/_utilities.scss +643 -0
- data/assets/stylesheets/bootstrap/_alerts.scss +73 -0
- data/assets/stylesheets/bootstrap/_badges.scss +68 -0
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
- data/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +168 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +271 -0
- data/assets/stylesheets/bootstrap/_close.scss +37 -0
- data/assets/stylesheets/bootstrap/_code.scss +69 -0
- data/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
- data/assets/stylesheets/bootstrap/_dropdowns.scss +213 -0
- data/assets/stylesheets/bootstrap/_forms.scss +607 -0
- data/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
- data/assets/stylesheets/bootstrap/_grid.scss +94 -0
- data/assets/stylesheets/bootstrap/_input-groups.scss +171 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +54 -0
- data/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
- data/assets/stylesheets/bootstrap/_media.scss +66 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +40 -0
- data/assets/stylesheets/bootstrap/_modals.scss +150 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +656 -0
- data/assets/stylesheets/bootstrap/_navs.scss +242 -0
- data/assets/stylesheets/bootstrap/_normalize.scss +427 -0
- data/assets/stylesheets/bootstrap/_pager.scss +54 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +86 -0
- data/assets/stylesheets/bootstrap/_panels.scss +271 -0
- data/assets/stylesheets/bootstrap/_popovers.scss +126 -0
- data/assets/stylesheets/bootstrap/_print.scss +99 -0
- data/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +179 -0
- data/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
- data/assets/stylesheets/bootstrap/_tables.scss +234 -0
- data/assets/stylesheets/bootstrap/_theme.scss +295 -0
- data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +112 -0
- data/assets/stylesheets/bootstrap/_type.scss +298 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +55 -0
- data/assets/stylesheets/bootstrap/_variables.scss +874 -0
- data/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +61 -0
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +56 -0
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
- data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/assets/stylesheets/font-awesome/_animated.scss +20 -0
- data/assets/stylesheets/font-awesome/_bordered-pulled.scss +20 -0
- data/assets/stylesheets/font-awesome/_core.scss +21 -0
- data/assets/stylesheets/font-awesome/_fixed-width.scss +6 -0
- data/assets/stylesheets/font-awesome/_icons.scss +1462 -0
- data/assets/stylesheets/font-awesome/_larger.scss +23 -0
- data/assets/stylesheets/font-awesome/_list.scss +18 -0
- data/assets/stylesheets/font-awesome/_mixins.scss +56 -0
- data/assets/stylesheets/font-awesome/_path.scss +56 -0
- data/assets/stylesheets/font-awesome/_rotated-flipped.scss +24 -0
- data/assets/stylesheets/font-awesome/_screen-reader.scss +5 -0
- data/assets/stylesheets/font-awesome/_shims.scss +2066 -0
- data/assets/stylesheets/font-awesome/_stacked.scss +31 -0
- data/assets/stylesheets/font-awesome/_variables.scss +1482 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/asset_box.rb +89 -0
- data/lib/asset_box/rails/engine.rb +22 -0
- data/lib/asset_box/rails/helpers.rb +17 -0
- data/lib/asset_box/rails/railtie.rb +13 -0
- data/lib/asset_box/version.rb +3 -0
- metadata +301 -0
@@ -0,0 +1,392 @@
|
|
1
|
+
(function($) {
|
2
|
+
"use strict";
|
3
|
+
var subViews = $(".subviews"), show_functions = [], close_functions = [], hide_functions = [], subview_id = [], screenPosition, $this, subViewElement, subviewShowClass = ".show-sv", subviewHideClass = ".hide-sv", subviewBackClass = ".back-sv", subview_action = "", thisBody = document.body || document.documentElement, thisStyle = thisBody.style, supportTransition = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined;
|
4
|
+
|
5
|
+
$(subviewShowClass).on("click", function(e) {
|
6
|
+
subViewElement = $(this);
|
7
|
+
var customOptions = new Object;
|
8
|
+
customOptions.content = subViewElement.attr('href');
|
9
|
+
customOptions.startFrom = subViewElement.data("startfrom"), customOptions.onShow = subViewElement.data("onshow"), customOptions.onHide = subViewElement.data("onhide"), customOptions.onClose = subViewElement.data("onclose");
|
10
|
+
$.subview(customOptions);
|
11
|
+
e.preventDefault();
|
12
|
+
});
|
13
|
+
$(subviewHideClass).on("click", function(e) {
|
14
|
+
subview_action = "close";
|
15
|
+
$.hideSubview();
|
16
|
+
e.preventDefault();
|
17
|
+
});
|
18
|
+
$(subviewBackClass).on("click", function(e) {
|
19
|
+
$.hideSubview();
|
20
|
+
e.preventDefault();
|
21
|
+
});
|
22
|
+
$.extend({
|
23
|
+
subview: function(options) {
|
24
|
+
// extend the options from pre-defined values:
|
25
|
+
var defaults = {
|
26
|
+
content: "",
|
27
|
+
startFrom: "top",
|
28
|
+
onShow: "",
|
29
|
+
onHide: "",
|
30
|
+
onClose: ""
|
31
|
+
};
|
32
|
+
|
33
|
+
var settings = $.extend({}, defaults, options);
|
34
|
+
$this = this;
|
35
|
+
show_functions.push(settings.onShow);
|
36
|
+
hide_functions.push(settings.onHide);
|
37
|
+
close_functions.push(settings.onClose);
|
38
|
+
subview_id.push(settings.content);
|
39
|
+
|
40
|
+
if(subViews.is(":visible") == false) {
|
41
|
+
if(supportTransition) {
|
42
|
+
|
43
|
+
$(".toolbar-tools").css({
|
44
|
+
opacity: 0,
|
45
|
+
left: "-20px"
|
46
|
+
}).on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function() {
|
47
|
+
$(this).off().hide();
|
48
|
+
$(".close-subviews").show(0, function(e) {
|
49
|
+
$(this).css({
|
50
|
+
opacity: 1,
|
51
|
+
left: "0px"
|
52
|
+
});
|
53
|
+
}).off().on("click", function(e) {
|
54
|
+
subview_action = "close";
|
55
|
+
|
56
|
+
if(jQuery.isFunction(close_functions[close_functions.length - 1])) {
|
57
|
+
close_functions[close_functions.length - 1].call($this);
|
58
|
+
return false;
|
59
|
+
}
|
60
|
+
$.hideSubview();
|
61
|
+
});
|
62
|
+
});
|
63
|
+
screenPosition = $(window).scrollTop();
|
64
|
+
$("html, body").animate({
|
65
|
+
scrollTop: 0
|
66
|
+
}, "slow", function() {
|
67
|
+
$('.main-container').css({
|
68
|
+
'max-height': $windowHeight - topBar.outerHeight(true),
|
69
|
+
'min-height': $windowHeight - topBar.outerHeight(true),
|
70
|
+
'overflow': 'hidden',
|
71
|
+
});
|
72
|
+
});
|
73
|
+
switch (settings.startFrom) {
|
74
|
+
case "right" :
|
75
|
+
|
76
|
+
subViews.addClass("subviews-right").css({
|
77
|
+
"right": 0,
|
78
|
+
"top": $(".toolbar").outerHeight(true),
|
79
|
+
height: $windowHeight - topBar.outerHeight(true) - $(".toolbar").outerHeight(true)
|
80
|
+
}).show(0, function() {
|
81
|
+
$(this).css({
|
82
|
+
width: "100%"
|
83
|
+
}).on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function() {
|
84
|
+
|
85
|
+
$(this).off();
|
86
|
+
if($(subview_id[0]).length) {
|
87
|
+
$(subview_id[0]).appendTo(".subviews-container").show(0, function() {
|
88
|
+
if(jQuery.isFunction(show_functions[show_functions.length - 1])) {
|
89
|
+
show_functions[show_functions.length - 1].call($this);
|
90
|
+
}
|
91
|
+
});
|
92
|
+
} else {
|
93
|
+
$(".subviews-container").html("<h3 class='center'>Sorry this page is not available</h3>");
|
94
|
+
}
|
95
|
+
|
96
|
+
});
|
97
|
+
});
|
98
|
+
break;
|
99
|
+
default :
|
100
|
+
|
101
|
+
subViews.addClass("subviews-top").css("top", $(".toolbar").outerHeight(true)).show(0, function() {
|
102
|
+
$(this).css({
|
103
|
+
height: $windowHeight - topBar.outerHeight(true) - $(".toolbar").outerHeight(true)
|
104
|
+
|
105
|
+
}).on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function() {
|
106
|
+
|
107
|
+
$(this).off();
|
108
|
+
if($(subview_id[0]).length) {
|
109
|
+
$(subview_id[0]).appendTo(".subviews-container").show(0, function() {
|
110
|
+
if(jQuery.isFunction(show_functions[show_functions.length - 1])) {
|
111
|
+
show_functions[show_functions.length - 1].call($this);
|
112
|
+
}
|
113
|
+
});
|
114
|
+
} else {
|
115
|
+
$(".subviews-container").html("<h3 class='center'>Sorry this page is not available</h3>");
|
116
|
+
}
|
117
|
+
});
|
118
|
+
});
|
119
|
+
break;
|
120
|
+
}
|
121
|
+
} else {
|
122
|
+
$(".toolbar-tools").animate({
|
123
|
+
opacity: 0,
|
124
|
+
left: "-20px"
|
125
|
+
}, 300, function() {
|
126
|
+
$(this).hide();
|
127
|
+
$(".close-subviews").show(0, function(e) {
|
128
|
+
$(this).animate({
|
129
|
+
opacity: 1,
|
130
|
+
left: "0px"
|
131
|
+
});
|
132
|
+
}).on("click", function(e) {
|
133
|
+
subview_action = "close";
|
134
|
+
|
135
|
+
if(jQuery.isFunction(close_functions[close_functions.length - 1])) {
|
136
|
+
close_functions[close_functions.length - 1].call($this);
|
137
|
+
return false;
|
138
|
+
}
|
139
|
+
$.hideSubview();
|
140
|
+
});
|
141
|
+
});
|
142
|
+
screenPosition = $(window).scrollTop();
|
143
|
+
$("html, body").animate({
|
144
|
+
scrollTop: 0
|
145
|
+
}, "slow", function() {
|
146
|
+
|
147
|
+
$('.main-container').css({
|
148
|
+
'max-height': $windowHeight - topBar.outerHeight(true),
|
149
|
+
'min-height': $windowHeight - topBar.outerHeight(true),
|
150
|
+
'overflow': 'hidden',
|
151
|
+
});
|
152
|
+
});
|
153
|
+
switch (settings.startFrom) {
|
154
|
+
case "right" :
|
155
|
+
subViews.addClass("subviews-right").css({
|
156
|
+
"right": 0,
|
157
|
+
"top": $(".toolbar").outerHeight(true),
|
158
|
+
height: $windowHeight - topBar.outerHeight(true) - $(".toolbar").outerHeight(true)
|
159
|
+
}).show(0, function() {
|
160
|
+
$(this).animate({
|
161
|
+
width: "100%"
|
162
|
+
}, 300, function() {
|
163
|
+
|
164
|
+
if($(subview_id[0]).length) {
|
165
|
+
$(subview_id[0]).appendTo(".subviews-container").show(0, function() {
|
166
|
+
if(jQuery.isFunction(show_functions[show_functions.length - 1])) {
|
167
|
+
show_functions[show_functions.length - 1].call($this);
|
168
|
+
}
|
169
|
+
});
|
170
|
+
} else {
|
171
|
+
$(".subviews-container").html("<h3 class='center'>Sorry this page is not available</h3>");
|
172
|
+
}
|
173
|
+
|
174
|
+
});
|
175
|
+
});
|
176
|
+
break;
|
177
|
+
default :
|
178
|
+
|
179
|
+
subViews.addClass("subviews-top").css("top", $(".toolbar").outerHeight(true)).show(0, function() {
|
180
|
+
$(this).animate({
|
181
|
+
height: $windowHeight - topBar.outerHeight(true) - $(".toolbar").outerHeight(true)
|
182
|
+
|
183
|
+
}, 300, function() {
|
184
|
+
|
185
|
+
$(this).off();
|
186
|
+
if($(subview_id[0]).length) {
|
187
|
+
$(subview_id[0]).appendTo(".subviews-container").show(0, function() {
|
188
|
+
if(jQuery.isFunction(show_functions[show_functions.length - 1])) {
|
189
|
+
show_functions[show_functions.length - 1].call($this);
|
190
|
+
}
|
191
|
+
});
|
192
|
+
} else {
|
193
|
+
$(".subviews-container").html("<h3 class='center'>Sorry this page is not available</h3>");
|
194
|
+
}
|
195
|
+
});
|
196
|
+
});
|
197
|
+
break;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
} else {
|
201
|
+
$(".back-subviews").show(300, function(e) {
|
202
|
+
$(this).css({
|
203
|
+
opacity: 1,
|
204
|
+
left: "0px"
|
205
|
+
});
|
206
|
+
}).off().on("click", function(e) {
|
207
|
+
subview_action = "back";
|
208
|
+
|
209
|
+
if(jQuery.isFunction(close_functions[close_functions.length - 1])) {
|
210
|
+
close_functions[close_functions.length - 1].call($this);
|
211
|
+
return false;
|
212
|
+
}
|
213
|
+
close_functions.pop();
|
214
|
+
$.hideSubview();
|
215
|
+
e.preventDefault();
|
216
|
+
});
|
217
|
+
$(".subviews-container").children().filter(':visible').fadeOut(function() {
|
218
|
+
if(jQuery.isFunction(hide_functions[hide_functions.length - 2])) {
|
219
|
+
hide_functions[hide_functions.length - 2].call($this);
|
220
|
+
}
|
221
|
+
$(this).appendTo("body");
|
222
|
+
|
223
|
+
$(subview_id[subview_id.length - 1]).appendTo(".subviews-container").show(0, function() {
|
224
|
+
|
225
|
+
if(jQuery.isFunction(show_functions[show_functions.length - 1])) {
|
226
|
+
show_functions[show_functions.length - 1].call($this);
|
227
|
+
}
|
228
|
+
});
|
229
|
+
});
|
230
|
+
}
|
231
|
+
},
|
232
|
+
hideSubview: function() {
|
233
|
+
if(subview_id.length > 1 && subview_action !== "close") {
|
234
|
+
|
235
|
+
subview_action = "";
|
236
|
+
if(subview_id.length < 3) {
|
237
|
+
if(supportTransition) {
|
238
|
+
$(".back-subviews").css({
|
239
|
+
opacity: 0,
|
240
|
+
left: "20px"
|
241
|
+
}).on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function() {
|
242
|
+
$(this).off().hide(200);
|
243
|
+
});
|
244
|
+
} else {
|
245
|
+
$(".back-subviews").animate({
|
246
|
+
opacity: 0,
|
247
|
+
left: "20px"
|
248
|
+
}, 300, function() {
|
249
|
+
$(this).hide(200);
|
250
|
+
});
|
251
|
+
}
|
252
|
+
}
|
253
|
+
|
254
|
+
$(".subviews-container").children().filter(':visible').fadeOut(function() {
|
255
|
+
if(jQuery.isFunction(hide_functions[hide_functions.length - 1])) {
|
256
|
+
hide_functions[hide_functions.length - 1].call($this);
|
257
|
+
}
|
258
|
+
hide_functions.pop();
|
259
|
+
show_functions.pop();
|
260
|
+
subview_id.pop();
|
261
|
+
$(this).appendTo("body");
|
262
|
+
$(subview_id[subview_id.length - 1]).appendTo(".subviews-container").fadeIn(function() {
|
263
|
+
if(jQuery.isFunction(show_functions[show_functions.length - 1])) {
|
264
|
+
show_functions[show_functions.length - 1].call($this);
|
265
|
+
}
|
266
|
+
});
|
267
|
+
});
|
268
|
+
} else {
|
269
|
+
subview_action = "";
|
270
|
+
$(".subviews-container").children().hide(0, function() {
|
271
|
+
if(jQuery.isFunction(hide_functions[hide_functions.length - 1])) {
|
272
|
+
hide_functions[hide_functions.length - 1].call($this);
|
273
|
+
}
|
274
|
+
$(this).appendTo("body");
|
275
|
+
show_functions = [];
|
276
|
+
close_functions = [];
|
277
|
+
subview_id = [];
|
278
|
+
|
279
|
+
});
|
280
|
+
if(supportTransition) {
|
281
|
+
if($(".back-subviews").is(":visible")) {
|
282
|
+
$(".back-subviews").css({
|
283
|
+
opacity: 0,
|
284
|
+
left: "20px"
|
285
|
+
}).on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function() {
|
286
|
+
$(this).off().hide();
|
287
|
+
});
|
288
|
+
}
|
289
|
+
$(".close-subviews").css({
|
290
|
+
opacity: 0,
|
291
|
+
left: "20px"
|
292
|
+
}).on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function() {
|
293
|
+
$(this).off().hide();
|
294
|
+
hide_functions = [];
|
295
|
+
$(".toolbar-tools").show(0, function() {
|
296
|
+
$(this).css({
|
297
|
+
opacity: 1,
|
298
|
+
left: "0px"
|
299
|
+
});
|
300
|
+
});
|
301
|
+
});
|
302
|
+
|
303
|
+
if(subViews.hasClass("subviews-right")) {
|
304
|
+
subViews.css({
|
305
|
+
width: 0
|
306
|
+
}).on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function() {
|
307
|
+
$(this).off().removeClass("subviews-right").hide().removeAttr("style");
|
308
|
+
$('.main-container').css({
|
309
|
+
'max-height': '',
|
310
|
+
'min-height': '',
|
311
|
+
'overflow': ''
|
312
|
+
});
|
313
|
+
|
314
|
+
$("html, body").animate({
|
315
|
+
scrollTop: screenPosition
|
316
|
+
}, "slow");
|
317
|
+
});
|
318
|
+
} else {
|
319
|
+
subViews.css({
|
320
|
+
height: 0
|
321
|
+
}).on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function() {
|
322
|
+
$(this).off().removeClass("subviews-top").hide().removeAttr("style");
|
323
|
+
$('.main-container').css({
|
324
|
+
'max-height': '',
|
325
|
+
'min-height': '',
|
326
|
+
'overflow': ''
|
327
|
+
});
|
328
|
+
|
329
|
+
$("html, body").animate({
|
330
|
+
scrollTop: screenPosition
|
331
|
+
}, "slow");
|
332
|
+
});
|
333
|
+
}
|
334
|
+
} else {
|
335
|
+
if($(".back-subviews").is(":visible")) {
|
336
|
+
$(".back-subviews").animate({
|
337
|
+
opacity: 0,
|
338
|
+
left: "20px"
|
339
|
+
}, 300, function() {
|
340
|
+
$(this).off().hide();
|
341
|
+
});
|
342
|
+
}
|
343
|
+
$(".close-subviews").animate({
|
344
|
+
opacity: 0,
|
345
|
+
left: "20px"
|
346
|
+
}, 300, function() {
|
347
|
+
$(this).off().hide();
|
348
|
+
hide_functions = [];
|
349
|
+
$(".toolbar-tools").show(0, function() {
|
350
|
+
$(this).animate({
|
351
|
+
opacity: 1,
|
352
|
+
left: "0px"
|
353
|
+
});
|
354
|
+
});
|
355
|
+
});
|
356
|
+
|
357
|
+
if(subViews.hasClass("subviews-right")) {
|
358
|
+
subViews.animate({
|
359
|
+
width: 0
|
360
|
+
}, 300, function() {
|
361
|
+
$(this).off().removeClass("subviews-right").hide().removeAttr("style");
|
362
|
+
$('.main-container').css({
|
363
|
+
'max-height': '',
|
364
|
+
'min-height': '',
|
365
|
+
'overflow': ''
|
366
|
+
});
|
367
|
+
|
368
|
+
$("html, body").animate({
|
369
|
+
scrollTop: screenPosition
|
370
|
+
}, "slow");
|
371
|
+
});
|
372
|
+
} else {
|
373
|
+
subViews.animate({
|
374
|
+
height: 0
|
375
|
+
}, 300, function() {
|
376
|
+
$(this).off().removeClass("subviews-top").hide().removeAttr("style");
|
377
|
+
$('.main-container').css({
|
378
|
+
'max-height': '',
|
379
|
+
'min-height': '',
|
380
|
+
'overflow': ''
|
381
|
+
});
|
382
|
+
|
383
|
+
$("html, body").animate({
|
384
|
+
scrollTop: screenPosition
|
385
|
+
}, "slow");
|
386
|
+
});
|
387
|
+
}
|
388
|
+
}
|
389
|
+
}
|
390
|
+
}
|
391
|
+
});
|
392
|
+
})(jQuery);
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*!
|
2
|
+
* Velocity.js: Accelerated JavaScript animation.
|
3
|
+
* @version 0.5.1
|
4
|
+
* @docs http://velocityjs.org
|
5
|
+
* @license Copyright 2014 Julian Shapiro. MIT License: http://en.wikipedia.org/wiki/MIT_License
|
6
|
+
*/
|
7
|
+
!function(a,b,c,d){function e(a){for(var b=-1,c=a?a.length:0,d=[];++b<c;){var e=a[b];e&&d.push(e)}return d}function f(a){var b=q.data(a,k);return null===b?d:b}function g(a){return function(b){return Math.round(b*a)*(1/a)}}function h(a,b){var c=a;return p.isString(a)?r.Easings[a]||(c=!1):c=p.isArray(a)&&1===a.length?g.apply(null,a):p.isArray(a)&&2===a.length?t.apply(null,a.concat([b])):p.isArray(a)&&4===a.length?s.apply(null,a):!1,c===!1&&(c=r.Easings[r.defaults.easing]?r.defaults.easing:m),c}function i(a){if(a)for(var b=(new Date).getTime(),c=0,e=r.State.calls.length;e>c;c++)if(r.State.calls[c]){var g=r.State.calls[c],h=g[0],k=g[2],l=g[3];l||(l=r.State.calls[c][3]=b-16);for(var m=Math.min((b-l)/k.duration,1),n=0,q=h.length;q>n;n++){var s=h[n],t=s.element;if(f(t)){var v=!1;null!==k.display&&"none"!==k.display&&u.setPropertyValue(t,"display",k.display);for(var w in s)if("element"!==w){var x,y=s[w],z=p.isString(y.easing)?r.Easings[y.easing]:y.easing;if(x=1===m?y.endValue:y.startValue+(y.endValue-y.startValue)*z(m),y.currentValue=x,u.Hooks.registered[w]){var A=u.Hooks.getRoot(w),B=f(t).rootPropertyValueCache[A];B&&(y.rootPropertyValue=B)}var C=u.setPropertyValue(t,w,y.currentValue+(0===parseFloat(x)?"":y.unitType),y.rootPropertyValue,y.scrollData);u.Hooks.registered[w]&&(f(t).rootPropertyValueCache[A]=u.Normalizations.registered[A]?u.Normalizations.registered[A]("extract",null,C[1]):C[1]),"transform"===C[0]&&(v=!0)}k.mobileHA&&f(t).transformCache.translate3d===d&&(f(t).transformCache.translate3d="(0px, 0px, 0px)",v=!0),v&&u.flushTransformCache(t)}}null!==k.display&&"none"!==k.display&&(r.State.calls[c][2].display=!1),k.progress&&k.progress.call(g[1],g[1],m,Math.max(0,l+k.duration-b),l),1===m&&j(c)}r.State.isTicking&&o(i)}function j(a,b){if(!r.State.calls[a])return!1;for(var c=r.State.calls[a][0],e=r.State.calls[a][1],g=r.State.calls[a][2],h=r.State.calls[a][4],i=!1,j=0,k=c.length;k>j;j++){var l=c[j].element;if(b||"none"!==g.display||g.loop||u.setPropertyValue(l,"display",g.display),(q.queue(l)[1]===d||!/\.velocityQueueEntryFlag/i.test(q.queue(l)[1]))&&f(l)){f(l).isAnimating=!1,f(l).rootPropertyValueCache={};var m,n=["transformPerspective","translateZ","rotateX","rotateY"],o=!1;for(var p in n)m=n[p],/^\(0[^.]/.test(f(l).transformCache[m])&&(o=!0,delete f(l).transformCache[m]);g.mobileHA&&(o=!0,delete f(l).transformCache.translate3d),o&&u.flushTransformCache(l)}b||!g.complete||g.loop||j!==k-1||g.complete.call(e,e),h&&h(e),g.queue!==!1&&q.dequeue(l,g.queue)}r.State.calls[a]=!1;for(var s=0,t=r.State.calls.length;t>s;s++)if(r.State.calls[s]!==!1){i=!0;break}i===!1&&(r.State.isTicking=!1,delete r.State.calls,r.State.calls=[])}var k="velocity",l=400,m="swing",n=function(){if(c.documentMode)return c.documentMode;for(var a=7;a>4;a--){var b=c.createElement("div");if(b.innerHTML="<!--[if IE "+a+"]><span></span><![endif]-->",b.getElementsByTagName("span").length)return b=null,a}return d}(),o=b.requestAnimationFrame||function(){var a=0;return b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||function(b){var c,d=(new Date).getTime();return c=Math.max(0,16-(d-a)),a=d+c,setTimeout(function(){b(d+c)},c)}}(),p={isString:function(a){return"string"==typeof a},isArray:Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},isFunction:function(a){return"[object Function]"===Object.prototype.toString.call(a)},isNode:function(a){return a&&a.nodeType},isNodeList:function(a){return"object"==typeof a&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(a))&&a.length!==d&&(0===a.length||"object"==typeof a[0]&&a[0].nodeType>0)},isWrapped:function(a){return a&&(a.jquery||b.Zepto&&b.Zepto.zepto.isZ(a))},isSVG:function(a){return b.SVGElement&&a instanceof SVGElement}},q=b.jQuery||a.Velocity&&a.Velocity.Utilities;if(!q)throw new Error("Velocity: Either jQuery or Velocity's jQuery shim must first be loaded.");if(a.Velocity!==d&&!a.Velocity.Utilities)throw new Error("Velocity: Namespace is occupied.");if(7>=n){if(b.jQuery)return void(b.jQuery.fn.velocity=b.jQuery.fn.animate);throw new Error("Velocity: For IE<=7, Velocity falls back to jQuery, which must first be loaded.")}if(8===n&&!b.jQuery)throw new Error("Velocity: For IE8, Velocity requires jQuery to be loaded. (Velocity's jQuery shim does not work with IE8.)");var r=a.Velocity=a.velocity={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:b.chrome,prefixElement:c.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:b.jQuery,Sequences:{},Easings:{},Promise:b.Promise,defaults:{queue:"",duration:l,easing:m,begin:null,complete:null,progress:null,display:null,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},animate:function(){},mock:!1,version:{major:0,minor:5,patch:1},debug:!1};b.pageYOffset!==d?(r.State.scrollAnchor=b,r.State.scrollPropertyLeft="pageXOffset",r.State.scrollPropertyTop="pageYOffset"):(r.State.scrollAnchor=c.documentElement||c.body.parentNode||c.body,r.State.scrollPropertyLeft="scrollLeft",r.State.scrollPropertyTop="scrollTop");var s=function(){function a(a,b){return 1-3*b+3*a}function b(a,b){return 3*b-6*a}function c(a){return 3*a}function d(d,e,f){return((a(e,f)*d+b(e,f))*d+c(e))*d}function e(d,e,f){return 3*a(e,f)*d*d+2*b(e,f)*d+c(e)}return function(a,b,c,f){function g(b){for(var f=b,g=0;8>g;++g){var h=e(f,a,c);if(0===h)return f;var i=d(f,a,c)-b;f-=i/h}return f}if(4!==arguments.length)return!1;for(var h=0;4>h;++h)if("number"!=typeof arguments[h]||isNaN(arguments[h])||!isFinite(arguments[h]))return!1;return a=Math.min(a,1),c=Math.min(c,1),a=Math.max(a,0),c=Math.max(c,0),function(e){return a===b&&c===f?e:d(g(e),b,f)}}}(),t=function(){function a(a){return-a.tension*a.x-a.friction*a.v}function b(b,c,d){var e={x:b.x+d.dx*c,v:b.v+d.dv*c,tension:b.tension,friction:b.friction};return{dx:e.v,dv:a(e)}}function c(c,d){var e={dx:c.v,dv:a(c)},f=b(c,.5*d,e),g=b(c,.5*d,f),h=b(c,d,g),i=1/6*(e.dx+2*(f.dx+g.dx)+h.dx),j=1/6*(e.dv+2*(f.dv+g.dv)+h.dv);return c.x=c.x+i*d,c.v=c.v+j*d,c}return function d(a,b,e){var f,g,h,i={x:-1,v:0,tension:null,friction:null},j=[0],k=0,l=1e-4,m=.016;for(a=parseFloat(a)||500,b=parseFloat(b)||20,e=e||null,i.tension=a,i.friction=b,f=null!==e,f?(k=d(a,b),g=k/e*m):g=m;;)if(h=c(h||i,g),j.push(1+h.x),k+=16,!(Math.abs(h.x)>l&&Math.abs(h.v)>l))break;return f?function(a){return j[a*(j.length-1)|0]}:k}}();!function(){r.Easings.linear=function(a){return a},r.Easings.swing=function(a){return.5-Math.cos(a*Math.PI)/2},r.Easings.spring=function(a){return 1-Math.cos(4.5*a*Math.PI)*Math.exp(6*-a)},r.Easings.ease=s(.25,.1,.25,1),r.Easings["ease-in"]=s(.42,0,1,1),r.Easings["ease-out"]=s(0,0,.58,1),r.Easings["ease-in-out"]=s(.42,0,.58,1);var a={};q.each(["Quad","Cubic","Quart","Quint","Expo"],function(b,c){a[c]=function(a){return Math.pow(a,b+2)}}),q.extend(a,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),q.each(a,function(a,b){r.Easings["easeIn"+a]=b,r.Easings["easeOut"+a]=function(a){return 1-b(1-a)},r.Easings["easeInOut"+a]=function(a){return.5>a?b(2*a)/2:1-b(-2*a+2)/2}})}();var u=r.CSS={RegEx:{valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Hooks:{templates:{color:["Red Green Blue Alpha","255 255 255 1"],backgroundColor:["Red Green Blue Alpha","255 255 255 1"],borderColor:["Red Green Blue Alpha","255 255 255 1"],borderTopColor:["Red Green Blue Alpha","255 255 255 1"],borderRightColor:["Red Green Blue Alpha","255 255 255 1"],borderBottomColor:["Red Green Blue Alpha","255 255 255 1"],borderLeftColor:["Red Green Blue Alpha","255 255 255 1"],outlineColor:["Red Green Blue Alpha","255 255 255 1"],fill:["Red Green Blue Alpha","255 255 255 1"],stroke:["Red Green Blue Alpha","255 255 255 1"],stopColor:["Red Green Blue Alpha","255 255 255 1"],textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){var a,b,c;if(n)for(a in u.Hooks.templates){b=u.Hooks.templates[a],c=b[0].split(" ");var d=b[1].match(u.RegEx.valueSplit);"Color"===c[0]&&(c.push(c.shift()),d.push(d.shift()),u.Hooks.templates[a]=[c.join(" "),d.join(" ")])}for(a in u.Hooks.templates){b=u.Hooks.templates[a],c=b[0].split(" ");for(var e in c){var f=a+c[e],g=e;u.Hooks.registered[f]=[a,g]}}},getRoot:function(a){var b=u.Hooks.registered[a];return b?b[0]:a},cleanRootPropertyValue:function(a,b){return u.RegEx.valueUnwrap.test(b)&&(b=b.match(u.Hooks.RegEx.valueUnwrap)[1]),u.Values.isCSSNullValue(b)&&(b=u.Hooks.templates[a][1]),b},extractValue:function(a,b){var c=u.Hooks.registered[a];if(c){var d=c[0],e=c[1];return b=u.Hooks.cleanRootPropertyValue(d,b),b.toString().match(u.RegEx.valueSplit)[e]}return b},injectValue:function(a,b,c){var d=u.Hooks.registered[a];if(d){var e,f,g=d[0],h=d[1];return c=u.Hooks.cleanRootPropertyValue(g,c),e=c.toString().match(u.RegEx.valueSplit),e[h]=b,f=e.join(" ")}return c}},Normalizations:{registered:{clip:function(a,b,c){switch(a){case"name":return"clip";case"extract":var d;return u.RegEx.wrappedValueAlreadyExtracted.test(c)?d=c:(d=c.toString().match(u.RegEx.valueUnwrap),d=d?d[1].replace(/,(\s+)?/g," "):c),d;case"inject":return"rect("+c+")"}},opacity:function(a,b,c){if(8>=n)switch(a){case"name":return"filter";case"extract":var d=c.toString().match(/alpha\(opacity=(.*)\)/i);return c=d?d[1]/100:1;case"inject":return b.style.zoom=1,parseFloat(c)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(c),10)+")"}else switch(a){case"name":return"opacity";case"extract":return c;case"inject":return c}}},register:function(){function a(a){var b,c=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a=a.replace(c,function(a,b,c,d){return b+b+c+c+d+d}),b=d.exec(a),b?"rgb("+(parseInt(b[1],16)+" "+parseInt(b[2],16)+" "+parseInt(b[3],16))+")":"rgb(0 0 0)"}var b=["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"];9>=n||r.State.isGingerbread||(b=b.concat(["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]));for(var c=0,e=b.length;e>c;c++)!function(){var a=b[c];u.Normalizations.registered[a]=function(b,c,e){switch(b){case"name":return"transform";case"extract":return f(c).transformCache[a]===d?/^scale/i.test(a)?1:0:f(c).transformCache[a].replace(/[()]/g,"");case"inject":var g=!1;switch(a.substr(0,a.length-1)){case"translate":g=!/(%|px|em|rem|\d)$/i.test(e);break;case"scal":case"scale":r.State.isAndroid&&f(c).transformCache[a]===d&&(e=1),g=!/(\d)$/i.test(e);break;case"skew":g=!/(deg|\d)$/i.test(e);break;case"rotate":g=!/(deg|\d)$/i.test(e)}return g||(f(c).transformCache[a]="("+e+")"),f(c).transformCache[a]}}}();for(var g=["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],c=0,h=g.length;h>c;c++)!function(){var b=g[c];u.Normalizations.registered[b]=function(c,e,f){switch(c){case"name":return b;case"extract":var g;if(u.RegEx.wrappedValueAlreadyExtracted.test(f))g=f;else{var h,i={aqua:"rgb(0, 255, 255);",black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",fuchsia:"rgb(255, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",lime:"rgb(0, 255, 0)",maroon:"rgb(128, 0, 0)",navy:"rgb(0, 0, 128)",olive:"rgb(128, 128, 0)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",silver:"rgb(192, 192, 192)",teal:"rgb(0, 128, 128)",white:"rgb(255, 255, 255)",yellow:"rgb(255, 255, 0)"};/^[A-z]+$/i.test(f)?h=i[f]!==d?i[f]:i.black:/^#([A-f\d]{3}){1,2}$/i.test(f)?h=a(f):/^rgba?\(/i.test(f)||(h=i.black),g=(h||f).toString().match(u.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return 8>=n||3!==g.split(" ").length||(g+=" 1"),g;case"inject":return 8>=n?4===f.split(" ").length&&(f=f.split(/\s+/).slice(0,3).join(" ")):3===f.split(" ").length&&(f+=" 1"),(8>=n?"rgb":"rgba")+"("+f.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(a){return a.replace(/-(\w)/g,function(a,b){return b.toUpperCase()})},SVGAttribute:function(a){var b="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y1";return(n||r.State.isAndroid&&!r.State.isChrome)&&(b+="|transform"),new RegExp("^("+b+")$","i").test(a)},prefixCheck:function(a){if(r.State.prefixMatches[a])return[r.State.prefixMatches[a],!0];for(var b=["","Webkit","Moz","ms","O"],c=0,d=b.length;d>c;c++){var e;if(e=0===c?a:b[c]+a.replace(/^\w/,function(a){return a.toUpperCase()}),p.isString(r.State.prefixElement.style[e]))return r.State.prefixMatches[a]=e,[e,!0]}return[a,!1]}},Values:{isCSSNullValue:function(a){return 0==a||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a)},getUnitType:function(a){return/^(rotate|skew)/i.test(a)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(a)?"":"px"}},getPropertyValue:function(a,c,e,g){function h(a,c){var e=0;if(8>=n)e=q.css(a,c);else{if(!g){if("height"===c&&"border-box"!==u.getPropertyValue(a,"boxSizing").toString().toLowerCase())return a.offsetHeight-(parseFloat(u.getPropertyValue(a,"borderTopWidth"))||0)-(parseFloat(u.getPropertyValue(a,"borderBottomWidth"))||0)-(parseFloat(u.getPropertyValue(a,"paddingTop"))||0)-(parseFloat(u.getPropertyValue(a,"paddingBottom"))||0);if("width"===c&&"border-box"!==u.getPropertyValue(a,"boxSizing").toString().toLowerCase())return a.offsetWidth-(parseFloat(u.getPropertyValue(a,"borderLeftWidth"))||0)-(parseFloat(u.getPropertyValue(a,"borderRightWidth"))||0)-(parseFloat(u.getPropertyValue(a,"paddingLeft"))||0)-(parseFloat(u.getPropertyValue(a,"paddingRight"))||0)}var i;i=f(a)===d?b.getComputedStyle(a,null):f(a).computedStyle?f(a).computedStyle:f(a).computedStyle=b.getComputedStyle(a,null),n&&"borderColor"===c&&(c="borderTopColor"),e=9===n&&"filter"===c?i.getPropertyValue(c):i[c],(""===e||null===e)&&(e=a.style[c])}if("auto"===e&&/^(top|right|bottom|left)$/i.test(c)){var j=h(a,"position");("fixed"===j||"absolute"===j&&/top|left/i.test(c))&&(e=q(a).position()[c]+"px")}return e}var i;if(u.Hooks.registered[c]){var j=c,k=u.Hooks.getRoot(j);e===d&&(e=u.getPropertyValue(a,u.Names.prefixCheck(k)[0])),u.Normalizations.registered[k]&&(e=u.Normalizations.registered[k]("extract",a,e)),i=u.Hooks.extractValue(j,e)}else if(u.Normalizations.registered[c]){var l,m;l=u.Normalizations.registered[c]("name",a),"transform"!==l&&(m=h(a,u.Names.prefixCheck(l)[0]),u.Values.isCSSNullValue(m)&&u.Hooks.templates[c]&&(m=u.Hooks.templates[c][1])),i=u.Normalizations.registered[c]("extract",a,m)}return/^[\d-]/.test(i)||(i=f(a)&&f(a).isSVG&&u.Names.SVGAttribute(c)?/^(height|width)$/i.test(c)?a.getBBox()[c]:a.getAttribute(c):h(a,u.Names.prefixCheck(c)[0])),u.Values.isCSSNullValue(i)&&(i=0),r.debug>=2&&console.log("Get "+c+": "+i),i},setPropertyValue:function(a,c,d,e,g){var h=c;if("scroll"===c)g.container?g.container["scroll"+g.direction]=d:"Left"===g.direction?b.scrollTo(d,g.alternateValue):b.scrollTo(g.alternateValue,d);else if(u.Normalizations.registered[c]&&"transform"===u.Normalizations.registered[c]("name",a))u.Normalizations.registered[c]("inject",a,d),h="transform",d=f(a).transformCache[c];else{if(u.Hooks.registered[c]){var i=c,j=u.Hooks.getRoot(c);e=e||u.getPropertyValue(a,j),d=u.Hooks.injectValue(i,d,e),c=j}if(u.Normalizations.registered[c]&&(d=u.Normalizations.registered[c]("inject",a,d),c=u.Normalizations.registered[c]("name",a)),h=u.Names.prefixCheck(c)[0],8>=n)try{a.style[h]=d}catch(k){r.debug&&console.log("Browser does not support ["+d+"] for ["+h+"]")}else f(a)&&f(a).isSVG&&u.Names.SVGAttribute(c)?a.setAttribute(c,d):a.style[h]=d;r.debug>=2&&console.log("Set "+c+" ("+h+"): "+d)}return[h,d]},flushTransformCache:function(a){function b(b){return parseFloat(u.getPropertyValue(a,b))}var c="";if((n||r.State.isAndroid&&!r.State.isChrome)&&f(a).isSVG){var d={translate:[b("translateX"),b("translateY")],skewX:[b("skewX")],skewY:[b("skewY")],scale:1!==b("scale")?[b("scale"),b("scale")]:[b("scaleX"),b("scaleY")],rotate:[b("rotateZ"),0,0]};q.each(f(a).transformCache,function(a){/^translate/i.test(a)?a="translate":/^scale/i.test(a)?a="scale":/^rotate/i.test(a)&&(a="rotate"),d[a]&&(c+=a+"("+d[a].join(" ")+") ",delete d[a])})}else{var e,g;q.each(f(a).transformCache,function(b){return e=f(a).transformCache[b],"transformPerspective"===b?(g=e,!0):(9===n&&"rotateZ"===b&&(b="rotate"),void(c+=b+e+" "))}),g&&(c="perspective"+g+" "+c)}u.setPropertyValue(a,"transform",c)}};u.Hooks.register(),u.Normalizations.register(),r.animate=function(){function a(){return g?B.promise||null:m}function b(){function a(){function a(a){var c=d,e=d,f=d;return p.isArray(a)?(c=a[0],!p.isArray(a[1])&&/^[\d-]/.test(a[1])||p.isFunction(a[1])?f=a[1]:(p.isString(a[1])||p.isArray(a[1]))&&(e=h(a[1],g.duration),a[2]!==d&&(f=a[2]))):c=a,e=e||g.easing,p.isFunction(c)&&(c=c.call(b,y,x)),p.isFunction(f)&&(f=f.call(b,y,x)),[c||0,e,f]}function k(a,b){var c,d;return d=(b||0).toString().toLowerCase().replace(/[%A-z]+$/,function(a){return c=a,""}),c||(c=u.Values.getUnitType(a)),[d,c]}function l(){var a={parent:b.parentNode,position:u.getPropertyValue(b,"position"),fontSize:u.getPropertyValue(b,"fontSize")},d=a.position===G.lastPosition&&a.parent===G.lastParent,e=a.fontSize===G.lastFontSize&&a.parent===G.lastParent;G.lastParent=a.parent,G.lastPosition=a.position,G.lastFontSize=a.fontSize,null===G.remToPxRatio&&(G.remToPxRatio=parseFloat(u.getPropertyValue(c.body,"fontSize"))||16);var g={overflowX:null,overflowY:null,boxSizing:null,width:null,minWidth:null,maxWidth:null,height:null,minHeight:null,maxHeight:null,paddingLeft:null},h={},i=10;if(h.remToPxRatio=G.remToPxRatio,n&&!f(b).isSVG)var j=/^auto$/i.test(b.currentStyle.width),k=/^auto$/i.test(b.currentStyle.height);d&&e||(f(b).isSVG||(g.overflowX=u.getPropertyValue(b,"overflowX"),g.overflowY=u.getPropertyValue(b,"overflowY"),g.boxSizing=u.getPropertyValue(b,"boxSizing"),g.minWidth=u.getPropertyValue(b,"minWidth"),g.maxWidth=u.getPropertyValue(b,"maxWidth")||"none",g.minHeight=u.getPropertyValue(b,"minHeight"),g.maxHeight=u.getPropertyValue(b,"maxHeight")||"none",g.paddingLeft=u.getPropertyValue(b,"paddingLeft")),g.width=u.getPropertyValue(b,"width",null,!0),g.height=u.getPropertyValue(b,"height",null,!0)),d?(h.percentToPxRatioWidth=G.lastPercentToPxWidth,h.percentToPxRatioHeight=G.lastPercentToPxHeight):(f(b).isSVG||(u.setPropertyValue(b,"overflowX","hidden"),u.setPropertyValue(b,"overflowY","hidden"),u.setPropertyValue(b,"boxSizing","content-box"),u.setPropertyValue(b,"minWidth",i+"%"),u.setPropertyValue(b,"maxWidth",i+"%"),u.setPropertyValue(b,"minHeight",i+"%"),u.setPropertyValue(b,"maxHeight",i+"%")),u.setPropertyValue(b,"width",i+"%"),u.setPropertyValue(b,"height",i+"%")),e?h.emToPxRatio=G.lastEmToPx:f(b).isSVG||u.setPropertyValue(b,"paddingLeft",i+"em"),d||(h.percentToPxRatioWidth=G.lastPercentToPxWidth=(parseFloat(u.getPropertyValue(b,"width",null,!0))||1)/i,h.percentToPxRatioHeight=G.lastPercentToPxHeight=(parseFloat(u.getPropertyValue(b,"height",null,!0))||1)/i),e||(h.emToPxRatio=G.lastEmToPx=(parseFloat(u.getPropertyValue(b,"paddingLeft"))||1)/i);for(var l in g)null!==g[l]&&u.setPropertyValue(b,l,g[l]);return f(b).isSVG||(n?(j&&u.setPropertyValue(b,"width","auto"),k&&u.setPropertyValue(b,"height","auto")):(u.setPropertyValue(b,"height","auto"),g.height!==u.getPropertyValue(b,"height",null,!0)&&u.setPropertyValue(b,"height",g.height),u.setPropertyValue(b,"width","auto"),g.width!==u.getPropertyValue(b,"width",null,!0)&&u.setPropertyValue(b,"width",g.width))),r.debug>=1&&console.log("Unit ratios: "+JSON.stringify(h),b),h}if(g.begin&&0===y&&g.begin.call(s,s),"scroll"===C){var m,o,w,z=/^x$/i.test(g.axis)?"Left":"Top",A=parseFloat(g.offset)||0;g.container?g.container.jquery||p.isNode(g.container)?(g.container=g.container[0]||g.container,m=g.container["scroll"+z],w=m+q(b).position()[z.toLowerCase()]+A):g.container=null:(m=r.State.scrollAnchor[r.State["scrollProperty"+z]],o=r.State.scrollAnchor[r.State["scrollProperty"+("Left"===z?"Top":"Left")]],w=q(b).offset()[z.toLowerCase()]+A),j={scroll:{rootPropertyValue:!1,startValue:m,currentValue:m,endValue:w,unitType:"",easing:g.easing,scrollData:{container:g.container,direction:z,alternateValue:o}},element:b}}else if("reverse"===C){if(!f(b).tweensContainer)return void q.dequeue(b,g.queue);"none"===f(b).opts.display&&(f(b).opts.display="block"),f(b).opts.loop=!1,f(b).opts.begin=null,f(b).opts.complete=null,v.easing||delete g.easing,v.duration||delete g.duration,g=q.extend({},f(b).opts,g);var D=q.extend(!0,{},f(b).tweensContainer);for(var E in D)if("element"!==E){var F=D[E].startValue;D[E].startValue=D[E].currentValue=D[E].endValue,D[E].endValue=F,v&&(D[E].easing=g.easing)}j=D}else if("start"===C){var D;f(b).tweensContainer&&f(b).isAnimating===!0&&(D=f(b).tweensContainer);for(var I in t){var J=a(t[I]),K=J[0],L=J[1],M=J[2];I=u.Names.camelCase(I);var N=u.Hooks.getRoot(I),O=!1;if(f(b).isSVG||u.Names.prefixCheck(N)[1]!==!1||u.Normalizations.registered[N]!==d){null!==g.display&&"none"!==g.display&&/opacity|filter/.test(I)&&!M&&0!==K&&(M=0),g._cacheValues&&D&&D[I]?(M===d&&(M=D[I].endValue+D[I].unitType),O=f(b).rootPropertyValueCache[N]):u.Hooks.registered[I]?M===d?(O=u.getPropertyValue(b,N),M=u.getPropertyValue(b,I,O)):O=u.Hooks.templates[N][1]:M===d&&(M=u.getPropertyValue(b,I));var P,Q,R,S;P=k(I,M),M=P[0],R=P[1],P=k(I,K),K=P[0].replace(/^([+-\/*])=/,function(a,b){return S=b,""}),Q=P[1],M=parseFloat(M)||0,K=parseFloat(K)||0;var T;if("%"===Q&&(/^(fontSize|lineHeight)$/.test(I)?(K/=100,Q="em"):/^scale/.test(I)?(K/=100,Q=""):/(Red|Green|Blue)$/i.test(I)&&(K=K/100*255,Q="")),/[\/*]/.test(S))Q=R;else if(R!==Q&&0!==M)if(0===K)Q=R;else{T=T||l();var U=/margin|padding|left|right|width|text|word|letter/i.test(I)||/X$/.test(I)?"x":"y";switch(R){case"%":M*="x"===U?T.percentToPxRatioWidth:T.percentToPxRatioHeight;break;case"em":M*=T.emToPxRatio;break;case"rem":M*=T.remToPxRatio;break;case"px":}switch(Q){case"%":M*=1/("x"===U?T.percentToPxRatioWidth:T.percentToPxRatioHeight);break;case"em":M*=1/T.emToPxRatio;break;case"rem":M*=1/T.remToPxRatio;break;case"px":}}switch(S){case"+":K=M+K;break;case"-":K=M-K;break;case"*":K=M*K;break;case"/":K=M/K}j[I]={rootPropertyValue:O,startValue:M,currentValue:M,endValue:K,unitType:Q,easing:L},r.debug&&console.log("tweensContainer ("+I+"): "+JSON.stringify(j[I]),b)}else r.debug&&console.log("Skipping ["+N+"] due to a lack of browser support.")}j.element=b}j.element&&(H.push(j),f(b).tweensContainer=j,f(b).opts=g,f(b).isAnimating=!0,y===x-1?(r.State.calls.length>1e4&&(r.State.calls=e(r.State.calls)),r.State.calls.push([H,s,g,null,B.resolver]),r.State.isTicking===!1&&(r.State.isTicking=!0,i())):y++)}var b=this,g=q.extend({},r.defaults,v),j={};if(f(b)===d&&q.data(b,k,{isSVG:p.isSVG(b),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}}),parseFloat(g.delay)&&g.queue!==!1&&q.queue(b,g.queue,function(a){r.velocityQueueEntryFlag=!0,setTimeout(a,parseFloat(g.delay))}),r.mock===!0)g.duration=1;else switch(g.duration.toString().toLowerCase()){case"fast":g.duration=200;break;case"normal":g.duration=l;break;case"slow":g.duration=600;break;default:g.duration=parseFloat(g.duration)||1}g.easing=h(g.easing,g.duration),g.begin&&!p.isFunction(g.begin)&&(g.begin=null),g.progress&&!p.isFunction(g.progress)&&(g.progress=null),g.complete&&!p.isFunction(g.complete)&&(g.complete=null),p.isString(g.display)&&(g.display=g.display.toLowerCase()),g.mobileHA=g.mobileHA&&r.State.isMobile&&!r.State.isGingerbread,g.queue===!1?g.delay?setTimeout(a,g.delay):a():q.queue(b,g.queue,function(b){return"clearQueue"===b?(B.promise&&B.resolver(s),!0):(r.velocityQueueEntryFlag=!0,void a(b))}),""!==g.queue&&"fx"!==g.queue||"inprogress"===q.queue(b)[0]||q.dequeue(b)}var g,m,o,s,t,v,w=arguments[0]&&(q.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||p.isString(arguments[0].properties));if(p.isWrapped(this)?(g=!1,o=0,s=this,m=this):(g=!0,o=1,s=w?arguments[0].elements:arguments[0]),s=p.isWrapped(s)?[].slice.call(s):s){w?(t=arguments[0].properties,v=arguments[0].options):(t=arguments[o],v=arguments[o+1]);var x=p.isArray(s)||p.isNodeList(s)?s.length:1,y=0;if("stop"!==t&&!q.isPlainObject(v)){var z=o+1;v={};for(var A=z;A<arguments.length;A++)!p.isArray(arguments[A])&&/^\d/.test(arguments[A])?v.duration=parseFloat(arguments[A]):p.isString(arguments[A])||p.isArray(arguments[A])?v.easing=arguments[A]:p.isFunction(arguments[A])&&(v.complete=arguments[A])}var B={promise:null,resolver:null,rejecter:null};g&&r.Promise&&(B.promise=new r.Promise(function(a,b){B.resolver=a,B.rejecter=b}));var C;switch(t){case"scroll":C="scroll";break;case"reverse":C="reverse";break;case"stop":var D=[];return q.each(r.State.calls,function(a,b){b!==!1&&q.each(p.isNode(b[1])?[b[1]]:b[1],function(b,c){q.each(p.isNode(s)?[s]:s,function(b,d){if(d===c){if(f(d)&&q.each(f(d).tweensContainer,function(a,b){b.endValue=b.currentValue}),v===!0||p.isString(v)){var e=p.isString(v)?v:"";q.each(q.queue(d,e),function(a,b){p.isFunction(b)&&b("clearQueue")}),q.queue(d,e,[])}D.push(a)}})})}),q.each(D,function(a,b){j(b,!0)}),B.promise&&B.resolver(s),a();default:if(!q.isPlainObject(t)||q.isEmptyObject(t)){if(p.isString(t)&&r.Sequences[t]){var E=v.duration;return v.backwards===!0&&(s=(s.jquery?[].slice.call(s):s).reverse()),q.each(s,function(a,b){parseFloat(v.stagger)&&(v.delay=parseFloat(v.stagger)*a),v.drag&&(v.duration=parseFloat(E)||(/^(callout|transition)/.test(t)?1e3:l),v.duration=Math.max(v.duration*(v.backwards?1-a/x:(a+1)/x),.75*v.duration,200)),r.Sequences[t].call(b,b,v||{},a,x,s,B.promise?B:d)}),a()}var F="Velocity: First argument ("+t+") was not a property map, a known action, or a registered sequence. Aborting.";return B.promise?B.rejecter(new Error(F)):console.log(F),a()}C="start"}var G={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPxRatio:null},H=[];q.each(p.isNode(s)?[s]:s,function(a,c){p.isNode(c)&&b.call(c)});var I,J=q.extend({},r.defaults,v);if(J.loop=parseInt(J.loop),I=2*J.loop-1,J.loop)for(var K=0;I>K;K++){var L={delay:J.delay};J.complete&&K===I-1&&(L.complete=J.complete),r.animate(s,"reverse",L)}return a()}};var v=b.jQuery||b.Zepto;v&&(v.fn.velocity=r.animate,v.fn.velocity.defaults=r.defaults),"undefined"!=typeof define&&define.amd?define(function(){return r}):"undefined"!=typeof module&&module.exports&&(module.exports=r),q.each(["Down","Up"],function(a,b){r.Sequences["slide"+b]=function(a,c){var d=q.extend({},c),e={height:null,marginTop:null,marginBottom:null,paddingTop:null,paddingBottom:null,overflow:null,overflowX:null,overflowY:null},f=d.begin,g=d.complete,h=!1;null!==d.display&&(d.display="Down"===b?d.display||"":d.display||"none"),d.begin=function(){function c(){a.style.display="block",e.height=r.CSS.getPropertyValue(a,"height"),a.style.height="auto",r.CSS.getPropertyValue(a,"height")===e.height&&(h=!0),r.CSS.setPropertyValue(a,"height",e.height+"px")}if("Down"===b){e.overflow=[r.CSS.getPropertyValue(a,"overflow"),0],e.overflowX=[r.CSS.getPropertyValue(a,"overflowX"),0],e.overflowY=[r.CSS.getPropertyValue(a,"overflowY"),0],a.style.overflow="hidden",a.style.overflowX="visible",a.style.overflowY="hidden",c();for(var d in e)/^overflow/.test(d)||(e[d]=[r.CSS.getPropertyValue(a,d),0]);a.style.display="none"}else{c();for(var d in e)e[d]=[0,r.CSS.getPropertyValue(a,d)];a.style.overflow="hidden",a.style.overflowX="visible",a.style.overflowY="hidden"}f&&f.call(a,a)},d.complete=function(a){var c="Down"===b?0:1;h===!0?e.height[c]="auto":e.height[c]+="px";for(var d in e)a.style[d]=e[d][c];g&&g.call(a,a)},r.animate(a,e,d)}}),q.each(["In","Out"],function(a,b){r.Sequences["fade"+b]=function(a,c,d,e){var f=q.extend({},c),g={opacity:"In"===b?1:0};d!==e-1&&(f.complete=f.begin=null),null!==f.display&&(f.display="In"===b?"":"none"),r.animate(this,g,f)}})}(window.jQuery||window.Zepto||window,window,document);
|
8
|
+
(function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var p="left",o="right",e="up",x="down",c="in",z="out",m="none",s="auto",l="swipe",t="pinch",A="tap",j="doubletap",b="longtap",y="hold",D="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,B="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};f.fn.swipe=function(G){var F=f(this),E=F.data(B);if(E&&typeof G==="string"){if(E[G]){return E[G].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+G+" does not exist on jQuery.swipe")}}else{if(!E&&(typeof G==="object"||!G)){return w.apply(this,arguments)}}return F};f.fn.swipe.defaults=n;f.fn.swipe.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipe.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:z};f.fn.swipe.pageScroll={NONE:m,HORIZONTAL:D,VERTICAL:u,AUTO:s};f.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(E){if(E&&(E.allowPageScroll===undefined&&(E.swipe!==undefined||E.swipeStatus!==undefined))){E.allowPageScroll=m}if(E.click!==undefined&&E.tap===undefined){E.tap=E.click}if(!E){E={}}E=f.extend({},f.fn.swipe.defaults,E);return this.each(function(){var G=f(this);var F=G.data(B);if(!F){F=new C(this,E);G.data(B,F)}})}function C(a4,av){var az=(a||d||!av.fallbackToMouseEvents),J=az?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",ay=az?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",U=az?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",S=az?null:"mouseleave",aD=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ag=0,aP=null,ab=0,a1=0,aZ=0,G=1,aq=0,aJ=0,M=null;var aR=f(a4);var Z="start";var W=0;var aQ=null;var T=0,a2=0,a5=0,ad=0,N=0;var aW=null,af=null;try{aR.bind(J,aN);aR.bind(aD,a9)}catch(ak){f.error("events not supported "+J+","+aD+" on jQuery.swipe")}this.enable=function(){aR.bind(J,aN);aR.bind(aD,a9);return aR};this.disable=function(){aK();return aR};this.destroy=function(){aK();aR.data(B,null);return aR};this.option=function(bc,bb){if(av[bc]!==undefined){if(bb===undefined){return av[bc]}else{av[bc]=bb}}else{f.error("Option "+bc+" does not exist on jQuery.swipe.options")}return null};function aN(bd){if(aB()){return}if(f(bd.target).closest(av.excludedElements,aR).length>0){return}var be=bd.originalEvent?bd.originalEvent:bd;var bc,bb=a?be.touches[0]:be;Z=g;if(a){W=be.touches.length}else{bd.preventDefault()}ag=0;aP=null;aJ=null;ab=0;a1=0;aZ=0;G=1;aq=0;aQ=aj();M=aa();R();if(!a||(W===av.fingers||av.fingers===i)||aX()){ai(0,bb);T=at();if(W==2){ai(1,be.touches[1]);a1=aZ=au(aQ[0].start,aQ[1].start)}if(av.swipeStatus||av.pinchStatus){bc=O(be,Z)}}else{bc=false}if(bc===false){Z=q;O(be,Z);return bc}else{if(av.hold){af=setTimeout(f.proxy(function(){aR.trigger("hold",[be.target]);if(av.hold){bc=av.hold.call(aR,be,be.target)}},this),av.longTapThreshold)}ao(true)}return null}function a3(be){var bh=be.originalEvent?be.originalEvent:be;if(Z===h||Z===q||am()){return}var bd,bc=a?bh.touches[0]:bh;var bf=aH(bc);a2=at();if(a){W=bh.touches.length}if(av.hold){clearTimeout(af)}Z=k;if(W==2){if(a1==0){ai(1,bh.touches[1]);a1=aZ=au(aQ[0].start,aQ[1].start)}else{aH(bh.touches[1]);aZ=au(aQ[0].end,aQ[1].end);aJ=ar(aQ[0].end,aQ[1].end)}G=a7(a1,aZ);aq=Math.abs(a1-aZ)}if((W===av.fingers||av.fingers===i)||!a||aX()){aP=aL(bf.start,bf.end);al(be,aP);ag=aS(bf.start,bf.end);ab=aM();aI(aP,ag);if(av.swipeStatus||av.pinchStatus){bd=O(bh,Z)}if(!av.triggerOnTouchEnd||av.triggerOnTouchLeave){var bb=true;if(av.triggerOnTouchLeave){var bg=aY(this);bb=E(bf.end,bg)}if(!av.triggerOnTouchEnd&&bb){Z=aC(k)}else{if(av.triggerOnTouchLeave&&!bb){Z=aC(h)}}if(Z==q||Z==h){O(bh,Z)}}}else{Z=q;O(bh,Z)}if(bd===false){Z=q;O(bh,Z)}}function L(bb){var bc=bb.originalEvent;if(a){if(bc.touches.length>0){F();return true}}if(am()){W=ad}a2=at();ab=aM();if(ba()||!an()){Z=q;O(bc,Z)}else{if(av.triggerOnTouchEnd||(av.triggerOnTouchEnd==false&&Z===k)){bb.preventDefault();Z=h;O(bc,Z)}else{if(!av.triggerOnTouchEnd&&a6()){Z=h;aF(bc,Z,A)}else{if(Z===k){Z=q;O(bc,Z)}}}}ao(false);return null}function a9(){W=0;a2=0;T=0;a1=0;aZ=0;G=1;R();ao(false)}function K(bb){var bc=bb.originalEvent;if(av.triggerOnTouchLeave){Z=aC(h);O(bc,Z)}}function aK(){aR.unbind(J,aN);aR.unbind(aD,a9);aR.unbind(ay,a3);aR.unbind(U,L);if(S){aR.unbind(S,K)}ao(false)}function aC(bf){var be=bf;var bd=aA();var bc=an();var bb=ba();if(!bd||bb){be=q}else{if(bc&&bf==k&&(!av.triggerOnTouchEnd||av.triggerOnTouchLeave)){be=h}else{if(!bc&&bf==h&&av.triggerOnTouchLeave){be=q}}}return be}function O(bd,bb){var bc=undefined;if(I()||V()){bc=aF(bd,bb,l)}else{if((P()||aX())&&bc!==false){bc=aF(bd,bb,t)}}if(aG()&&bc!==false){bc=aF(bd,bb,j)}else{if(ap()&&bc!==false){bc=aF(bd,bb,b)}else{if(ah()&&bc!==false){bc=aF(bd,bb,A)}}}if(bb===q){a9(bd)}if(bb===h){if(a){if(bd.touches.length==0){a9(bd)}}else{a9(bd)}}return bc}function aF(be,bb,bd){var bc=undefined;if(bd==l){aR.trigger("swipeStatus",[bb,aP||null,ag||0,ab||0,W,aQ]);if(av.swipeStatus){bc=av.swipeStatus.call(aR,be,bb,aP||null,ag||0,ab||0,W,aQ);if(bc===false){return false}}if(bb==h&&aV()){aR.trigger("swipe",[aP,ag,ab,W,aQ]);if(av.swipe){bc=av.swipe.call(aR,be,aP,ag,ab,W,aQ);if(bc===false){return false}}switch(aP){case p:aR.trigger("swipeLeft",[aP,ag,ab,W,aQ]);if(av.swipeLeft){bc=av.swipeLeft.call(aR,be,aP,ag,ab,W,aQ)}break;case o:aR.trigger("swipeRight",[aP,ag,ab,W,aQ]);if(av.swipeRight){bc=av.swipeRight.call(aR,be,aP,ag,ab,W,aQ)}break;case e:aR.trigger("swipeUp",[aP,ag,ab,W,aQ]);if(av.swipeUp){bc=av.swipeUp.call(aR,be,aP,ag,ab,W,aQ)}break;case x:aR.trigger("swipeDown",[aP,ag,ab,W,aQ]);if(av.swipeDown){bc=av.swipeDown.call(aR,be,aP,ag,ab,W,aQ)}break}}}if(bd==t){aR.trigger("pinchStatus",[bb,aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchStatus){bc=av.pinchStatus.call(aR,be,bb,aJ||null,aq||0,ab||0,W,G,aQ);if(bc===false){return false}}if(bb==h&&a8()){switch(aJ){case c:aR.trigger("pinchIn",[aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchIn){bc=av.pinchIn.call(aR,be,aJ||null,aq||0,ab||0,W,G,aQ)}break;case z:aR.trigger("pinchOut",[aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchOut){bc=av.pinchOut.call(aR,be,aJ||null,aq||0,ab||0,W,G,aQ)}break}}}if(bd==A){if(bb===q||bb===h){clearTimeout(aW);clearTimeout(af);if(Y()&&!H()){N=at();aW=setTimeout(f.proxy(function(){N=null;aR.trigger("tap",[be.target]);if(av.tap){bc=av.tap.call(aR,be,be.target)}},this),av.doubleTapThreshold)}else{N=null;aR.trigger("tap",[be.target]);if(av.tap){bc=av.tap.call(aR,be,be.target)}}}}else{if(bd==j){if(bb===q||bb===h){clearTimeout(aW);N=null;aR.trigger("doubletap",[be.target]);if(av.doubleTap){bc=av.doubleTap.call(aR,be,be.target)}}}else{if(bd==b){if(bb===q||bb===h){clearTimeout(aW);N=null;aR.trigger("longtap",[be.target]);if(av.longTap){bc=av.longTap.call(aR,be,be.target)}}}}}return bc}function an(){var bb=true;if(av.threshold!==null){bb=ag>=av.threshold}return bb}function ba(){var bb=false;if(av.cancelThreshold!==null&&aP!==null){bb=(aT(aP)-ag)>=av.cancelThreshold}return bb}function ae(){if(av.pinchThreshold!==null){return aq>=av.pinchThreshold}return true}function aA(){var bb;if(av.maxTimeThreshold){if(ab>=av.maxTimeThreshold){bb=false}else{bb=true}}else{bb=true}return bb}function al(bb,bc){if(av.allowPageScroll===m||aX()){bb.preventDefault()}else{var bd=av.allowPageScroll===s;switch(bc){case p:if((av.swipeLeft&&bd)||(!bd&&av.allowPageScroll!=D)){bb.preventDefault()}break;case o:if((av.swipeRight&&bd)||(!bd&&av.allowPageScroll!=D)){bb.preventDefault()}break;case e:if((av.swipeUp&&bd)||(!bd&&av.allowPageScroll!=u)){bb.preventDefault()}break;case x:if((av.swipeDown&&bd)||(!bd&&av.allowPageScroll!=u)){bb.preventDefault()}break}}}function a8(){var bc=aO();var bb=X();var bd=ae();return bc&&bb&&bd}function aX(){return !!(av.pinchStatus||av.pinchIn||av.pinchOut)}function P(){return !!(a8()&&aX())}function aV(){var be=aA();var bg=an();var bd=aO();var bb=X();var bc=ba();var bf=!bc&&bb&&bd&&bg&&be;return bf}function V(){return !!(av.swipe||av.swipeStatus||av.swipeLeft||av.swipeRight||av.swipeUp||av.swipeDown)}function I(){return !!(aV()&&V())}function aO(){return((W===av.fingers||av.fingers===i)||!a)}function X(){return aQ[0].end.x!==0}function a6(){return !!(av.tap)}function Y(){return !!(av.doubleTap)}function aU(){return !!(av.longTap)}function Q(){if(N==null){return false}var bb=at();return(Y()&&((bb-N)<=av.doubleTapThreshold))}function H(){return Q()}function ax(){return((W===1||!a)&&(isNaN(ag)||ag<av.threshold))}function a0(){return((ab>av.longTapThreshold)&&(ag<r))}function ah(){return !!(ax()&&a6())}function aG(){return !!(Q()&&Y())}function ap(){return !!(a0()&&aU())}function F(){a5=at();ad=event.touches.length+1}function R(){a5=0;ad=0}function am(){var bb=false;if(a5){var bc=at()-a5;if(bc<=av.fingerReleaseThreshold){bb=true}}return bb}function aB(){return !!(aR.data(B+"_intouch")===true)}function ao(bb){if(bb===true){aR.bind(ay,a3);aR.bind(U,L);if(S){aR.bind(S,K)}}else{aR.unbind(ay,a3,false);aR.unbind(U,L,false);if(S){aR.unbind(S,K,false)}}aR.data(B+"_intouch",bb===true)}function ai(bc,bb){var bd=bb.identifier!==undefined?bb.identifier:0;aQ[bc].identifier=bd;aQ[bc].start.x=aQ[bc].end.x=bb.pageX||bb.clientX;aQ[bc].start.y=aQ[bc].end.y=bb.pageY||bb.clientY;return aQ[bc]}function aH(bb){var bd=bb.identifier!==undefined?bb.identifier:0;var bc=ac(bd);bc.end.x=bb.pageX||bb.clientX;bc.end.y=bb.pageY||bb.clientY;return bc}function ac(bc){for(var bb=0;bb<aQ.length;bb++){if(aQ[bb].identifier==bc){return aQ[bb]}}}function aj(){var bb=[];for(var bc=0;bc<=5;bc++){bb.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0})}return bb}function aI(bb,bc){bc=Math.max(bc,aT(bb));M[bb].distance=bc}function aT(bb){if(M[bb]){return M[bb].distance}return undefined}function aa(){var bb={};bb[p]=aw(p);bb[o]=aw(o);bb[e]=aw(e);bb[x]=aw(x);return bb}function aw(bb){return{direction:bb,distance:0}}function aM(){return a2-T}function au(be,bd){var bc=Math.abs(be.x-bd.x);var bb=Math.abs(be.y-bd.y);return Math.round(Math.sqrt(bc*bc+bb*bb))}function a7(bb,bc){var bd=(bc/bb)*1;return bd.toFixed(2)}function ar(){if(G<1){return z}else{return c}}function aS(bc,bb){return Math.round(Math.sqrt(Math.pow(bb.x-bc.x,2)+Math.pow(bb.y-bc.y,2)))}function aE(be,bc){var bb=be.x-bc.x;var bg=bc.y-be.y;var bd=Math.atan2(bg,bb);var bf=Math.round(bd*180/Math.PI);if(bf<0){bf=360-Math.abs(bf)}return bf}function aL(bc,bb){var bd=aE(bc,bb);if((bd<=45)&&(bd>=0)){return p}else{if((bd<=360)&&(bd>=315)){return p}else{if((bd>=135)&&(bd<=225)){return o}else{if((bd>45)&&(bd<135)){return x}else{return e}}}}}function at(){var bb=new Date();return bb.getTime()}function aY(bb){bb=f(bb);var bd=bb.offset();var bc={left:bd.left,right:bd.left+bb.outerWidth(),top:bd.top,bottom:bd.top+bb.outerHeight()};return bc}function E(bb,bc){return(bb.x>bc.left&&bb.x<bc.right&&bb.y>bc.top&&bb.y<bc.bottom)}}}));
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// require icheck
|
2
|
+
//= require app/moment.min
|
3
|
+
//= require app/jquery.mousewheel
|
4
|
+
//= require app/perfect-scrollbar
|
5
|
+
//= require app/jquery.serialScroll.min
|
6
|
+
//= require app/jquery.appear
|
7
|
+
//= require app/velocity.min
|
8
|
+
//= require app/bootstrap-modal
|
9
|
+
//= require app/bootstrap-modalmanager
|
10
|
+
//= require app/bootstrap-switch.min.js
|
11
|
+
//= require app/jquery.inputlimiter.1.3.1.min
|
12
|
+
//= require app/bootstrap-datepicker
|
13
|
+
//= require app/bootstrap-fileupload.min
|
14
|
+
//= require app/daterangepicker
|
15
|
+
//= require app/debounce
|
16
|
+
//= require app/subview
|
@@ -0,0 +1,12 @@
|
|
1
|
+
//= require ./bootstrap/affix
|
2
|
+
//= require ./bootstrap/alert
|
3
|
+
//= require ./bootstrap/button
|
4
|
+
//= require ./bootstrap/carousel
|
5
|
+
//= require ./bootstrap/collapse
|
6
|
+
//= require ./bootstrap/dropdown
|
7
|
+
//= require ./bootstrap/modal
|
8
|
+
//= require ./bootstrap/scrollspy
|
9
|
+
//= require ./bootstrap/tab
|
10
|
+
//= require ./bootstrap/transition
|
11
|
+
//= require ./bootstrap/tooltip
|
12
|
+
//= require ./bootstrap/popover
|
@@ -0,0 +1,2580 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap v3.4.1 (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2019 Twitter, Inc.
|
4
|
+
* Licensed under the MIT license
|
5
|
+
*/
|
6
|
+
|
7
|
+
if (typeof jQuery === 'undefined') {
|
8
|
+
throw new Error('Bootstrap\'s JavaScript requires jQuery')
|
9
|
+
}
|
10
|
+
|
11
|
+
+function ($) {
|
12
|
+
'use strict';
|
13
|
+
var version = $.fn.jquery.split(' ')[0].split('.')
|
14
|
+
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
|
15
|
+
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
|
16
|
+
}
|
17
|
+
}(jQuery);
|
18
|
+
|
19
|
+
/* ========================================================================
|
20
|
+
* Bootstrap: transition.js v3.4.1
|
21
|
+
* https://getbootstrap.com/docs/3.4/javascript/#transitions
|
22
|
+
* ========================================================================
|
23
|
+
* Copyright 2011-2019 Twitter, Inc.
|
24
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
25
|
+
* ======================================================================== */
|
26
|
+
|
27
|
+
|
28
|
+
+function ($) {
|
29
|
+
'use strict';
|
30
|
+
|
31
|
+
// CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
|
32
|
+
// ============================================================
|
33
|
+
|
34
|
+
function transitionEnd() {
|
35
|
+
var el = document.createElement('bootstrap')
|
36
|
+
|
37
|
+
var transEndEventNames = {
|
38
|
+
WebkitTransition : 'webkitTransitionEnd',
|
39
|
+
MozTransition : 'transitionend',
|
40
|
+
OTransition : 'oTransitionEnd otransitionend',
|
41
|
+
transition : 'transitionend'
|
42
|
+
}
|
43
|
+
|
44
|
+
for (var name in transEndEventNames) {
|
45
|
+
if (el.style[name] !== undefined) {
|
46
|
+
return { end: transEndEventNames[name] }
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
return false // explicit for ie8 ( ._.)
|
51
|
+
}
|
52
|
+
|
53
|
+
// https://blog.alexmaccaw.com/css-transitions
|
54
|
+
$.fn.emulateTransitionEnd = function (duration) {
|
55
|
+
var called = false
|
56
|
+
var $el = this
|
57
|
+
$(this).one('bsTransitionEnd', function () { called = true })
|
58
|
+
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
|
59
|
+
setTimeout(callback, duration)
|
60
|
+
return this
|
61
|
+
}
|
62
|
+
|
63
|
+
$(function () {
|
64
|
+
$.support.transition = transitionEnd()
|
65
|
+
|
66
|
+
if (!$.support.transition) return
|
67
|
+
|
68
|
+
$.event.special.bsTransitionEnd = {
|
69
|
+
bindType: $.support.transition.end,
|
70
|
+
delegateType: $.support.transition.end,
|
71
|
+
handle: function (e) {
|
72
|
+
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
|
73
|
+
}
|
74
|
+
}
|
75
|
+
})
|
76
|
+
|
77
|
+
}(jQuery);
|
78
|
+
|
79
|
+
/* ========================================================================
|
80
|
+
* Bootstrap: alert.js v3.4.1
|
81
|
+
* https://getbootstrap.com/docs/3.4/javascript/#alerts
|
82
|
+
* ========================================================================
|
83
|
+
* Copyright 2011-2019 Twitter, Inc.
|
84
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
85
|
+
* ======================================================================== */
|
86
|
+
|
87
|
+
|
88
|
+
+function ($) {
|
89
|
+
'use strict';
|
90
|
+
|
91
|
+
// ALERT CLASS DEFINITION
|
92
|
+
// ======================
|
93
|
+
|
94
|
+
var dismiss = '[data-dismiss="alert"]'
|
95
|
+
var Alert = function (el) {
|
96
|
+
$(el).on('click', dismiss, this.close)
|
97
|
+
}
|
98
|
+
|
99
|
+
Alert.VERSION = '3.4.1'
|
100
|
+
|
101
|
+
Alert.TRANSITION_DURATION = 150
|
102
|
+
|
103
|
+
Alert.prototype.close = function (e) {
|
104
|
+
var $this = $(this)
|
105
|
+
var selector = $this.attr('data-target')
|
106
|
+
|
107
|
+
if (!selector) {
|
108
|
+
selector = $this.attr('href')
|
109
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
110
|
+
}
|
111
|
+
|
112
|
+
selector = selector === '#' ? [] : selector
|
113
|
+
var $parent = $(document).find(selector)
|
114
|
+
|
115
|
+
if (e) e.preventDefault()
|
116
|
+
|
117
|
+
if (!$parent.length) {
|
118
|
+
$parent = $this.closest('.alert')
|
119
|
+
}
|
120
|
+
|
121
|
+
$parent.trigger(e = $.Event('close.bs.alert'))
|
122
|
+
|
123
|
+
if (e.isDefaultPrevented()) return
|
124
|
+
|
125
|
+
$parent.removeClass('in')
|
126
|
+
|
127
|
+
function removeElement() {
|
128
|
+
// detach from parent, fire event then clean up data
|
129
|
+
$parent.detach().trigger('closed.bs.alert').remove()
|
130
|
+
}
|
131
|
+
|
132
|
+
$.support.transition && $parent.hasClass('fade') ?
|
133
|
+
$parent
|
134
|
+
.one('bsTransitionEnd', removeElement)
|
135
|
+
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
|
136
|
+
removeElement()
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
// ALERT PLUGIN DEFINITION
|
141
|
+
// =======================
|
142
|
+
|
143
|
+
function Plugin(option) {
|
144
|
+
return this.each(function () {
|
145
|
+
var $this = $(this)
|
146
|
+
var data = $this.data('bs.alert')
|
147
|
+
|
148
|
+
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
149
|
+
if (typeof option == 'string') data[option].call($this)
|
150
|
+
})
|
151
|
+
}
|
152
|
+
|
153
|
+
var old = $.fn.alert
|
154
|
+
|
155
|
+
$.fn.alert = Plugin
|
156
|
+
$.fn.alert.Constructor = Alert
|
157
|
+
|
158
|
+
|
159
|
+
// ALERT NO CONFLICT
|
160
|
+
// =================
|
161
|
+
|
162
|
+
$.fn.alert.noConflict = function () {
|
163
|
+
$.fn.alert = old
|
164
|
+
return this
|
165
|
+
}
|
166
|
+
|
167
|
+
|
168
|
+
// ALERT DATA-API
|
169
|
+
// ==============
|
170
|
+
|
171
|
+
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
172
|
+
|
173
|
+
}(jQuery);
|
174
|
+
|
175
|
+
/* ========================================================================
|
176
|
+
* Bootstrap: button.js v3.4.1
|
177
|
+
* https://getbootstrap.com/docs/3.4/javascript/#buttons
|
178
|
+
* ========================================================================
|
179
|
+
* Copyright 2011-2019 Twitter, Inc.
|
180
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
181
|
+
* ======================================================================== */
|
182
|
+
|
183
|
+
|
184
|
+
+function ($) {
|
185
|
+
'use strict';
|
186
|
+
|
187
|
+
// BUTTON PUBLIC CLASS DEFINITION
|
188
|
+
// ==============================
|
189
|
+
|
190
|
+
var Button = function (element, options) {
|
191
|
+
this.$element = $(element)
|
192
|
+
this.options = $.extend({}, Button.DEFAULTS, options)
|
193
|
+
this.isLoading = false
|
194
|
+
}
|
195
|
+
|
196
|
+
Button.VERSION = '3.4.1'
|
197
|
+
|
198
|
+
Button.DEFAULTS = {
|
199
|
+
loadingText: 'loading...'
|
200
|
+
}
|
201
|
+
|
202
|
+
Button.prototype.setState = function (state) {
|
203
|
+
var d = 'disabled'
|
204
|
+
var $el = this.$element
|
205
|
+
var val = $el.is('input') ? 'val' : 'html'
|
206
|
+
var data = $el.data()
|
207
|
+
|
208
|
+
state += 'Text'
|
209
|
+
|
210
|
+
if (data.resetText == null) $el.data('resetText', $el[val]())
|
211
|
+
|
212
|
+
// push to event loop to allow forms to submit
|
213
|
+
setTimeout($.proxy(function () {
|
214
|
+
$el[val](data[state] == null ? this.options[state] : data[state])
|
215
|
+
|
216
|
+
if (state == 'loadingText') {
|
217
|
+
this.isLoading = true
|
218
|
+
$el.addClass(d).attr(d, d).prop(d, true)
|
219
|
+
} else if (this.isLoading) {
|
220
|
+
this.isLoading = false
|
221
|
+
$el.removeClass(d).removeAttr(d).prop(d, false)
|
222
|
+
}
|
223
|
+
}, this), 0)
|
224
|
+
}
|
225
|
+
|
226
|
+
Button.prototype.toggle = function () {
|
227
|
+
var changed = true
|
228
|
+
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
229
|
+
|
230
|
+
if ($parent.length) {
|
231
|
+
var $input = this.$element.find('input')
|
232
|
+
if ($input.prop('type') == 'radio') {
|
233
|
+
if ($input.prop('checked')) changed = false
|
234
|
+
$parent.find('.active').removeClass('active')
|
235
|
+
this.$element.addClass('active')
|
236
|
+
} else if ($input.prop('type') == 'checkbox') {
|
237
|
+
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
|
238
|
+
this.$element.toggleClass('active')
|
239
|
+
}
|
240
|
+
$input.prop('checked', this.$element.hasClass('active'))
|
241
|
+
if (changed) $input.trigger('change')
|
242
|
+
} else {
|
243
|
+
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
244
|
+
this.$element.toggleClass('active')
|
245
|
+
}
|
246
|
+
}
|
247
|
+
|
248
|
+
|
249
|
+
// BUTTON PLUGIN DEFINITION
|
250
|
+
// ========================
|
251
|
+
|
252
|
+
function Plugin(option) {
|
253
|
+
return this.each(function () {
|
254
|
+
var $this = $(this)
|
255
|
+
var data = $this.data('bs.button')
|
256
|
+
var options = typeof option == 'object' && option
|
257
|
+
|
258
|
+
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
259
|
+
|
260
|
+
if (option == 'toggle') data.toggle()
|
261
|
+
else if (option) data.setState(option)
|
262
|
+
})
|
263
|
+
}
|
264
|
+
|
265
|
+
var old = $.fn.button
|
266
|
+
|
267
|
+
$.fn.button = Plugin
|
268
|
+
$.fn.button.Constructor = Button
|
269
|
+
|
270
|
+
|
271
|
+
// BUTTON NO CONFLICT
|
272
|
+
// ==================
|
273
|
+
|
274
|
+
$.fn.button.noConflict = function () {
|
275
|
+
$.fn.button = old
|
276
|
+
return this
|
277
|
+
}
|
278
|
+
|
279
|
+
|
280
|
+
// BUTTON DATA-API
|
281
|
+
// ===============
|
282
|
+
|
283
|
+
$(document)
|
284
|
+
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
285
|
+
var $btn = $(e.target).closest('.btn')
|
286
|
+
Plugin.call($btn, 'toggle')
|
287
|
+
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
|
288
|
+
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
|
289
|
+
e.preventDefault()
|
290
|
+
// The target component still receive the focus
|
291
|
+
if ($btn.is('input,button')) $btn.trigger('focus')
|
292
|
+
else $btn.find('input:visible,button:visible').first().trigger('focus')
|
293
|
+
}
|
294
|
+
})
|
295
|
+
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
296
|
+
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
297
|
+
})
|
298
|
+
|
299
|
+
}(jQuery);
|
300
|
+
|
301
|
+
/* ========================================================================
|
302
|
+
* Bootstrap: carousel.js v3.4.1
|
303
|
+
* https://getbootstrap.com/docs/3.4/javascript/#carousel
|
304
|
+
* ========================================================================
|
305
|
+
* Copyright 2011-2019 Twitter, Inc.
|
306
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
307
|
+
* ======================================================================== */
|
308
|
+
|
309
|
+
|
310
|
+
+function ($) {
|
311
|
+
'use strict';
|
312
|
+
|
313
|
+
// CAROUSEL CLASS DEFINITION
|
314
|
+
// =========================
|
315
|
+
|
316
|
+
var Carousel = function (element, options) {
|
317
|
+
this.$element = $(element)
|
318
|
+
this.$indicators = this.$element.find('.carousel-indicators')
|
319
|
+
this.options = options
|
320
|
+
this.paused = null
|
321
|
+
this.sliding = null
|
322
|
+
this.interval = null
|
323
|
+
this.$active = null
|
324
|
+
this.$items = null
|
325
|
+
|
326
|
+
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
327
|
+
|
328
|
+
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
|
329
|
+
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
330
|
+
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
331
|
+
}
|
332
|
+
|
333
|
+
Carousel.VERSION = '3.4.1'
|
334
|
+
|
335
|
+
Carousel.TRANSITION_DURATION = 600
|
336
|
+
|
337
|
+
Carousel.DEFAULTS = {
|
338
|
+
interval: 5000,
|
339
|
+
pause: 'hover',
|
340
|
+
wrap: true,
|
341
|
+
keyboard: true
|
342
|
+
}
|
343
|
+
|
344
|
+
Carousel.prototype.keydown = function (e) {
|
345
|
+
if (/input|textarea/i.test(e.target.tagName)) return
|
346
|
+
switch (e.which) {
|
347
|
+
case 37: this.prev(); break
|
348
|
+
case 39: this.next(); break
|
349
|
+
default: return
|
350
|
+
}
|
351
|
+
|
352
|
+
e.preventDefault()
|
353
|
+
}
|
354
|
+
|
355
|
+
Carousel.prototype.cycle = function (e) {
|
356
|
+
e || (this.paused = false)
|
357
|
+
|
358
|
+
this.interval && clearInterval(this.interval)
|
359
|
+
|
360
|
+
this.options.interval
|
361
|
+
&& !this.paused
|
362
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
363
|
+
|
364
|
+
return this
|
365
|
+
}
|
366
|
+
|
367
|
+
Carousel.prototype.getItemIndex = function (item) {
|
368
|
+
this.$items = item.parent().children('.item')
|
369
|
+
return this.$items.index(item || this.$active)
|
370
|
+
}
|
371
|
+
|
372
|
+
Carousel.prototype.getItemForDirection = function (direction, active) {
|
373
|
+
var activeIndex = this.getItemIndex(active)
|
374
|
+
var willWrap = (direction == 'prev' && activeIndex === 0)
|
375
|
+
|| (direction == 'next' && activeIndex == (this.$items.length - 1))
|
376
|
+
if (willWrap && !this.options.wrap) return active
|
377
|
+
var delta = direction == 'prev' ? -1 : 1
|
378
|
+
var itemIndex = (activeIndex + delta) % this.$items.length
|
379
|
+
return this.$items.eq(itemIndex)
|
380
|
+
}
|
381
|
+
|
382
|
+
Carousel.prototype.to = function (pos) {
|
383
|
+
var that = this
|
384
|
+
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
|
385
|
+
|
386
|
+
if (pos > (this.$items.length - 1) || pos < 0) return
|
387
|
+
|
388
|
+
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
|
389
|
+
if (activeIndex == pos) return this.pause().cycle()
|
390
|
+
|
391
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
|
392
|
+
}
|
393
|
+
|
394
|
+
Carousel.prototype.pause = function (e) {
|
395
|
+
e || (this.paused = true)
|
396
|
+
|
397
|
+
if (this.$element.find('.next, .prev').length && $.support.transition) {
|
398
|
+
this.$element.trigger($.support.transition.end)
|
399
|
+
this.cycle(true)
|
400
|
+
}
|
401
|
+
|
402
|
+
this.interval = clearInterval(this.interval)
|
403
|
+
|
404
|
+
return this
|
405
|
+
}
|
406
|
+
|
407
|
+
Carousel.prototype.next = function () {
|
408
|
+
if (this.sliding) return
|
409
|
+
return this.slide('next')
|
410
|
+
}
|
411
|
+
|
412
|
+
Carousel.prototype.prev = function () {
|
413
|
+
if (this.sliding) return
|
414
|
+
return this.slide('prev')
|
415
|
+
}
|
416
|
+
|
417
|
+
Carousel.prototype.slide = function (type, next) {
|
418
|
+
var $active = this.$element.find('.item.active')
|
419
|
+
var $next = next || this.getItemForDirection(type, $active)
|
420
|
+
var isCycling = this.interval
|
421
|
+
var direction = type == 'next' ? 'left' : 'right'
|
422
|
+
var that = this
|
423
|
+
|
424
|
+
if ($next.hasClass('active')) return (this.sliding = false)
|
425
|
+
|
426
|
+
var relatedTarget = $next[0]
|
427
|
+
var slideEvent = $.Event('slide.bs.carousel', {
|
428
|
+
relatedTarget: relatedTarget,
|
429
|
+
direction: direction
|
430
|
+
})
|
431
|
+
this.$element.trigger(slideEvent)
|
432
|
+
if (slideEvent.isDefaultPrevented()) return
|
433
|
+
|
434
|
+
this.sliding = true
|
435
|
+
|
436
|
+
isCycling && this.pause()
|
437
|
+
|
438
|
+
if (this.$indicators.length) {
|
439
|
+
this.$indicators.find('.active').removeClass('active')
|
440
|
+
var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
|
441
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
442
|
+
}
|
443
|
+
|
444
|
+
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
445
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
446
|
+
$next.addClass(type)
|
447
|
+
if (typeof $next === 'object' && $next.length) {
|
448
|
+
$next[0].offsetWidth // force reflow
|
449
|
+
}
|
450
|
+
$active.addClass(direction)
|
451
|
+
$next.addClass(direction)
|
452
|
+
$active
|
453
|
+
.one('bsTransitionEnd', function () {
|
454
|
+
$next.removeClass([type, direction].join(' ')).addClass('active')
|
455
|
+
$active.removeClass(['active', direction].join(' '))
|
456
|
+
that.sliding = false
|
457
|
+
setTimeout(function () {
|
458
|
+
that.$element.trigger(slidEvent)
|
459
|
+
}, 0)
|
460
|
+
})
|
461
|
+
.emulateTransitionEnd(Carousel.TRANSITION_DURATION)
|
462
|
+
} else {
|
463
|
+
$active.removeClass('active')
|
464
|
+
$next.addClass('active')
|
465
|
+
this.sliding = false
|
466
|
+
this.$element.trigger(slidEvent)
|
467
|
+
}
|
468
|
+
|
469
|
+
isCycling && this.cycle()
|
470
|
+
|
471
|
+
return this
|
472
|
+
}
|
473
|
+
|
474
|
+
|
475
|
+
// CAROUSEL PLUGIN DEFINITION
|
476
|
+
// ==========================
|
477
|
+
|
478
|
+
function Plugin(option) {
|
479
|
+
return this.each(function () {
|
480
|
+
var $this = $(this)
|
481
|
+
var data = $this.data('bs.carousel')
|
482
|
+
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
483
|
+
var action = typeof option == 'string' ? option : options.slide
|
484
|
+
|
485
|
+
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
|
486
|
+
if (typeof option == 'number') data.to(option)
|
487
|
+
else if (action) data[action]()
|
488
|
+
else if (options.interval) data.pause().cycle()
|
489
|
+
})
|
490
|
+
}
|
491
|
+
|
492
|
+
var old = $.fn.carousel
|
493
|
+
|
494
|
+
$.fn.carousel = Plugin
|
495
|
+
$.fn.carousel.Constructor = Carousel
|
496
|
+
|
497
|
+
|
498
|
+
// CAROUSEL NO CONFLICT
|
499
|
+
// ====================
|
500
|
+
|
501
|
+
$.fn.carousel.noConflict = function () {
|
502
|
+
$.fn.carousel = old
|
503
|
+
return this
|
504
|
+
}
|
505
|
+
|
506
|
+
|
507
|
+
// CAROUSEL DATA-API
|
508
|
+
// =================
|
509
|
+
|
510
|
+
var clickHandler = function (e) {
|
511
|
+
var $this = $(this)
|
512
|
+
var href = $this.attr('href')
|
513
|
+
if (href) {
|
514
|
+
href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
515
|
+
}
|
516
|
+
|
517
|
+
var target = $this.attr('data-target') || href
|
518
|
+
var $target = $(document).find(target)
|
519
|
+
|
520
|
+
if (!$target.hasClass('carousel')) return
|
521
|
+
|
522
|
+
var options = $.extend({}, $target.data(), $this.data())
|
523
|
+
var slideIndex = $this.attr('data-slide-to')
|
524
|
+
if (slideIndex) options.interval = false
|
525
|
+
|
526
|
+
Plugin.call($target, options)
|
527
|
+
|
528
|
+
if (slideIndex) {
|
529
|
+
$target.data('bs.carousel').to(slideIndex)
|
530
|
+
}
|
531
|
+
|
532
|
+
e.preventDefault()
|
533
|
+
}
|
534
|
+
|
535
|
+
$(document)
|
536
|
+
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
|
537
|
+
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
|
538
|
+
|
539
|
+
$(window).on('load', function () {
|
540
|
+
$('[data-ride="carousel"]').each(function () {
|
541
|
+
var $carousel = $(this)
|
542
|
+
Plugin.call($carousel, $carousel.data())
|
543
|
+
})
|
544
|
+
})
|
545
|
+
|
546
|
+
}(jQuery);
|
547
|
+
|
548
|
+
/* ========================================================================
|
549
|
+
* Bootstrap: collapse.js v3.4.1
|
550
|
+
* https://getbootstrap.com/docs/3.4/javascript/#collapse
|
551
|
+
* ========================================================================
|
552
|
+
* Copyright 2011-2019 Twitter, Inc.
|
553
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
554
|
+
* ======================================================================== */
|
555
|
+
|
556
|
+
/* jshint latedef: false */
|
557
|
+
|
558
|
+
+function ($) {
|
559
|
+
'use strict';
|
560
|
+
|
561
|
+
// COLLAPSE PUBLIC CLASS DEFINITION
|
562
|
+
// ================================
|
563
|
+
|
564
|
+
var Collapse = function (element, options) {
|
565
|
+
this.$element = $(element)
|
566
|
+
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
567
|
+
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
|
568
|
+
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
|
569
|
+
this.transitioning = null
|
570
|
+
|
571
|
+
if (this.options.parent) {
|
572
|
+
this.$parent = this.getParent()
|
573
|
+
} else {
|
574
|
+
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
|
575
|
+
}
|
576
|
+
|
577
|
+
if (this.options.toggle) this.toggle()
|
578
|
+
}
|
579
|
+
|
580
|
+
Collapse.VERSION = '3.4.1'
|
581
|
+
|
582
|
+
Collapse.TRANSITION_DURATION = 350
|
583
|
+
|
584
|
+
Collapse.DEFAULTS = {
|
585
|
+
toggle: true
|
586
|
+
}
|
587
|
+
|
588
|
+
Collapse.prototype.dimension = function () {
|
589
|
+
var hasWidth = this.$element.hasClass('width')
|
590
|
+
return hasWidth ? 'width' : 'height'
|
591
|
+
}
|
592
|
+
|
593
|
+
Collapse.prototype.show = function () {
|
594
|
+
if (this.transitioning || this.$element.hasClass('in')) return
|
595
|
+
|
596
|
+
var activesData
|
597
|
+
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
|
598
|
+
|
599
|
+
if (actives && actives.length) {
|
600
|
+
activesData = actives.data('bs.collapse')
|
601
|
+
if (activesData && activesData.transitioning) return
|
602
|
+
}
|
603
|
+
|
604
|
+
var startEvent = $.Event('show.bs.collapse')
|
605
|
+
this.$element.trigger(startEvent)
|
606
|
+
if (startEvent.isDefaultPrevented()) return
|
607
|
+
|
608
|
+
if (actives && actives.length) {
|
609
|
+
Plugin.call(actives, 'hide')
|
610
|
+
activesData || actives.data('bs.collapse', null)
|
611
|
+
}
|
612
|
+
|
613
|
+
var dimension = this.dimension()
|
614
|
+
|
615
|
+
this.$element
|
616
|
+
.removeClass('collapse')
|
617
|
+
.addClass('collapsing')[dimension](0)
|
618
|
+
.attr('aria-expanded', true)
|
619
|
+
|
620
|
+
this.$trigger
|
621
|
+
.removeClass('collapsed')
|
622
|
+
.attr('aria-expanded', true)
|
623
|
+
|
624
|
+
this.transitioning = 1
|
625
|
+
|
626
|
+
var complete = function () {
|
627
|
+
this.$element
|
628
|
+
.removeClass('collapsing')
|
629
|
+
.addClass('collapse in')[dimension]('')
|
630
|
+
this.transitioning = 0
|
631
|
+
this.$element
|
632
|
+
.trigger('shown.bs.collapse')
|
633
|
+
}
|
634
|
+
|
635
|
+
if (!$.support.transition) return complete.call(this)
|
636
|
+
|
637
|
+
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
|
638
|
+
|
639
|
+
this.$element
|
640
|
+
.one('bsTransitionEnd', $.proxy(complete, this))
|
641
|
+
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
|
642
|
+
}
|
643
|
+
|
644
|
+
Collapse.prototype.hide = function () {
|
645
|
+
if (this.transitioning || !this.$element.hasClass('in')) return
|
646
|
+
|
647
|
+
var startEvent = $.Event('hide.bs.collapse')
|
648
|
+
this.$element.trigger(startEvent)
|
649
|
+
if (startEvent.isDefaultPrevented()) return
|
650
|
+
|
651
|
+
var dimension = this.dimension()
|
652
|
+
|
653
|
+
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
|
654
|
+
|
655
|
+
this.$element
|
656
|
+
.addClass('collapsing')
|
657
|
+
.removeClass('collapse in')
|
658
|
+
.attr('aria-expanded', false)
|
659
|
+
|
660
|
+
this.$trigger
|
661
|
+
.addClass('collapsed')
|
662
|
+
.attr('aria-expanded', false)
|
663
|
+
|
664
|
+
this.transitioning = 1
|
665
|
+
|
666
|
+
var complete = function () {
|
667
|
+
this.transitioning = 0
|
668
|
+
this.$element
|
669
|
+
.removeClass('collapsing')
|
670
|
+
.addClass('collapse')
|
671
|
+
.trigger('hidden.bs.collapse')
|
672
|
+
}
|
673
|
+
|
674
|
+
if (!$.support.transition) return complete.call(this)
|
675
|
+
|
676
|
+
this.$element
|
677
|
+
[dimension](0)
|
678
|
+
.one('bsTransitionEnd', $.proxy(complete, this))
|
679
|
+
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)
|
680
|
+
}
|
681
|
+
|
682
|
+
Collapse.prototype.toggle = function () {
|
683
|
+
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
684
|
+
}
|
685
|
+
|
686
|
+
Collapse.prototype.getParent = function () {
|
687
|
+
return $(document).find(this.options.parent)
|
688
|
+
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
|
689
|
+
.each($.proxy(function (i, element) {
|
690
|
+
var $element = $(element)
|
691
|
+
this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
|
692
|
+
}, this))
|
693
|
+
.end()
|
694
|
+
}
|
695
|
+
|
696
|
+
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
|
697
|
+
var isOpen = $element.hasClass('in')
|
698
|
+
|
699
|
+
$element.attr('aria-expanded', isOpen)
|
700
|
+
$trigger
|
701
|
+
.toggleClass('collapsed', !isOpen)
|
702
|
+
.attr('aria-expanded', isOpen)
|
703
|
+
}
|
704
|
+
|
705
|
+
function getTargetFromTrigger($trigger) {
|
706
|
+
var href
|
707
|
+
var target = $trigger.attr('data-target')
|
708
|
+
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
709
|
+
|
710
|
+
return $(document).find(target)
|
711
|
+
}
|
712
|
+
|
713
|
+
|
714
|
+
// COLLAPSE PLUGIN DEFINITION
|
715
|
+
// ==========================
|
716
|
+
|
717
|
+
function Plugin(option) {
|
718
|
+
return this.each(function () {
|
719
|
+
var $this = $(this)
|
720
|
+
var data = $this.data('bs.collapse')
|
721
|
+
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
722
|
+
|
723
|
+
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
|
724
|
+
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
725
|
+
if (typeof option == 'string') data[option]()
|
726
|
+
})
|
727
|
+
}
|
728
|
+
|
729
|
+
var old = $.fn.collapse
|
730
|
+
|
731
|
+
$.fn.collapse = Plugin
|
732
|
+
$.fn.collapse.Constructor = Collapse
|
733
|
+
|
734
|
+
|
735
|
+
// COLLAPSE NO CONFLICT
|
736
|
+
// ====================
|
737
|
+
|
738
|
+
$.fn.collapse.noConflict = function () {
|
739
|
+
$.fn.collapse = old
|
740
|
+
return this
|
741
|
+
}
|
742
|
+
|
743
|
+
|
744
|
+
// COLLAPSE DATA-API
|
745
|
+
// =================
|
746
|
+
|
747
|
+
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
|
748
|
+
var $this = $(this)
|
749
|
+
|
750
|
+
if (!$this.attr('data-target')) e.preventDefault()
|
751
|
+
|
752
|
+
var $target = getTargetFromTrigger($this)
|
753
|
+
var data = $target.data('bs.collapse')
|
754
|
+
var option = data ? 'toggle' : $this.data()
|
755
|
+
|
756
|
+
Plugin.call($target, option)
|
757
|
+
})
|
758
|
+
|
759
|
+
}(jQuery);
|
760
|
+
|
761
|
+
/* ========================================================================
|
762
|
+
* Bootstrap: dropdown.js v3.4.1
|
763
|
+
* https://getbootstrap.com/docs/3.4/javascript/#dropdowns
|
764
|
+
* ========================================================================
|
765
|
+
* Copyright 2011-2019 Twitter, Inc.
|
766
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
767
|
+
* ======================================================================== */
|
768
|
+
|
769
|
+
|
770
|
+
+function ($) {
|
771
|
+
'use strict';
|
772
|
+
|
773
|
+
// DROPDOWN CLASS DEFINITION
|
774
|
+
// =========================
|
775
|
+
|
776
|
+
var backdrop = '.dropdown-backdrop'
|
777
|
+
var toggle = '[data-toggle="dropdown"]'
|
778
|
+
var Dropdown = function (element) {
|
779
|
+
$(element).on('click.bs.dropdown', this.toggle)
|
780
|
+
}
|
781
|
+
|
782
|
+
Dropdown.VERSION = '3.4.1'
|
783
|
+
|
784
|
+
function getParent($this) {
|
785
|
+
var selector = $this.attr('data-target')
|
786
|
+
|
787
|
+
if (!selector) {
|
788
|
+
selector = $this.attr('href')
|
789
|
+
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
790
|
+
}
|
791
|
+
|
792
|
+
var $parent = selector !== '#' ? $(document).find(selector) : null
|
793
|
+
|
794
|
+
return $parent && $parent.length ? $parent : $this.parent()
|
795
|
+
}
|
796
|
+
|
797
|
+
function clearMenus(e) {
|
798
|
+
if (e && e.which === 3) return
|
799
|
+
$(backdrop).remove()
|
800
|
+
$(toggle).each(function () {
|
801
|
+
var $this = $(this)
|
802
|
+
var $parent = getParent($this)
|
803
|
+
var relatedTarget = { relatedTarget: this }
|
804
|
+
|
805
|
+
if (!$parent.hasClass('open')) return
|
806
|
+
|
807
|
+
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
|
808
|
+
|
809
|
+
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
810
|
+
|
811
|
+
if (e.isDefaultPrevented()) return
|
812
|
+
|
813
|
+
$this.attr('aria-expanded', 'false')
|
814
|
+
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
|
815
|
+
})
|
816
|
+
}
|
817
|
+
|
818
|
+
Dropdown.prototype.toggle = function (e) {
|
819
|
+
var $this = $(this)
|
820
|
+
|
821
|
+
if ($this.is('.disabled, :disabled')) return
|
822
|
+
|
823
|
+
var $parent = getParent($this)
|
824
|
+
var isActive = $parent.hasClass('open')
|
825
|
+
|
826
|
+
clearMenus()
|
827
|
+
|
828
|
+
if (!isActive) {
|
829
|
+
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
|
830
|
+
// if mobile we use a backdrop because click events don't delegate
|
831
|
+
$(document.createElement('div'))
|
832
|
+
.addClass('dropdown-backdrop')
|
833
|
+
.insertAfter($(this))
|
834
|
+
.on('click', clearMenus)
|
835
|
+
}
|
836
|
+
|
837
|
+
var relatedTarget = { relatedTarget: this }
|
838
|
+
$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
|
839
|
+
|
840
|
+
if (e.isDefaultPrevented()) return
|
841
|
+
|
842
|
+
$this
|
843
|
+
.trigger('focus')
|
844
|
+
.attr('aria-expanded', 'true')
|
845
|
+
|
846
|
+
$parent
|
847
|
+
.toggleClass('open')
|
848
|
+
.trigger($.Event('shown.bs.dropdown', relatedTarget))
|
849
|
+
}
|
850
|
+
|
851
|
+
return false
|
852
|
+
}
|
853
|
+
|
854
|
+
Dropdown.prototype.keydown = function (e) {
|
855
|
+
if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
|
856
|
+
|
857
|
+
var $this = $(this)
|
858
|
+
|
859
|
+
e.preventDefault()
|
860
|
+
e.stopPropagation()
|
861
|
+
|
862
|
+
if ($this.is('.disabled, :disabled')) return
|
863
|
+
|
864
|
+
var $parent = getParent($this)
|
865
|
+
var isActive = $parent.hasClass('open')
|
866
|
+
|
867
|
+
if (!isActive && e.which != 27 || isActive && e.which == 27) {
|
868
|
+
if (e.which == 27) $parent.find(toggle).trigger('focus')
|
869
|
+
return $this.trigger('click')
|
870
|
+
}
|
871
|
+
|
872
|
+
var desc = ' li:not(.disabled):visible a'
|
873
|
+
var $items = $parent.find('.dropdown-menu' + desc)
|
874
|
+
|
875
|
+
if (!$items.length) return
|
876
|
+
|
877
|
+
var index = $items.index(e.target)
|
878
|
+
|
879
|
+
if (e.which == 38 && index > 0) index-- // up
|
880
|
+
if (e.which == 40 && index < $items.length - 1) index++ // down
|
881
|
+
if (!~index) index = 0
|
882
|
+
|
883
|
+
$items.eq(index).trigger('focus')
|
884
|
+
}
|
885
|
+
|
886
|
+
|
887
|
+
// DROPDOWN PLUGIN DEFINITION
|
888
|
+
// ==========================
|
889
|
+
|
890
|
+
function Plugin(option) {
|
891
|
+
return this.each(function () {
|
892
|
+
var $this = $(this)
|
893
|
+
var data = $this.data('bs.dropdown')
|
894
|
+
|
895
|
+
if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
|
896
|
+
if (typeof option == 'string') data[option].call($this)
|
897
|
+
})
|
898
|
+
}
|
899
|
+
|
900
|
+
var old = $.fn.dropdown
|
901
|
+
|
902
|
+
$.fn.dropdown = Plugin
|
903
|
+
$.fn.dropdown.Constructor = Dropdown
|
904
|
+
|
905
|
+
|
906
|
+
// DROPDOWN NO CONFLICT
|
907
|
+
// ====================
|
908
|
+
|
909
|
+
$.fn.dropdown.noConflict = function () {
|
910
|
+
$.fn.dropdown = old
|
911
|
+
return this
|
912
|
+
}
|
913
|
+
|
914
|
+
|
915
|
+
// APPLY TO STANDARD DROPDOWN ELEMENTS
|
916
|
+
// ===================================
|
917
|
+
|
918
|
+
$(document)
|
919
|
+
.on('click.bs.dropdown.data-api', clearMenus)
|
920
|
+
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
921
|
+
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
922
|
+
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
|
923
|
+
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
|
924
|
+
|
925
|
+
}(jQuery);
|
926
|
+
|
927
|
+
/* ========================================================================
|
928
|
+
* Bootstrap: modal.js v3.4.1
|
929
|
+
* https://getbootstrap.com/docs/3.4/javascript/#modals
|
930
|
+
* ========================================================================
|
931
|
+
* Copyright 2011-2019 Twitter, Inc.
|
932
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
933
|
+
* ======================================================================== */
|
934
|
+
|
935
|
+
|
936
|
+
+function ($) {
|
937
|
+
'use strict';
|
938
|
+
|
939
|
+
// MODAL CLASS DEFINITION
|
940
|
+
// ======================
|
941
|
+
|
942
|
+
var Modal = function (element, options) {
|
943
|
+
this.options = options
|
944
|
+
this.$body = $(document.body)
|
945
|
+
this.$element = $(element)
|
946
|
+
this.$dialog = this.$element.find('.modal-dialog')
|
947
|
+
this.$backdrop = null
|
948
|
+
this.isShown = null
|
949
|
+
this.originalBodyPad = null
|
950
|
+
this.scrollbarWidth = 0
|
951
|
+
this.ignoreBackdropClick = false
|
952
|
+
this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom'
|
953
|
+
|
954
|
+
if (this.options.remote) {
|
955
|
+
this.$element
|
956
|
+
.find('.modal-content')
|
957
|
+
.load(this.options.remote, $.proxy(function () {
|
958
|
+
this.$element.trigger('loaded.bs.modal')
|
959
|
+
}, this))
|
960
|
+
}
|
961
|
+
}
|
962
|
+
|
963
|
+
Modal.VERSION = '3.4.1'
|
964
|
+
|
965
|
+
Modal.TRANSITION_DURATION = 300
|
966
|
+
Modal.BACKDROP_TRANSITION_DURATION = 150
|
967
|
+
|
968
|
+
Modal.DEFAULTS = {
|
969
|
+
backdrop: true,
|
970
|
+
keyboard: true,
|
971
|
+
show: true
|
972
|
+
}
|
973
|
+
|
974
|
+
Modal.prototype.toggle = function (_relatedTarget) {
|
975
|
+
return this.isShown ? this.hide() : this.show(_relatedTarget)
|
976
|
+
}
|
977
|
+
|
978
|
+
Modal.prototype.show = function (_relatedTarget) {
|
979
|
+
var that = this
|
980
|
+
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
|
981
|
+
|
982
|
+
this.$element.trigger(e)
|
983
|
+
|
984
|
+
if (this.isShown || e.isDefaultPrevented()) return
|
985
|
+
|
986
|
+
this.isShown = true
|
987
|
+
|
988
|
+
this.checkScrollbar()
|
989
|
+
this.setScrollbar()
|
990
|
+
this.$body.addClass('modal-open')
|
991
|
+
|
992
|
+
this.escape()
|
993
|
+
this.resize()
|
994
|
+
|
995
|
+
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
996
|
+
|
997
|
+
this.$dialog.on('mousedown.dismiss.bs.modal', function () {
|
998
|
+
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
|
999
|
+
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
|
1000
|
+
})
|
1001
|
+
})
|
1002
|
+
|
1003
|
+
this.backdrop(function () {
|
1004
|
+
var transition = $.support.transition && that.$element.hasClass('fade')
|
1005
|
+
|
1006
|
+
if (!that.$element.parent().length) {
|
1007
|
+
that.$element.appendTo(that.$body) // don't move modals dom position
|
1008
|
+
}
|
1009
|
+
|
1010
|
+
that.$element
|
1011
|
+
.show()
|
1012
|
+
.scrollTop(0)
|
1013
|
+
|
1014
|
+
that.adjustDialog()
|
1015
|
+
|
1016
|
+
if (transition) {
|
1017
|
+
that.$element[0].offsetWidth // force reflow
|
1018
|
+
}
|
1019
|
+
|
1020
|
+
that.$element.addClass('in')
|
1021
|
+
|
1022
|
+
that.enforceFocus()
|
1023
|
+
|
1024
|
+
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
|
1025
|
+
|
1026
|
+
transition ?
|
1027
|
+
that.$dialog // wait for modal to slide in
|
1028
|
+
.one('bsTransitionEnd', function () {
|
1029
|
+
that.$element.trigger('focus').trigger(e)
|
1030
|
+
})
|
1031
|
+
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
|
1032
|
+
that.$element.trigger('focus').trigger(e)
|
1033
|
+
})
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
Modal.prototype.hide = function (e) {
|
1037
|
+
if (e) e.preventDefault()
|
1038
|
+
|
1039
|
+
e = $.Event('hide.bs.modal')
|
1040
|
+
|
1041
|
+
this.$element.trigger(e)
|
1042
|
+
|
1043
|
+
if (!this.isShown || e.isDefaultPrevented()) return
|
1044
|
+
|
1045
|
+
this.isShown = false
|
1046
|
+
|
1047
|
+
this.escape()
|
1048
|
+
this.resize()
|
1049
|
+
|
1050
|
+
$(document).off('focusin.bs.modal')
|
1051
|
+
|
1052
|
+
this.$element
|
1053
|
+
.removeClass('in')
|
1054
|
+
.off('click.dismiss.bs.modal')
|
1055
|
+
.off('mouseup.dismiss.bs.modal')
|
1056
|
+
|
1057
|
+
this.$dialog.off('mousedown.dismiss.bs.modal')
|
1058
|
+
|
1059
|
+
$.support.transition && this.$element.hasClass('fade') ?
|
1060
|
+
this.$element
|
1061
|
+
.one('bsTransitionEnd', $.proxy(this.hideModal, this))
|
1062
|
+
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
|
1063
|
+
this.hideModal()
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
Modal.prototype.enforceFocus = function () {
|
1067
|
+
$(document)
|
1068
|
+
.off('focusin.bs.modal') // guard against infinite focus loop
|
1069
|
+
.on('focusin.bs.modal', $.proxy(function (e) {
|
1070
|
+
if (document !== e.target &&
|
1071
|
+
this.$element[0] !== e.target &&
|
1072
|
+
!this.$element.has(e.target).length) {
|
1073
|
+
this.$element.trigger('focus')
|
1074
|
+
}
|
1075
|
+
}, this))
|
1076
|
+
}
|
1077
|
+
|
1078
|
+
Modal.prototype.escape = function () {
|
1079
|
+
if (this.isShown && this.options.keyboard) {
|
1080
|
+
this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
|
1081
|
+
e.which == 27 && this.hide()
|
1082
|
+
}, this))
|
1083
|
+
} else if (!this.isShown) {
|
1084
|
+
this.$element.off('keydown.dismiss.bs.modal')
|
1085
|
+
}
|
1086
|
+
}
|
1087
|
+
|
1088
|
+
Modal.prototype.resize = function () {
|
1089
|
+
if (this.isShown) {
|
1090
|
+
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
|
1091
|
+
} else {
|
1092
|
+
$(window).off('resize.bs.modal')
|
1093
|
+
}
|
1094
|
+
}
|
1095
|
+
|
1096
|
+
Modal.prototype.hideModal = function () {
|
1097
|
+
var that = this
|
1098
|
+
this.$element.hide()
|
1099
|
+
this.backdrop(function () {
|
1100
|
+
that.$body.removeClass('modal-open')
|
1101
|
+
that.resetAdjustments()
|
1102
|
+
that.resetScrollbar()
|
1103
|
+
that.$element.trigger('hidden.bs.modal')
|
1104
|
+
})
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
Modal.prototype.removeBackdrop = function () {
|
1108
|
+
this.$backdrop && this.$backdrop.remove()
|
1109
|
+
this.$backdrop = null
|
1110
|
+
}
|
1111
|
+
|
1112
|
+
Modal.prototype.backdrop = function (callback) {
|
1113
|
+
var that = this
|
1114
|
+
var animate = this.$element.hasClass('fade') ? 'fade' : ''
|
1115
|
+
|
1116
|
+
if (this.isShown && this.options.backdrop) {
|
1117
|
+
var doAnimate = $.support.transition && animate
|
1118
|
+
|
1119
|
+
this.$backdrop = $(document.createElement('div'))
|
1120
|
+
.addClass('modal-backdrop ' + animate)
|
1121
|
+
.appendTo(this.$body)
|
1122
|
+
|
1123
|
+
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
1124
|
+
if (this.ignoreBackdropClick) {
|
1125
|
+
this.ignoreBackdropClick = false
|
1126
|
+
return
|
1127
|
+
}
|
1128
|
+
if (e.target !== e.currentTarget) return
|
1129
|
+
this.options.backdrop == 'static'
|
1130
|
+
? this.$element[0].focus()
|
1131
|
+
: this.hide()
|
1132
|
+
}, this))
|
1133
|
+
|
1134
|
+
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
1135
|
+
|
1136
|
+
this.$backdrop.addClass('in')
|
1137
|
+
|
1138
|
+
if (!callback) return
|
1139
|
+
|
1140
|
+
doAnimate ?
|
1141
|
+
this.$backdrop
|
1142
|
+
.one('bsTransitionEnd', callback)
|
1143
|
+
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
|
1144
|
+
callback()
|
1145
|
+
|
1146
|
+
} else if (!this.isShown && this.$backdrop) {
|
1147
|
+
this.$backdrop.removeClass('in')
|
1148
|
+
|
1149
|
+
var callbackRemove = function () {
|
1150
|
+
that.removeBackdrop()
|
1151
|
+
callback && callback()
|
1152
|
+
}
|
1153
|
+
$.support.transition && this.$element.hasClass('fade') ?
|
1154
|
+
this.$backdrop
|
1155
|
+
.one('bsTransitionEnd', callbackRemove)
|
1156
|
+
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
|
1157
|
+
callbackRemove()
|
1158
|
+
|
1159
|
+
} else if (callback) {
|
1160
|
+
callback()
|
1161
|
+
}
|
1162
|
+
}
|
1163
|
+
|
1164
|
+
// these following methods are used to handle overflowing modals
|
1165
|
+
|
1166
|
+
Modal.prototype.handleUpdate = function () {
|
1167
|
+
this.adjustDialog()
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
Modal.prototype.adjustDialog = function () {
|
1171
|
+
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
|
1172
|
+
|
1173
|
+
this.$element.css({
|
1174
|
+
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
|
1175
|
+
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
|
1176
|
+
})
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
Modal.prototype.resetAdjustments = function () {
|
1180
|
+
this.$element.css({
|
1181
|
+
paddingLeft: '',
|
1182
|
+
paddingRight: ''
|
1183
|
+
})
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
Modal.prototype.checkScrollbar = function () {
|
1187
|
+
var fullWindowWidth = window.innerWidth
|
1188
|
+
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
|
1189
|
+
var documentElementRect = document.documentElement.getBoundingClientRect()
|
1190
|
+
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
|
1191
|
+
}
|
1192
|
+
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
|
1193
|
+
this.scrollbarWidth = this.measureScrollbar()
|
1194
|
+
}
|
1195
|
+
|
1196
|
+
Modal.prototype.setScrollbar = function () {
|
1197
|
+
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
|
1198
|
+
this.originalBodyPad = document.body.style.paddingRight || ''
|
1199
|
+
var scrollbarWidth = this.scrollbarWidth
|
1200
|
+
if (this.bodyIsOverflowing) {
|
1201
|
+
this.$body.css('padding-right', bodyPad + scrollbarWidth)
|
1202
|
+
$(this.fixedContent).each(function (index, element) {
|
1203
|
+
var actualPadding = element.style.paddingRight
|
1204
|
+
var calculatedPadding = $(element).css('padding-right')
|
1205
|
+
$(element)
|
1206
|
+
.data('padding-right', actualPadding)
|
1207
|
+
.css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px')
|
1208
|
+
})
|
1209
|
+
}
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
Modal.prototype.resetScrollbar = function () {
|
1213
|
+
this.$body.css('padding-right', this.originalBodyPad)
|
1214
|
+
$(this.fixedContent).each(function (index, element) {
|
1215
|
+
var padding = $(element).data('padding-right')
|
1216
|
+
$(element).removeData('padding-right')
|
1217
|
+
element.style.paddingRight = padding ? padding : ''
|
1218
|
+
})
|
1219
|
+
}
|
1220
|
+
|
1221
|
+
Modal.prototype.measureScrollbar = function () { // thx walsh
|
1222
|
+
var scrollDiv = document.createElement('div')
|
1223
|
+
scrollDiv.className = 'modal-scrollbar-measure'
|
1224
|
+
this.$body.append(scrollDiv)
|
1225
|
+
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
|
1226
|
+
this.$body[0].removeChild(scrollDiv)
|
1227
|
+
return scrollbarWidth
|
1228
|
+
}
|
1229
|
+
|
1230
|
+
|
1231
|
+
// MODAL PLUGIN DEFINITION
|
1232
|
+
// =======================
|
1233
|
+
|
1234
|
+
function Plugin(option, _relatedTarget) {
|
1235
|
+
return this.each(function () {
|
1236
|
+
var $this = $(this)
|
1237
|
+
var data = $this.data('bs.modal')
|
1238
|
+
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
1239
|
+
|
1240
|
+
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
|
1241
|
+
if (typeof option == 'string') data[option](_relatedTarget)
|
1242
|
+
else if (options.show) data.show(_relatedTarget)
|
1243
|
+
})
|
1244
|
+
}
|
1245
|
+
|
1246
|
+
var old = $.fn.modal
|
1247
|
+
|
1248
|
+
$.fn.modal = Plugin
|
1249
|
+
$.fn.modal.Constructor = Modal
|
1250
|
+
|
1251
|
+
|
1252
|
+
// MODAL NO CONFLICT
|
1253
|
+
// =================
|
1254
|
+
|
1255
|
+
$.fn.modal.noConflict = function () {
|
1256
|
+
$.fn.modal = old
|
1257
|
+
return this
|
1258
|
+
}
|
1259
|
+
|
1260
|
+
|
1261
|
+
// MODAL DATA-API
|
1262
|
+
// ==============
|
1263
|
+
|
1264
|
+
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
|
1265
|
+
var $this = $(this)
|
1266
|
+
var href = $this.attr('href')
|
1267
|
+
var target = $this.attr('data-target') ||
|
1268
|
+
(href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
|
1269
|
+
|
1270
|
+
var $target = $(document).find(target)
|
1271
|
+
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
1272
|
+
|
1273
|
+
if ($this.is('a')) e.preventDefault()
|
1274
|
+
|
1275
|
+
$target.one('show.bs.modal', function (showEvent) {
|
1276
|
+
if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
|
1277
|
+
$target.one('hidden.bs.modal', function () {
|
1278
|
+
$this.is(':visible') && $this.trigger('focus')
|
1279
|
+
})
|
1280
|
+
})
|
1281
|
+
Plugin.call($target, option, this)
|
1282
|
+
})
|
1283
|
+
|
1284
|
+
}(jQuery);
|
1285
|
+
|
1286
|
+
/* ========================================================================
|
1287
|
+
* Bootstrap: tooltip.js v3.4.1
|
1288
|
+
* https://getbootstrap.com/docs/3.4/javascript/#tooltip
|
1289
|
+
* Inspired by the original jQuery.tipsy by Jason Frame
|
1290
|
+
* ========================================================================
|
1291
|
+
* Copyright 2011-2019 Twitter, Inc.
|
1292
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
1293
|
+
* ======================================================================== */
|
1294
|
+
|
1295
|
+
+function ($) {
|
1296
|
+
'use strict';
|
1297
|
+
|
1298
|
+
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']
|
1299
|
+
|
1300
|
+
var uriAttrs = [
|
1301
|
+
'background',
|
1302
|
+
'cite',
|
1303
|
+
'href',
|
1304
|
+
'itemtype',
|
1305
|
+
'longdesc',
|
1306
|
+
'poster',
|
1307
|
+
'src',
|
1308
|
+
'xlink:href'
|
1309
|
+
]
|
1310
|
+
|
1311
|
+
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
|
1312
|
+
|
1313
|
+
var DefaultWhitelist = {
|
1314
|
+
// Global attributes allowed on any supplied element below.
|
1315
|
+
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
1316
|
+
a: ['target', 'href', 'title', 'rel'],
|
1317
|
+
area: [],
|
1318
|
+
b: [],
|
1319
|
+
br: [],
|
1320
|
+
col: [],
|
1321
|
+
code: [],
|
1322
|
+
div: [],
|
1323
|
+
em: [],
|
1324
|
+
hr: [],
|
1325
|
+
h1: [],
|
1326
|
+
h2: [],
|
1327
|
+
h3: [],
|
1328
|
+
h4: [],
|
1329
|
+
h5: [],
|
1330
|
+
h6: [],
|
1331
|
+
i: [],
|
1332
|
+
img: ['src', 'alt', 'title', 'width', 'height'],
|
1333
|
+
li: [],
|
1334
|
+
ol: [],
|
1335
|
+
p: [],
|
1336
|
+
pre: [],
|
1337
|
+
s: [],
|
1338
|
+
small: [],
|
1339
|
+
span: [],
|
1340
|
+
sub: [],
|
1341
|
+
sup: [],
|
1342
|
+
strong: [],
|
1343
|
+
u: [],
|
1344
|
+
ul: []
|
1345
|
+
}
|
1346
|
+
|
1347
|
+
/**
|
1348
|
+
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
1349
|
+
*
|
1350
|
+
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
1351
|
+
*/
|
1352
|
+
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi
|
1353
|
+
|
1354
|
+
/**
|
1355
|
+
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
1356
|
+
*
|
1357
|
+
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
1358
|
+
*/
|
1359
|
+
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i
|
1360
|
+
|
1361
|
+
function allowedAttribute(attr, allowedAttributeList) {
|
1362
|
+
var attrName = attr.nodeName.toLowerCase()
|
1363
|
+
|
1364
|
+
if ($.inArray(attrName, allowedAttributeList) !== -1) {
|
1365
|
+
if ($.inArray(attrName, uriAttrs) !== -1) {
|
1366
|
+
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
|
1367
|
+
}
|
1368
|
+
|
1369
|
+
return true
|
1370
|
+
}
|
1371
|
+
|
1372
|
+
var regExp = $(allowedAttributeList).filter(function (index, value) {
|
1373
|
+
return value instanceof RegExp
|
1374
|
+
})
|
1375
|
+
|
1376
|
+
// Check if a regular expression validates the attribute.
|
1377
|
+
for (var i = 0, l = regExp.length; i < l; i++) {
|
1378
|
+
if (attrName.match(regExp[i])) {
|
1379
|
+
return true
|
1380
|
+
}
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
return false
|
1384
|
+
}
|
1385
|
+
|
1386
|
+
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
1387
|
+
if (unsafeHtml.length === 0) {
|
1388
|
+
return unsafeHtml
|
1389
|
+
}
|
1390
|
+
|
1391
|
+
if (sanitizeFn && typeof sanitizeFn === 'function') {
|
1392
|
+
return sanitizeFn(unsafeHtml)
|
1393
|
+
}
|
1394
|
+
|
1395
|
+
// IE 8 and below don't support createHTMLDocument
|
1396
|
+
if (!document.implementation || !document.implementation.createHTMLDocument) {
|
1397
|
+
return unsafeHtml
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
var createdDocument = document.implementation.createHTMLDocument('sanitization')
|
1401
|
+
createdDocument.body.innerHTML = unsafeHtml
|
1402
|
+
|
1403
|
+
var whitelistKeys = $.map(whiteList, function (el, i) { return i })
|
1404
|
+
var elements = $(createdDocument.body).find('*')
|
1405
|
+
|
1406
|
+
for (var i = 0, len = elements.length; i < len; i++) {
|
1407
|
+
var el = elements[i]
|
1408
|
+
var elName = el.nodeName.toLowerCase()
|
1409
|
+
|
1410
|
+
if ($.inArray(elName, whitelistKeys) === -1) {
|
1411
|
+
el.parentNode.removeChild(el)
|
1412
|
+
|
1413
|
+
continue
|
1414
|
+
}
|
1415
|
+
|
1416
|
+
var attributeList = $.map(el.attributes, function (el) { return el })
|
1417
|
+
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
|
1418
|
+
|
1419
|
+
for (var j = 0, len2 = attributeList.length; j < len2; j++) {
|
1420
|
+
if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {
|
1421
|
+
el.removeAttribute(attributeList[j].nodeName)
|
1422
|
+
}
|
1423
|
+
}
|
1424
|
+
}
|
1425
|
+
|
1426
|
+
return createdDocument.body.innerHTML
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
// TOOLTIP PUBLIC CLASS DEFINITION
|
1430
|
+
// ===============================
|
1431
|
+
|
1432
|
+
var Tooltip = function (element, options) {
|
1433
|
+
this.type = null
|
1434
|
+
this.options = null
|
1435
|
+
this.enabled = null
|
1436
|
+
this.timeout = null
|
1437
|
+
this.hoverState = null
|
1438
|
+
this.$element = null
|
1439
|
+
this.inState = null
|
1440
|
+
|
1441
|
+
this.init('tooltip', element, options)
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
Tooltip.VERSION = '3.4.1'
|
1445
|
+
|
1446
|
+
Tooltip.TRANSITION_DURATION = 150
|
1447
|
+
|
1448
|
+
Tooltip.DEFAULTS = {
|
1449
|
+
animation: true,
|
1450
|
+
placement: 'top',
|
1451
|
+
selector: false,
|
1452
|
+
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
|
1453
|
+
trigger: 'hover focus',
|
1454
|
+
title: '',
|
1455
|
+
delay: 0,
|
1456
|
+
html: false,
|
1457
|
+
container: false,
|
1458
|
+
viewport: {
|
1459
|
+
selector: 'body',
|
1460
|
+
padding: 0
|
1461
|
+
},
|
1462
|
+
sanitize : true,
|
1463
|
+
sanitizeFn : null,
|
1464
|
+
whiteList : DefaultWhitelist
|
1465
|
+
}
|
1466
|
+
|
1467
|
+
Tooltip.prototype.init = function (type, element, options) {
|
1468
|
+
this.enabled = true
|
1469
|
+
this.type = type
|
1470
|
+
this.$element = $(element)
|
1471
|
+
this.options = this.getOptions(options)
|
1472
|
+
this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
|
1473
|
+
this.inState = { click: false, hover: false, focus: false }
|
1474
|
+
|
1475
|
+
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
|
1476
|
+
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
1477
|
+
}
|
1478
|
+
|
1479
|
+
var triggers = this.options.trigger.split(' ')
|
1480
|
+
|
1481
|
+
for (var i = triggers.length; i--;) {
|
1482
|
+
var trigger = triggers[i]
|
1483
|
+
|
1484
|
+
if (trigger == 'click') {
|
1485
|
+
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
1486
|
+
} else if (trigger != 'manual') {
|
1487
|
+
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
|
1488
|
+
var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
|
1489
|
+
|
1490
|
+
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
1491
|
+
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
1492
|
+
}
|
1493
|
+
}
|
1494
|
+
|
1495
|
+
this.options.selector ?
|
1496
|
+
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
|
1497
|
+
this.fixTitle()
|
1498
|
+
}
|
1499
|
+
|
1500
|
+
Tooltip.prototype.getDefaults = function () {
|
1501
|
+
return Tooltip.DEFAULTS
|
1502
|
+
}
|
1503
|
+
|
1504
|
+
Tooltip.prototype.getOptions = function (options) {
|
1505
|
+
var dataAttributes = this.$element.data()
|
1506
|
+
|
1507
|
+
for (var dataAttr in dataAttributes) {
|
1508
|
+
if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {
|
1509
|
+
delete dataAttributes[dataAttr]
|
1510
|
+
}
|
1511
|
+
}
|
1512
|
+
|
1513
|
+
options = $.extend({}, this.getDefaults(), dataAttributes, options)
|
1514
|
+
|
1515
|
+
if (options.delay && typeof options.delay == 'number') {
|
1516
|
+
options.delay = {
|
1517
|
+
show: options.delay,
|
1518
|
+
hide: options.delay
|
1519
|
+
}
|
1520
|
+
}
|
1521
|
+
|
1522
|
+
if (options.sanitize) {
|
1523
|
+
options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)
|
1524
|
+
}
|
1525
|
+
|
1526
|
+
return options
|
1527
|
+
}
|
1528
|
+
|
1529
|
+
Tooltip.prototype.getDelegateOptions = function () {
|
1530
|
+
var options = {}
|
1531
|
+
var defaults = this.getDefaults()
|
1532
|
+
|
1533
|
+
this._options && $.each(this._options, function (key, value) {
|
1534
|
+
if (defaults[key] != value) options[key] = value
|
1535
|
+
})
|
1536
|
+
|
1537
|
+
return options
|
1538
|
+
}
|
1539
|
+
|
1540
|
+
Tooltip.prototype.enter = function (obj) {
|
1541
|
+
var self = obj instanceof this.constructor ?
|
1542
|
+
obj : $(obj.currentTarget).data('bs.' + this.type)
|
1543
|
+
|
1544
|
+
if (!self) {
|
1545
|
+
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
1546
|
+
$(obj.currentTarget).data('bs.' + this.type, self)
|
1547
|
+
}
|
1548
|
+
|
1549
|
+
if (obj instanceof $.Event) {
|
1550
|
+
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
|
1551
|
+
}
|
1552
|
+
|
1553
|
+
if (self.tip().hasClass('in') || self.hoverState == 'in') {
|
1554
|
+
self.hoverState = 'in'
|
1555
|
+
return
|
1556
|
+
}
|
1557
|
+
|
1558
|
+
clearTimeout(self.timeout)
|
1559
|
+
|
1560
|
+
self.hoverState = 'in'
|
1561
|
+
|
1562
|
+
if (!self.options.delay || !self.options.delay.show) return self.show()
|
1563
|
+
|
1564
|
+
self.timeout = setTimeout(function () {
|
1565
|
+
if (self.hoverState == 'in') self.show()
|
1566
|
+
}, self.options.delay.show)
|
1567
|
+
}
|
1568
|
+
|
1569
|
+
Tooltip.prototype.isInStateTrue = function () {
|
1570
|
+
for (var key in this.inState) {
|
1571
|
+
if (this.inState[key]) return true
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
return false
|
1575
|
+
}
|
1576
|
+
|
1577
|
+
Tooltip.prototype.leave = function (obj) {
|
1578
|
+
var self = obj instanceof this.constructor ?
|
1579
|
+
obj : $(obj.currentTarget).data('bs.' + this.type)
|
1580
|
+
|
1581
|
+
if (!self) {
|
1582
|
+
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
1583
|
+
$(obj.currentTarget).data('bs.' + this.type, self)
|
1584
|
+
}
|
1585
|
+
|
1586
|
+
if (obj instanceof $.Event) {
|
1587
|
+
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
|
1588
|
+
}
|
1589
|
+
|
1590
|
+
if (self.isInStateTrue()) return
|
1591
|
+
|
1592
|
+
clearTimeout(self.timeout)
|
1593
|
+
|
1594
|
+
self.hoverState = 'out'
|
1595
|
+
|
1596
|
+
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
1597
|
+
|
1598
|
+
self.timeout = setTimeout(function () {
|
1599
|
+
if (self.hoverState == 'out') self.hide()
|
1600
|
+
}, self.options.delay.hide)
|
1601
|
+
}
|
1602
|
+
|
1603
|
+
Tooltip.prototype.show = function () {
|
1604
|
+
var e = $.Event('show.bs.' + this.type)
|
1605
|
+
|
1606
|
+
if (this.hasContent() && this.enabled) {
|
1607
|
+
this.$element.trigger(e)
|
1608
|
+
|
1609
|
+
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
|
1610
|
+
if (e.isDefaultPrevented() || !inDom) return
|
1611
|
+
var that = this
|
1612
|
+
|
1613
|
+
var $tip = this.tip()
|
1614
|
+
|
1615
|
+
var tipId = this.getUID(this.type)
|
1616
|
+
|
1617
|
+
this.setContent()
|
1618
|
+
$tip.attr('id', tipId)
|
1619
|
+
this.$element.attr('aria-describedby', tipId)
|
1620
|
+
|
1621
|
+
if (this.options.animation) $tip.addClass('fade')
|
1622
|
+
|
1623
|
+
var placement = typeof this.options.placement == 'function' ?
|
1624
|
+
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
1625
|
+
this.options.placement
|
1626
|
+
|
1627
|
+
var autoToken = /\s?auto?\s?/i
|
1628
|
+
var autoPlace = autoToken.test(placement)
|
1629
|
+
if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
|
1630
|
+
|
1631
|
+
$tip
|
1632
|
+
.detach()
|
1633
|
+
.css({ top: 0, left: 0, display: 'block' })
|
1634
|
+
.addClass(placement)
|
1635
|
+
.data('bs.' + this.type, this)
|
1636
|
+
|
1637
|
+
this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)
|
1638
|
+
this.$element.trigger('inserted.bs.' + this.type)
|
1639
|
+
|
1640
|
+
var pos = this.getPosition()
|
1641
|
+
var actualWidth = $tip[0].offsetWidth
|
1642
|
+
var actualHeight = $tip[0].offsetHeight
|
1643
|
+
|
1644
|
+
if (autoPlace) {
|
1645
|
+
var orgPlacement = placement
|
1646
|
+
var viewportDim = this.getPosition(this.$viewport)
|
1647
|
+
|
1648
|
+
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
|
1649
|
+
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
|
1650
|
+
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
|
1651
|
+
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
|
1652
|
+
placement
|
1653
|
+
|
1654
|
+
$tip
|
1655
|
+
.removeClass(orgPlacement)
|
1656
|
+
.addClass(placement)
|
1657
|
+
}
|
1658
|
+
|
1659
|
+
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
|
1660
|
+
|
1661
|
+
this.applyPlacement(calculatedOffset, placement)
|
1662
|
+
|
1663
|
+
var complete = function () {
|
1664
|
+
var prevHoverState = that.hoverState
|
1665
|
+
that.$element.trigger('shown.bs.' + that.type)
|
1666
|
+
that.hoverState = null
|
1667
|
+
|
1668
|
+
if (prevHoverState == 'out') that.leave(that)
|
1669
|
+
}
|
1670
|
+
|
1671
|
+
$.support.transition && this.$tip.hasClass('fade') ?
|
1672
|
+
$tip
|
1673
|
+
.one('bsTransitionEnd', complete)
|
1674
|
+
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
1675
|
+
complete()
|
1676
|
+
}
|
1677
|
+
}
|
1678
|
+
|
1679
|
+
Tooltip.prototype.applyPlacement = function (offset, placement) {
|
1680
|
+
var $tip = this.tip()
|
1681
|
+
var width = $tip[0].offsetWidth
|
1682
|
+
var height = $tip[0].offsetHeight
|
1683
|
+
|
1684
|
+
// manually read margins because getBoundingClientRect includes difference
|
1685
|
+
var marginTop = parseInt($tip.css('margin-top'), 10)
|
1686
|
+
var marginLeft = parseInt($tip.css('margin-left'), 10)
|
1687
|
+
|
1688
|
+
// we must check for NaN for ie 8/9
|
1689
|
+
if (isNaN(marginTop)) marginTop = 0
|
1690
|
+
if (isNaN(marginLeft)) marginLeft = 0
|
1691
|
+
|
1692
|
+
offset.top += marginTop
|
1693
|
+
offset.left += marginLeft
|
1694
|
+
|
1695
|
+
// $.fn.offset doesn't round pixel values
|
1696
|
+
// so we use setOffset directly with our own function B-0
|
1697
|
+
$.offset.setOffset($tip[0], $.extend({
|
1698
|
+
using: function (props) {
|
1699
|
+
$tip.css({
|
1700
|
+
top: Math.round(props.top),
|
1701
|
+
left: Math.round(props.left)
|
1702
|
+
})
|
1703
|
+
}
|
1704
|
+
}, offset), 0)
|
1705
|
+
|
1706
|
+
$tip.addClass('in')
|
1707
|
+
|
1708
|
+
// check to see if placing tip in new offset caused the tip to resize itself
|
1709
|
+
var actualWidth = $tip[0].offsetWidth
|
1710
|
+
var actualHeight = $tip[0].offsetHeight
|
1711
|
+
|
1712
|
+
if (placement == 'top' && actualHeight != height) {
|
1713
|
+
offset.top = offset.top + height - actualHeight
|
1714
|
+
}
|
1715
|
+
|
1716
|
+
var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
|
1717
|
+
|
1718
|
+
if (delta.left) offset.left += delta.left
|
1719
|
+
else offset.top += delta.top
|
1720
|
+
|
1721
|
+
var isVertical = /top|bottom/.test(placement)
|
1722
|
+
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
1723
|
+
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
|
1724
|
+
|
1725
|
+
$tip.offset(offset)
|
1726
|
+
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
1727
|
+
}
|
1728
|
+
|
1729
|
+
Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
|
1730
|
+
this.arrow()
|
1731
|
+
.css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
1732
|
+
.css(isVertical ? 'top' : 'left', '')
|
1733
|
+
}
|
1734
|
+
|
1735
|
+
Tooltip.prototype.setContent = function () {
|
1736
|
+
var $tip = this.tip()
|
1737
|
+
var title = this.getTitle()
|
1738
|
+
|
1739
|
+
if (this.options.html) {
|
1740
|
+
if (this.options.sanitize) {
|
1741
|
+
title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)
|
1742
|
+
}
|
1743
|
+
|
1744
|
+
$tip.find('.tooltip-inner').html(title)
|
1745
|
+
} else {
|
1746
|
+
$tip.find('.tooltip-inner').text(title)
|
1747
|
+
}
|
1748
|
+
|
1749
|
+
$tip.removeClass('fade in top bottom left right')
|
1750
|
+
}
|
1751
|
+
|
1752
|
+
Tooltip.prototype.hide = function (callback) {
|
1753
|
+
var that = this
|
1754
|
+
var $tip = $(this.$tip)
|
1755
|
+
var e = $.Event('hide.bs.' + this.type)
|
1756
|
+
|
1757
|
+
function complete() {
|
1758
|
+
if (that.hoverState != 'in') $tip.detach()
|
1759
|
+
if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
|
1760
|
+
that.$element
|
1761
|
+
.removeAttr('aria-describedby')
|
1762
|
+
.trigger('hidden.bs.' + that.type)
|
1763
|
+
}
|
1764
|
+
callback && callback()
|
1765
|
+
}
|
1766
|
+
|
1767
|
+
this.$element.trigger(e)
|
1768
|
+
|
1769
|
+
if (e.isDefaultPrevented()) return
|
1770
|
+
|
1771
|
+
$tip.removeClass('in')
|
1772
|
+
|
1773
|
+
$.support.transition && $tip.hasClass('fade') ?
|
1774
|
+
$tip
|
1775
|
+
.one('bsTransitionEnd', complete)
|
1776
|
+
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
1777
|
+
complete()
|
1778
|
+
|
1779
|
+
this.hoverState = null
|
1780
|
+
|
1781
|
+
return this
|
1782
|
+
}
|
1783
|
+
|
1784
|
+
Tooltip.prototype.fixTitle = function () {
|
1785
|
+
var $e = this.$element
|
1786
|
+
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
|
1787
|
+
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
1788
|
+
}
|
1789
|
+
}
|
1790
|
+
|
1791
|
+
Tooltip.prototype.hasContent = function () {
|
1792
|
+
return this.getTitle()
|
1793
|
+
}
|
1794
|
+
|
1795
|
+
Tooltip.prototype.getPosition = function ($element) {
|
1796
|
+
$element = $element || this.$element
|
1797
|
+
|
1798
|
+
var el = $element[0]
|
1799
|
+
var isBody = el.tagName == 'BODY'
|
1800
|
+
|
1801
|
+
var elRect = el.getBoundingClientRect()
|
1802
|
+
if (elRect.width == null) {
|
1803
|
+
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
1804
|
+
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
1805
|
+
}
|
1806
|
+
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
1807
|
+
// Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
|
1808
|
+
// See https://github.com/twbs/bootstrap/issues/20280
|
1809
|
+
var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
|
1810
|
+
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
1811
|
+
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
|
1812
|
+
|
1813
|
+
return $.extend({}, elRect, scroll, outerDims, elOffset)
|
1814
|
+
}
|
1815
|
+
|
1816
|
+
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
1817
|
+
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
1818
|
+
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
1819
|
+
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
1820
|
+
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
|
1821
|
+
|
1822
|
+
}
|
1823
|
+
|
1824
|
+
Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
|
1825
|
+
var delta = { top: 0, left: 0 }
|
1826
|
+
if (!this.$viewport) return delta
|
1827
|
+
|
1828
|
+
var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
|
1829
|
+
var viewportDimensions = this.getPosition(this.$viewport)
|
1830
|
+
|
1831
|
+
if (/right|left/.test(placement)) {
|
1832
|
+
var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
|
1833
|
+
var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
|
1834
|
+
if (topEdgeOffset < viewportDimensions.top) { // top overflow
|
1835
|
+
delta.top = viewportDimensions.top - topEdgeOffset
|
1836
|
+
} else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
|
1837
|
+
delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
|
1838
|
+
}
|
1839
|
+
} else {
|
1840
|
+
var leftEdgeOffset = pos.left - viewportPadding
|
1841
|
+
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
1842
|
+
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
1843
|
+
delta.left = viewportDimensions.left - leftEdgeOffset
|
1844
|
+
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
|
1845
|
+
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
1846
|
+
}
|
1847
|
+
}
|
1848
|
+
|
1849
|
+
return delta
|
1850
|
+
}
|
1851
|
+
|
1852
|
+
Tooltip.prototype.getTitle = function () {
|
1853
|
+
var title
|
1854
|
+
var $e = this.$element
|
1855
|
+
var o = this.options
|
1856
|
+
|
1857
|
+
title = $e.attr('data-original-title')
|
1858
|
+
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
1859
|
+
|
1860
|
+
return title
|
1861
|
+
}
|
1862
|
+
|
1863
|
+
Tooltip.prototype.getUID = function (prefix) {
|
1864
|
+
do prefix += ~~(Math.random() * 1000000)
|
1865
|
+
while (document.getElementById(prefix))
|
1866
|
+
return prefix
|
1867
|
+
}
|
1868
|
+
|
1869
|
+
Tooltip.prototype.tip = function () {
|
1870
|
+
if (!this.$tip) {
|
1871
|
+
this.$tip = $(this.options.template)
|
1872
|
+
if (this.$tip.length != 1) {
|
1873
|
+
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
|
1874
|
+
}
|
1875
|
+
}
|
1876
|
+
return this.$tip
|
1877
|
+
}
|
1878
|
+
|
1879
|
+
Tooltip.prototype.arrow = function () {
|
1880
|
+
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
|
1881
|
+
}
|
1882
|
+
|
1883
|
+
Tooltip.prototype.enable = function () {
|
1884
|
+
this.enabled = true
|
1885
|
+
}
|
1886
|
+
|
1887
|
+
Tooltip.prototype.disable = function () {
|
1888
|
+
this.enabled = false
|
1889
|
+
}
|
1890
|
+
|
1891
|
+
Tooltip.prototype.toggleEnabled = function () {
|
1892
|
+
this.enabled = !this.enabled
|
1893
|
+
}
|
1894
|
+
|
1895
|
+
Tooltip.prototype.toggle = function (e) {
|
1896
|
+
var self = this
|
1897
|
+
if (e) {
|
1898
|
+
self = $(e.currentTarget).data('bs.' + this.type)
|
1899
|
+
if (!self) {
|
1900
|
+
self = new this.constructor(e.currentTarget, this.getDelegateOptions())
|
1901
|
+
$(e.currentTarget).data('bs.' + this.type, self)
|
1902
|
+
}
|
1903
|
+
}
|
1904
|
+
|
1905
|
+
if (e) {
|
1906
|
+
self.inState.click = !self.inState.click
|
1907
|
+
if (self.isInStateTrue()) self.enter(self)
|
1908
|
+
else self.leave(self)
|
1909
|
+
} else {
|
1910
|
+
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
|
1911
|
+
}
|
1912
|
+
}
|
1913
|
+
|
1914
|
+
Tooltip.prototype.destroy = function () {
|
1915
|
+
var that = this
|
1916
|
+
clearTimeout(this.timeout)
|
1917
|
+
this.hide(function () {
|
1918
|
+
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
1919
|
+
if (that.$tip) {
|
1920
|
+
that.$tip.detach()
|
1921
|
+
}
|
1922
|
+
that.$tip = null
|
1923
|
+
that.$arrow = null
|
1924
|
+
that.$viewport = null
|
1925
|
+
that.$element = null
|
1926
|
+
})
|
1927
|
+
}
|
1928
|
+
|
1929
|
+
Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {
|
1930
|
+
return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)
|
1931
|
+
}
|
1932
|
+
|
1933
|
+
// TOOLTIP PLUGIN DEFINITION
|
1934
|
+
// =========================
|
1935
|
+
|
1936
|
+
function Plugin(option) {
|
1937
|
+
return this.each(function () {
|
1938
|
+
var $this = $(this)
|
1939
|
+
var data = $this.data('bs.tooltip')
|
1940
|
+
var options = typeof option == 'object' && option
|
1941
|
+
|
1942
|
+
if (!data && /destroy|hide/.test(option)) return
|
1943
|
+
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
|
1944
|
+
if (typeof option == 'string') data[option]()
|
1945
|
+
})
|
1946
|
+
}
|
1947
|
+
|
1948
|
+
var old = $.fn.tooltip
|
1949
|
+
|
1950
|
+
$.fn.tooltip = Plugin
|
1951
|
+
$.fn.tooltip.Constructor = Tooltip
|
1952
|
+
|
1953
|
+
|
1954
|
+
// TOOLTIP NO CONFLICT
|
1955
|
+
// ===================
|
1956
|
+
|
1957
|
+
$.fn.tooltip.noConflict = function () {
|
1958
|
+
$.fn.tooltip = old
|
1959
|
+
return this
|
1960
|
+
}
|
1961
|
+
|
1962
|
+
}(jQuery);
|
1963
|
+
|
1964
|
+
/* ========================================================================
|
1965
|
+
* Bootstrap: popover.js v3.4.1
|
1966
|
+
* https://getbootstrap.com/docs/3.4/javascript/#popovers
|
1967
|
+
* ========================================================================
|
1968
|
+
* Copyright 2011-2019 Twitter, Inc.
|
1969
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
1970
|
+
* ======================================================================== */
|
1971
|
+
|
1972
|
+
|
1973
|
+
+function ($) {
|
1974
|
+
'use strict';
|
1975
|
+
|
1976
|
+
// POPOVER PUBLIC CLASS DEFINITION
|
1977
|
+
// ===============================
|
1978
|
+
|
1979
|
+
var Popover = function (element, options) {
|
1980
|
+
this.init('popover', element, options)
|
1981
|
+
}
|
1982
|
+
|
1983
|
+
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
1984
|
+
|
1985
|
+
Popover.VERSION = '3.4.1'
|
1986
|
+
|
1987
|
+
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
1988
|
+
placement: 'right',
|
1989
|
+
trigger: 'click',
|
1990
|
+
content: '',
|
1991
|
+
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
1992
|
+
})
|
1993
|
+
|
1994
|
+
|
1995
|
+
// NOTE: POPOVER EXTENDS tooltip.js
|
1996
|
+
// ================================
|
1997
|
+
|
1998
|
+
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
|
1999
|
+
|
2000
|
+
Popover.prototype.constructor = Popover
|
2001
|
+
|
2002
|
+
Popover.prototype.getDefaults = function () {
|
2003
|
+
return Popover.DEFAULTS
|
2004
|
+
}
|
2005
|
+
|
2006
|
+
Popover.prototype.setContent = function () {
|
2007
|
+
var $tip = this.tip()
|
2008
|
+
var title = this.getTitle()
|
2009
|
+
var content = this.getContent()
|
2010
|
+
|
2011
|
+
if (this.options.html) {
|
2012
|
+
var typeContent = typeof content
|
2013
|
+
|
2014
|
+
if (this.options.sanitize) {
|
2015
|
+
title = this.sanitizeHtml(title)
|
2016
|
+
|
2017
|
+
if (typeContent === 'string') {
|
2018
|
+
content = this.sanitizeHtml(content)
|
2019
|
+
}
|
2020
|
+
}
|
2021
|
+
|
2022
|
+
$tip.find('.popover-title').html(title)
|
2023
|
+
$tip.find('.popover-content').children().detach().end()[
|
2024
|
+
typeContent === 'string' ? 'html' : 'append'
|
2025
|
+
](content)
|
2026
|
+
} else {
|
2027
|
+
$tip.find('.popover-title').text(title)
|
2028
|
+
$tip.find('.popover-content').children().detach().end().text(content)
|
2029
|
+
}
|
2030
|
+
|
2031
|
+
$tip.removeClass('fade top bottom left right in')
|
2032
|
+
|
2033
|
+
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
|
2034
|
+
// this manually by checking the contents.
|
2035
|
+
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
|
2036
|
+
}
|
2037
|
+
|
2038
|
+
Popover.prototype.hasContent = function () {
|
2039
|
+
return this.getTitle() || this.getContent()
|
2040
|
+
}
|
2041
|
+
|
2042
|
+
Popover.prototype.getContent = function () {
|
2043
|
+
var $e = this.$element
|
2044
|
+
var o = this.options
|
2045
|
+
|
2046
|
+
return $e.attr('data-content')
|
2047
|
+
|| (typeof o.content == 'function' ?
|
2048
|
+
o.content.call($e[0]) :
|
2049
|
+
o.content)
|
2050
|
+
}
|
2051
|
+
|
2052
|
+
Popover.prototype.arrow = function () {
|
2053
|
+
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
2054
|
+
}
|
2055
|
+
|
2056
|
+
|
2057
|
+
// POPOVER PLUGIN DEFINITION
|
2058
|
+
// =========================
|
2059
|
+
|
2060
|
+
function Plugin(option) {
|
2061
|
+
return this.each(function () {
|
2062
|
+
var $this = $(this)
|
2063
|
+
var data = $this.data('bs.popover')
|
2064
|
+
var options = typeof option == 'object' && option
|
2065
|
+
|
2066
|
+
if (!data && /destroy|hide/.test(option)) return
|
2067
|
+
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
2068
|
+
if (typeof option == 'string') data[option]()
|
2069
|
+
})
|
2070
|
+
}
|
2071
|
+
|
2072
|
+
var old = $.fn.popover
|
2073
|
+
|
2074
|
+
$.fn.popover = Plugin
|
2075
|
+
$.fn.popover.Constructor = Popover
|
2076
|
+
|
2077
|
+
|
2078
|
+
// POPOVER NO CONFLICT
|
2079
|
+
// ===================
|
2080
|
+
|
2081
|
+
$.fn.popover.noConflict = function () {
|
2082
|
+
$.fn.popover = old
|
2083
|
+
return this
|
2084
|
+
}
|
2085
|
+
|
2086
|
+
}(jQuery);
|
2087
|
+
|
2088
|
+
/* ========================================================================
|
2089
|
+
* Bootstrap: scrollspy.js v3.4.1
|
2090
|
+
* https://getbootstrap.com/docs/3.4/javascript/#scrollspy
|
2091
|
+
* ========================================================================
|
2092
|
+
* Copyright 2011-2019 Twitter, Inc.
|
2093
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
2094
|
+
* ======================================================================== */
|
2095
|
+
|
2096
|
+
|
2097
|
+
+function ($) {
|
2098
|
+
'use strict';
|
2099
|
+
|
2100
|
+
// SCROLLSPY CLASS DEFINITION
|
2101
|
+
// ==========================
|
2102
|
+
|
2103
|
+
function ScrollSpy(element, options) {
|
2104
|
+
this.$body = $(document.body)
|
2105
|
+
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
|
2106
|
+
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
2107
|
+
this.selector = (this.options.target || '') + ' .nav li > a'
|
2108
|
+
this.offsets = []
|
2109
|
+
this.targets = []
|
2110
|
+
this.activeTarget = null
|
2111
|
+
this.scrollHeight = 0
|
2112
|
+
|
2113
|
+
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
|
2114
|
+
this.refresh()
|
2115
|
+
this.process()
|
2116
|
+
}
|
2117
|
+
|
2118
|
+
ScrollSpy.VERSION = '3.4.1'
|
2119
|
+
|
2120
|
+
ScrollSpy.DEFAULTS = {
|
2121
|
+
offset: 10
|
2122
|
+
}
|
2123
|
+
|
2124
|
+
ScrollSpy.prototype.getScrollHeight = function () {
|
2125
|
+
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
|
2126
|
+
}
|
2127
|
+
|
2128
|
+
ScrollSpy.prototype.refresh = function () {
|
2129
|
+
var that = this
|
2130
|
+
var offsetMethod = 'offset'
|
2131
|
+
var offsetBase = 0
|
2132
|
+
|
2133
|
+
this.offsets = []
|
2134
|
+
this.targets = []
|
2135
|
+
this.scrollHeight = this.getScrollHeight()
|
2136
|
+
|
2137
|
+
if (!$.isWindow(this.$scrollElement[0])) {
|
2138
|
+
offsetMethod = 'position'
|
2139
|
+
offsetBase = this.$scrollElement.scrollTop()
|
2140
|
+
}
|
2141
|
+
|
2142
|
+
this.$body
|
2143
|
+
.find(this.selector)
|
2144
|
+
.map(function () {
|
2145
|
+
var $el = $(this)
|
2146
|
+
var href = $el.data('target') || $el.attr('href')
|
2147
|
+
var $href = /^#./.test(href) && $(href)
|
2148
|
+
|
2149
|
+
return ($href
|
2150
|
+
&& $href.length
|
2151
|
+
&& $href.is(':visible')
|
2152
|
+
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
|
2153
|
+
})
|
2154
|
+
.sort(function (a, b) { return a[0] - b[0] })
|
2155
|
+
.each(function () {
|
2156
|
+
that.offsets.push(this[0])
|
2157
|
+
that.targets.push(this[1])
|
2158
|
+
})
|
2159
|
+
}
|
2160
|
+
|
2161
|
+
ScrollSpy.prototype.process = function () {
|
2162
|
+
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
2163
|
+
var scrollHeight = this.getScrollHeight()
|
2164
|
+
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
|
2165
|
+
var offsets = this.offsets
|
2166
|
+
var targets = this.targets
|
2167
|
+
var activeTarget = this.activeTarget
|
2168
|
+
var i
|
2169
|
+
|
2170
|
+
if (this.scrollHeight != scrollHeight) {
|
2171
|
+
this.refresh()
|
2172
|
+
}
|
2173
|
+
|
2174
|
+
if (scrollTop >= maxScroll) {
|
2175
|
+
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
2176
|
+
}
|
2177
|
+
|
2178
|
+
if (activeTarget && scrollTop < offsets[0]) {
|
2179
|
+
this.activeTarget = null
|
2180
|
+
return this.clear()
|
2181
|
+
}
|
2182
|
+
|
2183
|
+
for (i = offsets.length; i--;) {
|
2184
|
+
activeTarget != targets[i]
|
2185
|
+
&& scrollTop >= offsets[i]
|
2186
|
+
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
|
2187
|
+
&& this.activate(targets[i])
|
2188
|
+
}
|
2189
|
+
}
|
2190
|
+
|
2191
|
+
ScrollSpy.prototype.activate = function (target) {
|
2192
|
+
this.activeTarget = target
|
2193
|
+
|
2194
|
+
this.clear()
|
2195
|
+
|
2196
|
+
var selector = this.selector +
|
2197
|
+
'[data-target="' + target + '"],' +
|
2198
|
+
this.selector + '[href="' + target + '"]'
|
2199
|
+
|
2200
|
+
var active = $(selector)
|
2201
|
+
.parents('li')
|
2202
|
+
.addClass('active')
|
2203
|
+
|
2204
|
+
if (active.parent('.dropdown-menu').length) {
|
2205
|
+
active = active
|
2206
|
+
.closest('li.dropdown')
|
2207
|
+
.addClass('active')
|
2208
|
+
}
|
2209
|
+
|
2210
|
+
active.trigger('activate.bs.scrollspy')
|
2211
|
+
}
|
2212
|
+
|
2213
|
+
ScrollSpy.prototype.clear = function () {
|
2214
|
+
$(this.selector)
|
2215
|
+
.parentsUntil(this.options.target, '.active')
|
2216
|
+
.removeClass('active')
|
2217
|
+
}
|
2218
|
+
|
2219
|
+
|
2220
|
+
// SCROLLSPY PLUGIN DEFINITION
|
2221
|
+
// ===========================
|
2222
|
+
|
2223
|
+
function Plugin(option) {
|
2224
|
+
return this.each(function () {
|
2225
|
+
var $this = $(this)
|
2226
|
+
var data = $this.data('bs.scrollspy')
|
2227
|
+
var options = typeof option == 'object' && option
|
2228
|
+
|
2229
|
+
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
|
2230
|
+
if (typeof option == 'string') data[option]()
|
2231
|
+
})
|
2232
|
+
}
|
2233
|
+
|
2234
|
+
var old = $.fn.scrollspy
|
2235
|
+
|
2236
|
+
$.fn.scrollspy = Plugin
|
2237
|
+
$.fn.scrollspy.Constructor = ScrollSpy
|
2238
|
+
|
2239
|
+
|
2240
|
+
// SCROLLSPY NO CONFLICT
|
2241
|
+
// =====================
|
2242
|
+
|
2243
|
+
$.fn.scrollspy.noConflict = function () {
|
2244
|
+
$.fn.scrollspy = old
|
2245
|
+
return this
|
2246
|
+
}
|
2247
|
+
|
2248
|
+
|
2249
|
+
// SCROLLSPY DATA-API
|
2250
|
+
// ==================
|
2251
|
+
|
2252
|
+
$(window).on('load.bs.scrollspy.data-api', function () {
|
2253
|
+
$('[data-spy="scroll"]').each(function () {
|
2254
|
+
var $spy = $(this)
|
2255
|
+
Plugin.call($spy, $spy.data())
|
2256
|
+
})
|
2257
|
+
})
|
2258
|
+
|
2259
|
+
}(jQuery);
|
2260
|
+
|
2261
|
+
/* ========================================================================
|
2262
|
+
* Bootstrap: tab.js v3.4.1
|
2263
|
+
* https://getbootstrap.com/docs/3.4/javascript/#tabs
|
2264
|
+
* ========================================================================
|
2265
|
+
* Copyright 2011-2019 Twitter, Inc.
|
2266
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
2267
|
+
* ======================================================================== */
|
2268
|
+
|
2269
|
+
|
2270
|
+
+function ($) {
|
2271
|
+
'use strict';
|
2272
|
+
|
2273
|
+
// TAB CLASS DEFINITION
|
2274
|
+
// ====================
|
2275
|
+
|
2276
|
+
var Tab = function (element) {
|
2277
|
+
// jscs:disable requireDollarBeforejQueryAssignment
|
2278
|
+
this.element = $(element)
|
2279
|
+
// jscs:enable requireDollarBeforejQueryAssignment
|
2280
|
+
}
|
2281
|
+
|
2282
|
+
Tab.VERSION = '3.4.1'
|
2283
|
+
|
2284
|
+
Tab.TRANSITION_DURATION = 150
|
2285
|
+
|
2286
|
+
Tab.prototype.show = function () {
|
2287
|
+
var $this = this.element
|
2288
|
+
var $ul = $this.closest('ul:not(.dropdown-menu)')
|
2289
|
+
var selector = $this.data('target')
|
2290
|
+
|
2291
|
+
if (!selector) {
|
2292
|
+
selector = $this.attr('href')
|
2293
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
2294
|
+
}
|
2295
|
+
|
2296
|
+
if ($this.parent('li').hasClass('active')) return
|
2297
|
+
|
2298
|
+
var $previous = $ul.find('.active:last a')
|
2299
|
+
var hideEvent = $.Event('hide.bs.tab', {
|
2300
|
+
relatedTarget: $this[0]
|
2301
|
+
})
|
2302
|
+
var showEvent = $.Event('show.bs.tab', {
|
2303
|
+
relatedTarget: $previous[0]
|
2304
|
+
})
|
2305
|
+
|
2306
|
+
$previous.trigger(hideEvent)
|
2307
|
+
$this.trigger(showEvent)
|
2308
|
+
|
2309
|
+
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
|
2310
|
+
|
2311
|
+
var $target = $(document).find(selector)
|
2312
|
+
|
2313
|
+
this.activate($this.closest('li'), $ul)
|
2314
|
+
this.activate($target, $target.parent(), function () {
|
2315
|
+
$previous.trigger({
|
2316
|
+
type: 'hidden.bs.tab',
|
2317
|
+
relatedTarget: $this[0]
|
2318
|
+
})
|
2319
|
+
$this.trigger({
|
2320
|
+
type: 'shown.bs.tab',
|
2321
|
+
relatedTarget: $previous[0]
|
2322
|
+
})
|
2323
|
+
})
|
2324
|
+
}
|
2325
|
+
|
2326
|
+
Tab.prototype.activate = function (element, container, callback) {
|
2327
|
+
var $active = container.find('> .active')
|
2328
|
+
var transition = callback
|
2329
|
+
&& $.support.transition
|
2330
|
+
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
|
2331
|
+
|
2332
|
+
function next() {
|
2333
|
+
$active
|
2334
|
+
.removeClass('active')
|
2335
|
+
.find('> .dropdown-menu > .active')
|
2336
|
+
.removeClass('active')
|
2337
|
+
.end()
|
2338
|
+
.find('[data-toggle="tab"]')
|
2339
|
+
.attr('aria-expanded', false)
|
2340
|
+
|
2341
|
+
element
|
2342
|
+
.addClass('active')
|
2343
|
+
.find('[data-toggle="tab"]')
|
2344
|
+
.attr('aria-expanded', true)
|
2345
|
+
|
2346
|
+
if (transition) {
|
2347
|
+
element[0].offsetWidth // reflow for transition
|
2348
|
+
element.addClass('in')
|
2349
|
+
} else {
|
2350
|
+
element.removeClass('fade')
|
2351
|
+
}
|
2352
|
+
|
2353
|
+
if (element.parent('.dropdown-menu').length) {
|
2354
|
+
element
|
2355
|
+
.closest('li.dropdown')
|
2356
|
+
.addClass('active')
|
2357
|
+
.end()
|
2358
|
+
.find('[data-toggle="tab"]')
|
2359
|
+
.attr('aria-expanded', true)
|
2360
|
+
}
|
2361
|
+
|
2362
|
+
callback && callback()
|
2363
|
+
}
|
2364
|
+
|
2365
|
+
$active.length && transition ?
|
2366
|
+
$active
|
2367
|
+
.one('bsTransitionEnd', next)
|
2368
|
+
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
|
2369
|
+
next()
|
2370
|
+
|
2371
|
+
$active.removeClass('in')
|
2372
|
+
}
|
2373
|
+
|
2374
|
+
|
2375
|
+
// TAB PLUGIN DEFINITION
|
2376
|
+
// =====================
|
2377
|
+
|
2378
|
+
function Plugin(option) {
|
2379
|
+
return this.each(function () {
|
2380
|
+
var $this = $(this)
|
2381
|
+
var data = $this.data('bs.tab')
|
2382
|
+
|
2383
|
+
if (!data) $this.data('bs.tab', (data = new Tab(this)))
|
2384
|
+
if (typeof option == 'string') data[option]()
|
2385
|
+
})
|
2386
|
+
}
|
2387
|
+
|
2388
|
+
var old = $.fn.tab
|
2389
|
+
|
2390
|
+
$.fn.tab = Plugin
|
2391
|
+
$.fn.tab.Constructor = Tab
|
2392
|
+
|
2393
|
+
|
2394
|
+
// TAB NO CONFLICT
|
2395
|
+
// ===============
|
2396
|
+
|
2397
|
+
$.fn.tab.noConflict = function () {
|
2398
|
+
$.fn.tab = old
|
2399
|
+
return this
|
2400
|
+
}
|
2401
|
+
|
2402
|
+
|
2403
|
+
// TAB DATA-API
|
2404
|
+
// ============
|
2405
|
+
|
2406
|
+
var clickHandler = function (e) {
|
2407
|
+
e.preventDefault()
|
2408
|
+
Plugin.call($(this), 'show')
|
2409
|
+
}
|
2410
|
+
|
2411
|
+
$(document)
|
2412
|
+
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
|
2413
|
+
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
|
2414
|
+
|
2415
|
+
}(jQuery);
|
2416
|
+
|
2417
|
+
/* ========================================================================
|
2418
|
+
* Bootstrap: affix.js v3.4.1
|
2419
|
+
* https://getbootstrap.com/docs/3.4/javascript/#affix
|
2420
|
+
* ========================================================================
|
2421
|
+
* Copyright 2011-2019 Twitter, Inc.
|
2422
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
2423
|
+
* ======================================================================== */
|
2424
|
+
|
2425
|
+
|
2426
|
+
+function ($) {
|
2427
|
+
'use strict';
|
2428
|
+
|
2429
|
+
// AFFIX CLASS DEFINITION
|
2430
|
+
// ======================
|
2431
|
+
|
2432
|
+
var Affix = function (element, options) {
|
2433
|
+
this.options = $.extend({}, Affix.DEFAULTS, options)
|
2434
|
+
|
2435
|
+
var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)
|
2436
|
+
|
2437
|
+
this.$target = target
|
2438
|
+
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
|
2439
|
+
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
2440
|
+
|
2441
|
+
this.$element = $(element)
|
2442
|
+
this.affixed = null
|
2443
|
+
this.unpin = null
|
2444
|
+
this.pinnedOffset = null
|
2445
|
+
|
2446
|
+
this.checkPosition()
|
2447
|
+
}
|
2448
|
+
|
2449
|
+
Affix.VERSION = '3.4.1'
|
2450
|
+
|
2451
|
+
Affix.RESET = 'affix affix-top affix-bottom'
|
2452
|
+
|
2453
|
+
Affix.DEFAULTS = {
|
2454
|
+
offset: 0,
|
2455
|
+
target: window
|
2456
|
+
}
|
2457
|
+
|
2458
|
+
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
|
2459
|
+
var scrollTop = this.$target.scrollTop()
|
2460
|
+
var position = this.$element.offset()
|
2461
|
+
var targetHeight = this.$target.height()
|
2462
|
+
|
2463
|
+
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
|
2464
|
+
|
2465
|
+
if (this.affixed == 'bottom') {
|
2466
|
+
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
|
2467
|
+
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
|
2468
|
+
}
|
2469
|
+
|
2470
|
+
var initializing = this.affixed == null
|
2471
|
+
var colliderTop = initializing ? scrollTop : position.top
|
2472
|
+
var colliderHeight = initializing ? targetHeight : height
|
2473
|
+
|
2474
|
+
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
|
2475
|
+
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
|
2476
|
+
|
2477
|
+
return false
|
2478
|
+
}
|
2479
|
+
|
2480
|
+
Affix.prototype.getPinnedOffset = function () {
|
2481
|
+
if (this.pinnedOffset) return this.pinnedOffset
|
2482
|
+
this.$element.removeClass(Affix.RESET).addClass('affix')
|
2483
|
+
var scrollTop = this.$target.scrollTop()
|
2484
|
+
var position = this.$element.offset()
|
2485
|
+
return (this.pinnedOffset = position.top - scrollTop)
|
2486
|
+
}
|
2487
|
+
|
2488
|
+
Affix.prototype.checkPositionWithEventLoop = function () {
|
2489
|
+
setTimeout($.proxy(this.checkPosition, this), 1)
|
2490
|
+
}
|
2491
|
+
|
2492
|
+
Affix.prototype.checkPosition = function () {
|
2493
|
+
if (!this.$element.is(':visible')) return
|
2494
|
+
|
2495
|
+
var height = this.$element.height()
|
2496
|
+
var offset = this.options.offset
|
2497
|
+
var offsetTop = offset.top
|
2498
|
+
var offsetBottom = offset.bottom
|
2499
|
+
var scrollHeight = Math.max($(document).height(), $(document.body).height())
|
2500
|
+
|
2501
|
+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
2502
|
+
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
2503
|
+
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
|
2504
|
+
|
2505
|
+
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
|
2506
|
+
|
2507
|
+
if (this.affixed != affix) {
|
2508
|
+
if (this.unpin != null) this.$element.css('top', '')
|
2509
|
+
|
2510
|
+
var affixType = 'affix' + (affix ? '-' + affix : '')
|
2511
|
+
var e = $.Event(affixType + '.bs.affix')
|
2512
|
+
|
2513
|
+
this.$element.trigger(e)
|
2514
|
+
|
2515
|
+
if (e.isDefaultPrevented()) return
|
2516
|
+
|
2517
|
+
this.affixed = affix
|
2518
|
+
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
|
2519
|
+
|
2520
|
+
this.$element
|
2521
|
+
.removeClass(Affix.RESET)
|
2522
|
+
.addClass(affixType)
|
2523
|
+
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
|
2524
|
+
}
|
2525
|
+
|
2526
|
+
if (affix == 'bottom') {
|
2527
|
+
this.$element.offset({
|
2528
|
+
top: scrollHeight - height - offsetBottom
|
2529
|
+
})
|
2530
|
+
}
|
2531
|
+
}
|
2532
|
+
|
2533
|
+
|
2534
|
+
// AFFIX PLUGIN DEFINITION
|
2535
|
+
// =======================
|
2536
|
+
|
2537
|
+
function Plugin(option) {
|
2538
|
+
return this.each(function () {
|
2539
|
+
var $this = $(this)
|
2540
|
+
var data = $this.data('bs.affix')
|
2541
|
+
var options = typeof option == 'object' && option
|
2542
|
+
|
2543
|
+
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
|
2544
|
+
if (typeof option == 'string') data[option]()
|
2545
|
+
})
|
2546
|
+
}
|
2547
|
+
|
2548
|
+
var old = $.fn.affix
|
2549
|
+
|
2550
|
+
$.fn.affix = Plugin
|
2551
|
+
$.fn.affix.Constructor = Affix
|
2552
|
+
|
2553
|
+
|
2554
|
+
// AFFIX NO CONFLICT
|
2555
|
+
// =================
|
2556
|
+
|
2557
|
+
$.fn.affix.noConflict = function () {
|
2558
|
+
$.fn.affix = old
|
2559
|
+
return this
|
2560
|
+
}
|
2561
|
+
|
2562
|
+
|
2563
|
+
// AFFIX DATA-API
|
2564
|
+
// ==============
|
2565
|
+
|
2566
|
+
$(window).on('load', function () {
|
2567
|
+
$('[data-spy="affix"]').each(function () {
|
2568
|
+
var $spy = $(this)
|
2569
|
+
var data = $spy.data()
|
2570
|
+
|
2571
|
+
data.offset = data.offset || {}
|
2572
|
+
|
2573
|
+
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
|
2574
|
+
if (data.offsetTop != null) data.offset.top = data.offsetTop
|
2575
|
+
|
2576
|
+
Plugin.call($spy, data)
|
2577
|
+
})
|
2578
|
+
})
|
2579
|
+
|
2580
|
+
}(jQuery);
|