twigg-app 0.0.1

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.
Files changed (175) hide show
  1. checksums.yaml +7 -0
  2. data/data/quips.yml +45 -0
  3. data/lib/twigg-app/app/quips.rb +13 -0
  4. data/lib/twigg-app/app/routes.rb +43 -0
  5. data/lib/twigg-app/app/server.rb +146 -0
  6. data/lib/twigg-app/app/version.rb +5 -0
  7. data/lib/twigg-app/app.rb +14 -0
  8. data/lib/twigg-app.rb +5 -0
  9. data/public/application.js +106 -0
  10. data/public/favicon.ico +0 -0
  11. data/public/favicon.png +0 -0
  12. data/public/vendor/bootstrap/CNAME +1 -0
  13. data/public/vendor/bootstrap/CONTRIBUTING.md +66 -0
  14. data/public/vendor/bootstrap/Gruntfile.js +195 -0
  15. data/public/vendor/bootstrap/LICENSE +176 -0
  16. data/public/vendor/bootstrap/README.md +139 -0
  17. data/public/vendor/bootstrap/_config.yml +28 -0
  18. data/public/vendor/bootstrap/_includes/ads.html +1 -0
  19. data/public/vendor/bootstrap/_includes/footer.html +33 -0
  20. data/public/vendor/bootstrap/_includes/header.html +43 -0
  21. data/public/vendor/bootstrap/_includes/nav-components.html +135 -0
  22. data/public/vendor/bootstrap/_includes/nav-css.html +77 -0
  23. data/public/vendor/bootstrap/_includes/nav-customize.html +40 -0
  24. data/public/vendor/bootstrap/_includes/nav-getting-started.html +28 -0
  25. data/public/vendor/bootstrap/_includes/nav-javascript.html +88 -0
  26. data/public/vendor/bootstrap/_includes/nav-main.html +32 -0
  27. data/public/vendor/bootstrap/_includes/old-bs-docs.html +8 -0
  28. data/public/vendor/bootstrap/_includes/social-buttons.html +16 -0
  29. data/public/vendor/bootstrap/_layouts/customize.html +52 -0
  30. data/public/vendor/bootstrap/_layouts/default.html +72 -0
  31. data/public/vendor/bootstrap/_layouts/home.html +43 -0
  32. data/public/vendor/bootstrap/assets/css/docs.css +896 -0
  33. data/public/vendor/bootstrap/assets/css/pygments-manni.css +66 -0
  34. data/public/vendor/bootstrap/assets/ico/apple-touch-icon-114-precomposed.png +0 -0
  35. data/public/vendor/bootstrap/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
  36. data/public/vendor/bootstrap/assets/ico/apple-touch-icon-57-precomposed.png +0 -0
  37. data/public/vendor/bootstrap/assets/ico/apple-touch-icon-72-precomposed.png +0 -0
  38. data/public/vendor/bootstrap/assets/ico/favicon.png +0 -0
  39. data/public/vendor/bootstrap/assets/js/application.js +82 -0
  40. data/public/vendor/bootstrap/assets/js/customizer.js +175 -0
  41. data/public/vendor/bootstrap/assets/js/holder.js +419 -0
  42. data/public/vendor/bootstrap/assets/js/html5shiv.js +8 -0
  43. data/public/vendor/bootstrap/assets/js/jquery.bbq.min.js +1287 -0
  44. data/public/vendor/bootstrap/assets/js/jquery.js +5 -0
  45. data/public/vendor/bootstrap/assets/js/jszip.js +1425 -0
  46. data/public/vendor/bootstrap/assets/js/less.js +9 -0
  47. data/public/vendor/bootstrap/assets/js/respond.min.js +6 -0
  48. data/public/vendor/bootstrap/assets/js/uglify.js +14 -0
  49. data/public/vendor/bootstrap/bower.json +11 -0
  50. data/public/vendor/bootstrap/browserstack.json +37 -0
  51. data/public/vendor/bootstrap/components.html +2555 -0
  52. data/public/vendor/bootstrap/composer.json +20 -0
  53. data/public/vendor/bootstrap/css.html +2276 -0
  54. data/public/vendor/bootstrap/customize.html +1480 -0
  55. data/public/vendor/bootstrap/dist/css/bootstrap.css +5579 -0
  56. data/public/vendor/bootstrap/dist/css/bootstrap.min.css +9 -0
  57. data/public/vendor/bootstrap/dist/js/bootstrap.js +1993 -0
  58. data/public/vendor/bootstrap/dist/js/bootstrap.min.js +6 -0
  59. data/public/vendor/bootstrap/getting-started.html +375 -0
  60. data/public/vendor/bootstrap/index.html +16 -0
  61. data/public/vendor/bootstrap/javascript.html +1904 -0
  62. data/public/vendor/bootstrap/js/affix.js +126 -0
  63. data/public/vendor/bootstrap/js/alert.js +98 -0
  64. data/public/vendor/bootstrap/js/button.js +109 -0
  65. data/public/vendor/bootstrap/js/carousel.js +217 -0
  66. data/public/vendor/bootstrap/js/collapse.js +179 -0
  67. data/public/vendor/bootstrap/js/dropdown.js +154 -0
  68. data/public/vendor/bootstrap/js/modal.js +244 -0
  69. data/public/vendor/bootstrap/js/popover.js +117 -0
  70. data/public/vendor/bootstrap/js/scrollspy.js +158 -0
  71. data/public/vendor/bootstrap/js/tab.js +135 -0
  72. data/public/vendor/bootstrap/js/tests/index.html +52 -0
  73. data/public/vendor/bootstrap/js/tests/phantom.js +63 -0
  74. data/public/vendor/bootstrap/js/tests/server.js +14 -0
  75. data/public/vendor/bootstrap/js/tests/unit/affix.js +25 -0
  76. data/public/vendor/bootstrap/js/tests/unit/alert.js +62 -0
  77. data/public/vendor/bootstrap/js/tests/unit/button.js +116 -0
  78. data/public/vendor/bootstrap/js/tests/unit/carousel.js +87 -0
  79. data/public/vendor/bootstrap/js/tests/unit/collapse.js +164 -0
  80. data/public/vendor/bootstrap/js/tests/unit/dropdown.js +219 -0
  81. data/public/vendor/bootstrap/js/tests/unit/modal.js +177 -0
  82. data/public/vendor/bootstrap/js/tests/unit/phantom.js +69 -0
  83. data/public/vendor/bootstrap/js/tests/unit/popover.js +133 -0
  84. data/public/vendor/bootstrap/js/tests/unit/scrollspy.js +37 -0
  85. data/public/vendor/bootstrap/js/tests/unit/tab.js +86 -0
  86. data/public/vendor/bootstrap/js/tests/unit/tooltip.js +437 -0
  87. data/public/vendor/bootstrap/js/tests/unit/transition.js +13 -0
  88. data/public/vendor/bootstrap/js/tests/vendor/jquery.js +5 -0
  89. data/public/vendor/bootstrap/js/tests/vendor/qunit.css +232 -0
  90. data/public/vendor/bootstrap/js/tests/vendor/qunit.js +1510 -0
  91. data/public/vendor/bootstrap/js/tooltip.js +382 -0
  92. data/public/vendor/bootstrap/js/transition.js +56 -0
  93. data/public/vendor/bootstrap/less/alerts.less +71 -0
  94. data/public/vendor/bootstrap/less/badges.less +51 -0
  95. data/public/vendor/bootstrap/less/bootstrap.less +63 -0
  96. data/public/vendor/bootstrap/less/breadcrumbs.less +23 -0
  97. data/public/vendor/bootstrap/less/button-groups.less +244 -0
  98. data/public/vendor/bootstrap/less/buttons.less +159 -0
  99. data/public/vendor/bootstrap/less/carousel.less +204 -0
  100. data/public/vendor/bootstrap/less/close.less +33 -0
  101. data/public/vendor/bootstrap/less/code.less +56 -0
  102. data/public/vendor/bootstrap/less/component-animations.less +29 -0
  103. data/public/vendor/bootstrap/less/dropdowns.less +176 -0
  104. data/public/vendor/bootstrap/less/forms.less +332 -0
  105. data/public/vendor/bootstrap/less/grid.less +340 -0
  106. data/public/vendor/bootstrap/less/input-groups.less +127 -0
  107. data/public/vendor/bootstrap/less/jumbotron.less +29 -0
  108. data/public/vendor/bootstrap/less/labels.less +54 -0
  109. data/public/vendor/bootstrap/less/list-group.less +88 -0
  110. data/public/vendor/bootstrap/less/media.less +56 -0
  111. data/public/vendor/bootstrap/less/mixins.less +693 -0
  112. data/public/vendor/bootstrap/less/modals.less +133 -0
  113. data/public/vendor/bootstrap/less/navbar.less +559 -0
  114. data/public/vendor/bootstrap/less/navs.less +228 -0
  115. data/public/vendor/bootstrap/less/normalize.less +396 -0
  116. data/public/vendor/bootstrap/less/pager.less +55 -0
  117. data/public/vendor/bootstrap/less/pagination.less +72 -0
  118. data/public/vendor/bootstrap/less/panels.less +128 -0
  119. data/public/vendor/bootstrap/less/popovers.less +133 -0
  120. data/public/vendor/bootstrap/less/print.less +100 -0
  121. data/public/vendor/bootstrap/less/progress-bars.less +99 -0
  122. data/public/vendor/bootstrap/less/responsive-utilities.less +149 -0
  123. data/public/vendor/bootstrap/less/scaffolding.less +111 -0
  124. data/public/vendor/bootstrap/less/tables.less +211 -0
  125. data/public/vendor/bootstrap/less/thumbnails.less +42 -0
  126. data/public/vendor/bootstrap/less/tooltip.less +95 -0
  127. data/public/vendor/bootstrap/less/type.less +238 -0
  128. data/public/vendor/bootstrap/less/utilities.less +42 -0
  129. data/public/vendor/bootstrap/less/variables.less +607 -0
  130. data/public/vendor/bootstrap/less/wells.less +29 -0
  131. data/public/vendor/bootstrap/package.json +33 -0
  132. data/public/vendor/bootstrap-glyphicons/CHANGELOG.md +3 -0
  133. data/public/vendor/bootstrap-glyphicons/CNAME +1 -0
  134. data/public/vendor/bootstrap-glyphicons/CONTRIBUTING.md +54 -0
  135. data/public/vendor/bootstrap-glyphicons/LICENSE +19 -0
  136. data/public/vendor/bootstrap-glyphicons/README.md +61 -0
  137. data/public/vendor/bootstrap-glyphicons/_config.yml +12 -0
  138. data/public/vendor/bootstrap-glyphicons/composer.json +9 -0
  139. data/public/vendor/bootstrap-glyphicons/css/bootstrap-glyphicons.css +2 -0
  140. data/public/vendor/bootstrap-glyphicons/css/bootstrap.css +9 -0
  141. data/public/vendor/bootstrap-glyphicons/css/docs.css +160 -0
  142. data/public/vendor/bootstrap-glyphicons/fonts/glyphiconshalflings-regular.eot +0 -0
  143. data/public/vendor/bootstrap-glyphicons/fonts/glyphiconshalflings-regular.otf +0 -0
  144. data/public/vendor/bootstrap-glyphicons/fonts/glyphiconshalflings-regular.svg +175 -0
  145. data/public/vendor/bootstrap-glyphicons/fonts/glyphiconshalflings-regular.ttf +0 -0
  146. data/public/vendor/bootstrap-glyphicons/fonts/glyphiconshalflings-regular.woff +0 -0
  147. data/public/vendor/bootstrap-glyphicons/index.html +255 -0
  148. data/public/vendor/bootstrap-glyphicons/less/bootstrap-glyphicons.less +201 -0
  149. data/public/vendor/bootstrap-glyphicons/package.json +18 -0
  150. data/public/vendor/d3/LICENSE +26 -0
  151. data/public/vendor/d3/README.md +7 -0
  152. data/public/vendor/d3/bower.json +25 -0
  153. data/public/vendor/d3/d3.js +8810 -0
  154. data/public/vendor/d3/d3.min.js +5 -0
  155. data/public/vendor/jquery/README.md +11 -0
  156. data/public/vendor/jquery/bower.json +11 -0
  157. data/public/vendor/jquery/component.json +15 -0
  158. data/public/vendor/jquery/composer.json +35 -0
  159. data/public/vendor/jquery/jquery-migrate.js +511 -0
  160. data/public/vendor/jquery/jquery-migrate.min.js +3 -0
  161. data/public/vendor/jquery/jquery.js +8829 -0
  162. data/public/vendor/jquery/jquery.min.js +6 -0
  163. data/public/vendor/jquery/jquery.min.map +1 -0
  164. data/public/vendor/jquery/package.json +7 -0
  165. data/public/vendor/replacejs/CHANGELOG.md +3 -0
  166. data/public/vendor/replacejs/MIT-LICENSE.txt +20 -0
  167. data/public/vendor/replacejs/README.md +123 -0
  168. data/public/vendor/replacejs/bower.json +24 -0
  169. data/public/vendor/replacejs/primer.js +17 -0
  170. data/public/vendor/replacejs/primer.min.js +1 -0
  171. data/public/vendor/replacejs/replace.js +182 -0
  172. data/public/vendor/stupidtable.js +158 -0
  173. data/views/dashboard.haml +17 -0
  174. data/views/layout.haml +60 -0
  175. metadata +330 -0
@@ -0,0 +1,382 @@
1
+ /* ========================================================================
2
+ * Bootstrap: tooltip.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#tooltip
4
+ * Inspired by the original jQuery.tipsy by Jason Frame
5
+ * ========================================================================
6
+ * Copyright 2012 Twitter, Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ * ======================================================================== */
20
+
21
+
22
+ +function ($) { "use strict";
23
+
24
+ // TOOLTIP PUBLIC CLASS DEFINITION
25
+ // ===============================
26
+
27
+ var Tooltip = function (element, options) {
28
+ this.type =
29
+ this.options =
30
+ this.enabled =
31
+ this.timeout =
32
+ this.hoverState =
33
+ this.$element = null
34
+
35
+ this.init('tooltip', element, options)
36
+ }
37
+
38
+ Tooltip.DEFAULTS = {
39
+ animation: true
40
+ , placement: 'top'
41
+ , selector: false
42
+ , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
43
+ , trigger: 'hover focus'
44
+ , title: ''
45
+ , delay: 0
46
+ , html: false
47
+ , container: false
48
+ }
49
+
50
+ Tooltip.prototype.init = function (type, element, options) {
51
+ this.enabled = true
52
+ this.type = type
53
+ this.$element = $(element)
54
+ this.options = this.getOptions(options)
55
+
56
+ var triggers = this.options.trigger.split(' ')
57
+
58
+ for (var i = triggers.length; i--;) {
59
+ var trigger = triggers[i]
60
+
61
+ if (trigger == 'click') {
62
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
63
+ } else if (trigger != 'manual') {
64
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
65
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
66
+
67
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
68
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
69
+ }
70
+ }
71
+
72
+ this.options.selector ?
73
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
74
+ this.fixTitle()
75
+ }
76
+
77
+ Tooltip.prototype.getDefaults = function () {
78
+ return Tooltip.DEFAULTS
79
+ }
80
+
81
+ Tooltip.prototype.getOptions = function (options) {
82
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
83
+
84
+ if (options.delay && typeof options.delay == 'number') {
85
+ options.delay = {
86
+ show: options.delay
87
+ , hide: options.delay
88
+ }
89
+ }
90
+
91
+ return options
92
+ }
93
+
94
+ Tooltip.prototype.getDelegateOptions = function () {
95
+ var options = {}
96
+ var defaults = this.getDefaults()
97
+
98
+ this._options && $.each(this._options, function (key, value) {
99
+ if (defaults[key] != value) options[key] = value
100
+ })
101
+
102
+ return options
103
+ }
104
+
105
+ Tooltip.prototype.enter = function (obj) {
106
+ var self = obj instanceof this.constructor ?
107
+ obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
108
+
109
+ clearTimeout(self.timeout)
110
+
111
+ if (!self.options.delay || !self.options.delay.show) return self.show()
112
+
113
+ self.hoverState = 'in'
114
+ self.timeout = setTimeout(function () {
115
+ if (self.hoverState == 'in') self.show()
116
+ }, self.options.delay.show)
117
+ }
118
+
119
+ Tooltip.prototype.leave = function (obj) {
120
+ var self = obj instanceof this.constructor ?
121
+ obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
122
+
123
+ clearTimeout(self.timeout)
124
+
125
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
126
+
127
+ self.hoverState = 'out'
128
+ self.timeout = setTimeout(function () {
129
+ if (self.hoverState == 'out') self.hide()
130
+ }, self.options.delay.hide)
131
+ }
132
+
133
+ Tooltip.prototype.show = function () {
134
+ var e = $.Event('show.bs.'+ this.type)
135
+
136
+ if (this.hasContent() && this.enabled) {
137
+ this.$element.trigger(e)
138
+
139
+ if (e.isDefaultPrevented()) return
140
+
141
+ var $tip = this.tip()
142
+
143
+ this.setContent()
144
+
145
+ if (this.options.animation) $tip.addClass('fade')
146
+
147
+ var placement = typeof this.options.placement == 'function' ?
148
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
149
+ this.options.placement
150
+
151
+ var autoToken = /\s?auto?\s?/i
152
+ var autoPlace = autoToken.test(placement)
153
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
154
+
155
+ $tip
156
+ .detach()
157
+ .css({ top: 0, left: 0, display: 'block' })
158
+ .addClass(placement)
159
+
160
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
161
+
162
+ var pos = this.getPosition()
163
+ var actualWidth = $tip[0].offsetWidth
164
+ var actualHeight = $tip[0].offsetHeight
165
+
166
+ if (autoPlace) {
167
+ var $parent = this.$element.parent()
168
+
169
+ var orgPlacement = placement
170
+ var docScroll = document.documentElement.scrollTop || document.body.scrollTop
171
+ var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
172
+ var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
173
+ var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
174
+
175
+ placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' :
176
+ placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' :
177
+ placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' :
178
+ placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' :
179
+ placement
180
+
181
+ $tip
182
+ .removeClass(orgPlacement)
183
+ .addClass(placement)
184
+ }
185
+
186
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
187
+
188
+ this.applyPlacement(calculatedOffset, placement)
189
+ this.$element.trigger('shown.bs.' + this.type)
190
+ }
191
+ }
192
+
193
+ Tooltip.prototype.applyPlacement = function(offset, placement) {
194
+ var replace
195
+ var $tip = this.tip()
196
+ var width = $tip[0].offsetWidth
197
+ var height = $tip[0].offsetHeight
198
+
199
+ // manually read margins because getBoundingClientRect includes difference
200
+ var marginTop = parseInt($tip.css('margin-top'), 10)
201
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
202
+
203
+ // we must check for NaN for ie 8/9
204
+ if (isNaN(marginTop)) marginTop = 0
205
+ if (isNaN(marginLeft)) marginLeft = 0
206
+
207
+ offset.top = offset.top + marginTop
208
+ offset.left = offset.left + marginLeft
209
+
210
+ $tip
211
+ .offset(offset)
212
+ .addClass('in')
213
+
214
+ // check to see if placing tip in new offset caused the tip to resize itself
215
+ var actualWidth = $tip[0].offsetWidth
216
+ var actualHeight = $tip[0].offsetHeight
217
+
218
+ if (placement == 'top' && actualHeight != height) {
219
+ replace = true
220
+ offset.top = offset.top + height - actualHeight
221
+ }
222
+
223
+ if (/bottom|top/.test(placement)) {
224
+ var delta = 0
225
+
226
+ if (offset.left < 0) {
227
+ delta = offset.left * -2
228
+ offset.left = 0
229
+
230
+ $tip.offset(offset)
231
+
232
+ actualWidth = $tip[0].offsetWidth
233
+ actualHeight = $tip[0].offsetHeight
234
+ }
235
+
236
+ this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
237
+ } else {
238
+ this.replaceArrow(actualHeight - height, actualHeight, 'top')
239
+ }
240
+
241
+ if (replace) $tip.offset(offset)
242
+ }
243
+
244
+ Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
245
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
246
+ }
247
+
248
+ Tooltip.prototype.setContent = function () {
249
+ var $tip = this.tip()
250
+ var title = this.getTitle()
251
+
252
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
253
+ $tip.removeClass('fade in top bottom left right')
254
+ }
255
+
256
+ Tooltip.prototype.hide = function () {
257
+ var that = this
258
+ var $tip = this.tip()
259
+ var e = $.Event('hide.bs.' + this.type)
260
+
261
+ function complete() { $tip.detach() }
262
+
263
+ this.$element.trigger(e)
264
+
265
+ if (e.isDefaultPrevented()) return
266
+
267
+ $tip.removeClass('in')
268
+
269
+ $.support.transition && this.$tip.hasClass('fade') ?
270
+ $tip
271
+ .one($.support.transition.end, complete)
272
+ .emulateTransitionEnd(150) :
273
+ complete()
274
+
275
+ this.$element.trigger('hidden.bs.' + this.type)
276
+
277
+ return this
278
+ }
279
+
280
+ Tooltip.prototype.fixTitle = function () {
281
+ var $e = this.$element
282
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
283
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
284
+ }
285
+ }
286
+
287
+ Tooltip.prototype.hasContent = function () {
288
+ return this.getTitle()
289
+ }
290
+
291
+ Tooltip.prototype.getPosition = function () {
292
+ var el = this.$element[0]
293
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
294
+ width: el.offsetWidth
295
+ , height: el.offsetHeight
296
+ }, this.$element.offset())
297
+ }
298
+
299
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
300
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
301
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
302
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
303
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
304
+ }
305
+
306
+ Tooltip.prototype.getTitle = function () {
307
+ var title
308
+ var $e = this.$element
309
+ var o = this.options
310
+
311
+ title = $e.attr('data-original-title')
312
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
313
+
314
+ return title
315
+ }
316
+
317
+ Tooltip.prototype.tip = function () {
318
+ return this.$tip = this.$tip || $(this.options.template)
319
+ }
320
+
321
+ Tooltip.prototype.arrow = function () {
322
+ return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
323
+ }
324
+
325
+ Tooltip.prototype.validate = function () {
326
+ if (!this.$element[0].parentNode) {
327
+ this.hide()
328
+ this.$element = null
329
+ this.options = null
330
+ }
331
+ }
332
+
333
+ Tooltip.prototype.enable = function () {
334
+ this.enabled = true
335
+ }
336
+
337
+ Tooltip.prototype.disable = function () {
338
+ this.enabled = false
339
+ }
340
+
341
+ Tooltip.prototype.toggleEnabled = function () {
342
+ this.enabled = !this.enabled
343
+ }
344
+
345
+ Tooltip.prototype.toggle = function (e) {
346
+ var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
347
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
348
+ }
349
+
350
+ Tooltip.prototype.destroy = function () {
351
+ this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
352
+ }
353
+
354
+
355
+ // TOOLTIP PLUGIN DEFINITION
356
+ // =========================
357
+
358
+ var old = $.fn.tooltip
359
+
360
+ $.fn.tooltip = function (option) {
361
+ return this.each(function () {
362
+ var $this = $(this)
363
+ var data = $this.data('bs.tooltip')
364
+ var options = typeof option == 'object' && option
365
+
366
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
367
+ if (typeof option == 'string') data[option]()
368
+ })
369
+ }
370
+
371
+ $.fn.tooltip.Constructor = Tooltip
372
+
373
+
374
+ // TOOLTIP NO CONFLICT
375
+ // ===================
376
+
377
+ $.fn.tooltip.noConflict = function () {
378
+ $.fn.tooltip = old
379
+ return this
380
+ }
381
+
382
+ }(window.jQuery);
@@ -0,0 +1,56 @@
1
+ /* ========================================================================
2
+ * Bootstrap: transition.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#transitions
4
+ * ========================================================================
5
+ * Copyright 2013 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ======================================================================== */
19
+
20
+
21
+ +function ($) { "use strict";
22
+
23
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
24
+ // ============================================================
25
+
26
+ function transitionEnd() {
27
+ var el = document.createElement('bootstrap')
28
+
29
+ var transEndEventNames = {
30
+ 'WebkitTransition' : 'webkitTransitionEnd'
31
+ , 'MozTransition' : 'transitionend'
32
+ , 'OTransition' : 'oTransitionEnd otransitionend'
33
+ , 'transition' : 'transitionend'
34
+ }
35
+
36
+ for (var name in transEndEventNames) {
37
+ if (el.style[name] !== undefined) {
38
+ return { end: transEndEventNames[name] }
39
+ }
40
+ }
41
+ }
42
+
43
+ // http://blog.alexmaccaw.com/css-transitions
44
+ $.fn.emulateTransitionEnd = function (duration) {
45
+ var called = false, $el = this
46
+ $(this).one($.support.transition.end, function () { called = true })
47
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
48
+ setTimeout(callback, duration)
49
+ return this
50
+ }
51
+
52
+ $(function () {
53
+ $.support.transition = transitionEnd()
54
+ })
55
+
56
+ }(window.jQuery);
@@ -0,0 +1,71 @@
1
+ //
2
+ // Alerts
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base styles
7
+ // -------------------------
8
+
9
+ .alert {
10
+ padding: @alert-padding;
11
+ margin-bottom: @line-height-computed;
12
+ color: @alert-text;
13
+ background-color: @alert-bg;
14
+ border: 1px solid @alert-border;
15
+ border-radius: @alert-border-radius;
16
+
17
+ // Headings for larger alerts
18
+ h4 {
19
+ margin-top: 0;
20
+ // Specified for the h4 to prevent conflicts of changing @headingsColor
21
+ color: inherit;
22
+ }
23
+ // Match the hr to the border of the alert
24
+ hr {
25
+ border-top-color: darken(@alert-border, 5%);
26
+ }
27
+ // Provide class for links that match alerts
28
+ .alert-link {
29
+ font-weight: @alert-link-font-weight;
30
+ color: darken(@alert-text, 10%);
31
+ }
32
+
33
+ // Improve alignment and spacing of inner content
34
+ > p,
35
+ > ul {
36
+ margin-bottom: 0;
37
+ }
38
+ > p + p {
39
+ margin-top: 5px;
40
+ }
41
+ }
42
+
43
+ // Dismissable alerts
44
+ //
45
+ // Expand the right padding and account for the close button's positioning.
46
+
47
+ .alert-dismissable {
48
+ padding-right: (@alert-padding + 20);
49
+
50
+ // Adjust close link position
51
+ .close {
52
+ position: relative;
53
+ top: -2px;
54
+ right: -21px;
55
+ color: inherit;
56
+ }
57
+ }
58
+
59
+ // Alternate styles
60
+ //
61
+ // Generate contextual modifier classes for colorizing the alert.
62
+
63
+ .alert-success {
64
+ .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
65
+ }
66
+ .alert-danger {
67
+ .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
68
+ }
69
+ .alert-info {
70
+ .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
71
+ }
@@ -0,0 +1,51 @@
1
+ //
2
+ // Badges
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base classes
7
+ .badge {
8
+ display: inline-block;
9
+ min-width: 10px;
10
+ padding: 3px 7px;
11
+ font-size: @font-size-small;
12
+ font-weight: @badge-font-weight;
13
+ color: @badge-color;
14
+ line-height: @badge-line-height;
15
+ vertical-align: baseline;
16
+ white-space: nowrap;
17
+ text-align: center;
18
+ background-color: @badge-bg;
19
+ border-radius: @badge-border-radius;
20
+
21
+ // Empty badges collapse automatically (not available in IE8)
22
+ &:empty {
23
+ display: none;
24
+ }
25
+ }
26
+
27
+ // Hover state, but only for links
28
+ a.badge {
29
+ &:hover,
30
+ &:focus {
31
+ color: @badge-link-hover-color;
32
+ text-decoration: none;
33
+ cursor: pointer;
34
+ }
35
+ }
36
+
37
+ // Quick fix for labels/badges in buttons
38
+ .btn .badge {
39
+ position: relative;
40
+ top: -1px;
41
+ }
42
+
43
+ // Account for counters in navs
44
+ a.list-group-item.active > .badge,
45
+ .nav-pills > .active > a > .badge {
46
+ color: @badge-active-color;
47
+ background-color: @badge-active-bg;
48
+ }
49
+ .nav-pills > li > a > .badge {
50
+ margin-left: 3px;
51
+ }
@@ -0,0 +1,63 @@
1
+ /*!
2
+ * Bootstrap v3.0.0
3
+ *
4
+ * Copyright 2013 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world by @mdo and @fat.
9
+ */
10
+
11
+ // Core variables and mixins
12
+ @import "variables.less";
13
+ @import "mixins.less";
14
+
15
+ // Reset
16
+ @import "normalize.less";
17
+ @import "print.less";
18
+
19
+ // Core CSS
20
+ @import "scaffolding.less";
21
+ @import "type.less";
22
+ @import "code.less";
23
+ @import "grid.less";
24
+
25
+ @import "tables.less";
26
+ @import "forms.less";
27
+ @import "buttons.less";
28
+
29
+ // Components: common
30
+ @import "component-animations.less";
31
+ @import "input-groups.less";
32
+ @import "dropdowns.less";
33
+ @import "list-group.less";
34
+ @import "panels.less";
35
+ @import "wells.less";
36
+ @import "close.less";
37
+
38
+ // Components: Nav
39
+ @import "navs.less";
40
+ @import "navbar.less";
41
+ @import "button-groups.less";
42
+ @import "breadcrumbs.less";
43
+ @import "pagination.less";
44
+ @import "pager.less";
45
+
46
+ // Components: Popovers
47
+ @import "modals.less";
48
+ @import "tooltip.less";
49
+ @import "popovers.less";
50
+
51
+ // Components: Misc
52
+ @import "alerts.less";
53
+ @import "thumbnails.less";
54
+ @import "media.less";
55
+ @import "labels.less";
56
+ @import "badges.less";
57
+ @import "progress-bars.less";
58
+ @import "carousel.less";
59
+ @import "jumbotron.less";
60
+
61
+ // Utility classes
62
+ @import "utilities.less"; // Has to be last to override when necessary
63
+ @import "responsive-utilities.less";
@@ -0,0 +1,23 @@
1
+ //
2
+ // Breadcrumbs
3
+ // --------------------------------------------------
4
+
5
+
6
+ .breadcrumb {
7
+ padding: 8px 15px;
8
+ margin-bottom: @line-height-computed;
9
+ list-style: none;
10
+ background-color: @breadcrumb-bg;
11
+ border-radius: @border-radius-base;
12
+ > li {
13
+ display: inline-block;
14
+ &+li:before {
15
+ content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space
16
+ padding: 0 5px;
17
+ color: @breadcrumb-color;
18
+ }
19
+ }
20
+ > .active {
21
+ color: @breadcrumb-active-color;
22
+ }
23
+ }