cmstyle 0.0.18 → 0.1.0
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.
- data/lib/assets/javascripts/bootstrap.js +204 -83
- data/lib/assets/stylesheets/bootstrap-responsive.css +24 -7
- data/lib/assets/stylesheets/bootstrap.css +249 -121
- data/lib/cmstyle/version.rb +1 -1
- metadata +3 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===================================================
|
2
|
-
* bootstrap-transition.js v2.
|
2
|
+
* bootstrap-transition.js v2.3.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
4
4
|
* ===================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -58,7 +58,7 @@
|
|
58
58
|
})
|
59
59
|
|
60
60
|
}(window.jQuery);/* ==========================================================
|
61
|
-
* bootstrap-alert.js v2.
|
61
|
+
* bootstrap-alert.js v2.3.2
|
62
62
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
63
63
|
* ==========================================================
|
64
64
|
* Copyright 2012 Twitter, Inc.
|
@@ -156,7 +156,7 @@
|
|
156
156
|
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
|
157
157
|
|
158
158
|
}(window.jQuery);/* ============================================================
|
159
|
-
* bootstrap-button.js v2.
|
159
|
+
* bootstrap-button.js v2.3.2
|
160
160
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
161
161
|
* ============================================================
|
162
162
|
* Copyright 2012 Twitter, Inc.
|
@@ -260,7 +260,7 @@
|
|
260
260
|
})
|
261
261
|
|
262
262
|
}(window.jQuery);/* ==========================================================
|
263
|
-
* bootstrap-carousel.js v2.
|
263
|
+
* bootstrap-carousel.js v2.3.2
|
264
264
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
265
265
|
* ==========================================================
|
266
266
|
* Copyright 2012 Twitter, Inc.
|
@@ -289,6 +289,7 @@
|
|
289
289
|
|
290
290
|
var Carousel = function (element, options) {
|
291
291
|
this.$element = $(element)
|
292
|
+
this.$indicators = this.$element.find('.carousel-indicators')
|
292
293
|
this.options = options
|
293
294
|
this.options.pause == 'hover' && this.$element
|
294
295
|
.on('mouseenter', $.proxy(this.pause, this))
|
@@ -299,19 +300,24 @@
|
|
299
300
|
|
300
301
|
cycle: function (e) {
|
301
302
|
if (!e) this.paused = false
|
303
|
+
if (this.interval) clearInterval(this.interval);
|
302
304
|
this.options.interval
|
303
305
|
&& !this.paused
|
304
306
|
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
305
307
|
return this
|
306
308
|
}
|
307
309
|
|
310
|
+
, getActiveIndex: function () {
|
311
|
+
this.$active = this.$element.find('.item.active')
|
312
|
+
this.$items = this.$active.parent().children()
|
313
|
+
return this.$items.index(this.$active)
|
314
|
+
}
|
315
|
+
|
308
316
|
, to: function (pos) {
|
309
|
-
var
|
310
|
-
, children = $active.parent().children()
|
311
|
-
, activePos = children.index($active)
|
317
|
+
var activeIndex = this.getActiveIndex()
|
312
318
|
, that = this
|
313
319
|
|
314
|
-
if (pos > (
|
320
|
+
if (pos > (this.$items.length - 1) || pos < 0) return
|
315
321
|
|
316
322
|
if (this.sliding) {
|
317
323
|
return this.$element.one('slid', function () {
|
@@ -319,18 +325,18 @@
|
|
319
325
|
})
|
320
326
|
}
|
321
327
|
|
322
|
-
if (
|
328
|
+
if (activeIndex == pos) {
|
323
329
|
return this.pause().cycle()
|
324
330
|
}
|
325
331
|
|
326
|
-
return this.slide(pos >
|
332
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
327
333
|
}
|
328
334
|
|
329
335
|
, pause: function (e) {
|
330
336
|
if (!e) this.paused = true
|
331
337
|
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
|
332
338
|
this.$element.trigger($.support.transition.end)
|
333
|
-
this.cycle()
|
339
|
+
this.cycle(true)
|
334
340
|
}
|
335
341
|
clearInterval(this.interval)
|
336
342
|
this.interval = null
|
@@ -364,10 +370,19 @@
|
|
364
370
|
|
365
371
|
e = $.Event('slide', {
|
366
372
|
relatedTarget: $next[0]
|
373
|
+
, direction: direction
|
367
374
|
})
|
368
375
|
|
369
376
|
if ($next.hasClass('active')) return
|
370
377
|
|
378
|
+
if (this.$indicators.length) {
|
379
|
+
this.$indicators.find('.active').removeClass('active')
|
380
|
+
this.$element.one('slid', function () {
|
381
|
+
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
|
382
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
383
|
+
})
|
384
|
+
}
|
385
|
+
|
371
386
|
if ($.support.transition && this.$element.hasClass('slide')) {
|
372
387
|
this.$element.trigger(e)
|
373
388
|
if (e.isDefaultPrevented()) return
|
@@ -412,7 +427,7 @@
|
|
412
427
|
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
413
428
|
if (typeof option == 'number') data.to(option)
|
414
429
|
else if (action) data[action]()
|
415
|
-
else if (options.interval) data.cycle()
|
430
|
+
else if (options.interval) data.pause().cycle()
|
416
431
|
})
|
417
432
|
}
|
418
433
|
|
@@ -435,16 +450,23 @@
|
|
435
450
|
/* CAROUSEL DATA-API
|
436
451
|
* ================= */
|
437
452
|
|
438
|
-
$(document).on('click.carousel.data-api', '[data-slide]', function (e) {
|
453
|
+
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
439
454
|
var $this = $(this), href
|
440
455
|
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
441
456
|
, options = $.extend({}, $target.data(), $this.data())
|
457
|
+
, slideIndex
|
458
|
+
|
442
459
|
$target.carousel(options)
|
460
|
+
|
461
|
+
if (slideIndex = $this.attr('data-slide-to')) {
|
462
|
+
$target.data('carousel').pause().to(slideIndex).cycle()
|
463
|
+
}
|
464
|
+
|
443
465
|
e.preventDefault()
|
444
466
|
})
|
445
467
|
|
446
468
|
}(window.jQuery);/* =============================================================
|
447
|
-
* bootstrap-collapse.js v2.
|
469
|
+
* bootstrap-collapse.js v2.3.2
|
448
470
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
449
471
|
* =============================================================
|
450
472
|
* Copyright 2012 Twitter, Inc.
|
@@ -497,7 +519,7 @@
|
|
497
519
|
, actives
|
498
520
|
, hasData
|
499
521
|
|
500
|
-
if (this.transitioning) return
|
522
|
+
if (this.transitioning || this.$element.hasClass('in')) return
|
501
523
|
|
502
524
|
dimension = this.dimension()
|
503
525
|
scroll = $.camelCase(['scroll', dimension].join('-'))
|
@@ -517,7 +539,7 @@
|
|
517
539
|
|
518
540
|
, hide: function () {
|
519
541
|
var dimension
|
520
|
-
if (this.transitioning) return
|
542
|
+
if (this.transitioning || !this.$element.hasClass('in')) return
|
521
543
|
dimension = this.dimension()
|
522
544
|
this.reset(this.$element[dimension]())
|
523
545
|
this.transition('removeClass', $.Event('hide'), 'hidden')
|
@@ -574,7 +596,7 @@
|
|
574
596
|
return this.each(function () {
|
575
597
|
var $this = $(this)
|
576
598
|
, data = $this.data('collapse')
|
577
|
-
, options = typeof option == 'object' && option
|
599
|
+
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
|
578
600
|
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
|
579
601
|
if (typeof option == 'string') data[option]()
|
580
602
|
})
|
@@ -610,7 +632,7 @@
|
|
610
632
|
})
|
611
633
|
|
612
634
|
}(window.jQuery);/* ============================================================
|
613
|
-
* bootstrap-dropdown.js v2.
|
635
|
+
* bootstrap-dropdown.js v2.3.2
|
614
636
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
615
637
|
* ============================================================
|
616
638
|
* Copyright 2012 Twitter, Inc.
|
@@ -663,6 +685,10 @@
|
|
663
685
|
clearMenus()
|
664
686
|
|
665
687
|
if (!isActive) {
|
688
|
+
if ('ontouchstart' in document.documentElement) {
|
689
|
+
// if mobile we we use a backdrop because click events don't delegate
|
690
|
+
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
|
691
|
+
}
|
666
692
|
$parent.toggleClass('open')
|
667
693
|
}
|
668
694
|
|
@@ -692,7 +718,10 @@
|
|
692
718
|
|
693
719
|
isActive = $parent.hasClass('open')
|
694
720
|
|
695
|
-
if (!isActive || (isActive && e.keyCode == 27))
|
721
|
+
if (!isActive || (isActive && e.keyCode == 27)) {
|
722
|
+
if (e.which == 27) $parent.find(toggle).focus()
|
723
|
+
return $this.click()
|
724
|
+
}
|
696
725
|
|
697
726
|
$items = $('[role=menu] li:not(.divider):visible a', $parent)
|
698
727
|
|
@@ -712,6 +741,7 @@
|
|
712
741
|
}
|
713
742
|
|
714
743
|
function clearMenus() {
|
744
|
+
$('.dropdown-backdrop').remove()
|
715
745
|
$(toggle).each(function () {
|
716
746
|
getParent($(this)).removeClass('open')
|
717
747
|
})
|
@@ -726,8 +756,9 @@
|
|
726
756
|
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
727
757
|
}
|
728
758
|
|
729
|
-
$parent = $(selector)
|
730
|
-
|
759
|
+
$parent = selector && $(selector)
|
760
|
+
|
761
|
+
if (!$parent || !$parent.length) $parent = $this.parent()
|
731
762
|
|
732
763
|
return $parent
|
733
764
|
}
|
@@ -763,14 +794,14 @@
|
|
763
794
|
* =================================== */
|
764
795
|
|
765
796
|
$(document)
|
766
|
-
.on('click.dropdown.data-api
|
767
|
-
.on('click.dropdown
|
768
|
-
.on('
|
769
|
-
.on('
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
* bootstrap-modal.js v2.
|
797
|
+
.on('click.dropdown.data-api', clearMenus)
|
798
|
+
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
799
|
+
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
800
|
+
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
801
|
+
|
802
|
+
}(window.jQuery);
|
803
|
+
/* =========================================================
|
804
|
+
* bootstrap-modal.js v2.3.2
|
774
805
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
775
806
|
* =========================================================
|
776
807
|
* Copyright 2012 Twitter, Inc.
|
@@ -831,8 +862,7 @@
|
|
831
862
|
that.$element.appendTo(document.body) //don't move modals dom position
|
832
863
|
}
|
833
864
|
|
834
|
-
that.$element
|
835
|
-
.show()
|
865
|
+
that.$element.show()
|
836
866
|
|
837
867
|
if (transition) {
|
838
868
|
that.$element[0].offsetWidth // force reflow
|
@@ -910,16 +940,17 @@
|
|
910
940
|
})
|
911
941
|
}
|
912
942
|
|
913
|
-
, hideModal: function (
|
914
|
-
this
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
943
|
+
, hideModal: function () {
|
944
|
+
var that = this
|
945
|
+
this.$element.hide()
|
946
|
+
this.backdrop(function () {
|
947
|
+
that.removeBackdrop()
|
948
|
+
that.$element.trigger('hidden')
|
949
|
+
})
|
919
950
|
}
|
920
951
|
|
921
952
|
, removeBackdrop: function () {
|
922
|
-
this.$backdrop.remove()
|
953
|
+
this.$backdrop && this.$backdrop.remove()
|
923
954
|
this.$backdrop = null
|
924
955
|
}
|
925
956
|
|
@@ -943,6 +974,8 @@
|
|
943
974
|
|
944
975
|
this.$backdrop.addClass('in')
|
945
976
|
|
977
|
+
if (!callback) return
|
978
|
+
|
946
979
|
doAnimate ?
|
947
980
|
this.$backdrop.one($.support.transition.end, callback) :
|
948
981
|
callback()
|
@@ -951,8 +984,8 @@
|
|
951
984
|
this.$backdrop.removeClass('in')
|
952
985
|
|
953
986
|
$.support.transition && this.$element.hasClass('fade')?
|
954
|
-
this.$backdrop.one($.support.transition.end,
|
955
|
-
|
987
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
988
|
+
callback()
|
956
989
|
|
957
990
|
} else if (callback) {
|
958
991
|
callback()
|
@@ -1015,7 +1048,7 @@
|
|
1015
1048
|
|
1016
1049
|
}(window.jQuery);
|
1017
1050
|
/* ===========================================================
|
1018
|
-
* bootstrap-tooltip.js v2.
|
1051
|
+
* bootstrap-tooltip.js v2.3.2
|
1019
1052
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
1020
1053
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
1021
1054
|
* ===========================================================
|
@@ -1054,19 +1087,27 @@
|
|
1054
1087
|
, init: function (type, element, options) {
|
1055
1088
|
var eventIn
|
1056
1089
|
, eventOut
|
1090
|
+
, triggers
|
1091
|
+
, trigger
|
1092
|
+
, i
|
1057
1093
|
|
1058
1094
|
this.type = type
|
1059
1095
|
this.$element = $(element)
|
1060
1096
|
this.options = this.getOptions(options)
|
1061
1097
|
this.enabled = true
|
1062
1098
|
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1099
|
+
triggers = this.options.trigger.split(' ')
|
1100
|
+
|
1101
|
+
for (i = triggers.length; i--;) {
|
1102
|
+
trigger = triggers[i]
|
1103
|
+
if (trigger == 'click') {
|
1104
|
+
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
1105
|
+
} else if (trigger != 'manual') {
|
1106
|
+
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
|
1107
|
+
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
|
1108
|
+
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
1109
|
+
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
1110
|
+
}
|
1070
1111
|
}
|
1071
1112
|
|
1072
1113
|
this.options.selector ?
|
@@ -1075,7 +1116,7 @@
|
|
1075
1116
|
}
|
1076
1117
|
|
1077
1118
|
, getOptions: function (options) {
|
1078
|
-
options = $.extend({}, $.fn[this.type].defaults,
|
1119
|
+
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
|
1079
1120
|
|
1080
1121
|
if (options.delay && typeof options.delay == 'number') {
|
1081
1122
|
options.delay = {
|
@@ -1088,7 +1129,15 @@
|
|
1088
1129
|
}
|
1089
1130
|
|
1090
1131
|
, enter: function (e) {
|
1091
|
-
var
|
1132
|
+
var defaults = $.fn[this.type].defaults
|
1133
|
+
, options = {}
|
1134
|
+
, self
|
1135
|
+
|
1136
|
+
this._options && $.each(this._options, function (key, value) {
|
1137
|
+
if (defaults[key] != value) options[key] = value
|
1138
|
+
}, this)
|
1139
|
+
|
1140
|
+
self = $(e.currentTarget)[this.type](options).data(this.type)
|
1092
1141
|
|
1093
1142
|
if (!self.options.delay || !self.options.delay.show) return self.show()
|
1094
1143
|
|
@@ -1113,14 +1162,16 @@
|
|
1113
1162
|
|
1114
1163
|
, show: function () {
|
1115
1164
|
var $tip
|
1116
|
-
, inside
|
1117
1165
|
, pos
|
1118
1166
|
, actualWidth
|
1119
1167
|
, actualHeight
|
1120
1168
|
, placement
|
1121
1169
|
, tp
|
1170
|
+
, e = $.Event('show')
|
1122
1171
|
|
1123
1172
|
if (this.hasContent() && this.enabled) {
|
1173
|
+
this.$element.trigger(e)
|
1174
|
+
if (e.isDefaultPrevented()) return
|
1124
1175
|
$tip = this.tip()
|
1125
1176
|
this.setContent()
|
1126
1177
|
|
@@ -1132,19 +1183,18 @@
|
|
1132
1183
|
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
1133
1184
|
this.options.placement
|
1134
1185
|
|
1135
|
-
inside = /in/.test(placement)
|
1136
|
-
|
1137
1186
|
$tip
|
1138
1187
|
.detach()
|
1139
1188
|
.css({ top: 0, left: 0, display: 'block' })
|
1140
|
-
.insertAfter(this.$element)
|
1141
1189
|
|
1142
|
-
|
1190
|
+
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
1191
|
+
|
1192
|
+
pos = this.getPosition()
|
1143
1193
|
|
1144
1194
|
actualWidth = $tip[0].offsetWidth
|
1145
1195
|
actualHeight = $tip[0].offsetHeight
|
1146
1196
|
|
1147
|
-
switch (
|
1197
|
+
switch (placement) {
|
1148
1198
|
case 'bottom':
|
1149
1199
|
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
|
1150
1200
|
break
|
@@ -1159,13 +1209,58 @@
|
|
1159
1209
|
break
|
1160
1210
|
}
|
1161
1211
|
|
1162
|
-
|
1163
|
-
|
1164
|
-
.addClass(placement)
|
1165
|
-
.addClass('in')
|
1212
|
+
this.applyPlacement(tp, placement)
|
1213
|
+
this.$element.trigger('shown')
|
1166
1214
|
}
|
1167
1215
|
}
|
1168
1216
|
|
1217
|
+
, applyPlacement: function(offset, placement){
|
1218
|
+
var $tip = this.tip()
|
1219
|
+
, width = $tip[0].offsetWidth
|
1220
|
+
, height = $tip[0].offsetHeight
|
1221
|
+
, actualWidth
|
1222
|
+
, actualHeight
|
1223
|
+
, delta
|
1224
|
+
, replace
|
1225
|
+
|
1226
|
+
$tip
|
1227
|
+
.offset(offset)
|
1228
|
+
.addClass(placement)
|
1229
|
+
.addClass('in')
|
1230
|
+
|
1231
|
+
actualWidth = $tip[0].offsetWidth
|
1232
|
+
actualHeight = $tip[0].offsetHeight
|
1233
|
+
|
1234
|
+
if (placement == 'top' && actualHeight != height) {
|
1235
|
+
offset.top = offset.top + height - actualHeight
|
1236
|
+
replace = true
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
if (placement == 'bottom' || placement == 'top') {
|
1240
|
+
delta = 0
|
1241
|
+
|
1242
|
+
if (offset.left < 0){
|
1243
|
+
delta = offset.left * -2
|
1244
|
+
offset.left = 0
|
1245
|
+
$tip.offset(offset)
|
1246
|
+
actualWidth = $tip[0].offsetWidth
|
1247
|
+
actualHeight = $tip[0].offsetHeight
|
1248
|
+
}
|
1249
|
+
|
1250
|
+
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
|
1251
|
+
} else {
|
1252
|
+
this.replaceArrow(actualHeight - height, actualHeight, 'top')
|
1253
|
+
}
|
1254
|
+
|
1255
|
+
if (replace) $tip.offset(offset)
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
, replaceArrow: function(delta, dimension, position){
|
1259
|
+
this
|
1260
|
+
.arrow()
|
1261
|
+
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
|
1262
|
+
}
|
1263
|
+
|
1169
1264
|
, setContent: function () {
|
1170
1265
|
var $tip = this.tip()
|
1171
1266
|
, title = this.getTitle()
|
@@ -1177,6 +1272,10 @@
|
|
1177
1272
|
, hide: function () {
|
1178
1273
|
var that = this
|
1179
1274
|
, $tip = this.tip()
|
1275
|
+
, e = $.Event('hide')
|
1276
|
+
|
1277
|
+
this.$element.trigger(e)
|
1278
|
+
if (e.isDefaultPrevented()) return
|
1180
1279
|
|
1181
1280
|
$tip.removeClass('in')
|
1182
1281
|
|
@@ -1195,13 +1294,15 @@
|
|
1195
1294
|
removeWithAnimation() :
|
1196
1295
|
$tip.detach()
|
1197
1296
|
|
1297
|
+
this.$element.trigger('hidden')
|
1298
|
+
|
1198
1299
|
return this
|
1199
1300
|
}
|
1200
1301
|
|
1201
1302
|
, fixTitle: function () {
|
1202
1303
|
var $e = this.$element
|
1203
1304
|
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
1204
|
-
$e.attr('data-original-title', $e.attr('title') || '').
|
1305
|
+
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
1205
1306
|
}
|
1206
1307
|
}
|
1207
1308
|
|
@@ -1209,11 +1310,12 @@
|
|
1209
1310
|
return this.getTitle()
|
1210
1311
|
}
|
1211
1312
|
|
1212
|
-
, getPosition: function (
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1313
|
+
, getPosition: function () {
|
1314
|
+
var el = this.$element[0]
|
1315
|
+
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
|
1316
|
+
width: el.offsetWidth
|
1317
|
+
, height: el.offsetHeight
|
1318
|
+
}, this.$element.offset())
|
1217
1319
|
}
|
1218
1320
|
|
1219
1321
|
, getTitle: function () {
|
@@ -1231,6 +1333,10 @@
|
|
1231
1333
|
return this.$tip = this.$tip || $(this.options.template)
|
1232
1334
|
}
|
1233
1335
|
|
1336
|
+
, arrow: function(){
|
1337
|
+
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
|
1338
|
+
}
|
1339
|
+
|
1234
1340
|
, validate: function () {
|
1235
1341
|
if (!this.$element[0].parentNode) {
|
1236
1342
|
this.hide()
|
@@ -1252,8 +1358,8 @@
|
|
1252
1358
|
}
|
1253
1359
|
|
1254
1360
|
, toggle: function (e) {
|
1255
|
-
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
1256
|
-
self
|
1361
|
+
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
|
1362
|
+
self.tip().hasClass('in') ? self.hide() : self.show()
|
1257
1363
|
}
|
1258
1364
|
|
1259
1365
|
, destroy: function () {
|
@@ -1285,10 +1391,11 @@
|
|
1285
1391
|
, placement: 'top'
|
1286
1392
|
, selector: false
|
1287
1393
|
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
1288
|
-
, trigger: 'hover'
|
1394
|
+
, trigger: 'hover focus'
|
1289
1395
|
, title: ''
|
1290
1396
|
, delay: 0
|
1291
1397
|
, html: false
|
1398
|
+
, container: false
|
1292
1399
|
}
|
1293
1400
|
|
1294
1401
|
|
@@ -1300,8 +1407,9 @@
|
|
1300
1407
|
return this
|
1301
1408
|
}
|
1302
1409
|
|
1303
|
-
}(window.jQuery)
|
1304
|
-
|
1410
|
+
}(window.jQuery);
|
1411
|
+
/* ===========================================================
|
1412
|
+
* bootstrap-popover.js v2.3.2
|
1305
1413
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
1306
1414
|
* ===========================================================
|
1307
1415
|
* Copyright 2012 Twitter, Inc.
|
@@ -1360,8 +1468,8 @@
|
|
1360
1468
|
, $e = this.$element
|
1361
1469
|
, o = this.options
|
1362
1470
|
|
1363
|
-
content = $e.
|
1364
|
-
||
|
1471
|
+
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
1472
|
+
|| $e.attr('data-content')
|
1365
1473
|
|
1366
1474
|
return content
|
1367
1475
|
}
|
@@ -1401,7 +1509,7 @@
|
|
1401
1509
|
placement: 'right'
|
1402
1510
|
, trigger: 'click'
|
1403
1511
|
, content: ''
|
1404
|
-
, template: '<div class="popover"><div class="arrow"></div><
|
1512
|
+
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
1405
1513
|
})
|
1406
1514
|
|
1407
1515
|
|
@@ -1413,8 +1521,9 @@
|
|
1413
1521
|
return this
|
1414
1522
|
}
|
1415
1523
|
|
1416
|
-
}(window.jQuery)
|
1417
|
-
|
1524
|
+
}(window.jQuery);
|
1525
|
+
/* =============================================================
|
1526
|
+
* bootstrap-scrollspy.js v2.3.2
|
1418
1527
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
1419
1528
|
* =============================================================
|
1420
1529
|
* Copyright 2012 Twitter, Inc.
|
@@ -1474,7 +1583,7 @@
|
|
1474
1583
|
, $href = /^#\w/.test(href) && $(href)
|
1475
1584
|
return ( $href
|
1476
1585
|
&& $href.length
|
1477
|
-
&& [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
|
1586
|
+
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
|
1478
1587
|
})
|
1479
1588
|
.sort(function (a, b) { return a[0] - b[0] })
|
1480
1589
|
.each(function () {
|
@@ -1575,7 +1684,7 @@
|
|
1575
1684
|
})
|
1576
1685
|
|
1577
1686
|
}(window.jQuery);/* ========================================================
|
1578
|
-
* bootstrap-tab.js v2.
|
1687
|
+
* bootstrap-tab.js v2.3.2
|
1579
1688
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
1580
1689
|
* ========================================================
|
1581
1690
|
* Copyright 2012 Twitter, Inc.
|
@@ -1718,7 +1827,7 @@
|
|
1718
1827
|
})
|
1719
1828
|
|
1720
1829
|
}(window.jQuery);/* =============================================================
|
1721
|
-
* bootstrap-typeahead.js v2.
|
1830
|
+
* bootstrap-typeahead.js v2.3.2
|
1722
1831
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
1723
1832
|
* =============================================================
|
1724
1833
|
* Copyright 2012 Twitter, Inc.
|
@@ -1891,6 +2000,7 @@
|
|
1891
2000
|
|
1892
2001
|
, listen: function () {
|
1893
2002
|
this.$element
|
2003
|
+
.on('focus', $.proxy(this.focus, this))
|
1894
2004
|
.on('blur', $.proxy(this.blur, this))
|
1895
2005
|
.on('keypress', $.proxy(this.keypress, this))
|
1896
2006
|
.on('keyup', $.proxy(this.keyup, this))
|
@@ -1902,6 +2012,7 @@
|
|
1902
2012
|
this.$menu
|
1903
2013
|
.on('click', $.proxy(this.click, this))
|
1904
2014
|
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
2015
|
+
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
|
1905
2016
|
}
|
1906
2017
|
|
1907
2018
|
, eventSupported: function(eventName) {
|
@@ -1975,22 +2086,33 @@
|
|
1975
2086
|
e.preventDefault()
|
1976
2087
|
}
|
1977
2088
|
|
2089
|
+
, focus: function (e) {
|
2090
|
+
this.focused = true
|
2091
|
+
}
|
2092
|
+
|
1978
2093
|
, blur: function (e) {
|
1979
|
-
|
1980
|
-
|
2094
|
+
this.focused = false
|
2095
|
+
if (!this.mousedover && this.shown) this.hide()
|
1981
2096
|
}
|
1982
2097
|
|
1983
2098
|
, click: function (e) {
|
1984
2099
|
e.stopPropagation()
|
1985
2100
|
e.preventDefault()
|
1986
2101
|
this.select()
|
2102
|
+
this.$element.focus()
|
1987
2103
|
}
|
1988
2104
|
|
1989
2105
|
, mouseenter: function (e) {
|
2106
|
+
this.mousedover = true
|
1990
2107
|
this.$menu.find('.active').removeClass('active')
|
1991
2108
|
$(e.currentTarget).addClass('active')
|
1992
2109
|
}
|
1993
2110
|
|
2111
|
+
, mouseleave: function (e) {
|
2112
|
+
this.mousedover = false
|
2113
|
+
if (!this.focused && this.shown) this.hide()
|
2114
|
+
}
|
2115
|
+
|
1994
2116
|
}
|
1995
2117
|
|
1996
2118
|
|
@@ -2035,13 +2157,12 @@
|
|
2035
2157
|
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
2036
2158
|
var $this = $(this)
|
2037
2159
|
if ($this.data('typeahead')) return
|
2038
|
-
e.preventDefault()
|
2039
2160
|
$this.typeahead($this.data())
|
2040
2161
|
})
|
2041
2162
|
|
2042
2163
|
}(window.jQuery);
|
2043
2164
|
/* ==========================================================
|
2044
|
-
* bootstrap-affix.js v2.
|
2165
|
+
* bootstrap-affix.js v2.3.2
|
2045
2166
|
* http://twitter.github.com/bootstrap/javascript.html#affix
|
2046
2167
|
* ==========================================================
|
2047
2168
|
* Copyright 2012 Twitter, Inc.
|