tennpipes-su 3.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +20 -0
  3. data/README.rdoc +70 -0
  4. data/Rakefile +22 -0
  5. data/lib/tennpipes-su.rb +35 -0
  6. data/lib/tennpipes-su/access_control.rb +191 -0
  7. data/lib/tennpipes-su/bootstrap-less/alerts.less +67 -0
  8. data/lib/tennpipes-su/bootstrap-less/badges.less +55 -0
  9. data/lib/tennpipes-su/bootstrap-less/bootstrap.less +49 -0
  10. data/lib/tennpipes-su/bootstrap-less/breadcrumbs.less +26 -0
  11. data/lib/tennpipes-su/bootstrap-less/button-groups.less +226 -0
  12. data/lib/tennpipes-su/bootstrap-less/buttons.less +155 -0
  13. data/lib/tennpipes-su/bootstrap-less/carousel.less +232 -0
  14. data/lib/tennpipes-su/bootstrap-less/close.less +33 -0
  15. data/lib/tennpipes-su/bootstrap-less/code.less +63 -0
  16. data/lib/tennpipes-su/bootstrap-less/component-animations.less +29 -0
  17. data/lib/tennpipes-su/bootstrap-less/dropdowns.less +213 -0
  18. data/lib/tennpipes-su/bootstrap-less/font-awesome/bordered-pulled.less +16 -0
  19. data/lib/tennpipes-su/bootstrap-less/font-awesome/core.less +12 -0
  20. data/lib/tennpipes-su/bootstrap-less/font-awesome/fixed-width.less +6 -0
  21. data/lib/tennpipes-su/bootstrap-less/font-awesome/font-awesome.less +17 -0
  22. data/lib/tennpipes-su/bootstrap-less/font-awesome/icons.less +412 -0
  23. data/lib/tennpipes-su/bootstrap-less/font-awesome/larger.less +13 -0
  24. data/lib/tennpipes-su/bootstrap-less/font-awesome/list.less +19 -0
  25. data/lib/tennpipes-su/bootstrap-less/font-awesome/mixins.less +20 -0
  26. data/lib/tennpipes-su/bootstrap-less/font-awesome/path.less +14 -0
  27. data/lib/tennpipes-su/bootstrap-less/font-awesome/rotated-flipped.less +9 -0
  28. data/lib/tennpipes-su/bootstrap-less/font-awesome/spinning.less +30 -0
  29. data/lib/tennpipes-su/bootstrap-less/font-awesome/stacked.less +20 -0
  30. data/lib/tennpipes-su/bootstrap-less/font-awesome/variables.less +381 -0
  31. data/lib/tennpipes-su/bootstrap-less/forms.less +419 -0
  32. data/lib/tennpipes-su/bootstrap-less/glyphicons.less +233 -0
  33. data/lib/tennpipes-su/bootstrap-less/grid.less +100 -0
  34. data/lib/tennpipes-su/bootstrap-less/input-groups.less +157 -0
  35. data/lib/tennpipes-su/bootstrap-less/jumbotron.less +44 -0
  36. data/lib/tennpipes-su/bootstrap-less/labels.less +64 -0
  37. data/lib/tennpipes-su/bootstrap-less/list-group.less +110 -0
  38. data/lib/tennpipes-su/bootstrap-less/media.less +56 -0
  39. data/lib/tennpipes-su/bootstrap-less/mixins.less +926 -0
  40. data/lib/tennpipes-su/bootstrap-less/modals.less +138 -0
  41. data/lib/tennpipes-su/bootstrap-less/navbar.less +616 -0
  42. data/lib/tennpipes-su/bootstrap-less/navs.less +242 -0
  43. data/lib/tennpipes-su/bootstrap-less/normalize.less +423 -0
  44. data/lib/tennpipes-su/bootstrap-less/pager.less +55 -0
  45. data/lib/tennpipes-su/bootstrap-less/pagination.less +88 -0
  46. data/lib/tennpipes-su/bootstrap-less/panels.less +230 -0
  47. data/lib/tennpipes-su/bootstrap-less/popovers.less +133 -0
  48. data/lib/tennpipes-su/bootstrap-less/print.less +101 -0
  49. data/lib/tennpipes-su/bootstrap-less/progress-bars.less +80 -0
  50. data/lib/tennpipes-su/bootstrap-less/responsive-utilities.less +93 -0
  51. data/lib/tennpipes-su/bootstrap-less/scaffolding.less +134 -0
  52. data/lib/tennpipes-su/bootstrap-less/tables.less +233 -0
  53. data/lib/tennpipes-su/bootstrap-less/tennpipes-su.less +18 -0
  54. data/lib/tennpipes-su/bootstrap-less/theme.less +247 -0
  55. data/lib/tennpipes-su/bootstrap-less/thumbnails.less +36 -0
  56. data/lib/tennpipes-su/bootstrap-less/tooltip.less +95 -0
  57. data/lib/tennpipes-su/bootstrap-less/type.less +296 -0
  58. data/lib/tennpipes-su/bootstrap-less/utilities.less +56 -0
  59. data/lib/tennpipes-su/bootstrap-less/variables.less +827 -0
  60. data/lib/tennpipes-su/bootstrap-less/wells.less +29 -0
  61. data/lib/tennpipes-su/generators/actions.rb +78 -0
  62. data/lib/tennpipes-su/generators/admin_app.rb +169 -0
  63. data/lib/tennpipes-su/generators/admin_page.rb +68 -0
  64. data/lib/tennpipes-su/generators/orm.rb +172 -0
  65. data/lib/tennpipes-su/generators/templates/account/activerecord.rb.tt +41 -0
  66. data/lib/tennpipes-su/generators/templates/account/couchrest.rb.tt +67 -0
  67. data/lib/tennpipes-su/generators/templates/account/datamapper.rb.tt +56 -0
  68. data/lib/tennpipes-su/generators/templates/account/dynamoid.rb.tt +55 -0
  69. data/lib/tennpipes-su/generators/templates/account/minirecord.rb.tt +44 -0
  70. data/lib/tennpipes-su/generators/templates/account/mongoid.rb.tt +54 -0
  71. data/lib/tennpipes-su/generators/templates/account/mongomapper.rb.tt +47 -0
  72. data/lib/tennpipes-su/generators/templates/account/ohm.rb.tt +70 -0
  73. data/lib/tennpipes-su/generators/templates/account/seeds.rb.tt +29 -0
  74. data/lib/tennpipes-su/generators/templates/account/sequel.rb.tt +53 -0
  75. data/lib/tennpipes-su/generators/templates/app.rb.tt +42 -0
  76. data/lib/tennpipes-su/generators/templates/app/controllers/base.rb.tt +5 -0
  77. data/lib/tennpipes-su/generators/templates/app/controllers/sessions.rb.tt +29 -0
  78. data/lib/tennpipes-su/generators/templates/assets/images/favicon.ico +0 -0
  79. data/lib/tennpipes-su/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  80. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  81. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.svg +414 -0
  82. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  83. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  84. data/lib/tennpipes-su/generators/templates/assets/images/logo.png +0 -0
  85. data/lib/tennpipes-su/generators/templates/assets/javascripts/application.js +118 -0
  86. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/affix.js +137 -0
  87. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/alert.js +88 -0
  88. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -0
  89. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/button.js +107 -0
  90. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/carousel.js +205 -0
  91. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/collapse.js +170 -0
  92. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/dropdown.js +147 -0
  93. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/modal.js +243 -0
  94. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/popover.js +110 -0
  95. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/scrollspy.js +153 -0
  96. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tab.js +125 -0
  97. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tooltip.js +399 -0
  98. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/transition.js +48 -0
  99. data/lib/tennpipes-su/generators/templates/assets/javascripts/jquery-1.11.0.min.js +4 -0
  100. data/lib/tennpipes-su/generators/templates/assets/stylesheets/application.css +353 -0
  101. data/lib/tennpipes-su/generators/templates/assets/stylesheets/bootstrap.css +4 -0
  102. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/FontAwesome.otf +0 -0
  103. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.eot +0 -0
  104. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.svg +414 -0
  105. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.ttf +0 -0
  106. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.woff +0 -0
  107. data/lib/tennpipes-su/generators/templates/erb/app/base/index.erb.tt +15 -0
  108. data/lib/tennpipes-su/generators/templates/erb/app/errors/403.erb.tt +3 -0
  109. data/lib/tennpipes-su/generators/templates/erb/app/errors/404.erb.tt +3 -0
  110. data/lib/tennpipes-su/generators/templates/erb/app/errors/500.erb.tt +3 -0
  111. data/lib/tennpipes-su/generators/templates/erb/app/layouts/application.erb.tt +64 -0
  112. data/lib/tennpipes-su/generators/templates/erb/app/layouts/error.erb.tt +23 -0
  113. data/lib/tennpipes-su/generators/templates/erb/app/sessions/new.erb.tt +44 -0
  114. data/lib/tennpipes-su/generators/templates/erb/page/_form.erb.tt +18 -0
  115. data/lib/tennpipes-su/generators/templates/erb/page/edit.erb.tt +10 -0
  116. data/lib/tennpipes-su/generators/templates/erb/page/index.erb.tt +81 -0
  117. data/lib/tennpipes-su/generators/templates/erb/page/new.erb.tt +9 -0
  118. data/lib/tennpipes-su/generators/templates/haml/app/base/index.haml.tt +12 -0
  119. data/lib/tennpipes-su/generators/templates/haml/app/errors/403.haml.tt +3 -0
  120. data/lib/tennpipes-su/generators/templates/haml/app/errors/404.haml.tt +3 -0
  121. data/lib/tennpipes-su/generators/templates/haml/app/errors/500.haml.tt +3 -0
  122. data/lib/tennpipes-su/generators/templates/haml/app/layouts/application.haml.tt +49 -0
  123. data/lib/tennpipes-su/generators/templates/haml/app/layouts/error.haml.tt +18 -0
  124. data/lib/tennpipes-su/generators/templates/haml/app/sessions/new.haml.tt +38 -0
  125. data/lib/tennpipes-su/generators/templates/haml/page/_form.haml.tt +16 -0
  126. data/lib/tennpipes-su/generators/templates/haml/page/edit.haml.tt +8 -0
  127. data/lib/tennpipes-su/generators/templates/haml/page/index.haml.tt +58 -0
  128. data/lib/tennpipes-su/generators/templates/haml/page/new.haml.tt +7 -0
  129. data/lib/tennpipes-su/generators/templates/page/controller.rb.tt +92 -0
  130. data/lib/tennpipes-su/generators/templates/slim/app/base/index.slim.tt +12 -0
  131. data/lib/tennpipes-su/generators/templates/slim/app/errors/403.slim.tt +3 -0
  132. data/lib/tennpipes-su/generators/templates/slim/app/errors/404.slim.tt +3 -0
  133. data/lib/tennpipes-su/generators/templates/slim/app/errors/500.slim.tt +3 -0
  134. data/lib/tennpipes-su/generators/templates/slim/app/layouts/application.slim.tt +48 -0
  135. data/lib/tennpipes-su/generators/templates/slim/app/layouts/error.slim.tt +19 -0
  136. data/lib/tennpipes-su/generators/templates/slim/app/sessions/new.slim.tt +37 -0
  137. data/lib/tennpipes-su/generators/templates/slim/page/_form.slim.tt +16 -0
  138. data/lib/tennpipes-su/generators/templates/slim/page/edit.slim.tt +8 -0
  139. data/lib/tennpipes-su/generators/templates/slim/page/index.slim.tt +56 -0
  140. data/lib/tennpipes-su/generators/templates/slim/page/new.slim.tt +7 -0
  141. data/lib/tennpipes-su/helpers/authentication_helpers.rb +108 -0
  142. data/lib/tennpipes-su/helpers/view_helpers.rb +87 -0
  143. data/lib/tennpipes-su/locale/admin/cs.yml +56 -0
  144. data/lib/tennpipes-su/locale/admin/da.yml +56 -0
  145. data/lib/tennpipes-su/locale/admin/de.yml +56 -0
  146. data/lib/tennpipes-su/locale/admin/en.yml +56 -0
  147. data/lib/tennpipes-su/locale/admin/es.yml +56 -0
  148. data/lib/tennpipes-su/locale/admin/fr.yml +56 -0
  149. data/lib/tennpipes-su/locale/admin/hu.yml +56 -0
  150. data/lib/tennpipes-su/locale/admin/it.yml +56 -0
  151. data/lib/tennpipes-su/locale/admin/ja.yml +57 -0
  152. data/lib/tennpipes-su/locale/admin/lv.yml +56 -0
  153. data/lib/tennpipes-su/locale/admin/nl.yml +56 -0
  154. data/lib/tennpipes-su/locale/admin/no.yml +56 -0
  155. data/lib/tennpipes-su/locale/admin/pl.yml +56 -0
  156. data/lib/tennpipes-su/locale/admin/pt_br.yml +56 -0
  157. data/lib/tennpipes-su/locale/admin/ro.yml +56 -0
  158. data/lib/tennpipes-su/locale/admin/ru.yml +57 -0
  159. data/lib/tennpipes-su/locale/admin/sv.yml +56 -0
  160. data/lib/tennpipes-su/locale/admin/tr.yml +56 -0
  161. data/lib/tennpipes-su/locale/admin/uk.yml +56 -0
  162. data/lib/tennpipes-su/locale/admin/zh_cn.yml +56 -0
  163. data/lib/tennpipes-su/locale/admin/zh_tw.yml +56 -0
  164. data/lib/tennpipes-su/locale/orm/cs.yml +12 -0
  165. data/lib/tennpipes-su/locale/orm/da.yml +12 -0
  166. data/lib/tennpipes-su/locale/orm/de.yml +12 -0
  167. data/lib/tennpipes-su/locale/orm/en.yml +12 -0
  168. data/lib/tennpipes-su/locale/orm/es.yml +12 -0
  169. data/lib/tennpipes-su/locale/orm/fr.yml +12 -0
  170. data/lib/tennpipes-su/locale/orm/hu.yml +12 -0
  171. data/lib/tennpipes-su/locale/orm/it.yml +12 -0
  172. data/lib/tennpipes-su/locale/orm/ja.yml +12 -0
  173. data/lib/tennpipes-su/locale/orm/lv.yml +12 -0
  174. data/lib/tennpipes-su/locale/orm/nl.yml +12 -0
  175. data/lib/tennpipes-su/locale/orm/no.yml +12 -0
  176. data/lib/tennpipes-su/locale/orm/pl.yml +38 -0
  177. data/lib/tennpipes-su/locale/orm/pt_br.yml +12 -0
  178. data/lib/tennpipes-su/locale/orm/ro.yml +12 -0
  179. data/lib/tennpipes-su/locale/orm/ru.yml +12 -0
  180. data/lib/tennpipes-su/locale/orm/sv.yml +12 -0
  181. data/lib/tennpipes-su/locale/orm/tr.yml +12 -0
  182. data/lib/tennpipes-su/locale/orm/uk.yml +12 -0
  183. data/lib/tennpipes-su/locale/orm/zh_cn.yml +12 -0
  184. data/lib/tennpipes-su/locale/orm/zh_tw.yml +12 -0
  185. data/test/fixtures/sequel.rb +72 -0
  186. data/test/generators/test_account_model_generator.rb +108 -0
  187. data/test/generators/test_admin_app_generator.rb +218 -0
  188. data/test/generators/test_admin_page_generator.rb +140 -0
  189. data/test/helper.rb +47 -0
  190. data/test/test_admin_application.rb +271 -0
  191. data/test/test_locale.rb +25 -0
  192. metadata +298 -0
@@ -0,0 +1,243 @@
1
+ /* ========================================================================
2
+ * Bootstrap: modal.js v3.1.0
3
+ * http://getbootstrap.com/javascript/#modals
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
+ // MODAL CLASS DEFINITION
14
+ // ======================
15
+
16
+ var Modal = function (element, options) {
17
+ this.options = options
18
+ this.$element = $(element)
19
+ this.$backdrop =
20
+ this.isShown = null
21
+
22
+ if (this.options.remote) {
23
+ this.$element
24
+ .find('.modal-content')
25
+ .load(this.options.remote, $.proxy(function () {
26
+ this.$element.trigger('loaded.bs.modal')
27
+ }, this))
28
+ }
29
+ }
30
+
31
+ Modal.DEFAULTS = {
32
+ backdrop: true,
33
+ keyboard: true,
34
+ show: true
35
+ }
36
+
37
+ Modal.prototype.toggle = function (_relatedTarget) {
38
+ return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
39
+ }
40
+
41
+ Modal.prototype.show = function (_relatedTarget) {
42
+ var that = this
43
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
44
+
45
+ this.$element.trigger(e)
46
+
47
+ if (this.isShown || e.isDefaultPrevented()) return
48
+
49
+ this.isShown = true
50
+
51
+ this.escape()
52
+
53
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
54
+
55
+ this.backdrop(function () {
56
+ var transition = $.support.transition && that.$element.hasClass('fade')
57
+
58
+ if (!that.$element.parent().length) {
59
+ that.$element.appendTo(document.body) // don't move modals dom position
60
+ }
61
+
62
+ that.$element
63
+ .show()
64
+ .scrollTop(0)
65
+
66
+ if (transition) {
67
+ that.$element[0].offsetWidth // force reflow
68
+ }
69
+
70
+ that.$element
71
+ .addClass('in')
72
+ .attr('aria-hidden', false)
73
+
74
+ that.enforceFocus()
75
+
76
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
77
+
78
+ transition ?
79
+ that.$element.find('.modal-dialog') // wait for modal to slide in
80
+ .one($.support.transition.end, function () {
81
+ that.$element.focus().trigger(e)
82
+ })
83
+ .emulateTransitionEnd(300) :
84
+ that.$element.focus().trigger(e)
85
+ })
86
+ }
87
+
88
+ Modal.prototype.hide = function (e) {
89
+ if (e) e.preventDefault()
90
+
91
+ e = $.Event('hide.bs.modal')
92
+
93
+ this.$element.trigger(e)
94
+
95
+ if (!this.isShown || e.isDefaultPrevented()) return
96
+
97
+ this.isShown = false
98
+
99
+ this.escape()
100
+
101
+ $(document).off('focusin.bs.modal')
102
+
103
+ this.$element
104
+ .removeClass('in')
105
+ .attr('aria-hidden', true)
106
+ .off('click.dismiss.bs.modal')
107
+
108
+ $.support.transition && this.$element.hasClass('fade') ?
109
+ this.$element
110
+ .one($.support.transition.end, $.proxy(this.hideModal, this))
111
+ .emulateTransitionEnd(300) :
112
+ this.hideModal()
113
+ }
114
+
115
+ Modal.prototype.enforceFocus = function () {
116
+ $(document)
117
+ .off('focusin.bs.modal') // guard against infinite focus loop
118
+ .on('focusin.bs.modal', $.proxy(function (e) {
119
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
120
+ this.$element.focus()
121
+ }
122
+ }, this))
123
+ }
124
+
125
+ Modal.prototype.escape = function () {
126
+ if (this.isShown && this.options.keyboard) {
127
+ this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
128
+ e.which == 27 && this.hide()
129
+ }, this))
130
+ } else if (!this.isShown) {
131
+ this.$element.off('keyup.dismiss.bs.modal')
132
+ }
133
+ }
134
+
135
+ Modal.prototype.hideModal = function () {
136
+ var that = this
137
+ this.$element.hide()
138
+ this.backdrop(function () {
139
+ that.removeBackdrop()
140
+ that.$element.trigger('hidden.bs.modal')
141
+ })
142
+ }
143
+
144
+ Modal.prototype.removeBackdrop = function () {
145
+ this.$backdrop && this.$backdrop.remove()
146
+ this.$backdrop = null
147
+ }
148
+
149
+ Modal.prototype.backdrop = function (callback) {
150
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
151
+
152
+ if (this.isShown && this.options.backdrop) {
153
+ var doAnimate = $.support.transition && animate
154
+
155
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
156
+ .appendTo(document.body)
157
+
158
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
159
+ if (e.target !== e.currentTarget) return
160
+ this.options.backdrop == 'static'
161
+ ? this.$element[0].focus.call(this.$element[0])
162
+ : this.hide.call(this)
163
+ }, this))
164
+
165
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
166
+
167
+ this.$backdrop.addClass('in')
168
+
169
+ if (!callback) return
170
+
171
+ doAnimate ?
172
+ this.$backdrop
173
+ .one($.support.transition.end, callback)
174
+ .emulateTransitionEnd(150) :
175
+ callback()
176
+
177
+ } else if (!this.isShown && this.$backdrop) {
178
+ this.$backdrop.removeClass('in')
179
+
180
+ $.support.transition && this.$element.hasClass('fade') ?
181
+ this.$backdrop
182
+ .one($.support.transition.end, callback)
183
+ .emulateTransitionEnd(150) :
184
+ callback()
185
+
186
+ } else if (callback) {
187
+ callback()
188
+ }
189
+ }
190
+
191
+
192
+ // MODAL PLUGIN DEFINITION
193
+ // =======================
194
+
195
+ var old = $.fn.modal
196
+
197
+ $.fn.modal = function (option, _relatedTarget) {
198
+ return this.each(function () {
199
+ var $this = $(this)
200
+ var data = $this.data('bs.modal')
201
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
202
+
203
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
204
+ if (typeof option == 'string') data[option](_relatedTarget)
205
+ else if (options.show) data.show(_relatedTarget)
206
+ })
207
+ }
208
+
209
+ $.fn.modal.Constructor = Modal
210
+
211
+
212
+ // MODAL NO CONFLICT
213
+ // =================
214
+
215
+ $.fn.modal.noConflict = function () {
216
+ $.fn.modal = old
217
+ return this
218
+ }
219
+
220
+
221
+ // MODAL DATA-API
222
+ // ==============
223
+
224
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
225
+ var $this = $(this)
226
+ var href = $this.attr('href')
227
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
228
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
229
+
230
+ if ($this.is('a')) e.preventDefault()
231
+
232
+ $target
233
+ .modal(option, this)
234
+ .one('hide', function () {
235
+ $this.is(':visible') && $this.focus()
236
+ })
237
+ })
238
+
239
+ $(document)
240
+ .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
241
+ .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
242
+
243
+ }(jQuery);
@@ -0,0 +1,110 @@
1
+ /* ========================================================================
2
+ * Bootstrap: popover.js v3.1.0
3
+ * http://getbootstrap.com/javascript/#popovers
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
+ // POPOVER PUBLIC CLASS DEFINITION
14
+ // ===============================
15
+
16
+ var Popover = function (element, options) {
17
+ this.init('popover', element, options)
18
+ }
19
+
20
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
21
+
22
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
23
+ placement: 'right',
24
+ trigger: 'click',
25
+ content: '',
26
+ template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
27
+ })
28
+
29
+
30
+ // NOTE: POPOVER EXTENDS tooltip.js
31
+ // ================================
32
+
33
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
34
+
35
+ Popover.prototype.constructor = Popover
36
+
37
+ Popover.prototype.getDefaults = function () {
38
+ return Popover.DEFAULTS
39
+ }
40
+
41
+ Popover.prototype.setContent = function () {
42
+ var $tip = this.tip()
43
+ var title = this.getTitle()
44
+ var content = this.getContent()
45
+
46
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
47
+ $tip.find('.popover-content')[ // we use append for html objects to maintain js events
48
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
49
+ ](content)
50
+
51
+ $tip.removeClass('fade top bottom left right in')
52
+
53
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
54
+ // this manually by checking the contents.
55
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
56
+ }
57
+
58
+ Popover.prototype.hasContent = function () {
59
+ return this.getTitle() || this.getContent()
60
+ }
61
+
62
+ Popover.prototype.getContent = function () {
63
+ var $e = this.$element
64
+ var o = this.options
65
+
66
+ return $e.attr('data-content')
67
+ || (typeof o.content == 'function' ?
68
+ o.content.call($e[0]) :
69
+ o.content)
70
+ }
71
+
72
+ Popover.prototype.arrow = function () {
73
+ return this.$arrow = this.$arrow || this.tip().find('.arrow')
74
+ }
75
+
76
+ Popover.prototype.tip = function () {
77
+ if (!this.$tip) this.$tip = $(this.options.template)
78
+ return this.$tip
79
+ }
80
+
81
+
82
+ // POPOVER PLUGIN DEFINITION
83
+ // =========================
84
+
85
+ var old = $.fn.popover
86
+
87
+ $.fn.popover = function (option) {
88
+ return this.each(function () {
89
+ var $this = $(this)
90
+ var data = $this.data('bs.popover')
91
+ var options = typeof option == 'object' && option
92
+
93
+ if (!data && option == 'destroy') return
94
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
95
+ if (typeof option == 'string') data[option]()
96
+ })
97
+ }
98
+
99
+ $.fn.popover.Constructor = Popover
100
+
101
+
102
+ // POPOVER NO CONFLICT
103
+ // ===================
104
+
105
+ $.fn.popover.noConflict = function () {
106
+ $.fn.popover = old
107
+ return this
108
+ }
109
+
110
+ }(jQuery);
@@ -0,0 +1,153 @@
1
+ /* ========================================================================
2
+ * Bootstrap: scrollspy.js v3.1.0
3
+ * http://getbootstrap.com/javascript/#scrollspy
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
+ // SCROLLSPY CLASS DEFINITION
14
+ // ==========================
15
+
16
+ function ScrollSpy(element, options) {
17
+ var href
18
+ var process = $.proxy(this.process, this)
19
+
20
+ this.$element = $(element).is('body') ? $(window) : $(element)
21
+ this.$body = $('body')
22
+ this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
23
+ this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
24
+ this.selector = (this.options.target
25
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
26
+ || '') + ' .nav li > a'
27
+ this.offsets = $([])
28
+ this.targets = $([])
29
+ this.activeTarget = null
30
+
31
+ this.refresh()
32
+ this.process()
33
+ }
34
+
35
+ ScrollSpy.DEFAULTS = {
36
+ offset: 10
37
+ }
38
+
39
+ ScrollSpy.prototype.refresh = function () {
40
+ var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
41
+
42
+ this.offsets = $([])
43
+ this.targets = $([])
44
+
45
+ var self = this
46
+ var $targets = this.$body
47
+ .find(this.selector)
48
+ .map(function () {
49
+ var $el = $(this)
50
+ var href = $el.data('target') || $el.attr('href')
51
+ var $href = /^#./.test(href) && $(href)
52
+
53
+ return ($href
54
+ && $href.length
55
+ && $href.is(':visible')
56
+ && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
57
+ })
58
+ .sort(function (a, b) { return a[0] - b[0] })
59
+ .each(function () {
60
+ self.offsets.push(this[0])
61
+ self.targets.push(this[1])
62
+ })
63
+ }
64
+
65
+ ScrollSpy.prototype.process = function () {
66
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
67
+ var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
68
+ var maxScroll = scrollHeight - this.$scrollElement.height()
69
+ var offsets = this.offsets
70
+ var targets = this.targets
71
+ var activeTarget = this.activeTarget
72
+ var i
73
+
74
+ if (scrollTop >= maxScroll) {
75
+ return activeTarget != (i = targets.last()[0]) && this.activate(i)
76
+ }
77
+
78
+ if (activeTarget && scrollTop <= offsets[0]) {
79
+ return activeTarget != (i = targets[0]) && this.activate(i)
80
+ }
81
+
82
+ for (i = offsets.length; i--;) {
83
+ activeTarget != targets[i]
84
+ && scrollTop >= offsets[i]
85
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
86
+ && this.activate( targets[i] )
87
+ }
88
+ }
89
+
90
+ ScrollSpy.prototype.activate = function (target) {
91
+ this.activeTarget = target
92
+
93
+ $(this.selector)
94
+ .parentsUntil(this.options.target, '.active')
95
+ .removeClass('active')
96
+
97
+ var selector = this.selector +
98
+ '[data-target="' + target + '"],' +
99
+ this.selector + '[href="' + target + '"]'
100
+
101
+ var active = $(selector)
102
+ .parents('li')
103
+ .addClass('active')
104
+
105
+ if (active.parent('.dropdown-menu').length) {
106
+ active = active
107
+ .closest('li.dropdown')
108
+ .addClass('active')
109
+ }
110
+
111
+ active.trigger('activate.bs.scrollspy')
112
+ }
113
+
114
+
115
+ // SCROLLSPY PLUGIN DEFINITION
116
+ // ===========================
117
+
118
+ var old = $.fn.scrollspy
119
+
120
+ $.fn.scrollspy = function (option) {
121
+ return this.each(function () {
122
+ var $this = $(this)
123
+ var data = $this.data('bs.scrollspy')
124
+ var options = typeof option == 'object' && option
125
+
126
+ if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
127
+ if (typeof option == 'string') data[option]()
128
+ })
129
+ }
130
+
131
+ $.fn.scrollspy.Constructor = ScrollSpy
132
+
133
+
134
+ // SCROLLSPY NO CONFLICT
135
+ // =====================
136
+
137
+ $.fn.scrollspy.noConflict = function () {
138
+ $.fn.scrollspy = old
139
+ return this
140
+ }
141
+
142
+
143
+ // SCROLLSPY DATA-API
144
+ // ==================
145
+
146
+ $(window).on('load', function () {
147
+ $('[data-spy="scroll"]').each(function () {
148
+ var $spy = $(this)
149
+ $spy.scrollspy($spy.data())
150
+ })
151
+ })
152
+
153
+ }(jQuery);