spiderfw 0.6.30 → 0.6.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +15 -7
  2. data/CHANGELOG +11 -0
  3. data/VERSION +1 -1
  4. data/apps/app_server/config/options.rb +1 -1
  5. data/apps/core/auth/controllers/login_controller.rb +3 -0
  6. data/apps/core/components/assets.rb +61 -3
  7. data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.eot +0 -0
  8. data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.svg +229 -0
  9. data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.ttf +0 -0
  10. data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.woff +0 -0
  11. data/apps/core/components/public/bootstrap_3/js/affix.js +140 -0
  12. data/apps/core/components/public/bootstrap_3/js/alert.js +92 -0
  13. data/apps/core/components/public/bootstrap_3/js/button.js +110 -0
  14. data/apps/core/components/public/bootstrap_3/js/carousel.js +210 -0
  15. data/apps/core/components/public/bootstrap_3/js/collapse.js +180 -0
  16. data/apps/core/components/public/bootstrap_3/js/dropdown.js +151 -0
  17. data/apps/core/components/public/bootstrap_3/js/modal.js +277 -0
  18. data/apps/core/components/public/bootstrap_3/js/popover.js +113 -0
  19. data/apps/core/components/public/bootstrap_3/js/scrollspy.js +158 -0
  20. data/apps/core/components/public/bootstrap_3/js/tab.js +128 -0
  21. data/apps/core/components/public/bootstrap_3/js/tooltip.js +456 -0
  22. data/apps/core/components/public/bootstrap_3/js/transition.js +48 -0
  23. data/apps/core/components/public/bootstrap_3/scss/_alerts.scss +67 -0
  24. data/apps/core/components/public/bootstrap_3/scss/_badges.scss +57 -0
  25. data/apps/core/components/public/bootstrap_3/scss/_breadcrumbs.scss +26 -0
  26. data/apps/core/components/public/bootstrap_3/scss/_button-groups.scss +240 -0
  27. data/apps/core/components/public/bootstrap_3/scss/_buttons.scss +159 -0
  28. data/apps/core/components/public/bootstrap_3/scss/_carousel.scss +243 -0
  29. data/apps/core/components/public/bootstrap_3/scss/_close.scss +35 -0
  30. data/apps/core/components/public/bootstrap_3/scss/_code.scss +62 -0
  31. data/apps/core/components/public/bootstrap_3/scss/_component-animations.scss +35 -0
  32. data/apps/core/components/public/bootstrap_3/scss/_dropdowns.scss +214 -0
  33. data/apps/core/components/public/bootstrap_3/scss/_forms.scss +489 -0
  34. data/apps/core/components/public/bootstrap_3/scss/_glyphicons.scss +237 -0
  35. data/apps/core/components/public/bootstrap_3/scss/_grid.scss +84 -0
  36. data/apps/core/components/public/bootstrap_3/scss/_input-groups.scss +166 -0
  37. data/apps/core/components/public/bootstrap_3/scss/_jumbotron.scss +48 -0
  38. data/apps/core/components/public/bootstrap_3/scss/_labels.scss +66 -0
  39. data/apps/core/components/public/bootstrap_3/scss/_list-group.scss +129 -0
  40. data/apps/core/components/public/bootstrap_3/scss/_media.scss +56 -0
  41. data/apps/core/components/public/bootstrap_3/scss/_mixins.scss +39 -0
  42. data/apps/core/components/public/bootstrap_3/scss/_modals.scss +147 -0
  43. data/apps/core/components/public/bootstrap_3/scss/_navbar.scss +658 -0
  44. data/apps/core/components/public/bootstrap_3/scss/_navs.scss +242 -0
  45. data/apps/core/components/public/bootstrap_3/scss/_normalize.scss +425 -0
  46. data/apps/core/components/public/bootstrap_3/scss/_pager.scss +55 -0
  47. data/apps/core/components/public/bootstrap_3/scss/_pagination.scss +88 -0
  48. data/apps/core/components/public/bootstrap_3/scss/_panels.scss +240 -0
  49. data/apps/core/components/public/bootstrap_3/scss/_popovers.scss +133 -0
  50. data/apps/core/components/public/bootstrap_3/scss/_print.scss +101 -0
  51. data/apps/core/components/public/bootstrap_3/scss/_progress-bars.scss +89 -0
  52. data/apps/core/components/public/bootstrap_3/scss/_responsive-embed.scss +34 -0
  53. data/apps/core/components/public/bootstrap_3/scss/_responsive-utilities.scss +174 -0
  54. data/apps/core/components/public/bootstrap_3/scss/_scaffolding.scss +150 -0
  55. data/apps/core/components/public/bootstrap_3/scss/_tables.scss +233 -0
  56. data/apps/core/components/public/bootstrap_3/scss/_theme.scss +247 -0
  57. data/apps/core/components/public/bootstrap_3/scss/_thumbnails.scss +38 -0
  58. data/apps/core/components/public/bootstrap_3/scss/_tooltip.scss +95 -0
  59. data/apps/core/components/public/bootstrap_3/scss/_type.scss +298 -0
  60. data/apps/core/components/public/bootstrap_3/scss/_utilities.scss +56 -0
  61. data/apps/core/components/public/bootstrap_3/scss/_variables.scss +853 -0
  62. data/apps/core/components/public/bootstrap_3/scss/_wells.scss +29 -0
  63. data/apps/core/components/public/bootstrap_3/scss/bootstrap.scss +50 -0
  64. data/apps/core/components/public/bootstrap_3/scss/mixins/_alerts.scss +14 -0
  65. data/apps/core/components/public/bootstrap_3/scss/mixins/_background-variant.scss +11 -0
  66. data/apps/core/components/public/bootstrap_3/scss/mixins/_border-radius.scss +18 -0
  67. data/apps/core/components/public/bootstrap_3/scss/mixins/_buttons.scss +50 -0
  68. data/apps/core/components/public/bootstrap_3/scss/mixins/_center-block.scss +7 -0
  69. data/apps/core/components/public/bootstrap_3/scss/mixins/_clearfix.scss +22 -0
  70. data/apps/core/components/public/bootstrap_3/scss/mixins/_forms.scss +84 -0
  71. data/apps/core/components/public/bootstrap_3/scss/mixins/_gradients.scss +58 -0
  72. data/apps/core/components/public/bootstrap_3/scss/mixins/_grid-framework.scss +87 -0
  73. data/apps/core/components/public/bootstrap_3/scss/mixins/_grid.scss +122 -0
  74. data/apps/core/components/public/bootstrap_3/scss/mixins/_hide-text.scss +21 -0
  75. data/apps/core/components/public/bootstrap_3/scss/mixins/_image.scss +33 -0
  76. data/apps/core/components/public/bootstrap_3/scss/mixins/_labels.scss +12 -0
  77. data/apps/core/components/public/bootstrap_3/scss/mixins/_list-group.scss +31 -0
  78. data/apps/core/components/public/bootstrap_3/scss/mixins/_nav-divider.scss +10 -0
  79. data/apps/core/components/public/bootstrap_3/scss/mixins/_nav-vertical-align.scss +9 -0
  80. data/apps/core/components/public/bootstrap_3/scss/mixins/_opacity.scss +8 -0
  81. data/apps/core/components/public/bootstrap_3/scss/mixins/_pagination.scss +23 -0
  82. data/apps/core/components/public/bootstrap_3/scss/mixins/_panels.scss +20 -0
  83. data/apps/core/components/public/bootstrap_3/scss/mixins/_progress-bar.scss +8 -0
  84. data/apps/core/components/public/bootstrap_3/scss/mixins/_reset-filter.scss +8 -0
  85. data/apps/core/components/public/bootstrap_3/scss/mixins/_resize.scss +6 -0
  86. data/apps/core/components/public/bootstrap_3/scss/mixins/_responsive-visibility.scss +21 -0
  87. data/apps/core/components/public/bootstrap_3/scss/mixins/_size.scss +10 -0
  88. data/apps/core/components/public/bootstrap_3/scss/mixins/_tab-focus.scss +9 -0
  89. data/apps/core/components/public/bootstrap_3/scss/mixins/_table-row.scss +28 -0
  90. data/apps/core/components/public/bootstrap_3/scss/mixins/_text-emphasis.scss +11 -0
  91. data/apps/core/components/public/bootstrap_3/scss/mixins/_text-overflow.scss +8 -0
  92. data/apps/core/components/public/bootstrap_3/scss/mixins/_vendor-prefixes.scss +224 -0
  93. data/apps/core/components/public/js/jquery/plugins/bsmselect/js/jquery.bsmselect.js +1 -1
  94. data/apps/core/components/widgets/month_calendar/month_calendar.shtml +3 -3
  95. data/apps/core/components/widgets/table/table.rb +6 -2
  96. data/apps/core/components/widgets/table/table.shtml +4 -4
  97. data/apps/core/forms/widgets/form/form.rb +1 -1
  98. data/apps/core/forms/widgets/inputs/select/select.rb +13 -2
  99. data/apps/messenger/lib/backends/mobyt.rb +6 -2
  100. data/apps/messenger/lib/backends/skebby.rb +1 -1
  101. data/apps/webdav/controllers/webdav_controller.rb +16 -7
  102. data/lib/spiderfw/controller/http_controller.rb +4 -1
  103. data/lib/spiderfw/env.rb +0 -1
  104. data/lib/spiderfw/http/adapters/rack.rb +3 -1
  105. data/lib/spiderfw/model/base_model.rb +7 -3
  106. data/lib/spiderfw/model/storage/connection_pool.rb +6 -2
  107. data/lib/spiderfw/model/storage/db/db_storage.rb +25 -9
  108. data/lib/spiderfw/site.rb +1 -1
  109. metadata +308 -149
@@ -0,0 +1,128 @@
1
+ /* ========================================================================
2
+ * Bootstrap: tab.js v3.1.1
3
+ * http://getbootstrap.com/javascript/#tabs
4
+ * ========================================================================
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * ======================================================================== */
8
+
9
+
10
+ +function ($) {
11
+ 'use strict';
12
+
13
+ // TAB CLASS DEFINITION
14
+ // ====================
15
+
16
+ var Tab = function (element) {
17
+ this.element = $(element)
18
+ }
19
+
20
+ Tab.VERSION = '3.1.1'
21
+
22
+ Tab.prototype.show = function () {
23
+ var $this = this.element
24
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
25
+ var selector = $this.data('target')
26
+
27
+ if (!selector) {
28
+ selector = $this.attr('href')
29
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
30
+ }
31
+
32
+ if ($this.parent('li').hasClass('active')) return
33
+
34
+ var previous = $ul.find('.active:last a')[0]
35
+ var e = $.Event('show.bs.tab', {
36
+ relatedTarget: previous
37
+ })
38
+
39
+ $this.trigger(e)
40
+
41
+ if (e.isDefaultPrevented()) return
42
+
43
+ var $target = $(selector)
44
+
45
+ this.activate($this.closest('li'), $ul)
46
+ this.activate($target, $target.parent(), function () {
47
+ $this.trigger({
48
+ type: 'shown.bs.tab',
49
+ relatedTarget: previous
50
+ })
51
+ })
52
+ }
53
+
54
+ Tab.prototype.activate = function (element, container, callback) {
55
+ var $active = container.find('> .active')
56
+ var transition = callback
57
+ && $.support.transition
58
+ && $active.hasClass('fade')
59
+
60
+ function next() {
61
+ $active
62
+ .removeClass('active')
63
+ .find('> .dropdown-menu > .active')
64
+ .removeClass('active')
65
+
66
+ element.addClass('active')
67
+
68
+ if (transition) {
69
+ element[0].offsetWidth // reflow for transition
70
+ element.addClass('in')
71
+ } else {
72
+ element.removeClass('fade')
73
+ }
74
+
75
+ if (element.parent('.dropdown-menu')) {
76
+ element.closest('li.dropdown').addClass('active')
77
+ }
78
+
79
+ callback && callback()
80
+ }
81
+
82
+ transition ?
83
+ $active
84
+ .one($.support.transition.end, next)
85
+ .emulateTransitionEnd(150) :
86
+ next()
87
+
88
+ $active.removeClass('in')
89
+ }
90
+
91
+
92
+ // TAB PLUGIN DEFINITION
93
+ // =====================
94
+
95
+ function Plugin( option ) {
96
+ return this.each(function () {
97
+ var $this = $(this)
98
+ var data = $this.data('bs.tab')
99
+
100
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
101
+ if (typeof option == 'string') data[option]()
102
+ })
103
+ }
104
+
105
+ var old = $.fn.tab
106
+
107
+ $.fn.tab = Plugin
108
+ $.fn.tab.Constructor = Tab
109
+
110
+
111
+ // TAB NO CONFLICT
112
+ // ===============
113
+
114
+ $.fn.tab.noConflict = function () {
115
+ $.fn.tab = old
116
+ return this
117
+ }
118
+
119
+
120
+ // TAB DATA-API
121
+ // ============
122
+
123
+ $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
124
+ e.preventDefault()
125
+ Plugin.call($(this), 'show')
126
+ })
127
+
128
+ }(jQuery);
@@ -0,0 +1,456 @@
1
+ /* ========================================================================
2
+ * Bootstrap: tooltip.js v3.1.1
3
+ * http://getbootstrap.com/javascript/#tooltip
4
+ * Inspired by the original jQuery.tipsy by Jason Frame
5
+ * ========================================================================
6
+ * Copyright 2011-2014 Twitter, Inc.
7
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
8
+ * ======================================================================== */
9
+
10
+
11
+ +function ($) {
12
+ 'use strict';
13
+
14
+ // TOOLTIP PUBLIC CLASS DEFINITION
15
+ // ===============================
16
+
17
+ var Tooltip = function (element, options) {
18
+ this.type =
19
+ this.options =
20
+ this.enabled =
21
+ this.timeout =
22
+ this.hoverState =
23
+ this.$element = null
24
+
25
+ this.init('tooltip', element, options)
26
+ }
27
+
28
+ Tooltip.VERSION = '3.1.1'
29
+
30
+ Tooltip.DEFAULTS = {
31
+ animation: true,
32
+ placement: 'top',
33
+ selector: false,
34
+ template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
35
+ trigger: 'hover focus',
36
+ title: '',
37
+ delay: 0,
38
+ html: false,
39
+ container: false,
40
+ viewport: {
41
+ selector: 'body',
42
+ padding: 0
43
+ }
44
+ }
45
+
46
+ Tooltip.prototype.init = function (type, element, options) {
47
+ this.enabled = true
48
+ this.type = type
49
+ this.$element = $(element)
50
+ this.options = this.getOptions(options)
51
+ this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
52
+
53
+ var triggers = this.options.trigger.split(' ')
54
+
55
+ for (var i = triggers.length; i--;) {
56
+ var trigger = triggers[i]
57
+
58
+ if (trigger == 'click') {
59
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
60
+ } else if (trigger != 'manual') {
61
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
62
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
63
+
64
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
65
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
66
+ }
67
+ }
68
+
69
+ this.options.selector ?
70
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
71
+ this.fixTitle()
72
+ }
73
+
74
+ Tooltip.prototype.getDefaults = function () {
75
+ return Tooltip.DEFAULTS
76
+ }
77
+
78
+ Tooltip.prototype.getOptions = function (options) {
79
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
80
+
81
+ if (options.delay && typeof options.delay == 'number') {
82
+ options.delay = {
83
+ show: options.delay,
84
+ hide: options.delay
85
+ }
86
+ }
87
+
88
+ return options
89
+ }
90
+
91
+ Tooltip.prototype.getDelegateOptions = function () {
92
+ var options = {}
93
+ var defaults = this.getDefaults()
94
+
95
+ this._options && $.each(this._options, function (key, value) {
96
+ if (defaults[key] != value) options[key] = value
97
+ })
98
+
99
+ return options
100
+ }
101
+
102
+ Tooltip.prototype.enter = function (obj) {
103
+ var self = obj instanceof this.constructor ?
104
+ obj : $(obj.currentTarget).data('bs.' + this.type)
105
+
106
+ if (!self) {
107
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
108
+ $(obj.currentTarget).data('bs.' + this.type, self)
109
+ }
110
+
111
+ clearTimeout(self.timeout)
112
+
113
+ self.hoverState = 'in'
114
+
115
+ if (!self.options.delay || !self.options.delay.show) return self.show()
116
+
117
+ self.timeout = setTimeout(function () {
118
+ if (self.hoverState == 'in') self.show()
119
+ }, self.options.delay.show)
120
+ }
121
+
122
+ Tooltip.prototype.leave = function (obj) {
123
+ var self = obj instanceof this.constructor ?
124
+ obj : $(obj.currentTarget).data('bs.' + this.type)
125
+
126
+ if (!self) {
127
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
128
+ $(obj.currentTarget).data('bs.' + this.type, self)
129
+ }
130
+
131
+ clearTimeout(self.timeout)
132
+
133
+ self.hoverState = 'out'
134
+
135
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
136
+
137
+ self.timeout = setTimeout(function () {
138
+ if (self.hoverState == 'out') self.hide()
139
+ }, self.options.delay.hide)
140
+ }
141
+
142
+ Tooltip.prototype.show = function () {
143
+ var e = $.Event('show.bs.' + this.type)
144
+
145
+ if (this.hasContent() && this.enabled) {
146
+ this.$element.trigger(e)
147
+
148
+ if (e.isDefaultPrevented()) return
149
+ var that = this;
150
+
151
+ var $tip = this.tip()
152
+
153
+ var tipId = this.getUID(this.type)
154
+
155
+ this.setContent()
156
+ $tip.attr('id', tipId)
157
+ this.$element.attr('aria-describedby', tipId)
158
+
159
+ if (this.options.animation) $tip.addClass('fade')
160
+
161
+ var placement = typeof this.options.placement == 'function' ?
162
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
163
+ this.options.placement
164
+
165
+ var autoToken = /\s?auto?\s?/i
166
+ var autoPlace = autoToken.test(placement)
167
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
168
+
169
+ $tip
170
+ .detach()
171
+ .css({ top: 0, left: 0, display: 'block' })
172
+ .addClass(placement)
173
+ .data('bs.' + this.type, this)
174
+
175
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
176
+
177
+ var pos = this.getPosition()
178
+ var actualWidth = $tip[0].offsetWidth
179
+ var actualHeight = $tip[0].offsetHeight
180
+
181
+ if (autoPlace) {
182
+ var orgPlacement = placement
183
+ var $parent = this.$element.parent()
184
+ var parentDim = this.getPosition($parent)
185
+
186
+ placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
187
+ placement == 'top' && pos.top - parentDim.scroll - actualHeight < 0 ? 'bottom' :
188
+ placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' :
189
+ placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' :
190
+ placement
191
+
192
+ $tip
193
+ .removeClass(orgPlacement)
194
+ .addClass(placement)
195
+ }
196
+
197
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
198
+
199
+ this.applyPlacement(calculatedOffset, placement)
200
+ this.hoverState = null
201
+
202
+ var complete = function() {
203
+ that.$element.trigger('shown.bs.' + that.type)
204
+ }
205
+
206
+ $.support.transition && this.$tip.hasClass('fade') ?
207
+ $tip
208
+ .one($.support.transition.end, complete)
209
+ .emulateTransitionEnd(150) :
210
+ complete()
211
+ }
212
+ }
213
+
214
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
215
+ var $tip = this.tip()
216
+ var width = $tip[0].offsetWidth
217
+ var height = $tip[0].offsetHeight
218
+
219
+ // manually read margins because getBoundingClientRect includes difference
220
+ var marginTop = parseInt($tip.css('margin-top'), 10)
221
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
222
+
223
+ // we must check for NaN for ie 8/9
224
+ if (isNaN(marginTop)) marginTop = 0
225
+ if (isNaN(marginLeft)) marginLeft = 0
226
+
227
+ offset.top = offset.top + marginTop
228
+ offset.left = offset.left + marginLeft
229
+
230
+ // $.fn.offset doesn't round pixel values
231
+ // so we use setOffset directly with our own function B-0
232
+ $.offset.setOffset($tip[0], $.extend({
233
+ using: function (props) {
234
+ $tip.css({
235
+ top: Math.round(props.top),
236
+ left: Math.round(props.left)
237
+ })
238
+ }
239
+ }, offset), 0)
240
+
241
+ $tip.addClass('in')
242
+
243
+ // check to see if placing tip in new offset caused the tip to resize itself
244
+ var actualWidth = $tip[0].offsetWidth
245
+ var actualHeight = $tip[0].offsetHeight
246
+
247
+ if (placement == 'top' && actualHeight != height) {
248
+ offset.top = offset.top + height - actualHeight
249
+ }
250
+
251
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
252
+
253
+ if (delta.left) offset.left += delta.left
254
+ else offset.top += delta.top
255
+
256
+ var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
257
+ var arrowPosition = delta.left ? 'left' : 'top'
258
+ var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
259
+
260
+ $tip.offset(offset)
261
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
262
+ }
263
+
264
+ Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
265
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
266
+ }
267
+
268
+ Tooltip.prototype.setContent = function () {
269
+ var $tip = this.tip()
270
+ var title = this.getTitle()
271
+
272
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
273
+ $tip.removeClass('fade in top bottom left right')
274
+ }
275
+
276
+ Tooltip.prototype.hide = function () {
277
+ var that = this
278
+ var $tip = this.tip()
279
+ var e = $.Event('hide.bs.' + this.type)
280
+
281
+ this.$element.removeAttr('aria-describedby')
282
+
283
+ function complete() {
284
+ if (that.hoverState != 'in') $tip.detach()
285
+ that.$element.trigger('hidden.bs.' + that.type)
286
+ }
287
+
288
+ this.$element.trigger(e)
289
+
290
+ if (e.isDefaultPrevented()) return
291
+
292
+ $tip.removeClass('in')
293
+
294
+ $.support.transition && this.$tip.hasClass('fade') ?
295
+ $tip
296
+ .one($.support.transition.end, complete)
297
+ .emulateTransitionEnd(150) :
298
+ complete()
299
+
300
+ this.hoverState = null
301
+
302
+ return this
303
+ }
304
+
305
+ Tooltip.prototype.fixTitle = function () {
306
+ var $e = this.$element
307
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
308
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
309
+ }
310
+ }
311
+
312
+ Tooltip.prototype.hasContent = function () {
313
+ return this.getTitle()
314
+ }
315
+
316
+ Tooltip.prototype.getPosition = function ($element) {
317
+ $element = $element || this.$element
318
+ var el = $element[0]
319
+ var isBody = el.tagName == 'BODY'
320
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
321
+ scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
322
+ width: isBody ? $(window).width() : $element.outerWidth(),
323
+ height: isBody ? $(window).height() : $element.outerHeight()
324
+ }, isBody ? {top: 0, left: 0} : $element.offset())
325
+ }
326
+
327
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
328
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
329
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
330
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
331
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
332
+
333
+ }
334
+
335
+ Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
336
+ var delta = { top: 0, left: 0 }
337
+ if (!this.$viewport) return delta
338
+
339
+ var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
340
+ var viewportDimensions = this.getPosition(this.$viewport)
341
+
342
+ if (/right|left/.test(placement)) {
343
+ var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
344
+ var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
345
+ if (topEdgeOffset < viewportDimensions.top) { // top overflow
346
+ delta.top = viewportDimensions.top - topEdgeOffset
347
+ } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
348
+ delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
349
+ }
350
+ } else {
351
+ var leftEdgeOffset = pos.left - viewportPadding
352
+ var rightEdgeOffset = pos.left + viewportPadding + actualWidth
353
+ if (leftEdgeOffset < viewportDimensions.left) { // left overflow
354
+ delta.left = viewportDimensions.left - leftEdgeOffset
355
+ } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
356
+ delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
357
+ }
358
+ }
359
+
360
+ return delta
361
+ }
362
+
363
+ Tooltip.prototype.getTitle = function () {
364
+ var title
365
+ var $e = this.$element
366
+ var o = this.options
367
+
368
+ title = $e.attr('data-original-title')
369
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
370
+
371
+ return title
372
+ }
373
+
374
+ Tooltip.prototype.getUID = function (prefix) {
375
+ do prefix += ~~(Math.random() * 1000000)
376
+ while (document.getElementById(prefix))
377
+ return prefix
378
+ }
379
+
380
+ Tooltip.prototype.tip = function () {
381
+ return this.$tip = this.$tip || $(this.options.template)
382
+ }
383
+
384
+ Tooltip.prototype.arrow = function () {
385
+ return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
386
+ }
387
+
388
+ Tooltip.prototype.validate = function () {
389
+ if (!this.$element[0].parentNode) {
390
+ this.hide()
391
+ this.$element = null
392
+ this.options = null
393
+ }
394
+ }
395
+
396
+ Tooltip.prototype.enable = function () {
397
+ this.enabled = true
398
+ }
399
+
400
+ Tooltip.prototype.disable = function () {
401
+ this.enabled = false
402
+ }
403
+
404
+ Tooltip.prototype.toggleEnabled = function () {
405
+ this.enabled = !this.enabled
406
+ }
407
+
408
+ Tooltip.prototype.toggle = function (e) {
409
+ var self = this
410
+ if (e) {
411
+ self = $(e.currentTarget).data('bs.' + this.type)
412
+ if (!self) {
413
+ self = new this.constructor(e.currentTarget, this.getDelegateOptions())
414
+ $(e.currentTarget).data('bs.' + this.type, self)
415
+ }
416
+ }
417
+
418
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
419
+ }
420
+
421
+ Tooltip.prototype.destroy = function () {
422
+ clearTimeout(this.timeout)
423
+ this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
424
+ }
425
+
426
+
427
+ // TOOLTIP PLUGIN DEFINITION
428
+ // =========================
429
+
430
+ function Plugin(option) {
431
+ return this.each(function () {
432
+ var $this = $(this)
433
+ var data = $this.data('bs.tooltip')
434
+ var options = typeof option == 'object' && option
435
+
436
+ if (!data && option == 'destroy') return
437
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
438
+ if (typeof option == 'string') data[option]()
439
+ })
440
+ }
441
+
442
+ var old = $.fn.tooltip
443
+
444
+ $.fn.tooltip = Plugin
445
+ $.fn.tooltip.Constructor = Tooltip
446
+
447
+
448
+ // TOOLTIP NO CONFLICT
449
+ // ===================
450
+
451
+ $.fn.tooltip.noConflict = function () {
452
+ $.fn.tooltip = old
453
+ return this
454
+ }
455
+
456
+ }(jQuery);
@@ -0,0 +1,48 @@
1
+ /* ========================================================================
2
+ * Bootstrap: transition.js v3.1.1
3
+ * http://getbootstrap.com/javascript/#transitions
4
+ * ========================================================================
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * ======================================================================== */
8
+
9
+
10
+ +function ($) {
11
+ 'use strict';
12
+
13
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
14
+ // ============================================================
15
+
16
+ function transitionEnd() {
17
+ var el = document.createElement('bootstrap')
18
+
19
+ var transEndEventNames = {
20
+ WebkitTransition : 'webkitTransitionEnd',
21
+ MozTransition : 'transitionend',
22
+ OTransition : 'oTransitionEnd otransitionend',
23
+ transition : 'transitionend'
24
+ }
25
+
26
+ for (var name in transEndEventNames) {
27
+ if (el.style[name] !== undefined) {
28
+ return { end: transEndEventNames[name] }
29
+ }
30
+ }
31
+
32
+ return false // explicit for ie8 ( ._.)
33
+ }
34
+
35
+ // http://blog.alexmaccaw.com/css-transitions
36
+ $.fn.emulateTransitionEnd = function (duration) {
37
+ var called = false, $el = this
38
+ $(this).one($.support.transition.end, function () { called = true })
39
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
40
+ setTimeout(callback, duration)
41
+ return this
42
+ }
43
+
44
+ $(function () {
45
+ $.support.transition = transitionEnd()
46
+ })
47
+
48
+ }(jQuery);
@@ -0,0 +1,67 @@
1
+ //
2
+ // Alerts
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base styles
7
+ // -------------------------
8
+
9
+ .alert {
10
+ padding: $alert-padding;
11
+ margin-bottom: $line-height-computed;
12
+ border: 1px solid transparent;
13
+ border-radius: $alert-border-radius;
14
+
15
+ // Headings for larger alerts
16
+ h4 {
17
+ margin-top: 0;
18
+ // Specified for the h4 to prevent conflicts of changing $headings-color
19
+ color: inherit;
20
+ }
21
+ // Provide class for links that match alerts
22
+ .alert-link {
23
+ font-weight: $alert-link-font-weight;
24
+ }
25
+
26
+ // Improve alignment and spacing of inner content
27
+ > p,
28
+ > ul {
29
+ margin-bottom: 0;
30
+ }
31
+ > p + p {
32
+ margin-top: 5px;
33
+ }
34
+ }
35
+
36
+ // Dismissable alerts
37
+ //
38
+ // Expand the right padding and account for the close button's positioning.
39
+
40
+ .alert-dismissable {
41
+ padding-right: ($alert-padding + 20);
42
+
43
+ // Adjust close link position
44
+ .close {
45
+ position: relative;
46
+ top: -2px;
47
+ right: -21px;
48
+ color: inherit;
49
+ }
50
+ }
51
+
52
+ // Alternate styles
53
+ //
54
+ // Generate contextual modifier classes for colorizing the alert.
55
+
56
+ .alert-success {
57
+ @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
58
+ }
59
+ .alert-info {
60
+ @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
61
+ }
62
+ .alert-warning {
63
+ @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
64
+ }
65
+ .alert-danger {
66
+ @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
67
+ }