twigg-app 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
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,179 @@
1
+ /* ========================================================================
2
+ * Bootstrap: collapse.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#collapse
4
+ * ========================================================================
5
+ * Copyright 2012 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
+ // COLLAPSE PUBLIC CLASS DEFINITION
24
+ // ================================
25
+
26
+ var Collapse = function (element, options) {
27
+ this.$element = $(element)
28
+ this.options = $.extend({}, Collapse.DEFAULTS, options)
29
+ this.transitioning = null
30
+
31
+ if (this.options.parent) this.$parent = $(this.options.parent)
32
+ if (this.options.toggle) this.toggle()
33
+ }
34
+
35
+ Collapse.DEFAULTS = {
36
+ toggle: true
37
+ }
38
+
39
+ Collapse.prototype.dimension = function () {
40
+ var hasWidth = this.$element.hasClass('width')
41
+ return hasWidth ? 'width' : 'height'
42
+ }
43
+
44
+ Collapse.prototype.show = function () {
45
+ if (this.transitioning || this.$element.hasClass('in')) return
46
+
47
+ var startEvent = $.Event('show.bs.collapse')
48
+ this.$element.trigger(startEvent)
49
+ if (startEvent.isDefaultPrevented()) return
50
+
51
+ var actives = this.$parent && this.$parent.find('> .panel > .in')
52
+
53
+ if (actives && actives.length) {
54
+ var hasData = actives.data('bs.collapse')
55
+ if (hasData && hasData.transitioning) return
56
+ actives.collapse('hide')
57
+ hasData || actives.data('bs.collapse', null)
58
+ }
59
+
60
+ var dimension = this.dimension()
61
+
62
+ this.$element
63
+ .removeClass('collapse')
64
+ .addClass('collapsing')
65
+ [dimension](0)
66
+
67
+ this.transitioning = 1
68
+
69
+ var complete = function () {
70
+ this.$element
71
+ .removeClass('collapsing')
72
+ .addClass('in')
73
+ [dimension]('auto')
74
+ this.transitioning = 0
75
+ this.$element.trigger('shown.bs.collapse')
76
+ }
77
+
78
+ if (!$.support.transition) return complete.call(this)
79
+
80
+ var scrollSize = $.camelCase(['scroll', dimension].join('-'))
81
+
82
+ this.$element
83
+ .one($.support.transition.end, $.proxy(complete, this))
84
+ .emulateTransitionEnd(350)
85
+ [dimension](this.$element[0][scrollSize])
86
+ }
87
+
88
+ Collapse.prototype.hide = function () {
89
+ if (this.transitioning || !this.$element.hasClass('in')) return
90
+
91
+ var startEvent = $.Event('hide.bs.collapse')
92
+ this.$element.trigger(startEvent)
93
+ if (startEvent.isDefaultPrevented()) return
94
+
95
+ var dimension = this.dimension()
96
+
97
+ this.$element
98
+ [dimension](this.$element[dimension]())
99
+ [0].offsetHeight
100
+
101
+ this.$element
102
+ .addClass('collapsing')
103
+ .removeClass('collapse')
104
+ .removeClass('in')
105
+
106
+ this.transitioning = 1
107
+
108
+ var complete = function () {
109
+ this.transitioning = 0
110
+ this.$element
111
+ .trigger('hidden.bs.collapse')
112
+ .removeClass('collapsing')
113
+ .addClass('collapse')
114
+ }
115
+
116
+ if (!$.support.transition) return complete.call(this)
117
+
118
+ this.$element
119
+ [dimension](0)
120
+ .one($.support.transition.end, $.proxy(complete, this))
121
+ .emulateTransitionEnd(350)
122
+ }
123
+
124
+ Collapse.prototype.toggle = function () {
125
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
126
+ }
127
+
128
+
129
+ // COLLAPSE PLUGIN DEFINITION
130
+ // ==========================
131
+
132
+ var old = $.fn.collapse
133
+
134
+ $.fn.collapse = function (option) {
135
+ return this.each(function () {
136
+ var $this = $(this)
137
+ var data = $this.data('bs.collapse')
138
+ var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
139
+
140
+ if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
141
+ if (typeof option == 'string') data[option]()
142
+ })
143
+ }
144
+
145
+ $.fn.collapse.Constructor = Collapse
146
+
147
+
148
+ // COLLAPSE NO CONFLICT
149
+ // ====================
150
+
151
+ $.fn.collapse.noConflict = function () {
152
+ $.fn.collapse = old
153
+ return this
154
+ }
155
+
156
+
157
+ // COLLAPSE DATA-API
158
+ // =================
159
+
160
+ $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
161
+ var $this = $(this), href
162
+ var target = $this.attr('data-target')
163
+ || e.preventDefault()
164
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
165
+ var $target = $(target)
166
+ var data = $target.data('bs.collapse')
167
+ var option = data ? 'toggle' : $this.data()
168
+ var parent = $this.attr('data-parent')
169
+ var $parent = parent && $(parent)
170
+
171
+ if (!data || !data.transitioning) {
172
+ if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
173
+ $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
174
+ }
175
+
176
+ $target.collapse(option)
177
+ })
178
+
179
+ }(window.jQuery);
@@ -0,0 +1,154 @@
1
+ /* ========================================================================
2
+ * Bootstrap: dropdown.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#dropdowns
4
+ * ========================================================================
5
+ * Copyright 2012 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
+ // DROPDOWN CLASS DEFINITION
24
+ // =========================
25
+
26
+ var backdrop = '.dropdown-backdrop'
27
+ var toggle = '[data-toggle=dropdown]'
28
+ var Dropdown = function (element) {
29
+ var $el = $(element).on('click.bs.dropdown', this.toggle)
30
+ }
31
+
32
+ Dropdown.prototype.toggle = function (e) {
33
+ var $this = $(this)
34
+
35
+ if ($this.is('.disabled, :disabled')) return
36
+
37
+ var $parent = getParent($this)
38
+ var isActive = $parent.hasClass('open')
39
+
40
+ clearMenus()
41
+
42
+ if (!isActive) {
43
+ if ('ontouchstart' in document.documentElement) {
44
+ // if mobile we we use a backdrop because click events don't delegate
45
+ $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
46
+ }
47
+
48
+ $parent.trigger(e = $.Event('show.bs.dropdown'))
49
+
50
+ if (e.isDefaultPrevented()) return
51
+
52
+ $parent
53
+ .toggleClass('open')
54
+ .trigger('shown.bs.dropdown')
55
+ }
56
+
57
+ $this.focus()
58
+
59
+ return false
60
+ }
61
+
62
+ Dropdown.prototype.keydown = function (e) {
63
+ if (!/(38|40|27)/.test(e.keyCode)) return
64
+
65
+ var $this = $(this)
66
+
67
+ e.preventDefault()
68
+ e.stopPropagation()
69
+
70
+ if ($this.is('.disabled, :disabled')) return
71
+
72
+ var $parent = getParent($this)
73
+ var isActive = $parent.hasClass('open')
74
+
75
+ if (!isActive || (isActive && e.keyCode == 27)) {
76
+ if (e.which == 27) $parent.find(toggle).focus()
77
+ return $this.click()
78
+ }
79
+
80
+ var $items = $('[role=menu] li:not(.divider):visible a', $parent)
81
+
82
+ if (!$items.length) return
83
+
84
+ var index = $items.index($items.filter(':focus'))
85
+
86
+ if (e.keyCode == 38 && index > 0) index-- // up
87
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
88
+ if (!~index) index=0
89
+
90
+ $items.eq(index).focus()
91
+ }
92
+
93
+ function clearMenus() {
94
+ $(backdrop).remove()
95
+ $(toggle).each(function (e) {
96
+ var $parent = getParent($(this))
97
+ if (!$parent.hasClass('open')) return
98
+ $parent.trigger(e = $.Event('hide.bs.dropdown'))
99
+ if (e.isDefaultPrevented()) return
100
+ $parent.removeClass('open').trigger('hidden.bs.dropdown')
101
+ })
102
+ }
103
+
104
+ function getParent($this) {
105
+ var selector = $this.attr('data-target')
106
+
107
+ if (!selector) {
108
+ selector = $this.attr('href')
109
+ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
110
+ }
111
+
112
+ var $parent = selector && $(selector)
113
+
114
+ return $parent && $parent.length ? $parent : $this.parent()
115
+ }
116
+
117
+
118
+ // DROPDOWN PLUGIN DEFINITION
119
+ // ==========================
120
+
121
+ var old = $.fn.dropdown
122
+
123
+ $.fn.dropdown = function (option) {
124
+ return this.each(function () {
125
+ var $this = $(this)
126
+ var data = $this.data('dropdown')
127
+
128
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
129
+ if (typeof option == 'string') data[option].call($this)
130
+ })
131
+ }
132
+
133
+ $.fn.dropdown.Constructor = Dropdown
134
+
135
+
136
+ // DROPDOWN NO CONFLICT
137
+ // ====================
138
+
139
+ $.fn.dropdown.noConflict = function () {
140
+ $.fn.dropdown = old
141
+ return this
142
+ }
143
+
144
+
145
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
146
+ // ===================================
147
+
148
+ $(document)
149
+ .on('click.bs.dropdown.data-api', clearMenus)
150
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
151
+ .on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
152
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
153
+
154
+ }(window.jQuery);
@@ -0,0 +1,244 @@
1
+ /* ========================================================================
2
+ * Bootstrap: modal.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#modals
4
+ * ========================================================================
5
+ * Copyright 2012 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
+ // MODAL CLASS DEFINITION
24
+ // ======================
25
+
26
+ var Modal = function (element, options) {
27
+ this.options = options
28
+ this.$element = $(element).on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
29
+ this.$backdrop =
30
+ this.isShown = null
31
+
32
+ if (this.options.remote) this.$element.load(this.options.remote)
33
+ }
34
+
35
+ Modal.DEFAULTS = {
36
+ backdrop: true
37
+ , keyboard: true
38
+ , show: true
39
+ }
40
+
41
+ Modal.prototype.toggle = function (_relatedTarget) {
42
+ return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
43
+ }
44
+
45
+ Modal.prototype.show = function (_relatedTarget) {
46
+ var that = this
47
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
48
+
49
+ this.$element.trigger(e)
50
+
51
+ if (this.isShown || e.isDefaultPrevented()) return
52
+
53
+ this.isShown = true
54
+
55
+ this.escape()
56
+
57
+ this.backdrop(function () {
58
+ var transition = $.support.transition && that.$element.hasClass('fade')
59
+
60
+ if (!that.$element.parent().length) {
61
+ that.$element.appendTo(document.body) // don't move modals dom position
62
+ }
63
+
64
+ that.$element.show()
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
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.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 that = this
151
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
152
+
153
+ if (this.isShown && this.options.backdrop) {
154
+ var doAnimate = $.support.transition && animate
155
+
156
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
157
+ .appendTo(document.body)
158
+
159
+ this.$element.on('click.dismiss.modal', $.proxy(function (e) {
160
+ if (e.target !== e.currentTarget) return
161
+ this.options.backdrop == 'static'
162
+ ? this.$element[0].focus.call(this.$element[0])
163
+ : this.hide.call(this)
164
+ }, this))
165
+
166
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
167
+
168
+ this.$backdrop.addClass('in')
169
+
170
+ if (!callback) return
171
+
172
+ doAnimate ?
173
+ this.$backdrop
174
+ .one($.support.transition.end, callback)
175
+ .emulateTransitionEnd(150) :
176
+ callback()
177
+
178
+ } else if (!this.isShown && this.$backdrop) {
179
+ this.$backdrop.removeClass('in')
180
+
181
+ $.support.transition && this.$element.hasClass('fade')?
182
+ this.$backdrop
183
+ .one($.support.transition.end, callback)
184
+ .emulateTransitionEnd(150) :
185
+ callback()
186
+
187
+ } else if (callback) {
188
+ callback()
189
+ }
190
+ }
191
+
192
+
193
+ // MODAL PLUGIN DEFINITION
194
+ // =======================
195
+
196
+ var old = $.fn.modal
197
+
198
+ $.fn.modal = function (option, _relatedTarget) {
199
+ return this.each(function () {
200
+ var $this = $(this)
201
+ var data = $this.data('bs.modal')
202
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
203
+
204
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
205
+ if (typeof option == 'string') data[option](_relatedTarget)
206
+ else if (options.show) data.show(_relatedTarget)
207
+ })
208
+ }
209
+
210
+ $.fn.modal.Constructor = Modal
211
+
212
+
213
+ // MODAL NO CONFLICT
214
+ // =================
215
+
216
+ $.fn.modal.noConflict = function () {
217
+ $.fn.modal = old
218
+ return this
219
+ }
220
+
221
+
222
+ // MODAL DATA-API
223
+ // ==============
224
+
225
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
226
+ var $this = $(this)
227
+ var href = $this.attr('href')
228
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
229
+ var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
230
+
231
+ e.preventDefault()
232
+
233
+ $target
234
+ .modal(option, this)
235
+ .one('hide', function () {
236
+ $this.is(':visible') && $this.focus()
237
+ })
238
+ })
239
+
240
+ $(document)
241
+ .on('shown.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
242
+ .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
243
+
244
+ }(window.jQuery);
@@ -0,0 +1,117 @@
1
+ /* ========================================================================
2
+ * Bootstrap: popover.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#popovers
4
+ * ========================================================================
5
+ * Copyright 2012 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
+ // POPOVER PUBLIC CLASS DEFINITION
24
+ // ===============================
25
+
26
+ var Popover = function (element, options) {
27
+ this.init('popover', element, options)
28
+ }
29
+
30
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
31
+
32
+ Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
33
+ placement: 'right'
34
+ , trigger: 'click'
35
+ , content: ''
36
+ , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
37
+ })
38
+
39
+
40
+ // NOTE: POPOVER EXTENDS tooltip.js
41
+ // ================================
42
+
43
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
44
+
45
+ Popover.prototype.constructor = Popover
46
+
47
+ Popover.prototype.getDefaults = function () {
48
+ return Popover.DEFAULTS
49
+ }
50
+
51
+ Popover.prototype.setContent = function () {
52
+ var $tip = this.tip()
53
+ var title = this.getTitle()
54
+ var content = this.getContent()
55
+
56
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
57
+ $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
58
+
59
+ $tip.removeClass('fade top bottom left right in')
60
+
61
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
62
+ // this manually by checking the contents.
63
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
64
+ }
65
+
66
+ Popover.prototype.hasContent = function () {
67
+ return this.getTitle() || this.getContent()
68
+ }
69
+
70
+ Popover.prototype.getContent = function () {
71
+ var $e = this.$element
72
+ var o = this.options
73
+
74
+ return $e.attr('data-content')
75
+ || (typeof o.content == 'function' ?
76
+ o.content.call($e[0]) :
77
+ o.content)
78
+ }
79
+
80
+ Popover.prototype.arrow = function () {
81
+ return this.$arrow = this.$arrow || this.tip().find('.arrow')
82
+ }
83
+
84
+ Popover.prototype.tip = function () {
85
+ if (!this.$tip) this.$tip = $(this.options.template)
86
+ return this.$tip
87
+ }
88
+
89
+
90
+ // POPOVER PLUGIN DEFINITION
91
+ // =========================
92
+
93
+ var old = $.fn.popover
94
+
95
+ $.fn.popover = function (option) {
96
+ return this.each(function () {
97
+ var $this = $(this)
98
+ var data = $this.data('bs.popover')
99
+ var options = typeof option == 'object' && option
100
+
101
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
102
+ if (typeof option == 'string') data[option]()
103
+ })
104
+ }
105
+
106
+ $.fn.popover.Constructor = Popover
107
+
108
+
109
+ // POPOVER NO CONFLICT
110
+ // ===================
111
+
112
+ $.fn.popover.noConflict = function () {
113
+ $.fn.popover = old
114
+ return this
115
+ }
116
+
117
+ }(window.jQuery);