@lazycatcloud/lzc-cli 1.1.1 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cmds/app.js +137 -0
- package/cmds/config.js +55 -0
- package/cmds/create.js +55 -0
- package/cmds/dev.js +122 -0
- package/cmds/init.js +125 -0
- package/cmds/log.js +103 -0
- package/cmds/publish.js +116 -0
- package/lib/api.js +34 -36
- package/lib/archiver.js +50 -31
- package/lib/box/check_qemu.js +27 -0
- package/lib/box/hportal.js +114 -0
- package/lib/box/index.js +152 -0
- package/lib/box/qemu_vm_mgr.js +625 -0
- package/lib/box/schemes/vm_box_system_debian.json +47 -0
- package/lib/builder.js +154 -35
- package/lib/dev.js +51 -32
- package/lib/env.js +276 -57
- package/lib/generator.js +31 -0
- package/lib/git/git-commit.sh +7 -0
- package/lib/git/git-reset.sh +15 -0
- package/lib/key.js +14 -11
- package/lib/sdk.js +7 -10
- package/lib/utils.js +149 -53
- package/package.json +18 -5
- package/scripts/cli.js +134 -70
- package/template/_lazycat/app-config +1 -0
- package/template/_lazycat/docker-compose.yml.in +3 -5
- package/template/golang/README.md +3 -4
- package/template/golang/assets/css/bootstrap-responsive.css +26 -23
- package/template/golang/assets/css/bootstrap-responsive.min.css +1065 -1
- package/template/golang/assets/css/bootstrap.css +733 -362
- package/template/golang/assets/css/bootstrap.min.css +5299 -1
- package/template/golang/assets/css/rego.css +17 -17
- package/template/golang/assets/js/bootstrap.js +1340 -1311
- package/template/golang/assets/js/bootstrap.min.js +1240 -5
- package/template/golang/assets/js/rego.js +80 -69
- package/template/golang/index.html +61 -59
- package/template/ionic_vue3/README.md +46 -0
- package/template/ionic_vue3/_eslintrc.cjs +24 -0
- package/template/ionic_vue3/_gitignore +29 -0
- package/template/ionic_vue3/_vscode/extensions.json +6 -0
- package/template/ionic_vue3/capacitor.config.ts +10 -0
- package/template/ionic_vue3/env.d.ts +1 -0
- package/template/ionic_vue3/index.html +13 -0
- package/template/ionic_vue3/ionic.config.json +7 -0
- package/template/ionic_vue3/package.json +52 -0
- package/template/ionic_vue3/postcss.config.js +6 -0
- package/template/ionic_vue3/public/favicon.ico +0 -0
- package/template/ionic_vue3/src/App.vue +11 -0
- package/template/ionic_vue3/src/assets/logo.svg +1 -0
- package/template/ionic_vue3/src/index.css +3 -0
- package/template/ionic_vue3/src/main.ts +35 -0
- package/template/ionic_vue3/src/router/index.ts +15 -0
- package/template/ionic_vue3/src/theme/variables.css +231 -0
- package/template/ionic_vue3/src/views/Home.vue +38 -0
- package/template/ionic_vue3/tailwind.config.js +7 -0
- package/template/ionic_vue3/tsconfig.json +16 -0
- package/template/ionic_vue3/tsconfig.vite-config.json +8 -0
- package/template/ionic_vue3/vite.config.ts +28 -0
- package/template/release/golang/build.sh +1 -2
- package/template/release/ionic_vue3/Dockerfile +10 -0
- package/template/release/ionic_vue3/build.sh +9 -0
- package/template/release/ionic_vue3/docker-compose.yml.in +8 -0
- package/template/release/vue/Dockerfile +3 -2
- package/template/release/vue/build.sh +4 -2
- package/template/vue/README.md +5 -0
- package/template/vue/babel.config.js +2 -4
|
@@ -17,47 +17,40 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
* ========================================================== */
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
!function ($) {
|
|
22
|
-
|
|
20
|
+
!(function ($) {
|
|
23
21
|
"use strict"; // jshint ;_;
|
|
24
22
|
|
|
25
|
-
|
|
26
23
|
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
|
|
27
24
|
* ======================================================= */
|
|
28
25
|
|
|
29
26
|
$(function () {
|
|
30
|
-
|
|
31
27
|
$.support.transition = (function () {
|
|
32
|
-
|
|
33
28
|
var transitionEnd = (function () {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
for (name in transEndEventNames){
|
|
29
|
+
var el = document.createElement("bootstrap"),
|
|
30
|
+
transEndEventNames = {
|
|
31
|
+
WebkitTransition: "webkitTransitionEnd",
|
|
32
|
+
MozTransition: "transitionend",
|
|
33
|
+
OTransition: "oTransitionEnd otransitionend",
|
|
34
|
+
transition: "transitionend",
|
|
35
|
+
},
|
|
36
|
+
name;
|
|
37
|
+
|
|
38
|
+
for (name in transEndEventNames) {
|
|
45
39
|
if (el.style[name] !== undefined) {
|
|
46
|
-
return transEndEventNames[name]
|
|
40
|
+
return transEndEventNames[name];
|
|
47
41
|
}
|
|
48
42
|
}
|
|
43
|
+
})();
|
|
49
44
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}(window.jQuery);/* ==========================================================
|
|
45
|
+
return (
|
|
46
|
+
transitionEnd && {
|
|
47
|
+
end: transitionEnd,
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
})();
|
|
51
|
+
});
|
|
52
|
+
})(window.jQuery);
|
|
53
|
+
/* ==========================================================
|
|
61
54
|
* bootstrap-alert.js v2.2.1
|
|
62
55
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
|
63
56
|
* ==========================================================
|
|
@@ -76,75 +69,69 @@
|
|
|
76
69
|
* limitations under the License.
|
|
77
70
|
* ========================================================== */
|
|
78
71
|
|
|
79
|
-
|
|
80
|
-
!function ($) {
|
|
81
|
-
|
|
72
|
+
!(function ($) {
|
|
82
73
|
"use strict"; // jshint ;_;
|
|
83
74
|
|
|
75
|
+
/* ALERT CLASS DEFINITION
|
|
76
|
+
* ====================== */
|
|
84
77
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
, Alert = function (el) {
|
|
90
|
-
$(el).on('click', dismiss, this.close)
|
|
91
|
-
}
|
|
78
|
+
var dismiss = '[data-dismiss="alert"]',
|
|
79
|
+
Alert = function (el) {
|
|
80
|
+
$(el).on("click", dismiss, this.close);
|
|
81
|
+
};
|
|
92
82
|
|
|
93
83
|
Alert.prototype.close = function (e) {
|
|
94
|
-
var $this = $(this)
|
|
95
|
-
|
|
96
|
-
|
|
84
|
+
var $this = $(this),
|
|
85
|
+
selector = $this.attr("data-target"),
|
|
86
|
+
$parent;
|
|
97
87
|
|
|
98
88
|
if (!selector) {
|
|
99
|
-
selector = $this.attr(
|
|
100
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/,
|
|
89
|
+
selector = $this.attr("href");
|
|
90
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ""); //strip for ie7
|
|
101
91
|
}
|
|
102
92
|
|
|
103
|
-
$parent = $(selector)
|
|
93
|
+
$parent = $(selector);
|
|
104
94
|
|
|
105
|
-
e && e.preventDefault()
|
|
95
|
+
e && e.preventDefault();
|
|
106
96
|
|
|
107
|
-
$parent.length ||
|
|
97
|
+
$parent.length ||
|
|
98
|
+
($parent = $this.hasClass("alert") ? $this : $this.parent());
|
|
108
99
|
|
|
109
|
-
$parent.trigger(e = $.Event(
|
|
100
|
+
$parent.trigger((e = $.Event("close")));
|
|
110
101
|
|
|
111
|
-
if (e.isDefaultPrevented()) return
|
|
102
|
+
if (e.isDefaultPrevented()) return;
|
|
112
103
|
|
|
113
|
-
$parent.removeClass(
|
|
104
|
+
$parent.removeClass("in");
|
|
114
105
|
|
|
115
106
|
function removeElement() {
|
|
116
|
-
$parent
|
|
117
|
-
.trigger('closed')
|
|
118
|
-
.remove()
|
|
107
|
+
$parent.trigger("closed").remove();
|
|
119
108
|
}
|
|
120
109
|
|
|
121
|
-
$.support.transition && $parent.hasClass(
|
|
122
|
-
$parent.on($.support.transition.end, removeElement)
|
|
123
|
-
removeElement()
|
|
124
|
-
}
|
|
125
|
-
|
|
110
|
+
$.support.transition && $parent.hasClass("fade")
|
|
111
|
+
? $parent.on($.support.transition.end, removeElement)
|
|
112
|
+
: removeElement();
|
|
113
|
+
};
|
|
126
114
|
|
|
127
|
-
|
|
128
|
-
|
|
115
|
+
/* ALERT PLUGIN DEFINITION
|
|
116
|
+
* ======================= */
|
|
129
117
|
|
|
130
118
|
$.fn.alert = function (option) {
|
|
131
119
|
return this.each(function () {
|
|
132
|
-
var $this = $(this)
|
|
133
|
-
|
|
134
|
-
if (!data) $this.data(
|
|
135
|
-
if (typeof option ==
|
|
136
|
-
})
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
$.fn.alert.Constructor = Alert
|
|
140
|
-
|
|
120
|
+
var $this = $(this),
|
|
121
|
+
data = $this.data("alert");
|
|
122
|
+
if (!data) $this.data("alert", (data = new Alert(this)));
|
|
123
|
+
if (typeof option == "string") data[option].call($this);
|
|
124
|
+
});
|
|
125
|
+
};
|
|
141
126
|
|
|
142
|
-
|
|
143
|
-
* ============== */
|
|
127
|
+
$.fn.alert.Constructor = Alert;
|
|
144
128
|
|
|
145
|
-
|
|
129
|
+
/* ALERT DATA-API
|
|
130
|
+
* ============== */
|
|
146
131
|
|
|
147
|
-
|
|
132
|
+
$(document).on("click.alert.data-api", dismiss, Alert.prototype.close);
|
|
133
|
+
})(window.jQuery);
|
|
134
|
+
/* ============================================================
|
|
148
135
|
* bootstrap-button.js v2.2.1
|
|
149
136
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
|
150
137
|
* ============================================================
|
|
@@ -163,81 +150,78 @@
|
|
|
163
150
|
* limitations under the License.
|
|
164
151
|
* ============================================================ */
|
|
165
152
|
|
|
166
|
-
|
|
167
|
-
!function ($) {
|
|
168
|
-
|
|
153
|
+
!(function ($) {
|
|
169
154
|
"use strict"; // jshint ;_;
|
|
170
155
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
* ============================== */
|
|
156
|
+
/* BUTTON PUBLIC CLASS DEFINITION
|
|
157
|
+
* ============================== */
|
|
174
158
|
|
|
175
159
|
var Button = function (element, options) {
|
|
176
|
-
this.$element = $(element)
|
|
177
|
-
this.options = $.extend({}, $.fn.button.defaults, options)
|
|
178
|
-
}
|
|
160
|
+
this.$element = $(element);
|
|
161
|
+
this.options = $.extend({}, $.fn.button.defaults, options);
|
|
162
|
+
};
|
|
179
163
|
|
|
180
164
|
Button.prototype.setState = function (state) {
|
|
181
|
-
var d =
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
165
|
+
var d = "disabled",
|
|
166
|
+
$el = this.$element,
|
|
167
|
+
data = $el.data(),
|
|
168
|
+
val = $el.is("input") ? "val" : "html";
|
|
185
169
|
|
|
186
|
-
state = state +
|
|
187
|
-
data.resetText || $el.data(
|
|
170
|
+
state = state + "Text";
|
|
171
|
+
data.resetText || $el.data("resetText", $el[val]());
|
|
188
172
|
|
|
189
|
-
$el[val](data[state] || this.options[state])
|
|
173
|
+
$el[val](data[state] || this.options[state]);
|
|
190
174
|
|
|
191
175
|
// push to event loop to allow forms to submit
|
|
192
176
|
setTimeout(function () {
|
|
193
|
-
state ==
|
|
194
|
-
$el.addClass(d).attr(d, d)
|
|
195
|
-
$el.removeClass(d).removeAttr(d)
|
|
196
|
-
}, 0)
|
|
197
|
-
}
|
|
177
|
+
state == "loadingText"
|
|
178
|
+
? $el.addClass(d).attr(d, d)
|
|
179
|
+
: $el.removeClass(d).removeAttr(d);
|
|
180
|
+
}, 0);
|
|
181
|
+
};
|
|
198
182
|
|
|
199
183
|
Button.prototype.toggle = function () {
|
|
200
|
-
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
|
|
184
|
+
var $parent = this.$element.closest('[data-toggle="buttons-radio"]');
|
|
201
185
|
|
|
202
|
-
$parent && $parent
|
|
203
|
-
.find('.active')
|
|
204
|
-
.removeClass('active')
|
|
205
|
-
|
|
206
|
-
this.$element.toggleClass('active')
|
|
207
|
-
}
|
|
186
|
+
$parent && $parent.find(".active").removeClass("active");
|
|
208
187
|
|
|
188
|
+
this.$element.toggleClass("active");
|
|
189
|
+
};
|
|
209
190
|
|
|
210
|
-
|
|
211
|
-
|
|
191
|
+
/* BUTTON PLUGIN DEFINITION
|
|
192
|
+
* ======================== */
|
|
212
193
|
|
|
213
194
|
$.fn.button = function (option) {
|
|
214
195
|
return this.each(function () {
|
|
215
|
-
var $this = $(this)
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
if (!data) $this.data(
|
|
219
|
-
if (option ==
|
|
220
|
-
else if (option) data.setState(option)
|
|
221
|
-
})
|
|
222
|
-
}
|
|
196
|
+
var $this = $(this),
|
|
197
|
+
data = $this.data("button"),
|
|
198
|
+
options = typeof option == "object" && option;
|
|
199
|
+
if (!data) $this.data("button", (data = new Button(this, options)));
|
|
200
|
+
if (option == "toggle") data.toggle();
|
|
201
|
+
else if (option) data.setState(option);
|
|
202
|
+
});
|
|
203
|
+
};
|
|
223
204
|
|
|
224
205
|
$.fn.button.defaults = {
|
|
225
|
-
loadingText:
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
$.fn.button.Constructor = Button
|
|
206
|
+
loadingText: "loading...",
|
|
207
|
+
};
|
|
229
208
|
|
|
209
|
+
$.fn.button.Constructor = Button;
|
|
230
210
|
|
|
231
|
-
|
|
232
|
-
|
|
211
|
+
/* BUTTON DATA-API
|
|
212
|
+
* =============== */
|
|
233
213
|
|
|
234
|
-
$(document).on(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
214
|
+
$(document).on(
|
|
215
|
+
"click.button.data-api",
|
|
216
|
+
"[data-toggle^=button]",
|
|
217
|
+
function (e) {
|
|
218
|
+
var $btn = $(e.target);
|
|
219
|
+
if (!$btn.hasClass("btn")) $btn = $btn.closest(".btn");
|
|
220
|
+
$btn.button("toggle");
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
})(window.jQuery);
|
|
224
|
+
/* ==========================================================
|
|
241
225
|
* bootstrap-carousel.js v2.2.1
|
|
242
226
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
|
243
227
|
* ==========================================================
|
|
@@ -256,163 +240,173 @@
|
|
|
256
240
|
* limitations under the License.
|
|
257
241
|
* ========================================================== */
|
|
258
242
|
|
|
259
|
-
|
|
260
|
-
!function ($) {
|
|
261
|
-
|
|
243
|
+
!(function ($) {
|
|
262
244
|
"use strict"; // jshint ;_;
|
|
263
245
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
* ========================= */
|
|
246
|
+
/* CAROUSEL CLASS DEFINITION
|
|
247
|
+
* ========================= */
|
|
267
248
|
|
|
268
249
|
var Carousel = function (element, options) {
|
|
269
|
-
this.$element = $(element)
|
|
270
|
-
this.options = options
|
|
271
|
-
this.options.slide && this.slide(this.options.slide)
|
|
272
|
-
this.options.pause ==
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
250
|
+
this.$element = $(element);
|
|
251
|
+
this.options = options;
|
|
252
|
+
this.options.slide && this.slide(this.options.slide);
|
|
253
|
+
this.options.pause == "hover" &&
|
|
254
|
+
this.$element
|
|
255
|
+
.on("mouseenter", $.proxy(this.pause, this))
|
|
256
|
+
.on("mouseleave", $.proxy(this.cycle, this));
|
|
257
|
+
};
|
|
276
258
|
|
|
277
259
|
Carousel.prototype = {
|
|
278
|
-
|
|
279
260
|
cycle: function (e) {
|
|
280
|
-
if (!e) this.paused = false
|
|
281
|
-
this.options.interval
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
261
|
+
if (!e) this.paused = false;
|
|
262
|
+
this.options.interval &&
|
|
263
|
+
!this.paused &&
|
|
264
|
+
(this.interval = setInterval(
|
|
265
|
+
$.proxy(this.next, this),
|
|
266
|
+
this.options.interval
|
|
267
|
+
));
|
|
268
|
+
return this;
|
|
269
|
+
},
|
|
270
|
+
|
|
271
|
+
to: function (pos) {
|
|
272
|
+
var $active = this.$element.find(".item.active"),
|
|
273
|
+
children = $active.parent().children(),
|
|
274
|
+
activePos = children.index($active),
|
|
275
|
+
that = this;
|
|
276
|
+
|
|
277
|
+
if (pos > children.length - 1 || pos < 0) return;
|
|
294
278
|
|
|
295
279
|
if (this.sliding) {
|
|
296
|
-
return this.$element.one(
|
|
297
|
-
that.to(pos)
|
|
298
|
-
})
|
|
280
|
+
return this.$element.one("slid", function () {
|
|
281
|
+
that.to(pos);
|
|
282
|
+
});
|
|
299
283
|
}
|
|
300
284
|
|
|
301
285
|
if (activePos == pos) {
|
|
302
|
-
return this.pause().cycle()
|
|
286
|
+
return this.pause().cycle();
|
|
303
287
|
}
|
|
304
288
|
|
|
305
|
-
return this.slide(pos > activePos ?
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
if (!e) this.paused = true
|
|
310
|
-
if (
|
|
311
|
-
this.$element.
|
|
312
|
-
|
|
289
|
+
return this.slide(pos > activePos ? "next" : "prev", $(children[pos]));
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
pause: function (e) {
|
|
293
|
+
if (!e) this.paused = true;
|
|
294
|
+
if (
|
|
295
|
+
this.$element.find(".next, .prev").length &&
|
|
296
|
+
$.support.transition.end
|
|
297
|
+
) {
|
|
298
|
+
this.$element.trigger($.support.transition.end);
|
|
299
|
+
this.cycle();
|
|
313
300
|
}
|
|
314
|
-
clearInterval(this.interval)
|
|
315
|
-
this.interval = null
|
|
316
|
-
return this
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
if (this.sliding) return
|
|
321
|
-
return this.slide(
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
if (this.sliding) return
|
|
326
|
-
return this.slide(
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
var $active = this.$element.find(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
this.sliding = true
|
|
339
|
-
|
|
340
|
-
isCycling && this.pause()
|
|
341
|
-
|
|
342
|
-
$next = $next.length ? $next : this.$element.find(
|
|
343
|
-
|
|
344
|
-
e = $.Event(
|
|
345
|
-
relatedTarget: $next[0]
|
|
346
|
-
})
|
|
347
|
-
|
|
348
|
-
if ($next.hasClass(
|
|
349
|
-
|
|
350
|
-
if ($.support.transition && this.$element.hasClass(
|
|
351
|
-
this.$element.trigger(e)
|
|
352
|
-
if (e.isDefaultPrevented()) return
|
|
353
|
-
$next.addClass(type)
|
|
354
|
-
$next[0].offsetWidth // force reflow
|
|
355
|
-
$active.addClass(direction)
|
|
356
|
-
$next.addClass(direction)
|
|
301
|
+
clearInterval(this.interval);
|
|
302
|
+
this.interval = null;
|
|
303
|
+
return this;
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
next: function () {
|
|
307
|
+
if (this.sliding) return;
|
|
308
|
+
return this.slide("next");
|
|
309
|
+
},
|
|
310
|
+
|
|
311
|
+
prev: function () {
|
|
312
|
+
if (this.sliding) return;
|
|
313
|
+
return this.slide("prev");
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
slide: function (type, next) {
|
|
317
|
+
var $active = this.$element.find(".item.active"),
|
|
318
|
+
$next = next || $active[type](),
|
|
319
|
+
isCycling = this.interval,
|
|
320
|
+
direction = type == "next" ? "left" : "right",
|
|
321
|
+
fallback = type == "next" ? "first" : "last",
|
|
322
|
+
that = this,
|
|
323
|
+
e;
|
|
324
|
+
|
|
325
|
+
this.sliding = true;
|
|
326
|
+
|
|
327
|
+
isCycling && this.pause();
|
|
328
|
+
|
|
329
|
+
$next = $next.length ? $next : this.$element.find(".item")[fallback]();
|
|
330
|
+
|
|
331
|
+
e = $.Event("slide", {
|
|
332
|
+
relatedTarget: $next[0],
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
if ($next.hasClass("active")) return;
|
|
336
|
+
|
|
337
|
+
if ($.support.transition && this.$element.hasClass("slide")) {
|
|
338
|
+
this.$element.trigger(e);
|
|
339
|
+
if (e.isDefaultPrevented()) return;
|
|
340
|
+
$next.addClass(type);
|
|
341
|
+
$next[0].offsetWidth; // force reflow
|
|
342
|
+
$active.addClass(direction);
|
|
343
|
+
$next.addClass(direction);
|
|
357
344
|
this.$element.one($.support.transition.end, function () {
|
|
358
|
-
$next.removeClass([type, direction].join(
|
|
359
|
-
$active.removeClass([
|
|
360
|
-
that.sliding = false
|
|
361
|
-
setTimeout(function () {
|
|
362
|
-
|
|
345
|
+
$next.removeClass([type, direction].join(" ")).addClass("active");
|
|
346
|
+
$active.removeClass(["active", direction].join(" "));
|
|
347
|
+
that.sliding = false;
|
|
348
|
+
setTimeout(function () {
|
|
349
|
+
that.$element.trigger("slid");
|
|
350
|
+
}, 0);
|
|
351
|
+
});
|
|
363
352
|
} else {
|
|
364
|
-
this.$element.trigger(e)
|
|
365
|
-
if (e.isDefaultPrevented()) return
|
|
366
|
-
$active.removeClass(
|
|
367
|
-
$next.addClass(
|
|
368
|
-
this.sliding = false
|
|
369
|
-
this.$element.trigger(
|
|
353
|
+
this.$element.trigger(e);
|
|
354
|
+
if (e.isDefaultPrevented()) return;
|
|
355
|
+
$active.removeClass("active");
|
|
356
|
+
$next.addClass("active");
|
|
357
|
+
this.sliding = false;
|
|
358
|
+
this.$element.trigger("slid");
|
|
370
359
|
}
|
|
371
360
|
|
|
372
|
-
isCycling && this.cycle()
|
|
373
|
-
|
|
374
|
-
return this
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
}
|
|
361
|
+
isCycling && this.cycle();
|
|
378
362
|
|
|
363
|
+
return this;
|
|
364
|
+
},
|
|
365
|
+
};
|
|
379
366
|
|
|
380
|
-
|
|
381
|
-
|
|
367
|
+
/* CAROUSEL PLUGIN DEFINITION
|
|
368
|
+
* ========================== */
|
|
382
369
|
|
|
383
370
|
$.fn.carousel = function (option) {
|
|
384
371
|
return this.each(function () {
|
|
385
|
-
var $this = $(this)
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
372
|
+
var $this = $(this),
|
|
373
|
+
data = $this.data("carousel"),
|
|
374
|
+
options = $.extend(
|
|
375
|
+
{},
|
|
376
|
+
$.fn.carousel.defaults,
|
|
377
|
+
typeof option == "object" && option
|
|
378
|
+
),
|
|
379
|
+
action = typeof option == "string" ? option : options.slide;
|
|
380
|
+
if (!data) $this.data("carousel", (data = new Carousel(this, options)));
|
|
381
|
+
if (typeof option == "number") data.to(option);
|
|
382
|
+
else if (action) data[action]();
|
|
383
|
+
else if (options.interval) data.cycle();
|
|
384
|
+
});
|
|
385
|
+
};
|
|
395
386
|
|
|
396
387
|
$.fn.carousel.defaults = {
|
|
397
|
-
interval: 5000
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
$.fn.carousel.Constructor = Carousel
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
388
|
+
interval: 5000,
|
|
389
|
+
pause: "hover",
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
$.fn.carousel.Constructor = Carousel;
|
|
393
|
+
|
|
394
|
+
/* CAROUSEL DATA-API
|
|
395
|
+
* ================= */
|
|
396
|
+
|
|
397
|
+
$(document).on("click.carousel.data-api", "[data-slide]", function (e) {
|
|
398
|
+
var $this = $(this),
|
|
399
|
+
href,
|
|
400
|
+
$target = $(
|
|
401
|
+
$this.attr("data-target") ||
|
|
402
|
+
((href = $this.attr("href")) && href.replace(/.*(?=#[^\s]+$)/, ""))
|
|
403
|
+
), //strip for ie7
|
|
404
|
+
options = $.extend({}, $target.data(), $this.data());
|
|
405
|
+
$target.carousel(options);
|
|
406
|
+
e.preventDefault();
|
|
407
|
+
});
|
|
408
|
+
})(window.jQuery);
|
|
409
|
+
/* =============================================================
|
|
416
410
|
* bootstrap-collapse.js v2.2.1
|
|
417
411
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
|
418
412
|
* =============================================================
|
|
@@ -431,143 +425,138 @@
|
|
|
431
425
|
* limitations under the License.
|
|
432
426
|
* ============================================================ */
|
|
433
427
|
|
|
434
|
-
|
|
435
|
-
!function ($) {
|
|
436
|
-
|
|
428
|
+
!(function ($) {
|
|
437
429
|
"use strict"; // jshint ;_;
|
|
438
430
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
* ================================ */
|
|
431
|
+
/* COLLAPSE PUBLIC CLASS DEFINITION
|
|
432
|
+
* ================================ */
|
|
442
433
|
|
|
443
434
|
var Collapse = function (element, options) {
|
|
444
|
-
this.$element = $(element)
|
|
445
|
-
this.options = $.extend({}, $.fn.collapse.defaults, options)
|
|
435
|
+
this.$element = $(element);
|
|
436
|
+
this.options = $.extend({}, $.fn.collapse.defaults, options);
|
|
446
437
|
|
|
447
438
|
if (this.options.parent) {
|
|
448
|
-
this.$parent = $(this.options.parent)
|
|
439
|
+
this.$parent = $(this.options.parent);
|
|
449
440
|
}
|
|
450
441
|
|
|
451
|
-
this.options.toggle && this.toggle()
|
|
452
|
-
}
|
|
442
|
+
this.options.toggle && this.toggle();
|
|
443
|
+
};
|
|
453
444
|
|
|
454
445
|
Collapse.prototype = {
|
|
446
|
+
constructor: Collapse,
|
|
455
447
|
|
|
456
|
-
|
|
448
|
+
dimension: function () {
|
|
449
|
+
var hasWidth = this.$element.hasClass("width");
|
|
450
|
+
return hasWidth ? "width" : "height";
|
|
451
|
+
},
|
|
457
452
|
|
|
458
|
-
|
|
459
|
-
var
|
|
460
|
-
return hasWidth ? 'width' : 'height'
|
|
461
|
-
}
|
|
453
|
+
show: function () {
|
|
454
|
+
var dimension, scroll, actives, hasData;
|
|
462
455
|
|
|
463
|
-
|
|
464
|
-
var dimension
|
|
465
|
-
, scroll
|
|
466
|
-
, actives
|
|
467
|
-
, hasData
|
|
456
|
+
if (this.transitioning) return;
|
|
468
457
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
scroll = $.camelCase(['scroll', dimension].join('-'))
|
|
473
|
-
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
|
|
458
|
+
dimension = this.dimension();
|
|
459
|
+
scroll = $.camelCase(["scroll", dimension].join("-"));
|
|
460
|
+
actives = this.$parent && this.$parent.find("> .accordion-group > .in");
|
|
474
461
|
|
|
475
462
|
if (actives && actives.length) {
|
|
476
|
-
hasData = actives.data(
|
|
477
|
-
if (hasData && hasData.transitioning) return
|
|
478
|
-
actives.collapse(
|
|
479
|
-
hasData || actives.data(
|
|
463
|
+
hasData = actives.data("collapse");
|
|
464
|
+
if (hasData && hasData.transitioning) return;
|
|
465
|
+
actives.collapse("hide");
|
|
466
|
+
hasData || actives.data("collapse", null);
|
|
480
467
|
}
|
|
481
468
|
|
|
482
|
-
this.$element[dimension](0)
|
|
483
|
-
this.transition(
|
|
484
|
-
$.support.transition &&
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
, hide: function () {
|
|
488
|
-
var dimension
|
|
489
|
-
if (this.transitioning) return
|
|
490
|
-
dimension = this.dimension()
|
|
491
|
-
this.reset(this.$element[dimension]())
|
|
492
|
-
this.transition('removeClass', $.Event('hide'), 'hidden')
|
|
493
|
-
this.$element[dimension](0)
|
|
494
|
-
}
|
|
469
|
+
this.$element[dimension](0);
|
|
470
|
+
this.transition("addClass", $.Event("show"), "shown");
|
|
471
|
+
$.support.transition &&
|
|
472
|
+
this.$element[dimension](this.$element[0][scroll]);
|
|
473
|
+
},
|
|
495
474
|
|
|
496
|
-
|
|
497
|
-
var dimension
|
|
475
|
+
hide: function () {
|
|
476
|
+
var dimension;
|
|
477
|
+
if (this.transitioning) return;
|
|
478
|
+
dimension = this.dimension();
|
|
479
|
+
this.reset(this.$element[dimension]());
|
|
480
|
+
this.transition("removeClass", $.Event("hide"), "hidden");
|
|
481
|
+
this.$element[dimension](0);
|
|
482
|
+
},
|
|
498
483
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
[dimension](size || 'auto')
|
|
502
|
-
[0].offsetWidth
|
|
484
|
+
reset: function (size) {
|
|
485
|
+
var dimension = this.dimension();
|
|
503
486
|
|
|
504
|
-
this.$element[size
|
|
505
|
-
|
|
506
|
-
return this
|
|
507
|
-
}
|
|
487
|
+
this.$element.removeClass("collapse")[dimension](size || "auto")[0]
|
|
488
|
+
.offsetWidth;
|
|
508
489
|
|
|
509
|
-
|
|
510
|
-
var that = this
|
|
511
|
-
, complete = function () {
|
|
512
|
-
if (startEvent.type == 'show') that.reset()
|
|
513
|
-
that.transitioning = 0
|
|
514
|
-
that.$element.trigger(completeEvent)
|
|
515
|
-
}
|
|
490
|
+
this.$element[size !== null ? "addClass" : "removeClass"]("collapse");
|
|
516
491
|
|
|
517
|
-
this
|
|
492
|
+
return this;
|
|
493
|
+
},
|
|
518
494
|
|
|
519
|
-
|
|
495
|
+
transition: function (method, startEvent, completeEvent) {
|
|
496
|
+
var that = this,
|
|
497
|
+
complete = function () {
|
|
498
|
+
if (startEvent.type == "show") that.reset();
|
|
499
|
+
that.transitioning = 0;
|
|
500
|
+
that.$element.trigger(completeEvent);
|
|
501
|
+
};
|
|
520
502
|
|
|
521
|
-
this.
|
|
503
|
+
this.$element.trigger(startEvent);
|
|
522
504
|
|
|
523
|
-
|
|
505
|
+
if (startEvent.isDefaultPrevented()) return;
|
|
524
506
|
|
|
525
|
-
|
|
526
|
-
this.$element.one($.support.transition.end, complete) :
|
|
527
|
-
complete()
|
|
528
|
-
}
|
|
507
|
+
this.transitioning = 1;
|
|
529
508
|
|
|
530
|
-
|
|
531
|
-
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
|
532
|
-
}
|
|
509
|
+
this.$element[method]("in");
|
|
533
510
|
|
|
534
|
-
|
|
511
|
+
$.support.transition && this.$element.hasClass("collapse")
|
|
512
|
+
? this.$element.one($.support.transition.end, complete)
|
|
513
|
+
: complete();
|
|
514
|
+
},
|
|
535
515
|
|
|
516
|
+
toggle: function () {
|
|
517
|
+
this[this.$element.hasClass("in") ? "hide" : "show"]();
|
|
518
|
+
},
|
|
519
|
+
};
|
|
536
520
|
|
|
537
|
-
|
|
538
|
-
|
|
521
|
+
/* COLLAPSIBLE PLUGIN DEFINITION
|
|
522
|
+
* ============================== */
|
|
539
523
|
|
|
540
524
|
$.fn.collapse = function (option) {
|
|
541
525
|
return this.each(function () {
|
|
542
|
-
var $this = $(this)
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
if (!data) $this.data(
|
|
546
|
-
if (typeof option ==
|
|
547
|
-
})
|
|
548
|
-
}
|
|
526
|
+
var $this = $(this),
|
|
527
|
+
data = $this.data("collapse"),
|
|
528
|
+
options = typeof option == "object" && option;
|
|
529
|
+
if (!data) $this.data("collapse", (data = new Collapse(this, options)));
|
|
530
|
+
if (typeof option == "string") data[option]();
|
|
531
|
+
});
|
|
532
|
+
};
|
|
549
533
|
|
|
550
534
|
$.fn.collapse.defaults = {
|
|
551
|
-
toggle: true
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
$.fn.collapse.Constructor = Collapse
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
535
|
+
toggle: true,
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
$.fn.collapse.Constructor = Collapse;
|
|
539
|
+
|
|
540
|
+
/* COLLAPSIBLE DATA-API
|
|
541
|
+
* ==================== */
|
|
542
|
+
|
|
543
|
+
$(document).on(
|
|
544
|
+
"click.collapse.data-api",
|
|
545
|
+
"[data-toggle=collapse]",
|
|
546
|
+
function (e) {
|
|
547
|
+
var $this = $(this),
|
|
548
|
+
href,
|
|
549
|
+
target =
|
|
550
|
+
$this.attr("data-target") ||
|
|
551
|
+
e.preventDefault() ||
|
|
552
|
+
((href = $this.attr("href")) && href.replace(/.*(?=#[^\s]+$)/, "")), //strip for ie7
|
|
553
|
+
option = $(target).data("collapse") ? "toggle" : $this.data();
|
|
554
|
+
$this[$(target).hasClass("in") ? "addClass" : "removeClass"]("collapsed");
|
|
555
|
+
$(target).collapse(option);
|
|
556
|
+
}
|
|
557
|
+
);
|
|
558
|
+
})(window.jQuery);
|
|
559
|
+
/* ============================================================
|
|
571
560
|
* bootstrap-dropdown.js v2.2.1
|
|
572
561
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
|
573
562
|
* ============================================================
|
|
@@ -586,135 +575,138 @@
|
|
|
586
575
|
* limitations under the License.
|
|
587
576
|
* ============================================================ */
|
|
588
577
|
|
|
589
|
-
|
|
590
|
-
!function ($) {
|
|
591
|
-
|
|
578
|
+
!(function ($) {
|
|
592
579
|
"use strict"; // jshint ;_;
|
|
593
580
|
|
|
581
|
+
/* DROPDOWN CLASS DEFINITION
|
|
582
|
+
* ========================= */
|
|
594
583
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
$el.parent().removeClass('open')
|
|
603
|
-
})
|
|
604
|
-
}
|
|
584
|
+
var toggle = "[data-toggle=dropdown]",
|
|
585
|
+
Dropdown = function (element) {
|
|
586
|
+
var $el = $(element).on("click.dropdown.data-api", this.toggle);
|
|
587
|
+
$("html").on("click.dropdown.data-api", function () {
|
|
588
|
+
$el.parent().removeClass("open");
|
|
589
|
+
});
|
|
590
|
+
};
|
|
605
591
|
|
|
606
592
|
Dropdown.prototype = {
|
|
593
|
+
constructor: Dropdown,
|
|
607
594
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
, $parent
|
|
613
|
-
, isActive
|
|
595
|
+
toggle: function (e) {
|
|
596
|
+
var $this = $(this),
|
|
597
|
+
$parent,
|
|
598
|
+
isActive;
|
|
614
599
|
|
|
615
|
-
if ($this.is(
|
|
600
|
+
if ($this.is(".disabled, :disabled")) return;
|
|
616
601
|
|
|
617
|
-
$parent = getParent($this)
|
|
602
|
+
$parent = getParent($this);
|
|
618
603
|
|
|
619
|
-
isActive = $parent.hasClass(
|
|
604
|
+
isActive = $parent.hasClass("open");
|
|
620
605
|
|
|
621
|
-
clearMenus()
|
|
606
|
+
clearMenus();
|
|
622
607
|
|
|
623
608
|
if (!isActive) {
|
|
624
|
-
$parent.toggleClass(
|
|
625
|
-
$this.focus()
|
|
609
|
+
$parent.toggleClass("open");
|
|
610
|
+
$this.focus();
|
|
626
611
|
}
|
|
627
612
|
|
|
628
|
-
return false
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
, keydown: function (e) {
|
|
632
|
-
var $this
|
|
633
|
-
, $items
|
|
634
|
-
, $active
|
|
635
|
-
, $parent
|
|
636
|
-
, isActive
|
|
637
|
-
, index
|
|
613
|
+
return false;
|
|
614
|
+
},
|
|
638
615
|
|
|
639
|
-
|
|
616
|
+
keydown: function (e) {
|
|
617
|
+
var $this, $items, $active, $parent, isActive, index;
|
|
640
618
|
|
|
641
|
-
|
|
619
|
+
if (!/(38|40|27)/.test(e.keyCode)) return;
|
|
642
620
|
|
|
643
|
-
|
|
644
|
-
e.stopPropagation()
|
|
621
|
+
$this = $(this);
|
|
645
622
|
|
|
646
|
-
|
|
623
|
+
e.preventDefault();
|
|
624
|
+
e.stopPropagation();
|
|
647
625
|
|
|
648
|
-
|
|
626
|
+
if ($this.is(".disabled, :disabled")) return;
|
|
649
627
|
|
|
650
|
-
|
|
628
|
+
$parent = getParent($this);
|
|
651
629
|
|
|
652
|
-
|
|
630
|
+
isActive = $parent.hasClass("open");
|
|
653
631
|
|
|
654
|
-
|
|
632
|
+
if (!isActive || (isActive && e.keyCode == 27)) return $this.click();
|
|
655
633
|
|
|
656
|
-
|
|
634
|
+
$items = $("[role=menu] li:not(.divider) a", $parent);
|
|
657
635
|
|
|
658
|
-
|
|
636
|
+
if (!$items.length) return;
|
|
659
637
|
|
|
660
|
-
|
|
661
|
-
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
|
|
662
|
-
if (!~index) index = 0
|
|
638
|
+
index = $items.index($items.filter(":focus"));
|
|
663
639
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
}
|
|
640
|
+
if (e.keyCode == 38 && index > 0) index--; // up
|
|
641
|
+
if (e.keyCode == 40 && index < $items.length - 1) index++; // down
|
|
642
|
+
if (!~index) index = 0;
|
|
668
643
|
|
|
669
|
-
|
|
644
|
+
$items.eq(index).focus();
|
|
645
|
+
},
|
|
646
|
+
};
|
|
670
647
|
|
|
671
648
|
function clearMenus() {
|
|
672
649
|
$(toggle).each(function () {
|
|
673
|
-
getParent($(this)).removeClass(
|
|
674
|
-
})
|
|
650
|
+
getParent($(this)).removeClass("open");
|
|
651
|
+
});
|
|
675
652
|
}
|
|
676
653
|
|
|
677
654
|
function getParent($this) {
|
|
678
|
-
var selector = $this.attr(
|
|
679
|
-
|
|
655
|
+
var selector = $this.attr("data-target"),
|
|
656
|
+
$parent;
|
|
680
657
|
|
|
681
658
|
if (!selector) {
|
|
682
|
-
selector = $this.attr(
|
|
683
|
-
selector =
|
|
659
|
+
selector = $this.attr("href");
|
|
660
|
+
selector =
|
|
661
|
+
selector &&
|
|
662
|
+
/#/.test(selector) &&
|
|
663
|
+
selector.replace(/.*(?=#[^\s]*$)/, ""); //strip for ie7
|
|
684
664
|
}
|
|
685
665
|
|
|
686
|
-
$parent = $(selector)
|
|
687
|
-
$parent.length || ($parent = $this.parent())
|
|
666
|
+
$parent = $(selector);
|
|
667
|
+
$parent.length || ($parent = $this.parent());
|
|
688
668
|
|
|
689
|
-
return $parent
|
|
669
|
+
return $parent;
|
|
690
670
|
}
|
|
691
671
|
|
|
692
|
-
|
|
693
672
|
/* DROPDOWN PLUGIN DEFINITION
|
|
694
673
|
* ========================== */
|
|
695
674
|
|
|
696
675
|
$.fn.dropdown = function (option) {
|
|
697
676
|
return this.each(function () {
|
|
698
|
-
var $this = $(this)
|
|
699
|
-
|
|
700
|
-
if (!data) $this.data(
|
|
701
|
-
if (typeof option ==
|
|
702
|
-
})
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
$.fn.dropdown.Constructor = Dropdown
|
|
677
|
+
var $this = $(this),
|
|
678
|
+
data = $this.data("dropdown");
|
|
679
|
+
if (!data) $this.data("dropdown", (data = new Dropdown(this)));
|
|
680
|
+
if (typeof option == "string") data[option].call($this);
|
|
681
|
+
});
|
|
682
|
+
};
|
|
706
683
|
|
|
684
|
+
$.fn.dropdown.Constructor = Dropdown;
|
|
707
685
|
|
|
708
686
|
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
|
709
687
|
* =================================== */
|
|
710
688
|
|
|
711
689
|
$(document)
|
|
712
|
-
.on(
|
|
713
|
-
.on(
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
690
|
+
.on("click.dropdown.data-api touchstart.dropdown.data-api", clearMenus)
|
|
691
|
+
.on(
|
|
692
|
+
"click.dropdown touchstart.dropdown.data-api",
|
|
693
|
+
".dropdown form",
|
|
694
|
+
function (e) {
|
|
695
|
+
e.stopPropagation();
|
|
696
|
+
}
|
|
697
|
+
)
|
|
698
|
+
.on(
|
|
699
|
+
"click.dropdown.data-api touchstart.dropdown.data-api",
|
|
700
|
+
toggle,
|
|
701
|
+
Dropdown.prototype.toggle
|
|
702
|
+
)
|
|
703
|
+
.on(
|
|
704
|
+
"keydown.dropdown.data-api touchstart.dropdown.data-api",
|
|
705
|
+
toggle + ", [role=menu]",
|
|
706
|
+
Dropdown.prototype.keydown
|
|
707
|
+
);
|
|
708
|
+
})(window.jQuery);
|
|
709
|
+
/* =========================================================
|
|
718
710
|
* bootstrap-modal.js v2.2.1
|
|
719
711
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
|
720
712
|
* =========================================================
|
|
@@ -733,221 +725,229 @@
|
|
|
733
725
|
* limitations under the License.
|
|
734
726
|
* ========================================================= */
|
|
735
727
|
|
|
736
|
-
|
|
737
|
-
!function ($) {
|
|
738
|
-
|
|
728
|
+
!(function ($) {
|
|
739
729
|
"use strict"; // jshint ;_;
|
|
740
730
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
* ====================== */
|
|
731
|
+
/* MODAL CLASS DEFINITION
|
|
732
|
+
* ====================== */
|
|
744
733
|
|
|
745
734
|
var Modal = function (element, options) {
|
|
746
|
-
this.options = options
|
|
747
|
-
this.$element = $(element)
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
735
|
+
this.options = options;
|
|
736
|
+
this.$element = $(element).delegate(
|
|
737
|
+
'[data-dismiss="modal"]',
|
|
738
|
+
"click.dismiss.modal",
|
|
739
|
+
$.proxy(this.hide, this)
|
|
740
|
+
);
|
|
741
|
+
this.options.remote &&
|
|
742
|
+
this.$element.find(".modal-body").load(this.options.remote);
|
|
743
|
+
};
|
|
751
744
|
|
|
752
745
|
Modal.prototype = {
|
|
746
|
+
constructor: Modal,
|
|
753
747
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
,
|
|
757
|
-
return this[!this.isShown ? 'show' : 'hide']()
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
, show: function () {
|
|
761
|
-
var that = this
|
|
762
|
-
, e = $.Event('show')
|
|
763
|
-
|
|
764
|
-
this.$element.trigger(e)
|
|
748
|
+
toggle: function () {
|
|
749
|
+
return this[!this.isShown ? "show" : "hide"]();
|
|
750
|
+
},
|
|
765
751
|
|
|
766
|
-
|
|
752
|
+
show: function () {
|
|
753
|
+
var that = this,
|
|
754
|
+
e = $.Event("show");
|
|
767
755
|
|
|
768
|
-
|
|
756
|
+
this.$element.trigger(e);
|
|
769
757
|
|
|
770
|
-
|
|
758
|
+
if (this.isShown || e.isDefaultPrevented()) return;
|
|
771
759
|
|
|
772
|
-
|
|
773
|
-
var transition = $.support.transition && that.$element.hasClass('fade')
|
|
760
|
+
this.isShown = true;
|
|
774
761
|
|
|
775
|
-
|
|
776
|
-
that.$element.appendTo(document.body) //don't move modals dom position
|
|
777
|
-
}
|
|
762
|
+
this.escape();
|
|
778
763
|
|
|
779
|
-
|
|
780
|
-
|
|
764
|
+
this.backdrop(function () {
|
|
765
|
+
var transition = $.support.transition && that.$element.hasClass("fade");
|
|
781
766
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
767
|
+
if (!that.$element.parent().length) {
|
|
768
|
+
that.$element.appendTo(document.body); //don't move modals dom position
|
|
769
|
+
}
|
|
785
770
|
|
|
786
|
-
|
|
787
|
-
.addClass('in')
|
|
788
|
-
.attr('aria-hidden', false)
|
|
771
|
+
that.$element.show();
|
|
789
772
|
|
|
790
|
-
|
|
773
|
+
if (transition) {
|
|
774
|
+
that.$element[0].offsetWidth; // force reflow
|
|
775
|
+
}
|
|
791
776
|
|
|
792
|
-
|
|
793
|
-
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
|
794
|
-
that.$element.focus().trigger('shown')
|
|
777
|
+
that.$element.addClass("in").attr("aria-hidden", false);
|
|
795
778
|
|
|
796
|
-
|
|
797
|
-
}
|
|
779
|
+
that.enforceFocus();
|
|
798
780
|
|
|
799
|
-
|
|
800
|
-
|
|
781
|
+
transition
|
|
782
|
+
? that.$element.one($.support.transition.end, function () {
|
|
783
|
+
that.$element.focus().trigger("shown");
|
|
784
|
+
})
|
|
785
|
+
: that.$element.focus().trigger("shown");
|
|
786
|
+
});
|
|
787
|
+
},
|
|
801
788
|
|
|
802
|
-
|
|
789
|
+
hide: function (e) {
|
|
790
|
+
e && e.preventDefault();
|
|
803
791
|
|
|
804
|
-
|
|
792
|
+
var that = this;
|
|
805
793
|
|
|
806
|
-
|
|
794
|
+
e = $.Event("hide");
|
|
807
795
|
|
|
808
|
-
|
|
796
|
+
this.$element.trigger(e);
|
|
809
797
|
|
|
810
|
-
|
|
798
|
+
if (!this.isShown || e.isDefaultPrevented()) return;
|
|
811
799
|
|
|
812
|
-
|
|
800
|
+
this.isShown = false;
|
|
813
801
|
|
|
814
|
-
|
|
802
|
+
this.escape();
|
|
815
803
|
|
|
816
|
-
|
|
817
|
-
.removeClass('in')
|
|
818
|
-
.attr('aria-hidden', true)
|
|
804
|
+
$(document).off("focusin.modal");
|
|
819
805
|
|
|
820
|
-
|
|
821
|
-
this.hideWithTransition() :
|
|
822
|
-
this.hideModal()
|
|
823
|
-
}
|
|
806
|
+
this.$element.removeClass("in").attr("aria-hidden", true);
|
|
824
807
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
that.$element.focus()
|
|
830
|
-
}
|
|
831
|
-
})
|
|
832
|
-
}
|
|
808
|
+
$.support.transition && this.$element.hasClass("fade")
|
|
809
|
+
? this.hideWithTransition()
|
|
810
|
+
: this.hideModal();
|
|
811
|
+
},
|
|
833
812
|
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
813
|
+
enforceFocus: function () {
|
|
814
|
+
var that = this;
|
|
815
|
+
$(document).on("focusin.modal", function (e) {
|
|
816
|
+
if (
|
|
817
|
+
that.$element[0] !== e.target &&
|
|
818
|
+
!that.$element.has(e.target).length
|
|
819
|
+
) {
|
|
820
|
+
that.$element.focus();
|
|
842
821
|
}
|
|
822
|
+
});
|
|
823
|
+
},
|
|
824
|
+
|
|
825
|
+
escape: function () {
|
|
826
|
+
var that = this;
|
|
827
|
+
if (this.isShown && this.options.keyboard) {
|
|
828
|
+
this.$element.on("keyup.dismiss.modal", function (e) {
|
|
829
|
+
e.which == 27 && that.hide();
|
|
830
|
+
});
|
|
831
|
+
} else if (!this.isShown) {
|
|
832
|
+
this.$element.off("keyup.dismiss.modal");
|
|
843
833
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
834
|
+
},
|
|
835
|
+
|
|
836
|
+
hideWithTransition: function () {
|
|
837
|
+
var that = this,
|
|
838
|
+
timeout = setTimeout(function () {
|
|
839
|
+
that.$element.off($.support.transition.end);
|
|
840
|
+
that.hideModal();
|
|
841
|
+
}, 500);
|
|
842
|
+
|
|
843
|
+
this.$element.one($.support.transition.end, function () {
|
|
844
|
+
clearTimeout(timeout);
|
|
845
|
+
that.hideModal();
|
|
846
|
+
});
|
|
847
|
+
},
|
|
848
|
+
|
|
849
|
+
hideModal: function (that) {
|
|
850
|
+
this.$element.hide().trigger("hidden");
|
|
851
|
+
|
|
852
|
+
this.backdrop();
|
|
853
|
+
},
|
|
854
|
+
|
|
855
|
+
removeBackdrop: function () {
|
|
856
|
+
this.$backdrop.remove();
|
|
857
|
+
this.$backdrop = null;
|
|
858
|
+
},
|
|
859
|
+
|
|
860
|
+
backdrop: function (callback) {
|
|
861
|
+
var that = this,
|
|
862
|
+
animate = this.$element.hasClass("fade") ? "fade" : "";
|
|
863
|
+
|
|
864
|
+
if (this.isShown && this.options.backdrop) {
|
|
865
|
+
var doAnimate = $.support.transition && animate;
|
|
866
|
+
|
|
867
|
+
this.$backdrop = $(
|
|
868
|
+
'<div class="modal-backdrop ' + animate + '" />'
|
|
869
|
+
).appendTo(document.body);
|
|
870
|
+
|
|
871
|
+
this.$backdrop.click(
|
|
872
|
+
this.options.backdrop == "static"
|
|
873
|
+
? $.proxy(this.$element[0].focus, this.$element[0])
|
|
884
874
|
: $.proxy(this.hide, this)
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
875
|
+
);
|
|
876
|
+
|
|
877
|
+
if (doAnimate) this.$backdrop[0].offsetWidth; // force reflow
|
|
878
|
+
|
|
879
|
+
this.$backdrop.addClass("in");
|
|
880
|
+
|
|
881
|
+
doAnimate
|
|
882
|
+
? this.$backdrop.one($.support.transition.end, callback)
|
|
883
|
+
: callback();
|
|
884
|
+
} else if (!this.isShown && this.$backdrop) {
|
|
885
|
+
this.$backdrop.removeClass("in");
|
|
886
|
+
|
|
887
|
+
$.support.transition && this.$element.hasClass("fade")
|
|
888
|
+
? this.$backdrop.one(
|
|
889
|
+
$.support.transition.end,
|
|
890
|
+
$.proxy(this.removeBackdrop, this)
|
|
891
|
+
)
|
|
892
|
+
: this.removeBackdrop();
|
|
893
|
+
} else if (callback) {
|
|
894
|
+
callback();
|
|
905
895
|
}
|
|
906
|
-
|
|
896
|
+
},
|
|
897
|
+
};
|
|
907
898
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
* ======================= */
|
|
899
|
+
/* MODAL PLUGIN DEFINITION
|
|
900
|
+
* ======================= */
|
|
911
901
|
|
|
912
902
|
$.fn.modal = function (option) {
|
|
913
903
|
return this.each(function () {
|
|
914
|
-
var $this = $(this)
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
904
|
+
var $this = $(this),
|
|
905
|
+
data = $this.data("modal"),
|
|
906
|
+
options = $.extend(
|
|
907
|
+
{},
|
|
908
|
+
$.fn.modal.defaults,
|
|
909
|
+
$this.data(),
|
|
910
|
+
typeof option == "object" && option
|
|
911
|
+
);
|
|
912
|
+
if (!data) $this.data("modal", (data = new Modal(this, options)));
|
|
913
|
+
if (typeof option == "string") data[option]();
|
|
914
|
+
else if (options.show) data.show();
|
|
915
|
+
});
|
|
916
|
+
};
|
|
922
917
|
|
|
923
918
|
$.fn.modal.defaults = {
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
$.fn.modal.Constructor = Modal
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
919
|
+
backdrop: true,
|
|
920
|
+
keyboard: true,
|
|
921
|
+
show: true,
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
$.fn.modal.Constructor = Modal;
|
|
925
|
+
|
|
926
|
+
/* MODAL DATA-API
|
|
927
|
+
* ============== */
|
|
928
|
+
|
|
929
|
+
$(document).on("click.modal.data-api", '[data-toggle="modal"]', function (e) {
|
|
930
|
+
var $this = $(this),
|
|
931
|
+
href = $this.attr("href"),
|
|
932
|
+
$target = $(
|
|
933
|
+
$this.attr("data-target") ||
|
|
934
|
+
(href && href.replace(/.*(?=#[^\s]+$)/, ""))
|
|
935
|
+
), //strip for ie7
|
|
936
|
+
option = $target.data("modal")
|
|
937
|
+
? "toggle"
|
|
938
|
+
: $.extend(
|
|
939
|
+
{ remote: !/#/.test(href) && href },
|
|
940
|
+
$target.data(),
|
|
941
|
+
$this.data()
|
|
942
|
+
);
|
|
943
|
+
|
|
944
|
+
e.preventDefault();
|
|
945
|
+
|
|
946
|
+
$target.modal(option).one("hide", function () {
|
|
947
|
+
$this.focus();
|
|
948
|
+
});
|
|
949
|
+
});
|
|
950
|
+
})(window.jQuery);
|
|
951
951
|
/* ===========================================================
|
|
952
952
|
* bootstrap-tooltip.js v2.2.1
|
|
953
953
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
|
@@ -968,262 +968,292 @@
|
|
|
968
968
|
* limitations under the License.
|
|
969
969
|
* ========================================================== */
|
|
970
970
|
|
|
971
|
-
|
|
972
|
-
!function ($) {
|
|
973
|
-
|
|
971
|
+
!(function ($) {
|
|
974
972
|
"use strict"; // jshint ;_;
|
|
975
973
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
* =============================== */
|
|
974
|
+
/* TOOLTIP PUBLIC CLASS DEFINITION
|
|
975
|
+
* =============================== */
|
|
979
976
|
|
|
980
977
|
var Tooltip = function (element, options) {
|
|
981
|
-
this.init(
|
|
982
|
-
}
|
|
978
|
+
this.init("tooltip", element, options);
|
|
979
|
+
};
|
|
983
980
|
|
|
984
981
|
Tooltip.prototype = {
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
this.
|
|
993
|
-
this
|
|
994
|
-
|
|
995
|
-
this.
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
982
|
+
constructor: Tooltip,
|
|
983
|
+
|
|
984
|
+
init: function (type, element, options) {
|
|
985
|
+
var eventIn, eventOut;
|
|
986
|
+
|
|
987
|
+
this.type = type;
|
|
988
|
+
this.$element = $(element);
|
|
989
|
+
this.options = this.getOptions(options);
|
|
990
|
+
this.enabled = true;
|
|
991
|
+
|
|
992
|
+
if (this.options.trigger == "click") {
|
|
993
|
+
this.$element.on(
|
|
994
|
+
"click." + this.type,
|
|
995
|
+
this.options.selector,
|
|
996
|
+
$.proxy(this.toggle, this)
|
|
997
|
+
);
|
|
998
|
+
} else if (this.options.trigger != "manual") {
|
|
999
|
+
eventIn = this.options.trigger == "hover" ? "mouseenter" : "focus";
|
|
1000
|
+
eventOut = this.options.trigger == "hover" ? "mouseleave" : "blur";
|
|
1001
|
+
this.$element.on(
|
|
1002
|
+
eventIn + "." + this.type,
|
|
1003
|
+
this.options.selector,
|
|
1004
|
+
$.proxy(this.enter, this)
|
|
1005
|
+
);
|
|
1006
|
+
this.$element.on(
|
|
1007
|
+
eventOut + "." + this.type,
|
|
1008
|
+
this.options.selector,
|
|
1009
|
+
$.proxy(this.leave, this)
|
|
1010
|
+
);
|
|
1004
1011
|
}
|
|
1005
1012
|
|
|
1006
|
-
this.options.selector
|
|
1007
|
-
(this._options = $.extend({}, this.options, {
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1013
|
+
this.options.selector
|
|
1014
|
+
? (this._options = $.extend({}, this.options, {
|
|
1015
|
+
trigger: "manual",
|
|
1016
|
+
selector: "",
|
|
1017
|
+
}))
|
|
1018
|
+
: this.fixTitle();
|
|
1019
|
+
},
|
|
1020
|
+
|
|
1021
|
+
getOptions: function (options) {
|
|
1022
|
+
options = $.extend(
|
|
1023
|
+
{},
|
|
1024
|
+
$.fn[this.type].defaults,
|
|
1025
|
+
options,
|
|
1026
|
+
this.$element.data()
|
|
1027
|
+
);
|
|
1028
|
+
|
|
1029
|
+
if (options.delay && typeof options.delay == "number") {
|
|
1015
1030
|
options.delay = {
|
|
1016
|
-
show: options.delay
|
|
1017
|
-
|
|
1018
|
-
}
|
|
1031
|
+
show: options.delay,
|
|
1032
|
+
hide: options.delay,
|
|
1033
|
+
};
|
|
1019
1034
|
}
|
|
1020
1035
|
|
|
1021
|
-
return options
|
|
1022
|
-
}
|
|
1036
|
+
return options;
|
|
1037
|
+
},
|
|
1023
1038
|
|
|
1024
|
-
|
|
1025
|
-
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
|
1039
|
+
enter: function (e) {
|
|
1040
|
+
var self = $(e.currentTarget)[this.type](this._options).data(this.type);
|
|
1026
1041
|
|
|
1027
|
-
if (!self.options.delay || !self.options.delay.show) return self.show()
|
|
1042
|
+
if (!self.options.delay || !self.options.delay.show) return self.show();
|
|
1028
1043
|
|
|
1029
|
-
clearTimeout(this.timeout)
|
|
1030
|
-
self.hoverState =
|
|
1031
|
-
this.timeout = setTimeout(function() {
|
|
1032
|
-
if (self.hoverState ==
|
|
1033
|
-
}, self.options.delay.show)
|
|
1034
|
-
}
|
|
1044
|
+
clearTimeout(this.timeout);
|
|
1045
|
+
self.hoverState = "in";
|
|
1046
|
+
this.timeout = setTimeout(function () {
|
|
1047
|
+
if (self.hoverState == "in") self.show();
|
|
1048
|
+
}, self.options.delay.show);
|
|
1049
|
+
},
|
|
1035
1050
|
|
|
1036
|
-
|
|
1037
|
-
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
|
1051
|
+
leave: function (e) {
|
|
1052
|
+
var self = $(e.currentTarget)[this.type](this._options).data(this.type);
|
|
1038
1053
|
|
|
1039
|
-
if (this.timeout) clearTimeout(this.timeout)
|
|
1040
|
-
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
|
1054
|
+
if (this.timeout) clearTimeout(this.timeout);
|
|
1055
|
+
if (!self.options.delay || !self.options.delay.hide) return self.hide();
|
|
1041
1056
|
|
|
1042
|
-
self.hoverState =
|
|
1043
|
-
this.timeout = setTimeout(function() {
|
|
1044
|
-
if (self.hoverState ==
|
|
1045
|
-
}, self.options.delay.hide)
|
|
1046
|
-
}
|
|
1057
|
+
self.hoverState = "out";
|
|
1058
|
+
this.timeout = setTimeout(function () {
|
|
1059
|
+
if (self.hoverState == "out") self.hide();
|
|
1060
|
+
}, self.options.delay.hide);
|
|
1061
|
+
},
|
|
1047
1062
|
|
|
1048
|
-
|
|
1049
|
-
var $tip
|
|
1050
|
-
, inside
|
|
1051
|
-
, pos
|
|
1052
|
-
, actualWidth
|
|
1053
|
-
, actualHeight
|
|
1054
|
-
, placement
|
|
1055
|
-
, tp
|
|
1063
|
+
show: function () {
|
|
1064
|
+
var $tip, inside, pos, actualWidth, actualHeight, placement, tp;
|
|
1056
1065
|
|
|
1057
1066
|
if (this.hasContent() && this.enabled) {
|
|
1058
|
-
$tip = this.tip()
|
|
1059
|
-
this.setContent()
|
|
1067
|
+
$tip = this.tip();
|
|
1068
|
+
this.setContent();
|
|
1060
1069
|
|
|
1061
1070
|
if (this.options.animation) {
|
|
1062
|
-
$tip.addClass(
|
|
1071
|
+
$tip.addClass("fade");
|
|
1063
1072
|
}
|
|
1064
1073
|
|
|
1065
|
-
placement =
|
|
1066
|
-
this.options.placement
|
|
1067
|
-
|
|
1074
|
+
placement =
|
|
1075
|
+
typeof this.options.placement == "function"
|
|
1076
|
+
? this.options.placement.call(this, $tip[0], this.$element[0])
|
|
1077
|
+
: this.options.placement;
|
|
1068
1078
|
|
|
1069
|
-
inside = /in/.test(placement)
|
|
1079
|
+
inside = /in/.test(placement);
|
|
1070
1080
|
|
|
1071
1081
|
$tip
|
|
1072
1082
|
.detach()
|
|
1073
|
-
.css({ top: 0, left: 0, display:
|
|
1074
|
-
.insertAfter(this.$element)
|
|
1075
|
-
|
|
1076
|
-
pos = this.getPosition(inside)
|
|
1077
|
-
|
|
1078
|
-
actualWidth = $tip[0].offsetWidth
|
|
1079
|
-
actualHeight = $tip[0].offsetHeight
|
|
1080
|
-
|
|
1081
|
-
switch (inside ? placement.split(
|
|
1082
|
-
case
|
|
1083
|
-
tp = {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
break
|
|
1088
|
-
case
|
|
1089
|
-
tp = {
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
break
|
|
1083
|
+
.css({ top: 0, left: 0, display: "block" })
|
|
1084
|
+
.insertAfter(this.$element);
|
|
1085
|
+
|
|
1086
|
+
pos = this.getPosition(inside);
|
|
1087
|
+
|
|
1088
|
+
actualWidth = $tip[0].offsetWidth;
|
|
1089
|
+
actualHeight = $tip[0].offsetHeight;
|
|
1090
|
+
|
|
1091
|
+
switch (inside ? placement.split(" ")[1] : placement) {
|
|
1092
|
+
case "bottom":
|
|
1093
|
+
tp = {
|
|
1094
|
+
top: pos.top + pos.height,
|
|
1095
|
+
left: pos.left + pos.width / 2 - actualWidth / 2,
|
|
1096
|
+
};
|
|
1097
|
+
break;
|
|
1098
|
+
case "top":
|
|
1099
|
+
tp = {
|
|
1100
|
+
top: pos.top - actualHeight,
|
|
1101
|
+
left: pos.left + pos.width / 2 - actualWidth / 2,
|
|
1102
|
+
};
|
|
1103
|
+
break;
|
|
1104
|
+
case "left":
|
|
1105
|
+
tp = {
|
|
1106
|
+
top: pos.top + pos.height / 2 - actualHeight / 2,
|
|
1107
|
+
left: pos.left - actualWidth,
|
|
1108
|
+
};
|
|
1109
|
+
break;
|
|
1110
|
+
case "right":
|
|
1111
|
+
tp = {
|
|
1112
|
+
top: pos.top + pos.height / 2 - actualHeight / 2,
|
|
1113
|
+
left: pos.left + pos.width,
|
|
1114
|
+
};
|
|
1115
|
+
break;
|
|
1094
1116
|
}
|
|
1095
1117
|
|
|
1096
|
-
$tip
|
|
1097
|
-
.offset(tp)
|
|
1098
|
-
.addClass(placement)
|
|
1099
|
-
.addClass('in')
|
|
1118
|
+
$tip.offset(tp).addClass(placement).addClass("in");
|
|
1100
1119
|
}
|
|
1101
|
-
}
|
|
1120
|
+
},
|
|
1102
1121
|
|
|
1103
|
-
|
|
1104
|
-
var $tip = this.tip()
|
|
1105
|
-
|
|
1122
|
+
setContent: function () {
|
|
1123
|
+
var $tip = this.tip(),
|
|
1124
|
+
title = this.getTitle();
|
|
1106
1125
|
|
|
1107
|
-
$tip.find(
|
|
1108
|
-
$tip.removeClass(
|
|
1109
|
-
}
|
|
1126
|
+
$tip.find(".tooltip-inner")[this.options.html ? "html" : "text"](title);
|
|
1127
|
+
$tip.removeClass("fade in top bottom left right");
|
|
1128
|
+
},
|
|
1110
1129
|
|
|
1111
|
-
|
|
1112
|
-
var that = this
|
|
1113
|
-
|
|
1130
|
+
hide: function () {
|
|
1131
|
+
var that = this,
|
|
1132
|
+
$tip = this.tip();
|
|
1114
1133
|
|
|
1115
|
-
$tip.removeClass(
|
|
1134
|
+
$tip.removeClass("in");
|
|
1116
1135
|
|
|
1117
1136
|
function removeWithAnimation() {
|
|
1118
1137
|
var timeout = setTimeout(function () {
|
|
1119
|
-
$tip.off($.support.transition.end).detach()
|
|
1120
|
-
}, 500)
|
|
1138
|
+
$tip.off($.support.transition.end).detach();
|
|
1139
|
+
}, 500);
|
|
1121
1140
|
|
|
1122
1141
|
$tip.one($.support.transition.end, function () {
|
|
1123
|
-
clearTimeout(timeout)
|
|
1124
|
-
$tip.detach()
|
|
1125
|
-
})
|
|
1142
|
+
clearTimeout(timeout);
|
|
1143
|
+
$tip.detach();
|
|
1144
|
+
});
|
|
1126
1145
|
}
|
|
1127
1146
|
|
|
1128
|
-
$.support.transition && this.$tip.hasClass(
|
|
1129
|
-
removeWithAnimation()
|
|
1130
|
-
$tip.detach()
|
|
1131
|
-
|
|
1132
|
-
return this
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
var $e = this.$element
|
|
1137
|
-
if (
|
|
1138
|
-
$e.attr(
|
|
1147
|
+
$.support.transition && this.$tip.hasClass("fade")
|
|
1148
|
+
? removeWithAnimation()
|
|
1149
|
+
: $tip.detach();
|
|
1150
|
+
|
|
1151
|
+
return this;
|
|
1152
|
+
},
|
|
1153
|
+
|
|
1154
|
+
fixTitle: function () {
|
|
1155
|
+
var $e = this.$element;
|
|
1156
|
+
if (
|
|
1157
|
+
$e.attr("title") ||
|
|
1158
|
+
typeof $e.attr("data-original-title") != "string"
|
|
1159
|
+
) {
|
|
1160
|
+
$e.attr("data-original-title", $e.attr("title") || "").removeAttr(
|
|
1161
|
+
"title"
|
|
1162
|
+
);
|
|
1139
1163
|
}
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
return this.getTitle()
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
return $.extend(
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1164
|
+
},
|
|
1165
|
+
|
|
1166
|
+
hasContent: function () {
|
|
1167
|
+
return this.getTitle();
|
|
1168
|
+
},
|
|
1169
|
+
|
|
1170
|
+
getPosition: function (inside) {
|
|
1171
|
+
return $.extend(
|
|
1172
|
+
{},
|
|
1173
|
+
inside ? { top: 0, left: 0 } : this.$element.offset(),
|
|
1174
|
+
{
|
|
1175
|
+
width: this.$element[0].offsetWidth,
|
|
1176
|
+
height: this.$element[0].offsetHeight,
|
|
1177
|
+
}
|
|
1178
|
+
);
|
|
1179
|
+
},
|
|
1152
1180
|
|
|
1153
|
-
|
|
1154
|
-
var title
|
|
1155
|
-
|
|
1156
|
-
|
|
1181
|
+
getTitle: function () {
|
|
1182
|
+
var title,
|
|
1183
|
+
$e = this.$element,
|
|
1184
|
+
o = this.options;
|
|
1157
1185
|
|
|
1158
|
-
title =
|
|
1159
|
-
|
|
1186
|
+
title =
|
|
1187
|
+
$e.attr("data-original-title") ||
|
|
1188
|
+
(typeof o.title == "function" ? o.title.call($e[0]) : o.title);
|
|
1160
1189
|
|
|
1161
|
-
return title
|
|
1162
|
-
}
|
|
1190
|
+
return title;
|
|
1191
|
+
},
|
|
1163
1192
|
|
|
1164
|
-
|
|
1165
|
-
return this.$tip = this.$tip || $(this.options.template)
|
|
1166
|
-
}
|
|
1193
|
+
tip: function () {
|
|
1194
|
+
return (this.$tip = this.$tip || $(this.options.template));
|
|
1195
|
+
},
|
|
1167
1196
|
|
|
1168
|
-
|
|
1197
|
+
validate: function () {
|
|
1169
1198
|
if (!this.$element[0].parentNode) {
|
|
1170
|
-
this.hide()
|
|
1171
|
-
this.$element = null
|
|
1172
|
-
this.options = null
|
|
1199
|
+
this.hide();
|
|
1200
|
+
this.$element = null;
|
|
1201
|
+
this.options = null;
|
|
1173
1202
|
}
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
, enable: function () {
|
|
1177
|
-
this.enabled = true
|
|
1178
|
-
}
|
|
1203
|
+
},
|
|
1179
1204
|
|
|
1180
|
-
|
|
1181
|
-
this.enabled =
|
|
1182
|
-
}
|
|
1205
|
+
enable: function () {
|
|
1206
|
+
this.enabled = true;
|
|
1207
|
+
},
|
|
1183
1208
|
|
|
1184
|
-
|
|
1185
|
-
this.enabled =
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
, toggle: function (e) {
|
|
1189
|
-
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
|
1190
|
-
self[self.tip().hasClass('in') ? 'hide' : 'show']()
|
|
1191
|
-
}
|
|
1209
|
+
disable: function () {
|
|
1210
|
+
this.enabled = false;
|
|
1211
|
+
},
|
|
1192
1212
|
|
|
1193
|
-
|
|
1194
|
-
this.
|
|
1195
|
-
}
|
|
1213
|
+
toggleEnabled: function () {
|
|
1214
|
+
this.enabled = !this.enabled;
|
|
1215
|
+
},
|
|
1196
1216
|
|
|
1197
|
-
|
|
1217
|
+
toggle: function (e) {
|
|
1218
|
+
var self = $(e.currentTarget)[this.type](this._options).data(this.type);
|
|
1219
|
+
self[self.tip().hasClass("in") ? "hide" : "show"]();
|
|
1220
|
+
},
|
|
1198
1221
|
|
|
1222
|
+
destroy: function () {
|
|
1223
|
+
this.hide()
|
|
1224
|
+
.$element.off("." + this.type)
|
|
1225
|
+
.removeData(this.type);
|
|
1226
|
+
},
|
|
1227
|
+
};
|
|
1199
1228
|
|
|
1200
|
-
|
|
1201
|
-
|
|
1229
|
+
/* TOOLTIP PLUGIN DEFINITION
|
|
1230
|
+
* ========================= */
|
|
1202
1231
|
|
|
1203
|
-
$.fn.tooltip = function (
|
|
1232
|
+
$.fn.tooltip = function (option) {
|
|
1204
1233
|
return this.each(function () {
|
|
1205
|
-
var $this = $(this)
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
if (!data) $this.data(
|
|
1209
|
-
if (typeof option ==
|
|
1210
|
-
})
|
|
1211
|
-
}
|
|
1234
|
+
var $this = $(this),
|
|
1235
|
+
data = $this.data("tooltip"),
|
|
1236
|
+
options = typeof option == "object" && option;
|
|
1237
|
+
if (!data) $this.data("tooltip", (data = new Tooltip(this, options)));
|
|
1238
|
+
if (typeof option == "string") data[option]();
|
|
1239
|
+
});
|
|
1240
|
+
};
|
|
1212
1241
|
|
|
1213
|
-
$.fn.tooltip.Constructor = Tooltip
|
|
1242
|
+
$.fn.tooltip.Constructor = Tooltip;
|
|
1214
1243
|
|
|
1215
1244
|
$.fn.tooltip.defaults = {
|
|
1216
|
-
animation: true
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
}(window.jQuery)
|
|
1245
|
+
animation: true,
|
|
1246
|
+
placement: "top",
|
|
1247
|
+
selector: false,
|
|
1248
|
+
template:
|
|
1249
|
+
'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
|
|
1250
|
+
trigger: "hover",
|
|
1251
|
+
title: "",
|
|
1252
|
+
delay: 0,
|
|
1253
|
+
html: false,
|
|
1254
|
+
};
|
|
1255
|
+
})(window.jQuery);
|
|
1256
|
+
/* ===========================================================
|
|
1227
1257
|
* bootstrap-popover.js v2.2.1
|
|
1228
1258
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
|
1229
1259
|
* ===========================================================
|
|
@@ -1242,90 +1272,89 @@
|
|
|
1242
1272
|
* limitations under the License.
|
|
1243
1273
|
* =========================================================== */
|
|
1244
1274
|
|
|
1245
|
-
|
|
1246
|
-
!function ($) {
|
|
1247
|
-
|
|
1275
|
+
!(function ($) {
|
|
1248
1276
|
"use strict"; // jshint ;_;
|
|
1249
1277
|
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
* =============================== */
|
|
1278
|
+
/* POPOVER PUBLIC CLASS DEFINITION
|
|
1279
|
+
* =============================== */
|
|
1253
1280
|
|
|
1254
1281
|
var Popover = function (element, options) {
|
|
1255
|
-
this.init(
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1282
|
+
this.init("popover", element, options);
|
|
1283
|
+
};
|
|
1258
1284
|
|
|
1259
1285
|
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
|
|
1260
1286
|
========================================== */
|
|
1261
1287
|
|
|
1262
1288
|
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
|
|
1289
|
+
constructor: Popover,
|
|
1263
1290
|
|
|
1264
|
-
|
|
1291
|
+
setContent: function () {
|
|
1292
|
+
var $tip = this.tip(),
|
|
1293
|
+
title = this.getTitle(),
|
|
1294
|
+
content = this.getContent();
|
|
1265
1295
|
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1296
|
+
$tip.find(".popover-title")[this.options.html ? "html" : "text"](title);
|
|
1297
|
+
$tip
|
|
1298
|
+
.find(".popover-content > *")
|
|
1299
|
+
[this.options.html ? "html" : "text"](content);
|
|
1270
1300
|
|
|
1271
|
-
$tip.
|
|
1272
|
-
|
|
1301
|
+
$tip.removeClass("fade top bottom left right in");
|
|
1302
|
+
},
|
|
1273
1303
|
|
|
1274
|
-
|
|
1275
|
-
|
|
1304
|
+
hasContent: function () {
|
|
1305
|
+
return this.getTitle() || this.getContent();
|
|
1306
|
+
},
|
|
1276
1307
|
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1308
|
+
getContent: function () {
|
|
1309
|
+
var content,
|
|
1310
|
+
$e = this.$element,
|
|
1311
|
+
o = this.options;
|
|
1280
1312
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
, o = this.options
|
|
1313
|
+
content =
|
|
1314
|
+
$e.attr("data-content") ||
|
|
1315
|
+
(typeof o.content == "function" ? o.content.call($e[0]) : o.content);
|
|
1285
1316
|
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
return content
|
|
1290
|
-
}
|
|
1317
|
+
return content;
|
|
1318
|
+
},
|
|
1291
1319
|
|
|
1292
|
-
|
|
1320
|
+
tip: function () {
|
|
1293
1321
|
if (!this.$tip) {
|
|
1294
|
-
this.$tip = $(this.options.template)
|
|
1322
|
+
this.$tip = $(this.options.template);
|
|
1295
1323
|
}
|
|
1296
|
-
return this.$tip
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
, destroy: function () {
|
|
1300
|
-
this.hide().$element.off('.' + this.type).removeData(this.type)
|
|
1301
|
-
}
|
|
1324
|
+
return this.$tip;
|
|
1325
|
+
},
|
|
1302
1326
|
|
|
1303
|
-
|
|
1327
|
+
destroy: function () {
|
|
1328
|
+
this.hide()
|
|
1329
|
+
.$element.off("." + this.type)
|
|
1330
|
+
.removeData(this.type);
|
|
1331
|
+
},
|
|
1332
|
+
});
|
|
1304
1333
|
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
* ======================= */
|
|
1334
|
+
/* POPOVER PLUGIN DEFINITION
|
|
1335
|
+
* ======================= */
|
|
1308
1336
|
|
|
1309
1337
|
$.fn.popover = function (option) {
|
|
1310
1338
|
return this.each(function () {
|
|
1311
|
-
var $this = $(this)
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
if (!data) $this.data(
|
|
1315
|
-
if (typeof option ==
|
|
1316
|
-
})
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
$.fn.popover.Constructor = Popover
|
|
1320
|
-
|
|
1321
|
-
$.fn.popover.defaults = $.extend({}
|
|
1322
|
-
placement:
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
}(window.jQuery)
|
|
1339
|
+
var $this = $(this),
|
|
1340
|
+
data = $this.data("popover"),
|
|
1341
|
+
options = typeof option == "object" && option;
|
|
1342
|
+
if (!data) $this.data("popover", (data = new Popover(this, options)));
|
|
1343
|
+
if (typeof option == "string") data[option]();
|
|
1344
|
+
});
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
$.fn.popover.Constructor = Popover;
|
|
1348
|
+
|
|
1349
|
+
$.fn.popover.defaults = $.extend({}, $.fn.tooltip.defaults, {
|
|
1350
|
+
placement: "right",
|
|
1351
|
+
trigger: "click",
|
|
1352
|
+
content: "",
|
|
1353
|
+
template:
|
|
1354
|
+
'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>',
|
|
1355
|
+
});
|
|
1356
|
+
})(window.jQuery);
|
|
1357
|
+
/* =============================================================
|
|
1329
1358
|
* bootstrap-scrollspy.js v2.2.1
|
|
1330
1359
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
|
1331
1360
|
* =============================================================
|
|
@@ -1344,138 +1373,136 @@
|
|
|
1344
1373
|
* limitations under the License.
|
|
1345
1374
|
* ============================================================== */
|
|
1346
1375
|
|
|
1347
|
-
|
|
1348
|
-
!function ($) {
|
|
1349
|
-
|
|
1376
|
+
!(function ($) {
|
|
1350
1377
|
"use strict"; // jshint ;_;
|
|
1351
1378
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
* ========================== */
|
|
1379
|
+
/* SCROLLSPY CLASS DEFINITION
|
|
1380
|
+
* ========================== */
|
|
1355
1381
|
|
|
1356
1382
|
function ScrollSpy(element, options) {
|
|
1357
|
-
var process = $.proxy(this.process, this)
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
|
|
1361
|
-
this.$scrollElement = $element.on(
|
|
1362
|
-
this.selector =
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
this
|
|
1383
|
+
var process = $.proxy(this.process, this),
|
|
1384
|
+
$element = $(element).is("body") ? $(window) : $(element),
|
|
1385
|
+
href;
|
|
1386
|
+
this.options = $.extend({}, $.fn.scrollspy.defaults, options);
|
|
1387
|
+
this.$scrollElement = $element.on("scroll.scroll-spy.data-api", process);
|
|
1388
|
+
this.selector =
|
|
1389
|
+
(this.options.target ||
|
|
1390
|
+
((href = $(element).attr("href")) &&
|
|
1391
|
+
href.replace(/.*(?=#[^\s]+$)/, "")) || //strip for ie7
|
|
1392
|
+
"") + " .nav li > a";
|
|
1393
|
+
this.$body = $("body");
|
|
1394
|
+
this.refresh();
|
|
1395
|
+
this.process();
|
|
1368
1396
|
}
|
|
1369
1397
|
|
|
1370
1398
|
ScrollSpy.prototype = {
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1399
|
+
constructor: ScrollSpy,
|
|
1400
|
+
|
|
1401
|
+
refresh: function () {
|
|
1402
|
+
var self = this,
|
|
1403
|
+
$targets;
|
|
1404
|
+
|
|
1405
|
+
this.offsets = $([]);
|
|
1406
|
+
this.targets = $([]);
|
|
1407
|
+
|
|
1408
|
+
$targets = this.$body
|
|
1409
|
+
.find(this.selector)
|
|
1410
|
+
.map(function () {
|
|
1411
|
+
var $el = $(this),
|
|
1412
|
+
href = $el.data("target") || $el.attr("href"),
|
|
1413
|
+
$href = /^#\w/.test(href) && $(href);
|
|
1414
|
+
return (
|
|
1415
|
+
($href && $href.length && [[$href.position().top, href]]) || null
|
|
1416
|
+
);
|
|
1417
|
+
})
|
|
1418
|
+
.sort(function (a, b) {
|
|
1419
|
+
return a[0] - b[0];
|
|
1420
|
+
})
|
|
1421
|
+
.each(function () {
|
|
1422
|
+
self.offsets.push(this[0]);
|
|
1423
|
+
self.targets.push(this[1]);
|
|
1424
|
+
});
|
|
1425
|
+
},
|
|
1426
|
+
|
|
1427
|
+
process: function () {
|
|
1428
|
+
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset,
|
|
1429
|
+
scrollHeight =
|
|
1430
|
+
this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight,
|
|
1431
|
+
maxScroll = scrollHeight - this.$scrollElement.height(),
|
|
1432
|
+
offsets = this.offsets,
|
|
1433
|
+
targets = this.targets,
|
|
1434
|
+
activeTarget = this.activeTarget,
|
|
1435
|
+
i;
|
|
1436
|
+
|
|
1437
|
+
if (scrollTop >= maxScroll) {
|
|
1438
|
+
return activeTarget != (i = targets.last()[0]) && this.activate(i);
|
|
1396
1439
|
}
|
|
1397
1440
|
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
, targets = this.targets
|
|
1404
|
-
, activeTarget = this.activeTarget
|
|
1405
|
-
, i
|
|
1406
|
-
|
|
1407
|
-
if (scrollTop >= maxScroll) {
|
|
1408
|
-
return activeTarget != (i = targets.last()[0])
|
|
1409
|
-
&& this.activate ( i )
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
for (i = offsets.length; i--;) {
|
|
1413
|
-
activeTarget != targets[i]
|
|
1414
|
-
&& scrollTop >= offsets[i]
|
|
1415
|
-
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
|
1416
|
-
&& this.activate( targets[i] )
|
|
1417
|
-
}
|
|
1441
|
+
for (i = offsets.length; i--; ) {
|
|
1442
|
+
activeTarget != targets[i] &&
|
|
1443
|
+
scrollTop >= offsets[i] &&
|
|
1444
|
+
(!offsets[i + 1] || scrollTop <= offsets[i + 1]) &&
|
|
1445
|
+
this.activate(targets[i]);
|
|
1418
1446
|
}
|
|
1447
|
+
},
|
|
1419
1448
|
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
, selector
|
|
1449
|
+
activate: function (target) {
|
|
1450
|
+
var active, selector;
|
|
1423
1451
|
|
|
1424
|
-
|
|
1452
|
+
this.activeTarget = target;
|
|
1425
1453
|
|
|
1426
|
-
|
|
1427
|
-
.parent('.active')
|
|
1428
|
-
.removeClass('active')
|
|
1454
|
+
$(this.selector).parent(".active").removeClass("active");
|
|
1429
1455
|
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1456
|
+
selector =
|
|
1457
|
+
this.selector +
|
|
1458
|
+
'[data-target="' +
|
|
1459
|
+
target +
|
|
1460
|
+
'"],' +
|
|
1461
|
+
this.selector +
|
|
1462
|
+
'[href="' +
|
|
1463
|
+
target +
|
|
1464
|
+
'"]';
|
|
1433
1465
|
|
|
1434
|
-
|
|
1435
|
-
.parent('li')
|
|
1436
|
-
.addClass('active')
|
|
1437
|
-
|
|
1438
|
-
if (active.parent('.dropdown-menu').length) {
|
|
1439
|
-
active = active.closest('li.dropdown').addClass('active')
|
|
1440
|
-
}
|
|
1466
|
+
active = $(selector).parent("li").addClass("active");
|
|
1441
1467
|
|
|
1442
|
-
|
|
1468
|
+
if (active.parent(".dropdown-menu").length) {
|
|
1469
|
+
active = active.closest("li.dropdown").addClass("active");
|
|
1443
1470
|
}
|
|
1444
1471
|
|
|
1445
|
-
|
|
1446
|
-
|
|
1472
|
+
active.trigger("activate");
|
|
1473
|
+
},
|
|
1474
|
+
};
|
|
1447
1475
|
|
|
1448
|
-
|
|
1449
|
-
|
|
1476
|
+
/* SCROLLSPY PLUGIN DEFINITION
|
|
1477
|
+
* =========================== */
|
|
1450
1478
|
|
|
1451
1479
|
$.fn.scrollspy = function (option) {
|
|
1452
1480
|
return this.each(function () {
|
|
1453
|
-
var $this = $(this)
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
if (!data) $this.data(
|
|
1457
|
-
if (typeof option ==
|
|
1458
|
-
})
|
|
1459
|
-
}
|
|
1481
|
+
var $this = $(this),
|
|
1482
|
+
data = $this.data("scrollspy"),
|
|
1483
|
+
options = typeof option == "object" && option;
|
|
1484
|
+
if (!data) $this.data("scrollspy", (data = new ScrollSpy(this, options)));
|
|
1485
|
+
if (typeof option == "string") data[option]();
|
|
1486
|
+
});
|
|
1487
|
+
};
|
|
1460
1488
|
|
|
1461
|
-
$.fn.scrollspy.Constructor = ScrollSpy
|
|
1489
|
+
$.fn.scrollspy.Constructor = ScrollSpy;
|
|
1462
1490
|
|
|
1463
1491
|
$.fn.scrollspy.defaults = {
|
|
1464
|
-
offset: 10
|
|
1465
|
-
}
|
|
1492
|
+
offset: 10,
|
|
1493
|
+
};
|
|
1466
1494
|
|
|
1495
|
+
/* SCROLLSPY DATA-API
|
|
1496
|
+
* ================== */
|
|
1467
1497
|
|
|
1468
|
-
|
|
1469
|
-
* ================== */
|
|
1470
|
-
|
|
1471
|
-
$(window).on('load', function () {
|
|
1498
|
+
$(window).on("load", function () {
|
|
1472
1499
|
$('[data-spy="scroll"]').each(function () {
|
|
1473
|
-
var $spy = $(this)
|
|
1474
|
-
$spy.scrollspy($spy.data())
|
|
1475
|
-
})
|
|
1476
|
-
})
|
|
1477
|
-
|
|
1478
|
-
|
|
1500
|
+
var $spy = $(this);
|
|
1501
|
+
$spy.scrollspy($spy.data());
|
|
1502
|
+
});
|
|
1503
|
+
});
|
|
1504
|
+
})(window.jQuery);
|
|
1505
|
+
/* ========================================================
|
|
1479
1506
|
* bootstrap-tab.js v2.2.1
|
|
1480
1507
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
|
1481
1508
|
* ========================================================
|
|
@@ -1494,120 +1521,115 @@
|
|
|
1494
1521
|
* limitations under the License.
|
|
1495
1522
|
* ======================================================== */
|
|
1496
1523
|
|
|
1497
|
-
|
|
1498
|
-
!function ($) {
|
|
1499
|
-
|
|
1524
|
+
!(function ($) {
|
|
1500
1525
|
"use strict"; // jshint ;_;
|
|
1501
1526
|
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
* ==================== */
|
|
1527
|
+
/* TAB CLASS DEFINITION
|
|
1528
|
+
* ==================== */
|
|
1505
1529
|
|
|
1506
1530
|
var Tab = function (element) {
|
|
1507
|
-
this.element = $(element)
|
|
1508
|
-
}
|
|
1531
|
+
this.element = $(element);
|
|
1532
|
+
};
|
|
1509
1533
|
|
|
1510
1534
|
Tab.prototype = {
|
|
1535
|
+
constructor: Tab,
|
|
1511
1536
|
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
,
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
, $target
|
|
1520
|
-
, e
|
|
1537
|
+
show: function () {
|
|
1538
|
+
var $this = this.element,
|
|
1539
|
+
$ul = $this.closest("ul:not(.dropdown-menu)"),
|
|
1540
|
+
selector = $this.attr("data-target"),
|
|
1541
|
+
previous,
|
|
1542
|
+
$target,
|
|
1543
|
+
e;
|
|
1521
1544
|
|
|
1522
1545
|
if (!selector) {
|
|
1523
|
-
selector = $this.attr(
|
|
1524
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/,
|
|
1546
|
+
selector = $this.attr("href");
|
|
1547
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ""); //strip for ie7
|
|
1525
1548
|
}
|
|
1526
1549
|
|
|
1527
|
-
if (
|
|
1550
|
+
if ($this.parent("li").hasClass("active")) return;
|
|
1528
1551
|
|
|
1529
|
-
previous = $ul.find(
|
|
1552
|
+
previous = $ul.find(".active:last a")[0];
|
|
1530
1553
|
|
|
1531
|
-
e = $.Event(
|
|
1532
|
-
relatedTarget: previous
|
|
1533
|
-
})
|
|
1554
|
+
e = $.Event("show", {
|
|
1555
|
+
relatedTarget: previous,
|
|
1556
|
+
});
|
|
1534
1557
|
|
|
1535
|
-
$this.trigger(e)
|
|
1558
|
+
$this.trigger(e);
|
|
1536
1559
|
|
|
1537
|
-
if (e.isDefaultPrevented()) return
|
|
1560
|
+
if (e.isDefaultPrevented()) return;
|
|
1538
1561
|
|
|
1539
|
-
$target = $(selector)
|
|
1562
|
+
$target = $(selector);
|
|
1540
1563
|
|
|
1541
|
-
this.activate($this.parent(
|
|
1564
|
+
this.activate($this.parent("li"), $ul);
|
|
1542
1565
|
this.activate($target, $target.parent(), function () {
|
|
1543
1566
|
$this.trigger({
|
|
1544
|
-
type:
|
|
1545
|
-
|
|
1546
|
-
})
|
|
1547
|
-
})
|
|
1548
|
-
}
|
|
1567
|
+
type: "shown",
|
|
1568
|
+
relatedTarget: previous,
|
|
1569
|
+
});
|
|
1570
|
+
});
|
|
1571
|
+
},
|
|
1549
1572
|
|
|
1550
|
-
|
|
1551
|
-
var $active = container.find(
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
&& $active.hasClass('fade')
|
|
1573
|
+
activate: function (element, container, callback) {
|
|
1574
|
+
var $active = container.find("> .active"),
|
|
1575
|
+
transition =
|
|
1576
|
+
callback && $.support.transition && $active.hasClass("fade");
|
|
1555
1577
|
|
|
1556
1578
|
function next() {
|
|
1557
1579
|
$active
|
|
1558
|
-
.removeClass(
|
|
1559
|
-
.find(
|
|
1560
|
-
.removeClass(
|
|
1580
|
+
.removeClass("active")
|
|
1581
|
+
.find("> .dropdown-menu > .active")
|
|
1582
|
+
.removeClass("active");
|
|
1561
1583
|
|
|
1562
|
-
element.addClass(
|
|
1584
|
+
element.addClass("active");
|
|
1563
1585
|
|
|
1564
1586
|
if (transition) {
|
|
1565
|
-
element[0].offsetWidth // reflow for transition
|
|
1566
|
-
element.addClass(
|
|
1587
|
+
element[0].offsetWidth; // reflow for transition
|
|
1588
|
+
element.addClass("in");
|
|
1567
1589
|
} else {
|
|
1568
|
-
element.removeClass(
|
|
1590
|
+
element.removeClass("fade");
|
|
1569
1591
|
}
|
|
1570
1592
|
|
|
1571
|
-
if (
|
|
1572
|
-
element.closest(
|
|
1593
|
+
if (element.parent(".dropdown-menu")) {
|
|
1594
|
+
element.closest("li.dropdown").addClass("active");
|
|
1573
1595
|
}
|
|
1574
1596
|
|
|
1575
|
-
callback && callback()
|
|
1597
|
+
callback && callback();
|
|
1576
1598
|
}
|
|
1577
1599
|
|
|
1578
|
-
transition ?
|
|
1579
|
-
$active.one($.support.transition.end, next) :
|
|
1580
|
-
next()
|
|
1581
|
-
|
|
1582
|
-
$active.removeClass('in')
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1600
|
+
transition ? $active.one($.support.transition.end, next) : next();
|
|
1585
1601
|
|
|
1602
|
+
$active.removeClass("in");
|
|
1603
|
+
},
|
|
1604
|
+
};
|
|
1586
1605
|
|
|
1587
|
-
|
|
1588
|
-
|
|
1606
|
+
/* TAB PLUGIN DEFINITION
|
|
1607
|
+
* ===================== */
|
|
1589
1608
|
|
|
1590
|
-
$.fn.tab = function (
|
|
1609
|
+
$.fn.tab = function (option) {
|
|
1591
1610
|
return this.each(function () {
|
|
1592
|
-
var $this = $(this)
|
|
1593
|
-
|
|
1594
|
-
if (!data) $this.data(
|
|
1595
|
-
if (typeof option ==
|
|
1596
|
-
})
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
$.fn.tab.Constructor = Tab
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
}
|
|
1611
|
+
var $this = $(this),
|
|
1612
|
+
data = $this.data("tab");
|
|
1613
|
+
if (!data) $this.data("tab", (data = new Tab(this)));
|
|
1614
|
+
if (typeof option == "string") data[option]();
|
|
1615
|
+
});
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
$.fn.tab.Constructor = Tab;
|
|
1619
|
+
|
|
1620
|
+
/* TAB DATA-API
|
|
1621
|
+
* ============ */
|
|
1622
|
+
|
|
1623
|
+
$(document).on(
|
|
1624
|
+
"click.tab.data-api",
|
|
1625
|
+
'[data-toggle="tab"], [data-toggle="pill"]',
|
|
1626
|
+
function (e) {
|
|
1627
|
+
e.preventDefault();
|
|
1628
|
+
$(this).tab("show");
|
|
1629
|
+
}
|
|
1630
|
+
);
|
|
1631
|
+
})(window.jQuery);
|
|
1632
|
+
/* =============================================================
|
|
1611
1633
|
* bootstrap-typeahead.js v2.2.1
|
|
1612
1634
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
|
1613
1635
|
* =============================================================
|
|
@@ -1626,297 +1648,299 @@
|
|
|
1626
1648
|
* limitations under the License.
|
|
1627
1649
|
* ============================================================ */
|
|
1628
1650
|
|
|
1629
|
-
|
|
1630
|
-
!function($){
|
|
1631
|
-
|
|
1651
|
+
!(function ($) {
|
|
1632
1652
|
"use strict"; // jshint ;_;
|
|
1633
1653
|
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
* ================================= */
|
|
1654
|
+
/* TYPEAHEAD PUBLIC CLASS DEFINITION
|
|
1655
|
+
* ================================= */
|
|
1637
1656
|
|
|
1638
1657
|
var Typeahead = function (element, options) {
|
|
1639
|
-
this.$element = $(element)
|
|
1640
|
-
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
|
1641
|
-
this.matcher = this.options.matcher || this.matcher
|
|
1642
|
-
this.sorter = this.options.sorter || this.sorter
|
|
1643
|
-
this.highlighter = this.options.highlighter || this.highlighter
|
|
1644
|
-
this.updater = this.options.updater || this.updater
|
|
1645
|
-
this.$menu = $(this.options.menu).appendTo(
|
|
1646
|
-
this.source = this.options.source
|
|
1647
|
-
this.shown = false
|
|
1648
|
-
this.listen()
|
|
1649
|
-
}
|
|
1658
|
+
this.$element = $(element);
|
|
1659
|
+
this.options = $.extend({}, $.fn.typeahead.defaults, options);
|
|
1660
|
+
this.matcher = this.options.matcher || this.matcher;
|
|
1661
|
+
this.sorter = this.options.sorter || this.sorter;
|
|
1662
|
+
this.highlighter = this.options.highlighter || this.highlighter;
|
|
1663
|
+
this.updater = this.options.updater || this.updater;
|
|
1664
|
+
this.$menu = $(this.options.menu).appendTo("body");
|
|
1665
|
+
this.source = this.options.source;
|
|
1666
|
+
this.shown = false;
|
|
1667
|
+
this.listen();
|
|
1668
|
+
};
|
|
1650
1669
|
|
|
1651
1670
|
Typeahead.prototype = {
|
|
1671
|
+
constructor: Typeahead,
|
|
1652
1672
|
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
.val(this.updater(val))
|
|
1659
|
-
.change()
|
|
1660
|
-
return this.hide()
|
|
1661
|
-
}
|
|
1673
|
+
select: function () {
|
|
1674
|
+
var val = this.$menu.find(".active").attr("data-value");
|
|
1675
|
+
this.$element.val(this.updater(val)).change();
|
|
1676
|
+
return this.hide();
|
|
1677
|
+
},
|
|
1662
1678
|
|
|
1663
|
-
|
|
1664
|
-
return item
|
|
1665
|
-
}
|
|
1679
|
+
updater: function (item) {
|
|
1680
|
+
return item;
|
|
1681
|
+
},
|
|
1666
1682
|
|
|
1667
|
-
|
|
1683
|
+
show: function () {
|
|
1668
1684
|
var pos = $.extend({}, this.$element.offset(), {
|
|
1669
|
-
height: this.$element[0].offsetHeight
|
|
1670
|
-
})
|
|
1685
|
+
height: this.$element[0].offsetHeight,
|
|
1686
|
+
});
|
|
1671
1687
|
|
|
1672
1688
|
this.$menu.css({
|
|
1673
|
-
top: pos.top + pos.height
|
|
1674
|
-
|
|
1675
|
-
})
|
|
1689
|
+
top: pos.top + pos.height,
|
|
1690
|
+
left: pos.left,
|
|
1691
|
+
});
|
|
1676
1692
|
|
|
1677
|
-
this.$menu.show()
|
|
1678
|
-
this.shown = true
|
|
1679
|
-
return this
|
|
1680
|
-
}
|
|
1693
|
+
this.$menu.show();
|
|
1694
|
+
this.shown = true;
|
|
1695
|
+
return this;
|
|
1696
|
+
},
|
|
1681
1697
|
|
|
1682
|
-
|
|
1683
|
-
this.$menu.hide()
|
|
1684
|
-
this.shown = false
|
|
1685
|
-
return this
|
|
1686
|
-
}
|
|
1698
|
+
hide: function () {
|
|
1699
|
+
this.$menu.hide();
|
|
1700
|
+
this.shown = false;
|
|
1701
|
+
return this;
|
|
1702
|
+
},
|
|
1687
1703
|
|
|
1688
|
-
|
|
1689
|
-
var items
|
|
1704
|
+
lookup: function (event) {
|
|
1705
|
+
var items;
|
|
1690
1706
|
|
|
1691
|
-
this.query = this.$element.val()
|
|
1707
|
+
this.query = this.$element.val();
|
|
1692
1708
|
|
|
1693
1709
|
if (!this.query || this.query.length < this.options.minLength) {
|
|
1694
|
-
return this.shown ? this.hide() : this
|
|
1710
|
+
return this.shown ? this.hide() : this;
|
|
1695
1711
|
}
|
|
1696
1712
|
|
|
1697
|
-
items = $.isFunction(this.source)
|
|
1713
|
+
items = $.isFunction(this.source)
|
|
1714
|
+
? this.source(this.query, $.proxy(this.process, this))
|
|
1715
|
+
: this.source;
|
|
1698
1716
|
|
|
1699
|
-
return items ? this.process(items) : this
|
|
1700
|
-
}
|
|
1717
|
+
return items ? this.process(items) : this;
|
|
1718
|
+
},
|
|
1701
1719
|
|
|
1702
|
-
|
|
1703
|
-
var that = this
|
|
1720
|
+
process: function (items) {
|
|
1721
|
+
var that = this;
|
|
1704
1722
|
|
|
1705
1723
|
items = $.grep(items, function (item) {
|
|
1706
|
-
return that.matcher(item)
|
|
1707
|
-
})
|
|
1724
|
+
return that.matcher(item);
|
|
1725
|
+
});
|
|
1708
1726
|
|
|
1709
|
-
items = this.sorter(items)
|
|
1727
|
+
items = this.sorter(items);
|
|
1710
1728
|
|
|
1711
1729
|
if (!items.length) {
|
|
1712
|
-
return this.shown ? this.hide() : this
|
|
1730
|
+
return this.shown ? this.hide() : this;
|
|
1713
1731
|
}
|
|
1714
1732
|
|
|
1715
|
-
return this.render(items.slice(0, this.options.items)).show()
|
|
1716
|
-
}
|
|
1733
|
+
return this.render(items.slice(0, this.options.items)).show();
|
|
1734
|
+
},
|
|
1717
1735
|
|
|
1718
|
-
|
|
1719
|
-
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
|
|
1720
|
-
}
|
|
1736
|
+
matcher: function (item) {
|
|
1737
|
+
return ~item.toLowerCase().indexOf(this.query.toLowerCase());
|
|
1738
|
+
},
|
|
1721
1739
|
|
|
1722
|
-
|
|
1723
|
-
var beginswith = []
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1740
|
+
sorter: function (items) {
|
|
1741
|
+
var beginswith = [],
|
|
1742
|
+
caseSensitive = [],
|
|
1743
|
+
caseInsensitive = [],
|
|
1744
|
+
item;
|
|
1727
1745
|
|
|
1728
|
-
while (item = items.shift()) {
|
|
1729
|
-
if (!item.toLowerCase().indexOf(this.query.toLowerCase()))
|
|
1730
|
-
|
|
1731
|
-
else
|
|
1746
|
+
while ((item = items.shift())) {
|
|
1747
|
+
if (!item.toLowerCase().indexOf(this.query.toLowerCase()))
|
|
1748
|
+
beginswith.push(item);
|
|
1749
|
+
else if (~item.indexOf(this.query)) caseSensitive.push(item);
|
|
1750
|
+
else caseInsensitive.push(item);
|
|
1732
1751
|
}
|
|
1733
1752
|
|
|
1734
|
-
return beginswith.concat(caseSensitive, caseInsensitive)
|
|
1735
|
-
}
|
|
1753
|
+
return beginswith.concat(caseSensitive, caseInsensitive);
|
|
1754
|
+
},
|
|
1736
1755
|
|
|
1737
|
-
|
|
1738
|
-
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,
|
|
1739
|
-
return item.replace(
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1756
|
+
highlighter: function (item) {
|
|
1757
|
+
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
1758
|
+
return item.replace(
|
|
1759
|
+
new RegExp("(" + query + ")", "ig"),
|
|
1760
|
+
function ($1, match) {
|
|
1761
|
+
return "<strong>" + match + "</strong>";
|
|
1762
|
+
}
|
|
1763
|
+
);
|
|
1764
|
+
},
|
|
1743
1765
|
|
|
1744
|
-
|
|
1745
|
-
var that = this
|
|
1766
|
+
render: function (items) {
|
|
1767
|
+
var that = this;
|
|
1746
1768
|
|
|
1747
1769
|
items = $(items).map(function (i, item) {
|
|
1748
|
-
i = $(that.options.item).attr(
|
|
1749
|
-
i.find(
|
|
1750
|
-
return i[0]
|
|
1751
|
-
})
|
|
1752
|
-
|
|
1753
|
-
items.first().addClass(
|
|
1754
|
-
this.$menu.html(items)
|
|
1755
|
-
return this
|
|
1756
|
-
}
|
|
1770
|
+
i = $(that.options.item).attr("data-value", item);
|
|
1771
|
+
i.find("a").html(that.highlighter(item));
|
|
1772
|
+
return i[0];
|
|
1773
|
+
});
|
|
1774
|
+
|
|
1775
|
+
items.first().addClass("active");
|
|
1776
|
+
this.$menu.html(items);
|
|
1777
|
+
return this;
|
|
1778
|
+
},
|
|
1757
1779
|
|
|
1758
|
-
|
|
1759
|
-
var active = this.$menu.find(
|
|
1760
|
-
|
|
1780
|
+
next: function (event) {
|
|
1781
|
+
var active = this.$menu.find(".active").removeClass("active"),
|
|
1782
|
+
next = active.next();
|
|
1761
1783
|
|
|
1762
1784
|
if (!next.length) {
|
|
1763
|
-
next = $(this.$menu.find(
|
|
1785
|
+
next = $(this.$menu.find("li")[0]);
|
|
1764
1786
|
}
|
|
1765
1787
|
|
|
1766
|
-
next.addClass(
|
|
1767
|
-
}
|
|
1788
|
+
next.addClass("active");
|
|
1789
|
+
},
|
|
1768
1790
|
|
|
1769
|
-
|
|
1770
|
-
var active = this.$menu.find(
|
|
1771
|
-
|
|
1791
|
+
prev: function (event) {
|
|
1792
|
+
var active = this.$menu.find(".active").removeClass("active"),
|
|
1793
|
+
prev = active.prev();
|
|
1772
1794
|
|
|
1773
1795
|
if (!prev.length) {
|
|
1774
|
-
prev = this.$menu.find(
|
|
1796
|
+
prev = this.$menu.find("li").last();
|
|
1775
1797
|
}
|
|
1776
1798
|
|
|
1777
|
-
prev.addClass(
|
|
1778
|
-
}
|
|
1799
|
+
prev.addClass("active");
|
|
1800
|
+
},
|
|
1779
1801
|
|
|
1780
|
-
|
|
1802
|
+
listen: function () {
|
|
1781
1803
|
this.$element
|
|
1782
|
-
.on(
|
|
1783
|
-
.on(
|
|
1784
|
-
.on(
|
|
1804
|
+
.on("blur", $.proxy(this.blur, this))
|
|
1805
|
+
.on("keypress", $.proxy(this.keypress, this))
|
|
1806
|
+
.on("keyup", $.proxy(this.keyup, this));
|
|
1785
1807
|
|
|
1786
|
-
if (this.eventSupported(
|
|
1787
|
-
this.$element.on(
|
|
1808
|
+
if (this.eventSupported("keydown")) {
|
|
1809
|
+
this.$element.on("keydown", $.proxy(this.keydown, this));
|
|
1788
1810
|
}
|
|
1789
1811
|
|
|
1790
1812
|
this.$menu
|
|
1791
|
-
.on(
|
|
1792
|
-
.on(
|
|
1793
|
-
}
|
|
1813
|
+
.on("click", $.proxy(this.click, this))
|
|
1814
|
+
.on("mouseenter", "li", $.proxy(this.mouseenter, this));
|
|
1815
|
+
},
|
|
1794
1816
|
|
|
1795
|
-
|
|
1796
|
-
var isSupported = eventName in this.$element
|
|
1817
|
+
eventSupported: function (eventName) {
|
|
1818
|
+
var isSupported = eventName in this.$element;
|
|
1797
1819
|
if (!isSupported) {
|
|
1798
|
-
this.$element.setAttribute(eventName,
|
|
1799
|
-
isSupported = typeof this.$element[eventName] ===
|
|
1820
|
+
this.$element.setAttribute(eventName, "return;");
|
|
1821
|
+
isSupported = typeof this.$element[eventName] === "function";
|
|
1800
1822
|
}
|
|
1801
|
-
return isSupported
|
|
1802
|
-
}
|
|
1823
|
+
return isSupported;
|
|
1824
|
+
},
|
|
1803
1825
|
|
|
1804
|
-
|
|
1805
|
-
if (!this.shown) return
|
|
1826
|
+
move: function (e) {
|
|
1827
|
+
if (!this.shown) return;
|
|
1806
1828
|
|
|
1807
|
-
switch(e.keyCode) {
|
|
1829
|
+
switch (e.keyCode) {
|
|
1808
1830
|
case 9: // tab
|
|
1809
1831
|
case 13: // enter
|
|
1810
1832
|
case 27: // escape
|
|
1811
|
-
e.preventDefault()
|
|
1812
|
-
break
|
|
1833
|
+
e.preventDefault();
|
|
1834
|
+
break;
|
|
1813
1835
|
|
|
1814
1836
|
case 38: // up arrow
|
|
1815
|
-
e.preventDefault()
|
|
1816
|
-
this.prev()
|
|
1817
|
-
break
|
|
1837
|
+
e.preventDefault();
|
|
1838
|
+
this.prev();
|
|
1839
|
+
break;
|
|
1818
1840
|
|
|
1819
1841
|
case 40: // down arrow
|
|
1820
|
-
e.preventDefault()
|
|
1821
|
-
this.next()
|
|
1822
|
-
break
|
|
1842
|
+
e.preventDefault();
|
|
1843
|
+
this.next();
|
|
1844
|
+
break;
|
|
1823
1845
|
}
|
|
1824
1846
|
|
|
1825
|
-
e.stopPropagation()
|
|
1826
|
-
}
|
|
1847
|
+
e.stopPropagation();
|
|
1848
|
+
},
|
|
1827
1849
|
|
|
1828
|
-
|
|
1829
|
-
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
|
|
1830
|
-
this.move(e)
|
|
1831
|
-
}
|
|
1850
|
+
keydown: function (e) {
|
|
1851
|
+
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40, 38, 9, 13, 27]);
|
|
1852
|
+
this.move(e);
|
|
1853
|
+
},
|
|
1832
1854
|
|
|
1833
|
-
|
|
1834
|
-
if (this.suppressKeyPressRepeat) return
|
|
1835
|
-
this.move(e)
|
|
1836
|
-
}
|
|
1855
|
+
keypress: function (e) {
|
|
1856
|
+
if (this.suppressKeyPressRepeat) return;
|
|
1857
|
+
this.move(e);
|
|
1858
|
+
},
|
|
1837
1859
|
|
|
1838
|
-
|
|
1839
|
-
switch(e.keyCode) {
|
|
1860
|
+
keyup: function (e) {
|
|
1861
|
+
switch (e.keyCode) {
|
|
1840
1862
|
case 40: // down arrow
|
|
1841
1863
|
case 38: // up arrow
|
|
1842
1864
|
case 16: // shift
|
|
1843
1865
|
case 17: // ctrl
|
|
1844
1866
|
case 18: // alt
|
|
1845
|
-
break
|
|
1867
|
+
break;
|
|
1846
1868
|
|
|
1847
1869
|
case 9: // tab
|
|
1848
1870
|
case 13: // enter
|
|
1849
|
-
if (!this.shown) return
|
|
1850
|
-
this.select()
|
|
1851
|
-
break
|
|
1871
|
+
if (!this.shown) return;
|
|
1872
|
+
this.select();
|
|
1873
|
+
break;
|
|
1852
1874
|
|
|
1853
1875
|
case 27: // escape
|
|
1854
|
-
if (!this.shown) return
|
|
1855
|
-
this.hide()
|
|
1856
|
-
break
|
|
1876
|
+
if (!this.shown) return;
|
|
1877
|
+
this.hide();
|
|
1878
|
+
break;
|
|
1857
1879
|
|
|
1858
1880
|
default:
|
|
1859
|
-
this.lookup()
|
|
1881
|
+
this.lookup();
|
|
1860
1882
|
}
|
|
1861
1883
|
|
|
1862
|
-
e.stopPropagation()
|
|
1863
|
-
e.preventDefault()
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
var that = this
|
|
1868
|
-
setTimeout(function () {
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
+
e.stopPropagation();
|
|
1885
|
+
e.preventDefault();
|
|
1886
|
+
},
|
|
1887
|
+
|
|
1888
|
+
blur: function (e) {
|
|
1889
|
+
var that = this;
|
|
1890
|
+
setTimeout(function () {
|
|
1891
|
+
that.hide();
|
|
1892
|
+
}, 150);
|
|
1893
|
+
},
|
|
1894
|
+
|
|
1895
|
+
click: function (e) {
|
|
1896
|
+
e.stopPropagation();
|
|
1897
|
+
e.preventDefault();
|
|
1898
|
+
this.select();
|
|
1899
|
+
},
|
|
1900
|
+
|
|
1901
|
+
mouseenter: function (e) {
|
|
1902
|
+
this.$menu.find(".active").removeClass("active");
|
|
1903
|
+
$(e.currentTarget).addClass("active");
|
|
1904
|
+
},
|
|
1905
|
+
};
|
|
1884
1906
|
|
|
1885
1907
|
/* TYPEAHEAD PLUGIN DEFINITION
|
|
1886
1908
|
* =========================== */
|
|
1887
1909
|
|
|
1888
1910
|
$.fn.typeahead = function (option) {
|
|
1889
1911
|
return this.each(function () {
|
|
1890
|
-
var $this = $(this)
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
if (!data) $this.data(
|
|
1894
|
-
if (typeof option ==
|
|
1895
|
-
})
|
|
1896
|
-
}
|
|
1912
|
+
var $this = $(this),
|
|
1913
|
+
data = $this.data("typeahead"),
|
|
1914
|
+
options = typeof option == "object" && option;
|
|
1915
|
+
if (!data) $this.data("typeahead", (data = new Typeahead(this, options)));
|
|
1916
|
+
if (typeof option == "string") data[option]();
|
|
1917
|
+
});
|
|
1918
|
+
};
|
|
1897
1919
|
|
|
1898
1920
|
$.fn.typeahead.defaults = {
|
|
1899
|
-
source: []
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
$.fn.typeahead.Constructor = Typeahead
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
}
|
|
1921
|
+
source: [],
|
|
1922
|
+
items: 8,
|
|
1923
|
+
menu: '<ul class="typeahead dropdown-menu"></ul>',
|
|
1924
|
+
item: '<li><a href="#"></a></li>',
|
|
1925
|
+
minLength: 1,
|
|
1926
|
+
};
|
|
1927
|
+
|
|
1928
|
+
$.fn.typeahead.Constructor = Typeahead;
|
|
1929
|
+
|
|
1930
|
+
/* TYPEAHEAD DATA-API
|
|
1931
|
+
* ================== */
|
|
1932
|
+
|
|
1933
|
+
$(document).on(
|
|
1934
|
+
"focus.typeahead.data-api",
|
|
1935
|
+
'[data-provide="typeahead"]',
|
|
1936
|
+
function (e) {
|
|
1937
|
+
var $this = $(this);
|
|
1938
|
+
if ($this.data("typeahead")) return;
|
|
1939
|
+
e.preventDefault();
|
|
1940
|
+
$this.typeahead($this.data());
|
|
1941
|
+
}
|
|
1942
|
+
);
|
|
1943
|
+
})(window.jQuery);
|
|
1920
1944
|
/* ==========================================================
|
|
1921
1945
|
* bootstrap-affix.js v2.2.1
|
|
1922
1946
|
* http://twitter.github.com/bootstrap/javascript.html#affix
|
|
@@ -1936,90 +1960,95 @@
|
|
|
1936
1960
|
* limitations under the License.
|
|
1937
1961
|
* ========================================================== */
|
|
1938
1962
|
|
|
1939
|
-
|
|
1940
|
-
!function ($) {
|
|
1941
|
-
|
|
1963
|
+
!(function ($) {
|
|
1942
1964
|
"use strict"; // jshint ;_;
|
|
1943
1965
|
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
* ====================== */
|
|
1966
|
+
/* AFFIX CLASS DEFINITION
|
|
1967
|
+
* ====================== */
|
|
1947
1968
|
|
|
1948
1969
|
var Affix = function (element, options) {
|
|
1949
|
-
this.options = $.extend({}, $.fn.affix.defaults, options)
|
|
1970
|
+
this.options = $.extend({}, $.fn.affix.defaults, options);
|
|
1950
1971
|
this.$window = $(window)
|
|
1951
|
-
.on(
|
|
1952
|
-
.on(
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1972
|
+
.on("scroll.affix.data-api", $.proxy(this.checkPosition, this))
|
|
1973
|
+
.on(
|
|
1974
|
+
"click.affix.data-api",
|
|
1975
|
+
$.proxy(function () {
|
|
1976
|
+
setTimeout($.proxy(this.checkPosition, this), 1);
|
|
1977
|
+
}, this)
|
|
1978
|
+
);
|
|
1979
|
+
this.$element = $(element);
|
|
1980
|
+
this.checkPosition();
|
|
1981
|
+
};
|
|
1956
1982
|
|
|
1957
1983
|
Affix.prototype.checkPosition = function () {
|
|
1958
|
-
if (!this.$element.is(
|
|
1959
|
-
|
|
1960
|
-
var scrollHeight = $(document).height()
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
if (typeof offset !=
|
|
1970
|
-
if (typeof offsetTop ==
|
|
1971
|
-
if (typeof offsetBottom ==
|
|
1972
|
-
|
|
1973
|
-
affix =
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
this
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1984
|
+
if (!this.$element.is(":visible")) return;
|
|
1985
|
+
|
|
1986
|
+
var scrollHeight = $(document).height(),
|
|
1987
|
+
scrollTop = this.$window.scrollTop(),
|
|
1988
|
+
position = this.$element.offset(),
|
|
1989
|
+
offset = this.options.offset,
|
|
1990
|
+
offsetBottom = offset.bottom,
|
|
1991
|
+
offsetTop = offset.top,
|
|
1992
|
+
reset = "affix affix-top affix-bottom",
|
|
1993
|
+
affix;
|
|
1994
|
+
|
|
1995
|
+
if (typeof offset != "object") offsetBottom = offsetTop = offset;
|
|
1996
|
+
if (typeof offsetTop == "function") offsetTop = offset.top();
|
|
1997
|
+
if (typeof offsetBottom == "function") offsetBottom = offset.bottom();
|
|
1998
|
+
|
|
1999
|
+
affix =
|
|
2000
|
+
this.unpin != null && scrollTop + this.unpin <= position.top
|
|
2001
|
+
? false
|
|
2002
|
+
: offsetBottom != null &&
|
|
2003
|
+
position.top + this.$element.height() >= scrollHeight - offsetBottom
|
|
2004
|
+
? "bottom"
|
|
2005
|
+
: offsetTop != null && scrollTop <= offsetTop
|
|
2006
|
+
? "top"
|
|
2007
|
+
: false;
|
|
2008
|
+
|
|
2009
|
+
if (this.affixed === affix) return;
|
|
2010
|
+
|
|
2011
|
+
this.affixed = affix;
|
|
2012
|
+
this.unpin = affix == "bottom" ? position.top - scrollTop : null;
|
|
2013
|
+
|
|
2014
|
+
this.$element
|
|
2015
|
+
.removeClass(reset)
|
|
2016
|
+
.addClass("affix" + (affix ? "-" + affix : ""));
|
|
2017
|
+
};
|
|
2018
|
+
|
|
2019
|
+
/* AFFIX PLUGIN DEFINITION
|
|
2020
|
+
* ======================= */
|
|
1989
2021
|
|
|
1990
2022
|
$.fn.affix = function (option) {
|
|
1991
2023
|
return this.each(function () {
|
|
1992
|
-
var $this = $(this)
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
if (!data) $this.data(
|
|
1996
|
-
if (typeof option ==
|
|
1997
|
-
})
|
|
1998
|
-
}
|
|
2024
|
+
var $this = $(this),
|
|
2025
|
+
data = $this.data("affix"),
|
|
2026
|
+
options = typeof option == "object" && option;
|
|
2027
|
+
if (!data) $this.data("affix", (data = new Affix(this, options)));
|
|
2028
|
+
if (typeof option == "string") data[option]();
|
|
2029
|
+
});
|
|
2030
|
+
};
|
|
1999
2031
|
|
|
2000
|
-
$.fn.affix.Constructor = Affix
|
|
2032
|
+
$.fn.affix.Constructor = Affix;
|
|
2001
2033
|
|
|
2002
2034
|
$.fn.affix.defaults = {
|
|
2003
|
-
offset: 0
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2035
|
+
offset: 0,
|
|
2036
|
+
};
|
|
2006
2037
|
|
|
2007
|
-
|
|
2008
|
-
|
|
2038
|
+
/* AFFIX DATA-API
|
|
2039
|
+
* ============== */
|
|
2009
2040
|
|
|
2010
|
-
$(window).on(
|
|
2041
|
+
$(window).on("load", function () {
|
|
2011
2042
|
$('[data-spy="affix"]').each(function () {
|
|
2012
|
-
var $spy = $(this)
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
data.offset = data.offset || {}
|
|
2016
|
-
|
|
2017
|
-
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
|
|
2018
|
-
data.offsetTop && (data.offset.top = data.offsetTop)
|
|
2043
|
+
var $spy = $(this),
|
|
2044
|
+
data = $spy.data();
|
|
2019
2045
|
|
|
2020
|
-
|
|
2021
|
-
})
|
|
2022
|
-
})
|
|
2046
|
+
data.offset = data.offset || {};
|
|
2023
2047
|
|
|
2048
|
+
data.offsetBottom && (data.offset.bottom = data.offsetBottom);
|
|
2049
|
+
data.offsetTop && (data.offset.top = data.offsetTop);
|
|
2024
2050
|
|
|
2025
|
-
|
|
2051
|
+
$spy.affix(data);
|
|
2052
|
+
});
|
|
2053
|
+
});
|
|
2054
|
+
})(window.jQuery);
|