spiderfw 0.6.22 → 0.6.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. data/CHANGELOG +9 -0
  2. data/VERSION +1 -1
  3. data/apps/app_server/controllers/app_server_controller.rb +7 -2
  4. data/apps/app_server/lib/git_app.rb +5 -3
  5. data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +2 -1
  6. data/apps/core/admin/controllers/admin_controller.rb +4 -4
  7. data/apps/core/admin/controllers/app_admin_controller.rb +3 -2
  8. data/apps/core/admin/public/css/sass/admin.css +56 -31
  9. data/apps/core/admin/public/sass/admin.scss +38 -4
  10. data/apps/core/admin/views/_breadcrumb.shtml +8 -0
  11. data/apps/core/admin/views/admin.layout.shtml +8 -5
  12. data/apps/core/auth/controllers/login_controller.rb +3 -8
  13. data/apps/core/components/assets.rb +37 -1
  14. data/apps/core/components/public/bootstrap/LICENSE +13 -0
  15. data/apps/core/components/public/bootstrap/README.md +28 -0
  16. data/apps/core/components/public/bootstrap/img/glyphicons-halflings-white.png +0 -0
  17. data/apps/core/components/public/bootstrap/img/glyphicons-halflings.png +0 -0
  18. data/apps/core/components/public/bootstrap/js/README.md +106 -0
  19. data/apps/core/components/public/bootstrap/js/bootstrap-alert.js +91 -0
  20. data/apps/core/components/public/bootstrap/js/bootstrap-button.js +98 -0
  21. data/apps/core/components/public/bootstrap/js/bootstrap-carousel.js +154 -0
  22. data/apps/core/components/public/bootstrap/js/bootstrap-collapse.js +136 -0
  23. data/apps/core/components/public/bootstrap/js/bootstrap-dropdown.js +92 -0
  24. data/apps/core/components/public/bootstrap/js/bootstrap-modal.js +209 -0
  25. data/apps/core/components/public/bootstrap/js/bootstrap-popover.js +95 -0
  26. data/apps/core/components/public/bootstrap/js/bootstrap-scrollspy.js +125 -0
  27. data/apps/core/components/public/bootstrap/js/bootstrap-tab.js +130 -0
  28. data/apps/core/components/public/bootstrap/js/bootstrap-tooltip.js +270 -0
  29. data/apps/core/components/public/bootstrap/js/bootstrap-transition.js +51 -0
  30. data/apps/core/components/public/bootstrap/js/bootstrap-typeahead.js +271 -0
  31. data/apps/core/components/public/bootstrap/js/tests/index.html +49 -0
  32. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-alert.js +41 -0
  33. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-button.js +54 -0
  34. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-collapse.js +25 -0
  35. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-dropdown.js +53 -0
  36. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-modal.js +85 -0
  37. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-popover.js +93 -0
  38. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-scrollspy.js +31 -0
  39. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-tab.js +45 -0
  40. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-tooltip.js +62 -0
  41. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-transition.js +13 -0
  42. data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-typeahead.js +128 -0
  43. data/apps/core/components/public/bootstrap/js/tests/vendor/jquery.js +9252 -0
  44. data/apps/core/components/public/bootstrap/js/tests/vendor/qunit.css +232 -0
  45. data/apps/core/components/public/bootstrap/js/tests/vendor/qunit.js +1510 -0
  46. data/apps/core/components/public/bootstrap/scss/_accordion.scss +28 -0
  47. data/apps/core/components/public/bootstrap/scss/_alerts.scss +70 -0
  48. data/apps/core/components/public/bootstrap/scss/_breadcrumbs.scss +22 -0
  49. data/apps/core/components/public/bootstrap/scss/_button-groups.scss +146 -0
  50. data/apps/core/components/public/bootstrap/scss/_buttons.scss +165 -0
  51. data/apps/core/components/public/bootstrap/scss/_carousel.scss +121 -0
  52. data/apps/core/components/public/bootstrap/scss/_close.scss +18 -0
  53. data/apps/core/components/public/bootstrap/scss/_code.scss +44 -0
  54. data/apps/core/components/public/bootstrap/scss/_component-animations.scss +18 -0
  55. data/apps/core/components/public/bootstrap/scss/_custom.css +0 -0
  56. data/apps/core/components/public/bootstrap/scss/_dropdowns.scss +131 -0
  57. data/apps/core/components/public/bootstrap/scss/_forms.scss +516 -0
  58. data/apps/core/components/public/bootstrap/scss/_grid.scss +8 -0
  59. data/apps/core/components/public/bootstrap/scss/_hero-unit.scss +20 -0
  60. data/apps/core/components/public/bootstrap/scss/_labels.scss +16 -0
  61. data/apps/core/components/public/bootstrap/scss/_layouts.scss +17 -0
  62. data/apps/core/components/public/bootstrap/scss/_mixins.scss +538 -0
  63. data/apps/core/components/public/bootstrap/scss/_modals.scss +72 -0
  64. data/apps/core/components/public/bootstrap/scss/_navbar.scss +292 -0
  65. data/apps/core/components/public/bootstrap/scss/_navs.scss +343 -0
  66. data/apps/core/components/public/bootstrap/scss/_pager.scss +30 -0
  67. data/apps/core/components/public/bootstrap/scss/_pagination.scss +64 -0
  68. data/apps/core/components/public/bootstrap/scss/_patterns.scss +13 -0
  69. data/apps/core/components/public/bootstrap/scss/_popovers.scss +49 -0
  70. data/apps/core/components/public/bootstrap/scss/_print.scss +18 -0
  71. data/apps/core/components/public/bootstrap/scss/_progress-bars.scss +95 -0
  72. data/apps/core/{admin/public/sass/bootstrap/reset.scss → components/public/bootstrap/scss/_reset.scss} +36 -51
  73. data/apps/core/components/public/bootstrap/scss/_scaffolding.scss +29 -0
  74. data/apps/core/components/public/bootstrap/scss/_sprites.scss +156 -0
  75. data/apps/core/components/public/bootstrap/scss/_tables.scss +139 -0
  76. data/apps/core/components/public/bootstrap/scss/_thumbnails.scss +35 -0
  77. data/apps/core/components/public/bootstrap/scss/_tooltip.scss +35 -0
  78. data/apps/core/components/public/bootstrap/scss/_type.scss +217 -0
  79. data/apps/core/components/public/bootstrap/scss/_utilities.scss +23 -0
  80. data/apps/core/components/public/bootstrap/scss/_variables.scss +99 -0
  81. data/apps/core/components/public/bootstrap/scss/_wells.scss +17 -0
  82. data/apps/core/components/public/bootstrap/scss/bootstrap-responsive.css +707 -0
  83. data/apps/core/components/public/bootstrap/scss/bootstrap-responsive.scss +323 -0
  84. data/apps/core/components/public/bootstrap/scss/bootstrap.css +4604 -0
  85. data/apps/core/components/public/bootstrap/scss/bootstrap.scss +62 -0
  86. data/apps/core/components/public/bootstrap/scss/config.rb +36 -0
  87. data/apps/core/components/public/css/admin.css +2 -1
  88. data/apps/core/components/public/css/sass/bootstrap/bootstrap.css +3107 -0
  89. data/apps/core/components/public/css/table_base.css +9 -0
  90. data/apps/core/components/public/widgets/month_calendar.js +9 -0
  91. data/apps/core/components/widgets/crud/crud.rb +9 -1
  92. data/apps/core/components/widgets/crud/crud.shtml +2 -2
  93. data/apps/core/components/widgets/month_calendar/month_calendar.shtml +1 -0
  94. data/apps/core/components/widgets/table/table.rb +84 -55
  95. data/apps/core/components/widgets/table/table.shtml +2 -1
  96. data/apps/core/forms/public/ckeditor/CHANGES.html +139 -1
  97. data/apps/core/forms/public/ckeditor/LICENSE.html +1 -8
  98. data/apps/core/forms/public/ckeditor/ckeditor.js +141 -137
  99. data/apps/core/forms/public/ckeditor/ckeditor_basic.js +3 -3
  100. data/apps/core/forms/public/ckeditor/ckeditor_basic_source.js +1 -1
  101. data/apps/core/forms/public/ckeditor/ckeditor_source.js +13 -3
  102. data/apps/core/forms/public/ckeditor/contents.css +4 -2
  103. data/apps/core/forms/public/ckeditor/lang/_translationstatus.txt +59 -59
  104. data/apps/core/forms/public/ckeditor/lang/af.js +1 -1
  105. data/apps/core/forms/public/ckeditor/lang/ar.js +1 -1
  106. data/apps/core/forms/public/ckeditor/lang/bg.js +1 -1
  107. data/apps/core/forms/public/ckeditor/lang/bn.js +1 -1
  108. data/apps/core/forms/public/ckeditor/lang/bs.js +1 -1
  109. data/apps/core/forms/public/ckeditor/lang/ca.js +1 -1
  110. data/apps/core/forms/public/ckeditor/lang/cs.js +1 -1
  111. data/apps/core/forms/public/ckeditor/lang/cy.js +1 -1
  112. data/apps/core/forms/public/ckeditor/lang/da.js +1 -1
  113. data/apps/core/forms/public/ckeditor/lang/de.js +1 -1
  114. data/apps/core/forms/public/ckeditor/lang/el.js +1 -1
  115. data/apps/core/forms/public/ckeditor/lang/en-au.js +1 -1
  116. data/apps/core/forms/public/ckeditor/lang/en-ca.js +1 -1
  117. data/apps/core/forms/public/ckeditor/lang/en-gb.js +1 -1
  118. data/apps/core/forms/public/ckeditor/lang/en.js +1 -1
  119. data/apps/core/forms/public/ckeditor/lang/eo.js +1 -1
  120. data/apps/core/forms/public/ckeditor/lang/es.js +1 -1
  121. data/apps/core/forms/public/ckeditor/lang/et.js +1 -1
  122. data/apps/core/forms/public/ckeditor/lang/eu.js +1 -1
  123. data/apps/core/forms/public/ckeditor/lang/fa.js +1 -1
  124. data/apps/core/forms/public/ckeditor/lang/fi.js +1 -1
  125. data/apps/core/forms/public/ckeditor/lang/fo.js +1 -1
  126. data/apps/core/forms/public/ckeditor/lang/fr-ca.js +1 -1
  127. data/apps/core/forms/public/ckeditor/lang/fr.js +1 -1
  128. data/apps/core/forms/public/ckeditor/lang/gl.js +1 -1
  129. data/apps/core/forms/public/ckeditor/lang/gu.js +1 -1
  130. data/apps/core/forms/public/ckeditor/lang/he.js +1 -1
  131. data/apps/core/forms/public/ckeditor/lang/hi.js +1 -1
  132. data/apps/core/forms/public/ckeditor/lang/hr.js +1 -1
  133. data/apps/core/forms/public/ckeditor/lang/hu.js +1 -1
  134. data/apps/core/forms/public/ckeditor/lang/is.js +1 -1
  135. data/apps/core/forms/public/ckeditor/lang/it.js +1 -1
  136. data/apps/core/forms/public/ckeditor/lang/ja.js +1 -1
  137. data/apps/core/forms/public/ckeditor/lang/ka.js +1 -1
  138. data/apps/core/forms/public/ckeditor/lang/km.js +1 -1
  139. data/apps/core/forms/public/ckeditor/lang/ko.js +1 -1
  140. data/apps/core/forms/public/ckeditor/lang/lt.js +1 -1
  141. data/apps/core/forms/public/ckeditor/lang/lv.js +1 -1
  142. data/apps/core/forms/public/ckeditor/lang/mn.js +1 -1
  143. data/apps/core/forms/public/ckeditor/lang/ms.js +1 -1
  144. data/apps/core/forms/public/ckeditor/lang/nb.js +1 -1
  145. data/apps/core/forms/public/ckeditor/lang/nl.js +1 -1
  146. data/apps/core/forms/public/ckeditor/lang/no.js +1 -1
  147. data/apps/core/forms/public/ckeditor/lang/pl.js +1 -1
  148. data/apps/core/forms/public/ckeditor/lang/pt-br.js +1 -1
  149. data/apps/core/forms/public/ckeditor/lang/pt.js +1 -1
  150. data/apps/core/forms/public/ckeditor/lang/ro.js +1 -1
  151. data/apps/core/forms/public/ckeditor/lang/ru.js +1 -1
  152. data/apps/core/forms/public/ckeditor/lang/sk.js +1 -1
  153. data/apps/core/forms/public/ckeditor/lang/sl.js +1 -1
  154. data/apps/core/forms/public/ckeditor/lang/sr-latn.js +1 -1
  155. data/apps/core/forms/public/ckeditor/lang/sr.js +1 -1
  156. data/apps/core/forms/public/ckeditor/lang/sv.js +1 -1
  157. data/apps/core/forms/public/ckeditor/lang/th.js +1 -1
  158. data/apps/core/forms/public/ckeditor/lang/tr.js +1 -1
  159. data/apps/core/forms/public/ckeditor/lang/uk.js +1 -1
  160. data/apps/core/forms/public/ckeditor/lang/vi.js +1 -1
  161. data/apps/core/forms/public/ckeditor/lang/zh-cn.js +1 -1
  162. data/apps/core/forms/public/ckeditor/lang/zh.js +1 -1
  163. data/apps/core/forms/public/ckeditor/plugins/autogrow/plugin.js +1 -1
  164. data/apps/core/forms/public/ckeditor/plugins/bbcode/plugin.js +4 -4
  165. data/apps/core/forms/public/ckeditor/plugins/docprops/dialogs/docprops.js +2 -2
  166. data/apps/core/forms/public/ckeditor/plugins/find/dialogs/find.js +5 -4
  167. data/apps/core/forms/public/ckeditor/plugins/flash/dialogs/flash.js +4 -4
  168. data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/select.js +2 -2
  169. data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
  170. data/apps/core/forms/public/ckeditor/plugins/iframe/dialogs/iframe.js +2 -2
  171. data/apps/core/forms/public/ckeditor/plugins/image/dialogs/image.js +6 -6
  172. data/apps/core/forms/public/ckeditor/plugins/link/dialogs/link.js +6 -5
  173. data/apps/core/forms/public/ckeditor/plugins/liststyle/dialogs/liststyle.js +2 -1
  174. data/apps/core/forms/public/ckeditor/plugins/pastefromword/filter/default.js +5 -5
  175. data/apps/core/forms/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
  176. data/apps/core/forms/public/ckeditor/plugins/specialchar/lang/en.js +1 -1
  177. data/apps/core/forms/public/ckeditor/plugins/table/dialogs/table.js +4 -4
  178. data/apps/core/forms/public/ckeditor/plugins/tableresize/plugin.js +2 -2
  179. data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/wsc.js +1 -1
  180. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/README.md +26 -0
  181. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/dialog.css +616 -0
  182. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/editor.css +1088 -0
  183. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/icons.png +0 -0
  184. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/dialog_sides.gif +0 -0
  185. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/dialog_sides.png +0 -0
  186. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/dialog_sides_rtl.png +0 -0
  187. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/mini.png +0 -0
  188. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/noimage.png +0 -0
  189. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/sprites.png +0 -0
  190. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/sprites_ie6.png +0 -0
  191. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/toolbar_start.gif +0 -0
  192. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/skin.js +7 -0
  193. data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/templates.css +54 -0
  194. data/apps/core/forms/public/ckeditor/skins/kama/dialog.css +4 -3
  195. data/apps/core/forms/public/ckeditor/skins/kama/editor.css +3 -3
  196. data/apps/core/forms/public/ckeditor/themes/default/theme.js +2 -2
  197. data/apps/core/forms/public/css/form.css +5 -5
  198. data/apps/core/forms/public/html_area.js +5 -5
  199. data/apps/core/forms/tags/element_label.erb +1 -1
  200. data/apps/core/forms/tags/row.erb +1 -1
  201. data/apps/core/forms/widgets/form/form.rb +2 -1
  202. data/apps/core/forms/widgets/form/form.shtml +3 -3
  203. data/apps/core/forms/widgets/inputs/checkbox/checkbox.shtml +1 -1
  204. data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +1 -1
  205. data/apps/core/forms/widgets/inputs/file_input/file_input.shtml +1 -1
  206. data/apps/core/forms/widgets/inputs/html_area/html_area.shtml +1 -1
  207. data/apps/core/forms/widgets/inputs/input/input.shtml +1 -1
  208. data/apps/core/forms/widgets/inputs/input/readonly.shtml +1 -1
  209. data/apps/core/forms/widgets/inputs/password/password.shtml +1 -1
  210. data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +1 -1
  211. data/apps/core/forms/widgets/inputs/select/select.shtml +1 -1
  212. data/apps/core/forms/widgets/inputs/text/text.shtml +1 -1
  213. data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +1 -1
  214. data/apps/core/forms/widgets/inputs/time_span/time_span.shtml +1 -1
  215. data/apps/messenger/controllers/messenger_admin_controller.rb +19 -4
  216. data/apps/messenger/views/admin/_admin.layout.shtml +1 -1
  217. data/apps/messenger/views/admin/queue.shtml +6 -6
  218. data/apps/messenger/views/admin/view_email.shtml +7 -0
  219. data/apps/messenger/views/admin/view_sms.shtml +4 -0
  220. data/blueprints/app/.dirs +2 -1
  221. data/blueprints/app/test/features/support/env.rb +4 -0
  222. data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
  223. data/lib/spiderfw/cmd/commands/config.rb +6 -3
  224. data/lib/spiderfw/config/configuration.rb +11 -2
  225. data/lib/spiderfw/config/options/spider.rb +1 -1
  226. data/lib/spiderfw/controller/controller.rb +27 -15
  227. data/lib/spiderfw/controller/dispatcher.rb +8 -4
  228. data/lib/spiderfw/controller/http_controller.rb +9 -5
  229. data/lib/spiderfw/controller/mixins/static_content.rb +1 -0
  230. data/lib/spiderfw/controller/mixins/visual.rb +48 -31
  231. data/lib/spiderfw/home.rb +8 -0
  232. data/lib/spiderfw/i18n/cldr.rb +1 -0
  233. data/lib/spiderfw/model/base_model.rb +2 -2
  234. data/lib/spiderfw/model/mappers/db_mapper.rb +1 -0
  235. data/lib/spiderfw/model/unit_of_work.rb +2 -2
  236. data/lib/spiderfw/requires.rb +1 -0
  237. data/lib/spiderfw/setup/app_manager.rb +16 -8
  238. data/lib/spiderfw/spider.rb +2 -2
  239. data/lib/spiderfw/templates/layout.rb +16 -9
  240. data/lib/spiderfw/templates/template.rb +28 -8
  241. data/lib/spiderfw/utils/logger.rb +9 -9
  242. data/views/errors/error.layout.shtml +9 -4
  243. metadata +98 -13
  244. data/apps/core/admin/public/sass/bootstrap/bootstrap.scss +0 -29
  245. data/apps/core/admin/public/sass/bootstrap/forms.scss +0 -478
  246. data/apps/core/admin/public/sass/bootstrap/mixins.scss +0 -220
  247. data/apps/core/admin/public/sass/bootstrap/patterns.scss +0 -1062
  248. data/apps/core/admin/public/sass/bootstrap/scaffolding.scss +0 -136
  249. data/apps/core/admin/public/sass/bootstrap/tables.scss +0 -224
  250. data/apps/core/admin/public/sass/bootstrap/type.scss +0 -187
  251. data/apps/core/admin/public/sass/bootstrap/variables.scss +0 -60
@@ -0,0 +1,209 @@
1
+ /* =========================================================
2
+ * bootstrap-modal.js v2.0.0
3
+ * http://twitter.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( $ ){
22
+
23
+ "use strict"
24
+
25
+ /* MODAL CLASS DEFINITION
26
+ * ====================== */
27
+
28
+ var Modal = function ( content, options ) {
29
+ this.options = $.extend({}, $.fn.modal.defaults, options)
30
+ this.$element = $(content)
31
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
32
+ }
33
+
34
+ Modal.prototype = {
35
+
36
+ constructor: Modal
37
+
38
+ , toggle: function () {
39
+ return this[!this.isShown ? 'show' : 'hide']()
40
+ }
41
+
42
+ , show: function () {
43
+ var that = this
44
+
45
+ if (this.isShown) return
46
+
47
+ $('body').addClass('modal-open')
48
+
49
+ this.isShown = true
50
+ this.$element.trigger('show')
51
+
52
+ escape.call(this)
53
+ backdrop.call(this, function () {
54
+ var transition = $.support.transition && that.$element.hasClass('fade')
55
+
56
+ !that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position
57
+
58
+ that.$element
59
+ .show()
60
+
61
+ if (transition) {
62
+ that.$element[0].offsetWidth // force reflow
63
+ }
64
+
65
+ that.$element.addClass('in')
66
+
67
+ transition ?
68
+ that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
69
+ that.$element.trigger('shown')
70
+
71
+ })
72
+ }
73
+
74
+ , hide: function ( e ) {
75
+ e && e.preventDefault()
76
+
77
+ if (!this.isShown) return
78
+
79
+ var that = this
80
+ this.isShown = false
81
+
82
+ $('body').removeClass('modal-open')
83
+
84
+ escape.call(this)
85
+
86
+ this.$element
87
+ .trigger('hide')
88
+ .removeClass('in')
89
+
90
+ $.support.transition && this.$element.hasClass('fade') ?
91
+ hideWithTransition.call(this) :
92
+ hideModal.call(this)
93
+ }
94
+
95
+ }
96
+
97
+
98
+ /* MODAL PRIVATE METHODS
99
+ * ===================== */
100
+
101
+ function hideWithTransition() {
102
+ var that = this
103
+ , timeout = setTimeout(function () {
104
+ that.$element.off($.support.transition.end)
105
+ hideModal.call(that)
106
+ }, 500)
107
+
108
+ this.$element.one($.support.transition.end, function () {
109
+ clearTimeout(timeout)
110
+ hideModal.call(that)
111
+ })
112
+ }
113
+
114
+ function hideModal( that ) {
115
+ this.$element
116
+ .hide()
117
+ .trigger('hidden')
118
+
119
+ backdrop.call(this)
120
+ }
121
+
122
+ function backdrop( callback ) {
123
+ var that = this
124
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
125
+
126
+ if (this.isShown && this.options.backdrop) {
127
+ var doAnimate = $.support.transition && animate
128
+
129
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
130
+ .appendTo(document.body)
131
+
132
+ if (this.options.backdrop != 'static') {
133
+ this.$backdrop.click($.proxy(this.hide, this))
134
+ }
135
+
136
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
137
+
138
+ this.$backdrop.addClass('in')
139
+
140
+ doAnimate ?
141
+ this.$backdrop.one($.support.transition.end, callback) :
142
+ callback()
143
+
144
+ } else if (!this.isShown && this.$backdrop) {
145
+ this.$backdrop.removeClass('in')
146
+
147
+ $.support.transition && this.$element.hasClass('fade')?
148
+ this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
149
+ removeBackdrop.call(this)
150
+
151
+ } else if (callback) {
152
+ callback()
153
+ }
154
+ }
155
+
156
+ function removeBackdrop() {
157
+ this.$backdrop.remove()
158
+ this.$backdrop = null
159
+ }
160
+
161
+ function escape() {
162
+ var that = this
163
+ if (this.isShown && this.options.keyboard) {
164
+ $(document).on('keyup.dismiss.modal', function ( e ) {
165
+ e.which == 27 && that.hide()
166
+ })
167
+ } else if (!this.isShown) {
168
+ $(document).off('keyup.dismiss.modal')
169
+ }
170
+ }
171
+
172
+
173
+ /* MODAL PLUGIN DEFINITION
174
+ * ======================= */
175
+
176
+ $.fn.modal = function ( option ) {
177
+ return this.each(function () {
178
+ var $this = $(this)
179
+ , data = $this.data('modal')
180
+ , options = typeof option == 'object' && option
181
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
182
+ if (typeof option == 'string') data[option]()
183
+ else data.show()
184
+ })
185
+ }
186
+
187
+ $.fn.modal.defaults = {
188
+ backdrop: true
189
+ , keyboard: true
190
+ }
191
+
192
+ $.fn.modal.Constructor = Modal
193
+
194
+
195
+ /* MODAL DATA-API
196
+ * ============== */
197
+
198
+ $(function () {
199
+ $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
200
+ var $this = $(this), href
201
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
202
+ , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
203
+
204
+ e.preventDefault()
205
+ $target.modal(option)
206
+ })
207
+ })
208
+
209
+ }( window.jQuery )
@@ -0,0 +1,95 @@
1
+ /* ===========================================================
2
+ * bootstrap-popover.js v2.0.0
3
+ * http://twitter.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( $ ) {
22
+
23
+ "use strict"
24
+
25
+ var Popover = function ( element, options ) {
26
+ this.init('popover', element, options)
27
+ }
28
+
29
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
30
+ ========================================== */
31
+
32
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
33
+
34
+ constructor: Popover
35
+
36
+ , setContent: function () {
37
+ var $tip = this.tip()
38
+ , title = this.getTitle()
39
+ , content = this.getContent()
40
+
41
+ $tip.find('.popover-title')[ $.type(title) == 'object' ? 'append' : 'html' ](title)
42
+ $tip.find('.popover-content > *')[ $.type(content) == 'object' ? 'append' : 'html' ](content)
43
+
44
+ $tip.removeClass('fade top bottom left right in')
45
+ }
46
+
47
+ , hasContent: function () {
48
+ return this.getTitle() || this.getContent()
49
+ }
50
+
51
+ , getContent: function () {
52
+ var content
53
+ , $e = this.$element
54
+ , o = this.options
55
+
56
+ content = $e.attr('data-content')
57
+ || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
58
+
59
+ content = content.toString().replace(/(^\s*|\s*$)/, "")
60
+
61
+ return content
62
+ }
63
+
64
+ , tip: function() {
65
+ if (!this.$tip) {
66
+ this.$tip = $(this.options.template)
67
+ }
68
+ return this.$tip
69
+ }
70
+
71
+ })
72
+
73
+
74
+ /* POPOVER PLUGIN DEFINITION
75
+ * ======================= */
76
+
77
+ $.fn.popover = function ( option ) {
78
+ return this.each(function () {
79
+ var $this = $(this)
80
+ , data = $this.data('popover')
81
+ , options = typeof option == 'object' && option
82
+ if (!data) $this.data('popover', (data = new Popover(this, options)))
83
+ if (typeof option == 'string') data[option]()
84
+ })
85
+ }
86
+
87
+ $.fn.popover.Constructor = Popover
88
+
89
+ $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
90
+ placement: 'right'
91
+ , content: ''
92
+ , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
93
+ })
94
+
95
+ }( window.jQuery )
@@ -0,0 +1,125 @@
1
+ /* =============================================================
2
+ * bootstrap-scrollspy.js v2.0.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
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
+ !function ( $ ) {
21
+
22
+ "use strict"
23
+
24
+ /* SCROLLSPY CLASS DEFINITION
25
+ * ========================== */
26
+
27
+ function ScrollSpy( element, options) {
28
+ var process = $.proxy(this.process, this)
29
+ , $element = $(element).is('body') ? $(window) : $(element)
30
+ , href
31
+ this.options = $.extend({}, $.fn.scrollspy.defaults, options)
32
+ this.$scrollElement = $element.on('scroll.scroll.data-api', process)
33
+ this.selector = (this.options.target
34
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
35
+ || '') + ' .nav li > a'
36
+ this.$body = $('body').on('click.scroll.data-api', this.selector, process)
37
+ this.refresh()
38
+ this.process()
39
+ }
40
+
41
+ ScrollSpy.prototype = {
42
+
43
+ constructor: ScrollSpy
44
+
45
+ , refresh: function () {
46
+ this.targets = this.$body
47
+ .find(this.selector)
48
+ .map(function () {
49
+ var href = $(this).attr('href')
50
+ return /^#\w/.test(href) && $(href).length ? href : null
51
+ })
52
+
53
+ this.offsets = $.map(this.targets, function (id) {
54
+ return $(id).position().top
55
+ })
56
+ }
57
+
58
+ , process: function () {
59
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
60
+ , offsets = this.offsets
61
+ , targets = this.targets
62
+ , activeTarget = this.activeTarget
63
+ , i
64
+
65
+ for (i = offsets.length; i--;) {
66
+ activeTarget != targets[i]
67
+ && scrollTop >= offsets[i]
68
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
69
+ && this.activate( targets[i] )
70
+ }
71
+ }
72
+
73
+ , activate: function (target) {
74
+ var active
75
+
76
+ this.activeTarget = target
77
+
78
+ this.$body
79
+ .find(this.selector).parent('.active')
80
+ .removeClass('active')
81
+
82
+ active = this.$body
83
+ .find(this.selector + '[href="' + target + '"]')
84
+ .parent('li')
85
+ .addClass('active')
86
+
87
+ if ( active.parent('.dropdown-menu') ) {
88
+ active.closest('li.dropdown').addClass('active')
89
+ }
90
+ }
91
+
92
+ }
93
+
94
+
95
+ /* SCROLLSPY PLUGIN DEFINITION
96
+ * =========================== */
97
+
98
+ $.fn.scrollspy = function ( option ) {
99
+ return this.each(function () {
100
+ var $this = $(this)
101
+ , data = $this.data('scrollspy')
102
+ , options = typeof option == 'object' && option
103
+ if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
104
+ if (typeof option == 'string') data[option]()
105
+ })
106
+ }
107
+
108
+ $.fn.scrollspy.Constructor = ScrollSpy
109
+
110
+ $.fn.scrollspy.defaults = {
111
+ offset: 10
112
+ }
113
+
114
+
115
+ /* SCROLLSPY DATA-API
116
+ * ================== */
117
+
118
+ $(function () {
119
+ $('[data-spy="scroll"]').each(function () {
120
+ var $spy = $(this)
121
+ $spy.scrollspy($spy.data())
122
+ })
123
+ })
124
+
125
+ }( window.jQuery )
@@ -0,0 +1,130 @@
1
+ /* ========================================================
2
+ * bootstrap-tab.js v2.0.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
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( $ ){
22
+
23
+ "use strict"
24
+
25
+ /* TAB CLASS DEFINITION
26
+ * ==================== */
27
+
28
+ var Tab = function ( element ) {
29
+ this.element = $(element)
30
+ }
31
+
32
+ Tab.prototype = {
33
+
34
+ constructor: Tab
35
+
36
+ , show: function () {
37
+ var $this = this.element
38
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
39
+ , selector = $this.attr('data-target')
40
+ , previous
41
+ , $target
42
+
43
+ if (!selector) {
44
+ selector = $this.attr('href')
45
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
46
+ }
47
+
48
+ if ( $this.parent('li').hasClass('active') ) return
49
+
50
+ previous = $ul.find('.active a').last()[0]
51
+
52
+ $this.trigger({
53
+ type: 'show'
54
+ , relatedTarget: previous
55
+ })
56
+
57
+ $target = $(selector)
58
+
59
+ this.activate($this.parent('li'), $ul)
60
+ this.activate($target, $target.parent(), function () {
61
+ $this.trigger({
62
+ type: 'shown'
63
+ , relatedTarget: previous
64
+ })
65
+ })
66
+ }
67
+
68
+ , activate: function ( element, container, callback) {
69
+ var $active = container.find('> .active')
70
+ , transition = callback
71
+ && $.support.transition
72
+ && $active.hasClass('fade')
73
+
74
+ function next() {
75
+ $active
76
+ .removeClass('active')
77
+ .find('> .dropdown-menu > .active')
78
+ .removeClass('active')
79
+
80
+ element.addClass('active')
81
+
82
+ if (transition) {
83
+ element[0].offsetWidth // reflow for transition
84
+ element.addClass('in')
85
+ } else {
86
+ element.removeClass('fade')
87
+ }
88
+
89
+ if ( element.parent('.dropdown-menu') ) {
90
+ element.closest('li.dropdown').addClass('active')
91
+ }
92
+
93
+ callback && callback()
94
+ }
95
+
96
+ transition ?
97
+ $active.one($.support.transition.end, next) :
98
+ next()
99
+
100
+ $active.removeClass('in')
101
+ }
102
+ }
103
+
104
+
105
+ /* TAB PLUGIN DEFINITION
106
+ * ===================== */
107
+
108
+ $.fn.tab = function ( option ) {
109
+ return this.each(function () {
110
+ var $this = $(this)
111
+ , data = $this.data('tab')
112
+ if (!data) $this.data('tab', (data = new Tab(this)))
113
+ if (typeof option == 'string') data[option]()
114
+ })
115
+ }
116
+
117
+ $.fn.tab.Constructor = Tab
118
+
119
+
120
+ /* TAB DATA-API
121
+ * ============ */
122
+
123
+ $(function () {
124
+ $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
125
+ e.preventDefault()
126
+ $(this).tab('show')
127
+ })
128
+ })
129
+
130
+ }( window.jQuery )