rvnstat 1.0.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.
Files changed (271) hide show
  1. checksums.yaml +7 -0
  2. data/._README.md +0 -0
  3. data/._ss.png +0 -0
  4. data/.gitignore +17 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +34 -0
  8. data/Rakefile +1 -0
  9. data/bin/._rvnstat +0 -0
  10. data/bin/rvnstat +9 -0
  11. data/config.ru +4 -0
  12. data/config.yml +3 -0
  13. data/lib/._app.rb +0 -0
  14. data/lib/._config.rb +0 -0
  15. data/lib/._require.rb +0 -0
  16. data/lib/._rvnstat.rb +0 -0
  17. data/lib/._vnstat.rb +0 -0
  18. data/lib/app.rb +102 -0
  19. data/lib/config.rb +13 -0
  20. data/lib/require.rb +10 -0
  21. data/lib/rvnstat.rb +5 -0
  22. data/lib/rvnstat/._version.rb +0 -0
  23. data/lib/rvnstat/version.rb +3 -0
  24. data/lib/vnstat.rb +74 -0
  25. data/public/CNAME +1 -0
  26. data/public/CONTRIBUTING.md +192 -0
  27. data/public/Gruntfile.js +418 -0
  28. data/public/LICENSE +21 -0
  29. data/public/README.md +173 -0
  30. data/public/_config.yml +35 -0
  31. data/public/bower.json +24 -0
  32. data/public/browserstack.json +44 -0
  33. data/public/composer.json +25 -0
  34. data/public/dist/css/._custom.css +0 -0
  35. data/public/dist/css/bootstrap-theme.css +347 -0
  36. data/public/dist/css/bootstrap-theme.css.map +1 -0
  37. data/public/dist/css/bootstrap-theme.min.css +7 -0
  38. data/public/dist/css/bootstrap.css +5831 -0
  39. data/public/dist/css/bootstrap.css.map +1 -0
  40. data/public/dist/css/bootstrap.min.css +7 -0
  41. data/public/dist/css/custom.css +20 -0
  42. data/public/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  43. data/public/dist/fonts/glyphicons-halflings-regular.svg +229 -0
  44. data/public/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  45. data/public/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  46. data/public/dist/js/bootstrap.js +1951 -0
  47. data/public/dist/js/bootstrap.min.js +6 -0
  48. data/public/docs/LICENSE +319 -0
  49. data/public/docs/_data/glyphicons.yml +203 -0
  50. data/public/docs/_data/showcase.yml +19 -0
  51. data/public/docs/_includes/ads.html +1 -0
  52. data/public/docs/_includes/customizer-variables.html +1690 -0
  53. data/public/docs/_includes/footer.html +70 -0
  54. data/public/docs/_includes/header.html +42 -0
  55. data/public/docs/_includes/nav-about.html +9 -0
  56. data/public/docs/_includes/nav-components.html +138 -0
  57. data/public/docs/_includes/nav-css.html +127 -0
  58. data/public/docs/_includes/nav-customize.html +46 -0
  59. data/public/docs/_includes/nav-getting-started.html +62 -0
  60. data/public/docs/_includes/nav-javascript.html +89 -0
  61. data/public/docs/_includes/nav-main.html +36 -0
  62. data/public/docs/_includes/nav-migration.html +12 -0
  63. data/public/docs/_includes/social-buttons.html +16 -0
  64. data/public/docs/_layouts/default.html +55 -0
  65. data/public/docs/_layouts/home.html +18 -0
  66. data/public/docs/about.html +149 -0
  67. data/public/docs/assets/css/docs.css +1394 -0
  68. data/public/docs/assets/css/docs.min.css +6 -0
  69. data/public/docs/assets/css/pygments-manni.css +66 -0
  70. data/public/docs/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
  71. data/public/docs/assets/ico/favicon.ico +0 -0
  72. data/public/docs/assets/img/components.png +0 -0
  73. data/public/docs/assets/img/devices.png +0 -0
  74. data/public/docs/assets/img/sass-less.png +0 -0
  75. data/public/docs/assets/js/application.js +101 -0
  76. data/public/docs/assets/js/customize.min.js +49 -0
  77. data/public/docs/assets/js/customizer.js +348 -0
  78. data/public/docs/assets/js/docs.min.js +16 -0
  79. data/public/docs/assets/js/ie8-responsive-file-warning.js +12 -0
  80. data/public/docs/assets/js/raw-files.min.js +8 -0
  81. data/public/docs/assets/js/vendor/blob.js +166 -0
  82. data/public/docs/assets/js/vendor/filesaver.js +236 -0
  83. data/public/docs/assets/js/vendor/holder.js +645 -0
  84. data/public/docs/assets/js/vendor/jszip.js +1474 -0
  85. data/public/docs/assets/js/vendor/less.min.js +16 -0
  86. data/public/docs/assets/js/vendor/uglify.min.js +14 -0
  87. data/public/docs/components.html +3001 -0
  88. data/public/docs/css.html +3346 -0
  89. data/public/docs/customize.html +356 -0
  90. data/public/docs/customizer-nav.jade +15 -0
  91. data/public/docs/customizer-variables.jade +21 -0
  92. data/public/docs/dist/css/bootstrap-theme.css.map +1 -0
  93. data/public/docs/dist/css/bootstrap-theme.min.css +7 -0
  94. data/public/docs/dist/css/bootstrap.css.map +1 -0
  95. data/public/docs/dist/css/bootstrap.min.css +7 -0
  96. data/public/docs/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  97. data/public/docs/dist/fonts/glyphicons-halflings-regular.svg +229 -0
  98. data/public/docs/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  99. data/public/docs/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  100. data/public/docs/dist/js/bootstrap.min.js +7 -0
  101. data/public/docs/examples/blog/blog.css +168 -0
  102. data/public/docs/examples/blog/index.html +171 -0
  103. data/public/docs/examples/carousel/carousel.css +148 -0
  104. data/public/docs/examples/carousel/index.html +206 -0
  105. data/public/docs/examples/cover/cover.css +161 -0
  106. data/public/docs/examples/cover/index.html +75 -0
  107. data/public/docs/examples/dashboard/dashboard.css +93 -0
  108. data/public/docs/examples/dashboard/index.html +243 -0
  109. data/public/docs/examples/grid/grid.css +28 -0
  110. data/public/docs/examples/grid/index.html +152 -0
  111. data/public/docs/examples/jumbotron-narrow/index.html +82 -0
  112. data/public/docs/examples/jumbotron-narrow/jumbotron-narrow.css +79 -0
  113. data/public/docs/examples/jumbotron/index.html +99 -0
  114. data/public/docs/examples/jumbotron/jumbotron.css +5 -0
  115. data/public/docs/examples/justified-nav/index.html +84 -0
  116. data/public/docs/examples/justified-nav/justified-nav.css +88 -0
  117. data/public/docs/examples/navbar-fixed-top/index.html +91 -0
  118. data/public/docs/examples/navbar-fixed-top/navbar-fixed-top.css +4 -0
  119. data/public/docs/examples/navbar-static-top/index.html +92 -0
  120. data/public/docs/examples/navbar-static-top/navbar-static-top.css +7 -0
  121. data/public/docs/examples/navbar/index.html +90 -0
  122. data/public/docs/examples/navbar/navbar.css +8 -0
  123. data/public/docs/examples/non-responsive/index.html +105 -0
  124. data/public/docs/examples/non-responsive/non-responsive.css +120 -0
  125. data/public/docs/examples/offcanvas/index.html +130 -0
  126. data/public/docs/examples/offcanvas/offcanvas.css +51 -0
  127. data/public/docs/examples/offcanvas/offcanvas.js +5 -0
  128. data/public/docs/examples/screenshots/blog.jpg +0 -0
  129. data/public/docs/examples/screenshots/carousel.jpg +0 -0
  130. data/public/docs/examples/screenshots/cover.jpg +0 -0
  131. data/public/docs/examples/screenshots/dashboard.jpg +0 -0
  132. data/public/docs/examples/screenshots/grid.jpg +0 -0
  133. data/public/docs/examples/screenshots/jumbotron-narrow.jpg +0 -0
  134. data/public/docs/examples/screenshots/jumbotron.jpg +0 -0
  135. data/public/docs/examples/screenshots/justified-nav.jpg +0 -0
  136. data/public/docs/examples/screenshots/navbar-fixed.jpg +0 -0
  137. data/public/docs/examples/screenshots/navbar-static.jpg +0 -0
  138. data/public/docs/examples/screenshots/navbar.jpg +0 -0
  139. data/public/docs/examples/screenshots/non-responsive.jpg +0 -0
  140. data/public/docs/examples/screenshots/offcanvas.jpg +0 -0
  141. data/public/docs/examples/screenshots/sign-in.jpg +0 -0
  142. data/public/docs/examples/screenshots/starter-template.jpg +0 -0
  143. data/public/docs/examples/screenshots/sticky-footer-navbar.jpg +0 -0
  144. data/public/docs/examples/screenshots/sticky-footer.jpg +0 -0
  145. data/public/docs/examples/screenshots/theme.jpg +0 -0
  146. data/public/docs/examples/signin/index.html +50 -0
  147. data/public/docs/examples/signin/signin.css +40 -0
  148. data/public/docs/examples/starter-template/index.html +68 -0
  149. data/public/docs/examples/starter-template/starter-template.css +7 -0
  150. data/public/docs/examples/sticky-footer-navbar/index.html +91 -0
  151. data/public/docs/examples/sticky-footer-navbar/sticky-footer-navbar.css +45 -0
  152. data/public/docs/examples/sticky-footer/index.html +55 -0
  153. data/public/docs/examples/sticky-footer/sticky-footer.css +38 -0
  154. data/public/docs/examples/theme/index.html +384 -0
  155. data/public/docs/examples/theme/theme.css +14 -0
  156. data/public/docs/getting-started.html +773 -0
  157. data/public/docs/grunt/bs-glyphicons-data-generator.js +33 -0
  158. data/public/docs/grunt/bs-lessdoc-parser.js +236 -0
  159. data/public/docs/grunt/bs-raw-files-generator.js +31 -0
  160. data/public/docs/index.html +72 -0
  161. data/public/docs/javascript.html +2141 -0
  162. data/public/docs/migration.html +423 -0
  163. data/public/fonts/glyphicons-halflings-regular.eot +0 -0
  164. data/public/fonts/glyphicons-halflings-regular.svg +229 -0
  165. data/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  166. data/public/fonts/glyphicons-halflings-regular.woff +0 -0
  167. data/public/js/._exporting.js +0 -0
  168. data/public/js/._highcharts-all.js +0 -0
  169. data/public/js/._jquery-min.js +0 -0
  170. data/public/js/.jscs.json +15 -0
  171. data/public/js/.jshintrc +14 -0
  172. data/public/js/affix.js +137 -0
  173. data/public/js/alert.js +88 -0
  174. data/public/js/bootstrap.min.js +6 -0
  175. data/public/js/button.js +107 -0
  176. data/public/js/carousel.js +205 -0
  177. data/public/js/collapse.js +170 -0
  178. data/public/js/dropdown.js +147 -0
  179. data/public/js/highcharts.js +294 -0
  180. data/public/js/jquery-1.11.0.min.js +4 -0
  181. data/public/js/modal.js +243 -0
  182. data/public/js/popover.js +110 -0
  183. data/public/js/scrollspy.js +153 -0
  184. data/public/js/tab.js +125 -0
  185. data/public/js/tests/index.html +54 -0
  186. data/public/js/tests/unit/affix.js +50 -0
  187. data/public/js/tests/unit/alert.js +62 -0
  188. data/public/js/tests/unit/button.js +122 -0
  189. data/public/js/tests/unit/carousel.js +110 -0
  190. data/public/js/tests/unit/collapse.js +164 -0
  191. data/public/js/tests/unit/dropdown.js +218 -0
  192. data/public/js/tests/unit/modal.js +195 -0
  193. data/public/js/tests/unit/phantom.js +69 -0
  194. data/public/js/tests/unit/popover.js +133 -0
  195. data/public/js/tests/unit/scrollspy.js +36 -0
  196. data/public/js/tests/unit/tab.js +86 -0
  197. data/public/js/tests/unit/tooltip.js +432 -0
  198. data/public/js/tests/vendor/jquery.js +6 -0
  199. data/public/js/tests/vendor/qunit.css +245 -0
  200. data/public/js/tests/vendor/qunit.js +2210 -0
  201. data/public/js/tooltip.js +399 -0
  202. data/public/js/transition.js +48 -0
  203. data/public/less/.csscomb.json +297 -0
  204. data/public/less/.csslintrc +19 -0
  205. data/public/less/alerts.less +67 -0
  206. data/public/less/badges.less +55 -0
  207. data/public/less/bootstrap.less +49 -0
  208. data/public/less/breadcrumbs.less +26 -0
  209. data/public/less/button-groups.less +226 -0
  210. data/public/less/buttons.less +155 -0
  211. data/public/less/carousel.less +232 -0
  212. data/public/less/close.less +33 -0
  213. data/public/less/code.less +63 -0
  214. data/public/less/component-animations.less +29 -0
  215. data/public/less/dropdowns.less +213 -0
  216. data/public/less/forms.less +419 -0
  217. data/public/less/glyphicons.less +233 -0
  218. data/public/less/grid.less +100 -0
  219. data/public/less/input-groups.less +157 -0
  220. data/public/less/jumbotron.less +44 -0
  221. data/public/less/labels.less +64 -0
  222. data/public/less/list-group.less +110 -0
  223. data/public/less/media.less +56 -0
  224. data/public/less/mixins.less +926 -0
  225. data/public/less/modals.less +138 -0
  226. data/public/less/navbar.less +616 -0
  227. data/public/less/navs.less +242 -0
  228. data/public/less/normalize.less +423 -0
  229. data/public/less/pager.less +55 -0
  230. data/public/less/pagination.less +88 -0
  231. data/public/less/panels.less +230 -0
  232. data/public/less/popovers.less +133 -0
  233. data/public/less/print.less +101 -0
  234. data/public/less/progress-bars.less +80 -0
  235. data/public/less/responsive-utilities.less +93 -0
  236. data/public/less/scaffolding.less +134 -0
  237. data/public/less/tables.less +233 -0
  238. data/public/less/theme.less +247 -0
  239. data/public/less/thumbnails.less +36 -0
  240. data/public/less/tooltip.less +95 -0
  241. data/public/less/type.less +296 -0
  242. data/public/less/utilities.less +56 -0
  243. data/public/less/variables.less +827 -0
  244. data/public/less/wells.less +29 -0
  245. data/public/package.json +71 -0
  246. data/public/test-infra/README.md +100 -0
  247. data/public/test-infra/npm-shrinkwrap.canonical.json +1 -0
  248. data/public/test-infra/requirements.txt +1 -0
  249. data/public/test-infra/s3_cache.py +107 -0
  250. data/public/test-infra/sauce_browsers.yml +83 -0
  251. data/public/test-infra/shrinkwrap.js +24 -0
  252. data/public/test-infra/uncached-npm-install.sh +4 -0
  253. data/rvnstat.gemspec +26 -0
  254. data/rvnstat.yml +3 -0
  255. data/ss.png +0 -0
  256. data/untitled.txt +0 -0
  257. data/views/._hourly.erb +0 -0
  258. data/views/._index.erb +0 -0
  259. data/views/._live_traffic.erb +0 -0
  260. data/views/._monthly.erb +0 -0
  261. data/views/._top_ten.erb +0 -0
  262. data/views/day_detail.erb +44 -0
  263. data/views/day_total.erb +42 -0
  264. data/views/graph_test.erb +2 -0
  265. data/views/hourly.erb +19 -0
  266. data/views/index.erb +71 -0
  267. data/views/layout.erb +28 -0
  268. data/views/live_traffic.erb +57 -0
  269. data/views/monthly.erb +21 -0
  270. data/views/top_ten.erb +21 -0
  271. metadata +385 -0
@@ -0,0 +1,399 @@
1
+ /* ========================================================================
2
+ * Bootstrap: tooltip.js v3.1.0
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.DEFAULTS = {
29
+ animation: true,
30
+ placement: 'top',
31
+ selector: false,
32
+ template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
33
+ trigger: 'hover focus',
34
+ title: '',
35
+ delay: 0,
36
+ html: false,
37
+ container: false
38
+ }
39
+
40
+ Tooltip.prototype.init = function (type, element, options) {
41
+ this.enabled = true
42
+ this.type = type
43
+ this.$element = $(element)
44
+ this.options = this.getOptions(options)
45
+
46
+ var triggers = this.options.trigger.split(' ')
47
+
48
+ for (var i = triggers.length; i--;) {
49
+ var trigger = triggers[i]
50
+
51
+ if (trigger == 'click') {
52
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
53
+ } else if (trigger != 'manual') {
54
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
55
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
56
+
57
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
58
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
59
+ }
60
+ }
61
+
62
+ this.options.selector ?
63
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
64
+ this.fixTitle()
65
+ }
66
+
67
+ Tooltip.prototype.getDefaults = function () {
68
+ return Tooltip.DEFAULTS
69
+ }
70
+
71
+ Tooltip.prototype.getOptions = function (options) {
72
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
73
+
74
+ if (options.delay && typeof options.delay == 'number') {
75
+ options.delay = {
76
+ show: options.delay,
77
+ hide: options.delay
78
+ }
79
+ }
80
+
81
+ return options
82
+ }
83
+
84
+ Tooltip.prototype.getDelegateOptions = function () {
85
+ var options = {}
86
+ var defaults = this.getDefaults()
87
+
88
+ this._options && $.each(this._options, function (key, value) {
89
+ if (defaults[key] != value) options[key] = value
90
+ })
91
+
92
+ return options
93
+ }
94
+
95
+ Tooltip.prototype.enter = function (obj) {
96
+ var self = obj instanceof this.constructor ?
97
+ obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
98
+
99
+ clearTimeout(self.timeout)
100
+
101
+ self.hoverState = 'in'
102
+
103
+ if (!self.options.delay || !self.options.delay.show) return self.show()
104
+
105
+ self.timeout = setTimeout(function () {
106
+ if (self.hoverState == 'in') self.show()
107
+ }, self.options.delay.show)
108
+ }
109
+
110
+ Tooltip.prototype.leave = function (obj) {
111
+ var self = obj instanceof this.constructor ?
112
+ obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
113
+
114
+ clearTimeout(self.timeout)
115
+
116
+ self.hoverState = 'out'
117
+
118
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
119
+
120
+ self.timeout = setTimeout(function () {
121
+ if (self.hoverState == 'out') self.hide()
122
+ }, self.options.delay.hide)
123
+ }
124
+
125
+ Tooltip.prototype.show = function () {
126
+ var e = $.Event('show.bs.' + this.type)
127
+
128
+ if (this.hasContent() && this.enabled) {
129
+ this.$element.trigger(e)
130
+
131
+ if (e.isDefaultPrevented()) return
132
+ var that = this;
133
+
134
+ var $tip = this.tip()
135
+
136
+ this.setContent()
137
+
138
+ if (this.options.animation) $tip.addClass('fade')
139
+
140
+ var placement = typeof this.options.placement == 'function' ?
141
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
142
+ this.options.placement
143
+
144
+ var autoToken = /\s?auto?\s?/i
145
+ var autoPlace = autoToken.test(placement)
146
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
147
+
148
+ $tip
149
+ .detach()
150
+ .css({ top: 0, left: 0, display: 'block' })
151
+ .addClass(placement)
152
+
153
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
154
+
155
+ var pos = this.getPosition()
156
+ var actualWidth = $tip[0].offsetWidth
157
+ var actualHeight = $tip[0].offsetHeight
158
+
159
+ if (autoPlace) {
160
+ var $parent = this.$element.parent()
161
+
162
+ var orgPlacement = placement
163
+ var docScroll = document.documentElement.scrollTop || document.body.scrollTop
164
+ var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
165
+ var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
166
+ var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
167
+
168
+ placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' :
169
+ placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' :
170
+ placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' :
171
+ placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' :
172
+ placement
173
+
174
+ $tip
175
+ .removeClass(orgPlacement)
176
+ .addClass(placement)
177
+ }
178
+
179
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
180
+
181
+ this.applyPlacement(calculatedOffset, placement)
182
+ this.hoverState = null
183
+
184
+ var complete = function() {
185
+ that.$element.trigger('shown.bs.' + that.type)
186
+ }
187
+
188
+ $.support.transition && this.$tip.hasClass('fade') ?
189
+ $tip
190
+ .one($.support.transition.end, complete)
191
+ .emulateTransitionEnd(150) :
192
+ complete()
193
+ }
194
+ }
195
+
196
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
197
+ var replace
198
+ var $tip = this.tip()
199
+ var width = $tip[0].offsetWidth
200
+ var height = $tip[0].offsetHeight
201
+
202
+ // manually read margins because getBoundingClientRect includes difference
203
+ var marginTop = parseInt($tip.css('margin-top'), 10)
204
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
205
+
206
+ // we must check for NaN for ie 8/9
207
+ if (isNaN(marginTop)) marginTop = 0
208
+ if (isNaN(marginLeft)) marginLeft = 0
209
+
210
+ offset.top = offset.top + marginTop
211
+ offset.left = offset.left + marginLeft
212
+
213
+ // $.fn.offset doesn't round pixel values
214
+ // so we use setOffset directly with our own function B-0
215
+ $.offset.setOffset($tip[0], $.extend({
216
+ using: function (props) {
217
+ $tip.css({
218
+ top: Math.round(props.top),
219
+ left: Math.round(props.left)
220
+ })
221
+ }
222
+ }, offset), 0)
223
+
224
+ $tip.addClass('in')
225
+
226
+ // check to see if placing tip in new offset caused the tip to resize itself
227
+ var actualWidth = $tip[0].offsetWidth
228
+ var actualHeight = $tip[0].offsetHeight
229
+
230
+ if (placement == 'top' && actualHeight != height) {
231
+ replace = true
232
+ offset.top = offset.top + height - actualHeight
233
+ }
234
+
235
+ if (/bottom|top/.test(placement)) {
236
+ var delta = 0
237
+
238
+ if (offset.left < 0) {
239
+ delta = offset.left * -2
240
+ offset.left = 0
241
+
242
+ $tip.offset(offset)
243
+
244
+ actualWidth = $tip[0].offsetWidth
245
+ actualHeight = $tip[0].offsetHeight
246
+ }
247
+
248
+ this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
249
+ } else {
250
+ this.replaceArrow(actualHeight - height, actualHeight, 'top')
251
+ }
252
+
253
+ if (replace) $tip.offset(offset)
254
+ }
255
+
256
+ Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
257
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
258
+ }
259
+
260
+ Tooltip.prototype.setContent = function () {
261
+ var $tip = this.tip()
262
+ var title = this.getTitle()
263
+
264
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
265
+ $tip.removeClass('fade in top bottom left right')
266
+ }
267
+
268
+ Tooltip.prototype.hide = function () {
269
+ var that = this
270
+ var $tip = this.tip()
271
+ var e = $.Event('hide.bs.' + this.type)
272
+
273
+ function complete() {
274
+ if (that.hoverState != 'in') $tip.detach()
275
+ that.$element.trigger('hidden.bs.' + that.type)
276
+ }
277
+
278
+ this.$element.trigger(e)
279
+
280
+ if (e.isDefaultPrevented()) return
281
+
282
+ $tip.removeClass('in')
283
+
284
+ $.support.transition && this.$tip.hasClass('fade') ?
285
+ $tip
286
+ .one($.support.transition.end, complete)
287
+ .emulateTransitionEnd(150) :
288
+ complete()
289
+
290
+ this.hoverState = null
291
+
292
+ return this
293
+ }
294
+
295
+ Tooltip.prototype.fixTitle = function () {
296
+ var $e = this.$element
297
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
298
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
299
+ }
300
+ }
301
+
302
+ Tooltip.prototype.hasContent = function () {
303
+ return this.getTitle()
304
+ }
305
+
306
+ Tooltip.prototype.getPosition = function () {
307
+ var el = this.$element[0]
308
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
309
+ width: el.offsetWidth,
310
+ height: el.offsetHeight
311
+ }, this.$element.offset())
312
+ }
313
+
314
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
315
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
316
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
317
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
318
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
319
+ }
320
+
321
+ Tooltip.prototype.getTitle = function () {
322
+ var title
323
+ var $e = this.$element
324
+ var o = this.options
325
+
326
+ title = $e.attr('data-original-title')
327
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
328
+
329
+ return title
330
+ }
331
+
332
+ Tooltip.prototype.tip = function () {
333
+ return this.$tip = this.$tip || $(this.options.template)
334
+ }
335
+
336
+ Tooltip.prototype.arrow = function () {
337
+ return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
338
+ }
339
+
340
+ Tooltip.prototype.validate = function () {
341
+ if (!this.$element[0].parentNode) {
342
+ this.hide()
343
+ this.$element = null
344
+ this.options = null
345
+ }
346
+ }
347
+
348
+ Tooltip.prototype.enable = function () {
349
+ this.enabled = true
350
+ }
351
+
352
+ Tooltip.prototype.disable = function () {
353
+ this.enabled = false
354
+ }
355
+
356
+ Tooltip.prototype.toggleEnabled = function () {
357
+ this.enabled = !this.enabled
358
+ }
359
+
360
+ Tooltip.prototype.toggle = function (e) {
361
+ var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
362
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
363
+ }
364
+
365
+ Tooltip.prototype.destroy = function () {
366
+ clearTimeout(this.timeout)
367
+ this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
368
+ }
369
+
370
+
371
+ // TOOLTIP PLUGIN DEFINITION
372
+ // =========================
373
+
374
+ var old = $.fn.tooltip
375
+
376
+ $.fn.tooltip = function (option) {
377
+ return this.each(function () {
378
+ var $this = $(this)
379
+ var data = $this.data('bs.tooltip')
380
+ var options = typeof option == 'object' && option
381
+
382
+ if (!data && option == 'destroy') return
383
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
384
+ if (typeof option == 'string') data[option]()
385
+ })
386
+ }
387
+
388
+ $.fn.tooltip.Constructor = Tooltip
389
+
390
+
391
+ // TOOLTIP NO CONFLICT
392
+ // ===================
393
+
394
+ $.fn.tooltip.noConflict = function () {
395
+ $.fn.tooltip = old
396
+ return this
397
+ }
398
+
399
+ }(jQuery);
@@ -0,0 +1,48 @@
1
+ /* ========================================================================
2
+ * Bootstrap: transition.js v3.1.0
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,297 @@
1
+ {
2
+ "always-semicolon": true,
3
+ "block-indent": 2,
4
+ "colon-space": true,
5
+ "color-case": "lower",
6
+ "color-shorthand": true,
7
+ "combinator-space": true,
8
+ "element-case": "lower",
9
+ "eof-newline": true,
10
+ "leading-zero": false,
11
+ "remove-empty-rulesets": true,
12
+ "rule-indent": 2,
13
+ "stick-brace": true,
14
+ "strip-spaces": true,
15
+ "unitless-zero": true,
16
+ "vendor-prefix-align": true,
17
+ "sort-order": [
18
+ [
19
+ "position",
20
+ "top",
21
+ "right",
22
+ "bottom",
23
+ "left",
24
+ "z-index",
25
+ "display",
26
+ "float",
27
+ "width",
28
+ "min-width",
29
+ "max-width",
30
+ "height",
31
+ "min-height",
32
+ "max-height",
33
+ "-webkit-box-sizing",
34
+ "-moz-box-sizing",
35
+ "box-sizing",
36
+ "-webkit-appearance",
37
+ "padding",
38
+ "padding-top",
39
+ "padding-right",
40
+ "padding-bottom",
41
+ "padding-left",
42
+ "margin",
43
+ "margin-top",
44
+ "margin-right",
45
+ "margin-bottom",
46
+ "margin-left",
47
+ "overflow",
48
+ "overflow-x",
49
+ "overflow-y",
50
+ "-webkit-overflow-scrolling",
51
+ "-ms-overflow-x",
52
+ "-ms-overflow-y",
53
+ "-ms-overflow-style",
54
+ "clip",
55
+ "clear",
56
+ "font",
57
+ "font-family",
58
+ "font-size",
59
+ "font-style",
60
+ "font-weight",
61
+ "font-variant",
62
+ "font-size-adjust",
63
+ "font-stretch",
64
+ "font-effect",
65
+ "font-emphasize",
66
+ "font-emphasize-position",
67
+ "font-emphasize-style",
68
+ "font-smooth",
69
+ "-webkit-hyphens",
70
+ "-moz-hyphens",
71
+ "hyphens",
72
+ "line-height",
73
+ "color",
74
+ "text-align",
75
+ "-webkit-text-align-last",
76
+ "-moz-text-align-last",
77
+ "-ms-text-align-last",
78
+ "text-align-last",
79
+ "text-emphasis",
80
+ "text-emphasis-color",
81
+ "text-emphasis-style",
82
+ "text-emphasis-position",
83
+ "text-decoration",
84
+ "text-indent",
85
+ "text-justify",
86
+ "text-outline",
87
+ "-ms-text-overflow",
88
+ "text-overflow",
89
+ "text-overflow-ellipsis",
90
+ "text-overflow-mode",
91
+ "text-shadow",
92
+ "text-transform",
93
+ "text-wrap",
94
+ "-webkit-text-size-adjust",
95
+ "-ms-text-size-adjust",
96
+ "letter-spacing",
97
+ "-ms-word-break",
98
+ "word-break",
99
+ "word-spacing",
100
+ "-ms-word-wrap",
101
+ "word-wrap",
102
+ "-moz-tab-size",
103
+ "-o-tab-size",
104
+ "tab-size",
105
+ "white-space",
106
+ "vertical-align",
107
+ "list-style",
108
+ "list-style-position",
109
+ "list-style-type",
110
+ "list-style-image",
111
+ "pointer-events",
112
+ "cursor",
113
+ "visibility",
114
+ "zoom",
115
+ "flex-direction",
116
+ "flex-order",
117
+ "flex-pack",
118
+ "flex-align",
119
+ "table-layout",
120
+ "empty-cells",
121
+ "caption-side",
122
+ "border-spacing",
123
+ "border-collapse",
124
+ "content",
125
+ "quotes",
126
+ "counter-reset",
127
+ "counter-increment",
128
+ "resize",
129
+ "-webkit-user-select",
130
+ "-moz-user-select",
131
+ "-ms-user-select",
132
+ "-o-user-select",
133
+ "user-select",
134
+ "nav-index",
135
+ "nav-up",
136
+ "nav-right",
137
+ "nav-down",
138
+ "nav-left",
139
+ "background",
140
+ "background-color",
141
+ "background-image",
142
+ "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
143
+ "filter:progid:DXImageTransform.Microsoft.gradient",
144
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
145
+ "filter",
146
+ "background-repeat",
147
+ "background-attachment",
148
+ "background-position",
149
+ "background-position-x",
150
+ "background-position-y",
151
+ "-webkit-background-clip",
152
+ "-moz-background-clip",
153
+ "background-clip",
154
+ "background-origin",
155
+ "-webkit-background-size",
156
+ "-moz-background-size",
157
+ "-o-background-size",
158
+ "background-size",
159
+ "border",
160
+ "border-color",
161
+ "border-style",
162
+ "border-width",
163
+ "border-top",
164
+ "border-top-color",
165
+ "border-top-style",
166
+ "border-top-width",
167
+ "border-right",
168
+ "border-right-color",
169
+ "border-right-style",
170
+ "border-right-width",
171
+ "border-bottom",
172
+ "border-bottom-color",
173
+ "border-bottom-style",
174
+ "border-bottom-width",
175
+ "border-left",
176
+ "border-left-color",
177
+ "border-left-style",
178
+ "border-left-width",
179
+ "border-radius",
180
+ "border-top-left-radius",
181
+ "border-top-right-radius",
182
+ "border-bottom-right-radius",
183
+ "border-bottom-left-radius",
184
+ "-webkit-border-image",
185
+ "-moz-border-image",
186
+ "-o-border-image",
187
+ "border-image",
188
+ "-webkit-border-image-source",
189
+ "-moz-border-image-source",
190
+ "-o-border-image-source",
191
+ "border-image-source",
192
+ "-webkit-border-image-slice",
193
+ "-moz-border-image-slice",
194
+ "-o-border-image-slice",
195
+ "border-image-slice",
196
+ "-webkit-border-image-width",
197
+ "-moz-border-image-width",
198
+ "-o-border-image-width",
199
+ "border-image-width",
200
+ "-webkit-border-image-outset",
201
+ "-moz-border-image-outset",
202
+ "-o-border-image-outset",
203
+ "border-image-outset",
204
+ "-webkit-border-image-repeat",
205
+ "-moz-border-image-repeat",
206
+ "-o-border-image-repeat",
207
+ "border-image-repeat",
208
+ "outline",
209
+ "outline-width",
210
+ "outline-style",
211
+ "outline-color",
212
+ "outline-offset",
213
+ "-webkit-box-shadow",
214
+ "-moz-box-shadow",
215
+ "box-shadow",
216
+ "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity",
217
+ "-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
218
+ "opacity",
219
+ "-ms-interpolation-mode",
220
+ "-webkit-transition",
221
+ "-moz-transition",
222
+ "-ms-transition",
223
+ "-o-transition",
224
+ "transition",
225
+ "-webkit-transition-delay",
226
+ "-moz-transition-delay",
227
+ "-ms-transition-delay",
228
+ "-o-transition-delay",
229
+ "transition-delay",
230
+ "-webkit-transition-timing-function",
231
+ "-moz-transition-timing-function",
232
+ "-ms-transition-timing-function",
233
+ "-o-transition-timing-function",
234
+ "transition-timing-function",
235
+ "-webkit-transition-duration",
236
+ "-moz-transition-duration",
237
+ "-ms-transition-duration",
238
+ "-o-transition-duration",
239
+ "transition-duration",
240
+ "-webkit-transition-property",
241
+ "-moz-transition-property",
242
+ "-ms-transition-property",
243
+ "-o-transition-property",
244
+ "transition-property",
245
+ "-webkit-transform",
246
+ "-moz-transform",
247
+ "-ms-transform",
248
+ "-o-transform",
249
+ "transform",
250
+ "-webkit-transform-origin",
251
+ "-moz-transform-origin",
252
+ "-ms-transform-origin",
253
+ "-o-transform-origin",
254
+ "transform-origin",
255
+ "-webkit-animation",
256
+ "-moz-animation",
257
+ "-ms-animation",
258
+ "-o-animation",
259
+ "animation",
260
+ "-webkit-animation-name",
261
+ "-moz-animation-name",
262
+ "-ms-animation-name",
263
+ "-o-animation-name",
264
+ "animation-name",
265
+ "-webkit-animation-duration",
266
+ "-moz-animation-duration",
267
+ "-ms-animation-duration",
268
+ "-o-animation-duration",
269
+ "animation-duration",
270
+ "-webkit-animation-play-state",
271
+ "-moz-animation-play-state",
272
+ "-ms-animation-play-state",
273
+ "-o-animation-play-state",
274
+ "animation-play-state",
275
+ "-webkit-animation-timing-function",
276
+ "-moz-animation-timing-function",
277
+ "-ms-animation-timing-function",
278
+ "-o-animation-timing-function",
279
+ "animation-timing-function",
280
+ "-webkit-animation-delay",
281
+ "-moz-animation-delay",
282
+ "-ms-animation-delay",
283
+ "-o-animation-delay",
284
+ "animation-delay",
285
+ "-webkit-animation-iteration-count",
286
+ "-moz-animation-iteration-count",
287
+ "-ms-animation-iteration-count",
288
+ "-o-animation-iteration-count",
289
+ "animation-iteration-count",
290
+ "-webkit-animation-direction",
291
+ "-moz-animation-direction",
292
+ "-ms-animation-direction",
293
+ "-o-animation-direction",
294
+ "animation-direction"
295
+ ]
296
+ ]
297
+ }