databaseformalizer 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. data/.project +18 -0
  2. data/README +256 -0
  3. data/README.md +2 -0
  4. data/Rakefile +21 -0
  5. data/app/controllers/databaseformalizer/attr_defs_controller.rb +98 -0
  6. data/app/controllers/databaseformalizer/attr_vals_controller.rb +85 -0
  7. data/app/controllers/databaseformalizer/dbformahome_controller.rb +7 -0
  8. data/app/controllers/databaseformalizer/entities_controller.rb +105 -0
  9. data/app/controllers/databaseformalizer/entity_defs_controller.rb +90 -0
  10. data/app/helpers/application_helper.rb +2 -0
  11. data/app/helpers/databaseformalizer/application_helper.rb +4 -0
  12. data/app/helpers/databaseformalizer/attr_defs_helper.rb +4 -0
  13. data/app/helpers/databaseformalizer/attr_vals_helper.rb +4 -0
  14. data/app/helpers/databaseformalizer/dbformahome_helper.rb +4 -0
  15. data/app/helpers/databaseformalizer/entities_helper.rb +160 -0
  16. data/app/helpers/databaseformalizer/entity_defs_helper.rb +68 -0
  17. data/app/models/databaseformalizer/attr_def.rb +48 -0
  18. data/app/models/databaseformalizer/attr_list_join_def.rb +17 -0
  19. data/app/models/databaseformalizer/attr_list_join_val.rb +18 -0
  20. data/app/models/databaseformalizer/attr_val.rb +36 -0
  21. data/app/models/databaseformalizer/attr_vals_entity.rb +18 -0
  22. data/app/models/databaseformalizer/entity.rb +27 -0
  23. data/app/models/databaseformalizer/entity_def.rb +24 -0
  24. data/app/models/databaseformalizer/entity_def_attr_def.rb +18 -0
  25. data/app/views/databaseformalizer/attr_defs/_form.html.erb +74 -0
  26. data/app/views/databaseformalizer/attr_defs/edit.html.erb +7 -0
  27. data/app/views/databaseformalizer/attr_defs/index.html.erb +38 -0
  28. data/app/views/databaseformalizer/attr_defs/new.html.erb +6 -0
  29. data/app/views/databaseformalizer/attr_defs/show.html.erb +50 -0
  30. data/app/views/databaseformalizer/attr_vals/_form.html.erb +29 -0
  31. data/app/views/databaseformalizer/attr_vals/edit.html.erb +7 -0
  32. data/app/views/databaseformalizer/attr_vals/index.html.erb +28 -0
  33. data/app/views/databaseformalizer/attr_vals/new.html.erb +6 -0
  34. data/app/views/databaseformalizer/attr_vals/show.html.erb +20 -0
  35. data/app/views/databaseformalizer/dbformahome/index.html.erb +19 -0
  36. data/app/views/databaseformalizer/entities/_attr_val_boolean_form.html.erb +7 -0
  37. data/app/views/databaseformalizer/entities/_attr_val_checkList_form.html.erb +22 -0
  38. data/app/views/databaseformalizer/entities/_attr_val_datetime_form.html.erb +15 -0
  39. data/app/views/databaseformalizer/entities/_attr_val_entityDef_form.html.erb +14 -0
  40. data/app/views/databaseformalizer/entities/_attr_val_form_all.html.erb +4 -0
  41. data/app/views/databaseformalizer/entities/_attr_val_form_one.html.erb +6 -0
  42. data/app/views/databaseformalizer/entities/_attr_val_integer_form.html.erb +10 -0
  43. data/app/views/databaseformalizer/entities/_attr_val_openList_element_form.html.erb +16 -0
  44. data/app/views/databaseformalizer/entities/_attr_val_openList_form.html.erb +12 -0
  45. data/app/views/databaseformalizer/entities/_attr_val_selectOneInList_form.html.erb +20 -0
  46. data/app/views/databaseformalizer/entities/_attr_val_string_form.html.erb +10 -0
  47. data/app/views/databaseformalizer/entities/_attr_val_text_form.html.erb +10 -0
  48. data/app/views/databaseformalizer/entities/_form.html.erb +54 -0
  49. data/app/views/databaseformalizer/entities/edit.html.erb +8 -0
  50. data/app/views/databaseformalizer/entities/index.html.erb +45 -0
  51. data/app/views/databaseformalizer/entities/new.html.erb +10 -0
  52. data/app/views/databaseformalizer/entities/new.js.erb +1 -0
  53. data/app/views/databaseformalizer/entities/show.html.erb +50 -0
  54. data/app/views/databaseformalizer/entity_defs/_form.html.erb +51 -0
  55. data/app/views/databaseformalizer/entity_defs/edit.html.erb +7 -0
  56. data/app/views/databaseformalizer/entity_defs/index.html.erb +57 -0
  57. data/app/views/databaseformalizer/entity_defs/new.html.erb +6 -0
  58. data/app/views/databaseformalizer/entity_defs/show.html.erb +30 -0
  59. data/app/views/databaseformalizer/layouts/application.html.erb +134 -0
  60. data/databaseformalizer.gemspec +34 -0
  61. data/lib/acts_as_entity/base.rb +101 -0
  62. data/lib/application_controller.rb +21 -0
  63. data/lib/application_helper.rb +3 -0
  64. data/lib/databaseformalizer.rb +27 -0
  65. data/lib/engine.rb +23 -0
  66. data/lib/generators/entity_def/USAGE +8 -0
  67. data/lib/generators/entity_def/entity_def_generator.rb +39 -0
  68. data/lib/generators/entity_def/templates/controller.rb +98 -0
  69. data/lib/generators/entity_def/templates/helper.rb +2 -0
  70. data/lib/generators/entity_def/templates/model.rb +3 -0
  71. data/lib/generators/entity_def/templates/view/_form.html.erb +35 -0
  72. data/lib/generators/entity_def/templates/view/edit.html.erb +6 -0
  73. data/lib/generators/entity_def/templates/view/index.html.erb +27 -0
  74. data/lib/generators/entity_def/templates/view/new.html.erb +5 -0
  75. data/lib/generators/entity_def/templates/view/show.html.erb +3 -0
  76. data/lib/rails/generators/databaseformalizer/databaseformalizer_generator.rb +52 -0
  77. data/lib/rails/generators/databaseformalizer/templates/initializer.rb +8 -0
  78. data/lib/rails/generators/databaseformalizer/templates/migration.rb +9 -0
  79. data/lib/rails/generators/databaseformalizer/templates/migration.rb.bak +9 -0
  80. data/lib/rails/generators/databaseformalizer/templates/schema.rb +84 -0
  81. data/lib/rails/railties/tasks.rake +8 -0
  82. data/public/bootstrap/css/bootstrap-fixed-header.css +15 -0
  83. data/public/bootstrap/css/bootstrap-responsive.css +808 -0
  84. data/public/bootstrap/css/bootstrap-responsive.min.css +9 -0
  85. data/public/bootstrap/css/bootstrap-toggle.css +242 -0
  86. data/public/bootstrap/css/cerulean/bootstrap.min.css +740 -0
  87. data/public/bootstrap/css/img/glyphicons-halflings-white.png +0 -0
  88. data/public/bootstrap/css/img/glyphicons-halflings.png +0 -0
  89. data/public/bootstrap/js/bootstrap-alert.js +90 -0
  90. data/public/bootstrap/js/bootstrap-collapse.js +157 -0
  91. data/public/bootstrap/js/bootstrap-dropdown.js +100 -0
  92. data/public/bootstrap/js/bootstrap-fixed-header.js +54 -0
  93. data/public/bootstrap/js/bootstrap-modal.js +218 -0
  94. data/public/bootstrap/js/bootstrap-popover.js +98 -0
  95. data/public/bootstrap/js/bootstrap-tab.js +135 -0
  96. data/public/bootstrap/js/bootstrap-toggle.js +104 -0
  97. data/public/bootstrap/js/bootstrap-tooltip.js +275 -0
  98. data/public/bootstrap/js/bootstrap-transition.js +61 -0
  99. data/public/bootstrap/js/bootstrap.js +1824 -0
  100. data/public/bootstrap/js/bootstrap.min.js +6 -0
  101. data/public/images/Thumbs.db +0 -0
  102. data/public/images/bootstrap/Thumbs.db +0 -0
  103. data/public/images/bootstrap/glyphicons-halflings.png +0 -0
  104. data/public/images/databaseformalizer.jpg +0 -0
  105. data/public/images/metamodel.png +0 -0
  106. data/public/images/model.png +0 -0
  107. data/public/javascripts/databaseformalizer.js +13 -0
  108. data/public/javascripts/jquery.js +9252 -0
  109. data/public/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  110. data/public/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  111. data/public/jquery-ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  112. data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  113. data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  114. data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  115. data/public/jquery-ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  116. data/public/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  117. data/public/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  118. data/public/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  119. data/public/jquery-ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  120. data/public/jquery-ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  121. data/public/jquery-ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  122. data/public/jquery-ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  123. data/public/jquery-ui/css/ui-lightness/jquery-ui-1.8.21.custom.css +565 -0
  124. data/public/jquery-ui/js/jquery-1.7.2.min.js +4 -0
  125. data/public/jquery-ui/js/jquery-ui-1.8.21.custom.min.js +125 -0
  126. data/public/jquery-validation/README.md +8 -0
  127. data/public/jquery-validation/additional-methods.js +300 -0
  128. data/public/jquery-validation/additional-methods.min.js +29 -0
  129. data/public/jquery-validation/changelog.txt +277 -0
  130. data/public/jquery-validation/jquery.validate.js +1188 -0
  131. data/public/jquery-validation/jquery.validate.min.js +51 -0
  132. data/public/jquery-validation/lib/jquery-1.3.2.js +4376 -0
  133. data/public/jquery-validation/lib/jquery-1.4.2.js +6240 -0
  134. data/public/jquery-validation/lib/jquery-1.4.4.js +7179 -0
  135. data/public/jquery-validation/lib/jquery-1.5.2.js +8374 -0
  136. data/public/jquery-validation/lib/jquery-1.6.1.js +8936 -0
  137. data/public/jquery-validation/lib/jquery.form.js +660 -0
  138. data/public/jquery-validation/lib/jquery.js +4376 -0
  139. data/public/jquery-validation/lib/jquery.metadata.js +122 -0
  140. data/public/jquery-validation/lib/jquery.mockjax.js +382 -0
  141. data/public/jquery-validation/localization/messages_ar.js +24 -0
  142. data/public/jquery-validation/localization/messages_bg.js +23 -0
  143. data/public/jquery-validation/localization/messages_ca.js +23 -0
  144. data/public/jquery-validation/localization/messages_cn.js +23 -0
  145. data/public/jquery-validation/localization/messages_cs.js +23 -0
  146. data/public/jquery-validation/localization/messages_da.js +20 -0
  147. data/public/jquery-validation/localization/messages_de.js +20 -0
  148. data/public/jquery-validation/localization/messages_el.js +24 -0
  149. data/public/jquery-validation/localization/messages_es.js +23 -0
  150. data/public/jquery-validation/localization/messages_eu.js +23 -0
  151. data/public/jquery-validation/localization/messages_fa.js +23 -0
  152. data/public/jquery-validation/localization/messages_fi.js +21 -0
  153. data/public/jquery-validation/localization/messages_fr.js +23 -0
  154. data/public/jquery-validation/localization/messages_ge.js +23 -0
  155. data/public/jquery-validation/localization/messages_he.js +23 -0
  156. data/public/jquery-validation/localization/messages_hu.js +20 -0
  157. data/public/jquery-validation/localization/messages_it.js +23 -0
  158. data/public/jquery-validation/localization/messages_ja.js +23 -0
  159. data/public/jquery-validation/localization/messages_kk.js +23 -0
  160. data/public/jquery-validation/localization/messages_lt.js +23 -0
  161. data/public/jquery-validation/localization/messages_lv.js +23 -0
  162. data/public/jquery-validation/localization/messages_nl.js +23 -0
  163. data/public/jquery-validation/localization/messages_no.js +23 -0
  164. data/public/jquery-validation/localization/messages_pl.js +23 -0
  165. data/public/jquery-validation/localization/messages_ptbr.js +23 -0
  166. data/public/jquery-validation/localization/messages_ptpt.js +23 -0
  167. data/public/jquery-validation/localization/messages_ro.js +23 -0
  168. data/public/jquery-validation/localization/messages_ru.js +23 -0
  169. data/public/jquery-validation/localization/messages_se.js +21 -0
  170. data/public/jquery-validation/localization/messages_si.js +23 -0
  171. data/public/jquery-validation/localization/messages_sk.js +20 -0
  172. data/public/jquery-validation/localization/messages_sl.js +23 -0
  173. data/public/jquery-validation/localization/messages_sr.js +23 -0
  174. data/public/jquery-validation/localization/messages_th.js +23 -0
  175. data/public/jquery-validation/localization/messages_tr.js +23 -0
  176. data/public/jquery-validation/localization/messages_tw.js +23 -0
  177. data/public/jquery-validation/localization/messages_ua.js +23 -0
  178. data/public/jquery-validation/localization/messages_vi.js +23 -0
  179. data/public/jquery-validation/localization/methods_de.js +12 -0
  180. data/public/jquery-validation/localization/methods_nl.js +9 -0
  181. data/public/jquery-validation/localization/methods_pt.js +9 -0
  182. data/public/jquery-validation/todo +172 -0
  183. data/public/jquery-validation/version.txt +1 -0
  184. data/public/stylesheets/databaseformalizer.css +64 -0
  185. data/public/stylesheets/scaffold.css +56 -0
  186. data/public/tablesorter/addons/.svn/all-wcprops +5 -0
  187. data/public/tablesorter/addons/.svn/entries +31 -0
  188. data/public/tablesorter/addons/pager/.svn/all-wcprops +17 -0
  189. data/public/tablesorter/addons/pager/.svn/entries +96 -0
  190. data/public/tablesorter/addons/pager/.svn/prop-base/jquery.tablesorter.pager.css.svn-base +5 -0
  191. data/public/tablesorter/addons/pager/.svn/prop-base/jquery.tablesorter.pager.js.svn-base +5 -0
  192. data/public/tablesorter/addons/pager/.svn/text-base/jquery.tablesorter.pager.css.svn-base +25 -0
  193. data/public/tablesorter/addons/pager/.svn/text-base/jquery.tablesorter.pager.js.svn-base +184 -0
  194. data/public/tablesorter/addons/pager/jquery.tablesorter.pager.css +25 -0
  195. data/public/tablesorter/addons/pager/jquery.tablesorter.pager.js +184 -0
  196. data/public/tablesorter/build/.svn/all-wcprops +47 -0
  197. data/public/tablesorter/build/.svn/entries +266 -0
  198. data/public/tablesorter/build/.svn/prop-base/ParseMaster.js.svn-base +5 -0
  199. data/public/tablesorter/build/.svn/prop-base/js.jar.svn-base +5 -0
  200. data/public/tablesorter/build/.svn/prop-base/jsmin.js.svn-base +5 -0
  201. data/public/tablesorter/build/.svn/prop-base/min.js.svn-base +5 -0
  202. data/public/tablesorter/build/.svn/prop-base/pack.js.svn-base +5 -0
  203. data/public/tablesorter/build/.svn/prop-base/packer.js.svn-base +5 -0
  204. data/public/tablesorter/build/.svn/prop-base/writeFile.js.svn-base +5 -0
  205. data/public/tablesorter/build/.svn/text-base/ParseMaster.js.svn-base +106 -0
  206. data/public/tablesorter/build/.svn/text-base/js.jar.svn-base +0 -0
  207. data/public/tablesorter/build/.svn/text-base/jsmin.js.svn-base +316 -0
  208. data/public/tablesorter/build/.svn/text-base/min.js.svn-base +5 -0
  209. data/public/tablesorter/build/.svn/text-base/pack.js.svn-base +5 -0
  210. data/public/tablesorter/build/.svn/text-base/packer.js.svn-base +316 -0
  211. data/public/tablesorter/build/.svn/text-base/writeFile.js.svn-base +19 -0
  212. data/public/tablesorter/build/ParseMaster.js +106 -0
  213. data/public/tablesorter/build/js.jar +0 -0
  214. data/public/tablesorter/build/jsmin.js +316 -0
  215. data/public/tablesorter/build/min.js +5 -0
  216. data/public/tablesorter/build/pack.js +5 -0
  217. data/public/tablesorter/build/packer.js +316 -0
  218. data/public/tablesorter/build/writeFile.js +19 -0
  219. data/public/tablesorter/build.xml +26 -0
  220. data/public/tablesorter/changelog +41 -0
  221. data/public/tablesorter/jquery-latest.js +154 -0
  222. data/public/tablesorter/jquery.metadata.js +122 -0
  223. data/public/tablesorter/jquery.tablesorter.js +1031 -0
  224. data/public/tablesorter/jquery.tablesorter.min.js +4 -0
  225. data/public/tablesorter/jquery.tablesorter.widgets.js +433 -0
  226. data/public/tablesorter/jquery.ui.datepicker.js +1727 -0
  227. data/public/tablesorter/style.css +110 -0
  228. data/public/tablesorter/themes/.svn/all-wcprops +5 -0
  229. data/public/tablesorter/themes/.svn/entries +34 -0
  230. data/public/tablesorter/themes/blue/.svn/all-wcprops +35 -0
  231. data/public/tablesorter/themes/blue/.svn/entries +198 -0
  232. data/public/tablesorter/themes/blue/.svn/prop-base/asc.gif.svn-base +5 -0
  233. data/public/tablesorter/themes/blue/.svn/prop-base/bg.gif.svn-base +5 -0
  234. data/public/tablesorter/themes/blue/.svn/prop-base/blue.zip.svn-base +5 -0
  235. data/public/tablesorter/themes/blue/.svn/prop-base/desc.gif.svn-base +5 -0
  236. data/public/tablesorter/themes/blue/.svn/prop-base/style.css.svn-base +5 -0
  237. data/public/tablesorter/themes/blue/.svn/text-base/asc.gif.svn-base +0 -0
  238. data/public/tablesorter/themes/blue/.svn/text-base/bg.gif.svn-base +0 -0
  239. data/public/tablesorter/themes/blue/.svn/text-base/blue.zip.svn-base +0 -0
  240. data/public/tablesorter/themes/blue/.svn/text-base/desc.gif.svn-base +0 -0
  241. data/public/tablesorter/themes/blue/.svn/text-base/style.css.svn-base +39 -0
  242. data/public/tablesorter/themes/blue/asc.gif +0 -0
  243. data/public/tablesorter/themes/blue/bg.gif +0 -0
  244. data/public/tablesorter/themes/blue/blue.zip +0 -0
  245. data/public/tablesorter/themes/blue/desc.gif +0 -0
  246. data/public/tablesorter/themes/blue/style.css +39 -0
  247. data/public/tablesorter/themes/green/.svn/all-wcprops +35 -0
  248. data/public/tablesorter/themes/green/.svn/entries +198 -0
  249. data/public/tablesorter/themes/green/.svn/prop-base/asc.png.svn-base +5 -0
  250. data/public/tablesorter/themes/green/.svn/prop-base/bg.png.svn-base +5 -0
  251. data/public/tablesorter/themes/green/.svn/prop-base/desc.png.svn-base +5 -0
  252. data/public/tablesorter/themes/green/.svn/prop-base/green.zip.svn-base +5 -0
  253. data/public/tablesorter/themes/green/.svn/prop-base/style.css.svn-base +5 -0
  254. data/public/tablesorter/themes/green/.svn/text-base/asc.png.svn-base +0 -0
  255. data/public/tablesorter/themes/green/.svn/text-base/bg.png.svn-base +0 -0
  256. data/public/tablesorter/themes/green/.svn/text-base/desc.png.svn-base +0 -0
  257. data/public/tablesorter/themes/green/.svn/text-base/green.zip.svn-base +0 -0
  258. data/public/tablesorter/themes/green/.svn/text-base/style.css.svn-base +39 -0
  259. data/public/tablesorter/themes/green/asc.png +0 -0
  260. data/public/tablesorter/themes/green/bg.png +0 -0
  261. data/public/tablesorter/themes/green/desc.png +0 -0
  262. data/public/tablesorter/themes/green/green.zip +0 -0
  263. data/public/tablesorter/themes/green/style.css +39 -0
  264. data/test/database.yml +5 -0
  265. data/test/test_helper.rb +56 -0
  266. data/test/unit/databaseformalizer_test.rb +11 -0
  267. metadata +332 -0
@@ -0,0 +1,90 @@
1
+ /* ==========================================================
2
+ * bootstrap-alert.js v2.0.3
3
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
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"; // jshint ;_;
24
+
25
+
26
+ /* ALERT CLASS DEFINITION
27
+ * ====================== */
28
+
29
+ var dismiss = '[data-dismiss="alert"]'
30
+ , Alert = function (el) {
31
+ $(el).on('click', dismiss, this.close)
32
+ }
33
+
34
+ Alert.prototype.close = function (e) {
35
+ var $this = $(this)
36
+ , selector = $this.attr('data-target')
37
+ , $parent
38
+
39
+ if (!selector) {
40
+ selector = $this.attr('href')
41
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42
+ }
43
+
44
+ $parent = $(selector)
45
+
46
+ e && e.preventDefault()
47
+
48
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
49
+
50
+ $parent.trigger(e = $.Event('close'))
51
+
52
+ if (e.isDefaultPrevented()) return
53
+
54
+ $parent.removeClass('in')
55
+
56
+ function removeElement() {
57
+ $parent
58
+ .trigger('closed')
59
+ .remove()
60
+ }
61
+
62
+ $.support.transition && $parent.hasClass('fade') ?
63
+ $parent.on($.support.transition.end, removeElement) :
64
+ removeElement()
65
+ }
66
+
67
+
68
+ /* ALERT PLUGIN DEFINITION
69
+ * ======================= */
70
+
71
+ $.fn.alert = function (option) {
72
+ return this.each(function () {
73
+ var $this = $(this)
74
+ , data = $this.data('alert')
75
+ if (!data) $this.data('alert', (data = new Alert(this)))
76
+ if (typeof option == 'string') data[option].call($this)
77
+ })
78
+ }
79
+
80
+ $.fn.alert.Constructor = Alert
81
+
82
+
83
+ /* ALERT DATA-API
84
+ * ============== */
85
+
86
+ $(function () {
87
+ $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
88
+ })
89
+
90
+ }(window.jQuery);
@@ -0,0 +1,157 @@
1
+ /* =============================================================
2
+ * bootstrap-collapse.js v2.0.4
3
+ * http://twitter.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 ($) {
22
+
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* COLLAPSE PUBLIC CLASS DEFINITION
27
+ * ================================ */
28
+
29
+ var Collapse = function (element, options) {
30
+ this.$element = $(element)
31
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
32
+
33
+ if (this.options.parent) {
34
+ this.$parent = $(this.options.parent)
35
+ }
36
+
37
+ this.options.toggle && this.toggle()
38
+ }
39
+
40
+ Collapse.prototype = {
41
+
42
+ constructor: Collapse
43
+
44
+ , dimension: function () {
45
+ var hasWidth = this.$element.hasClass('width')
46
+ return hasWidth ? 'width' : 'height'
47
+ }
48
+
49
+ , show: function () {
50
+ var dimension
51
+ , scroll
52
+ , actives
53
+ , hasData
54
+
55
+ if (this.transitioning) return
56
+
57
+ dimension = this.dimension()
58
+ scroll = $.camelCase(['scroll', dimension].join('-'))
59
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
60
+
61
+ if (actives && actives.length) {
62
+ hasData = actives.data('collapse')
63
+ if (hasData && hasData.transitioning) return
64
+ actives.collapse('hide')
65
+ hasData || actives.data('collapse', null)
66
+ }
67
+
68
+ this.$element[dimension](0)
69
+ this.transition('addClass', $.Event('show'), 'shown')
70
+ this.$element[dimension](this.$element[0][scroll])
71
+ }
72
+
73
+ , hide: function () {
74
+ var dimension
75
+ if (this.transitioning) return
76
+ dimension = this.dimension()
77
+ this.reset(this.$element[dimension]())
78
+ this.transition('removeClass', $.Event('hide'), 'hidden')
79
+ this.$element[dimension](0)
80
+ }
81
+
82
+ , reset: function (size) {
83
+ var dimension = this.dimension()
84
+
85
+ this.$element
86
+ .removeClass('collapse')
87
+ [dimension](size || 'auto')
88
+ [0].offsetWidth
89
+
90
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
91
+
92
+ return this
93
+ }
94
+
95
+ , transition: function (method, startEvent, completeEvent) {
96
+ var that = this
97
+ , complete = function () {
98
+ if (startEvent.type == 'show') that.reset()
99
+ that.transitioning = 0
100
+ that.$element.trigger(completeEvent)
101
+ }
102
+
103
+ this.$element.trigger(startEvent)
104
+
105
+ if (startEvent.isDefaultPrevented()) return
106
+
107
+ this.transitioning = 1
108
+
109
+ this.$element[method]('in')
110
+
111
+ $.support.transition && this.$element.hasClass('collapse') ?
112
+ this.$element.one($.support.transition.end, complete) :
113
+ complete()
114
+ }
115
+
116
+ , toggle: function () {
117
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
118
+ }
119
+
120
+ }
121
+
122
+
123
+ /* COLLAPSIBLE PLUGIN DEFINITION
124
+ * ============================== */
125
+
126
+ $.fn.collapse = function (option) {
127
+ return this.each(function () {
128
+ var $this = $(this)
129
+ , data = $this.data('collapse')
130
+ , options = typeof option == 'object' && option
131
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
132
+ if (typeof option == 'string') data[option]()
133
+ })
134
+ }
135
+
136
+ $.fn.collapse.defaults = {
137
+ toggle: true
138
+ }
139
+
140
+ $.fn.collapse.Constructor = Collapse
141
+
142
+
143
+ /* COLLAPSIBLE DATA-API
144
+ * ==================== */
145
+
146
+ $(function () {
147
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
148
+ var $this = $(this), href
149
+ , target = $this.attr('data-target')
150
+ || e.preventDefault()
151
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
152
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
153
+ $(target).collapse(option)
154
+ })
155
+ })
156
+
157
+ }(window.jQuery);
@@ -0,0 +1,100 @@
1
+ /* ============================================================
2
+ * bootstrap-dropdown.js v2.0.3
3
+ * http://twitter.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 ($) {
22
+
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* DROPDOWN CLASS DEFINITION
27
+ * ========================= */
28
+
29
+ var toggle = '[data-toggle="dropdown"]'
30
+ , Dropdown = function (element) {
31
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
32
+ $('html').on('click.dropdown.data-api', function () {
33
+ $el.parent().removeClass('open')
34
+ })
35
+ }
36
+
37
+ Dropdown.prototype = {
38
+
39
+ constructor: Dropdown
40
+
41
+ , toggle: function (e) {
42
+ var $this = $(this)
43
+ , $parent
44
+ , selector
45
+ , isActive
46
+
47
+ if ($this.is('.disabled, :disabled')) return
48
+
49
+ selector = $this.attr('data-target')
50
+
51
+ if (!selector) {
52
+ selector = $this.attr('href')
53
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
54
+ }
55
+
56
+ $parent = $(selector)
57
+ $parent.length || ($parent = $this.parent())
58
+
59
+ isActive = $parent.hasClass('open')
60
+
61
+ clearMenus()
62
+
63
+ if (!isActive) $parent.toggleClass('open')
64
+
65
+ return false
66
+ }
67
+
68
+ }
69
+
70
+ function clearMenus() {
71
+ $(toggle).parent().removeClass('open')
72
+ }
73
+
74
+
75
+ /* DROPDOWN PLUGIN DEFINITION
76
+ * ========================== */
77
+
78
+ $.fn.dropdown = function (option) {
79
+ return this.each(function () {
80
+ var $this = $(this)
81
+ , data = $this.data('dropdown')
82
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
83
+ if (typeof option == 'string') data[option].call($this)
84
+ })
85
+ }
86
+
87
+ $.fn.dropdown.Constructor = Dropdown
88
+
89
+
90
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
91
+ * =================================== */
92
+
93
+ $(function () {
94
+ $('html').on('click.dropdown.data-api', clearMenus)
95
+ $('body')
96
+ .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
97
+ .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
98
+ })
99
+
100
+ }(window.jQuery);
@@ -0,0 +1,54 @@
1
+ (function($) {
2
+
3
+ $.fn.fixedHeader = function (options) {
4
+ var config = {
5
+ topOffset: 40,
6
+ bgColor: '#EEEEEE'
7
+ };
8
+ if (options){ $.extend(config, options); }
9
+
10
+ return this.each( function() {
11
+ var o = $(this);
12
+
13
+ var $win = $(window)
14
+ , $head = $('thead.header', o)
15
+ , isFixed = 0;
16
+ var headTop = $head.length && $head.offset().top - config.topOffset;
17
+
18
+ function processScroll() {
19
+ if (!o.is(':visible')) return;
20
+ var i, scrollTop = $win.scrollTop();
21
+ var t = $head.length && $head.offset().top - config.topOffset;
22
+ if (!isFixed && headTop != t) { headTop = t; }
23
+ if (scrollTop >= headTop && !isFixed) {
24
+ isFixed = 1;
25
+ $head.addClass('header-fixed');
26
+ } else if (scrollTop <= headTop && isFixed) {
27
+ isFixed = 0;
28
+ $head.removeClass('header-fixed');
29
+ }
30
+ isFixed ? $('thead.header-copy', o).removeClass('hide')
31
+ : $('thead.header-copy', o).addClass('hide');
32
+ }
33
+ $win.on('scroll', processScroll);
34
+
35
+ // hack sad times - holdover until rewrite for 2.1
36
+ $head.on('click', function () {
37
+ if (!isFixed) setTimeout(function () { $win.scrollTop($win.scrollTop() - 47) }, 10);
38
+ })
39
+
40
+ $head.clone().removeClass('header header-fixed').addClass('header-copy').appendTo(o);
41
+ o.find('tbody > tr:first > td').each(function (i, h){
42
+ var w = $(h).width();
43
+ var d = $('<div>').css({overflow:'hidden', width: w});
44
+ $(h).css({width: w});
45
+ $head.find('> tr > th:eq('+i+')').append(d.clone());
46
+ });
47
+ $head.css({ margin:'0 auto',
48
+ width: o.width(),
49
+ 'background-color':config.bgColor });
50
+ processScroll();
51
+ });
52
+ };
53
+
54
+ })(jQuery);
@@ -0,0 +1,218 @@
1
+ /* =========================================================
2
+ * bootstrap-modal.js v2.0.3
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"; // jshint ;_;
24
+
25
+
26
+ /* MODAL CLASS DEFINITION
27
+ * ====================== */
28
+
29
+ var Modal = function (content, options) {
30
+ this.options = options
31
+ this.$element = $(content)
32
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
33
+ }
34
+
35
+ Modal.prototype = {
36
+
37
+ constructor: Modal
38
+
39
+ , toggle: function () {
40
+ return this[!this.isShown ? 'show' : 'hide']()
41
+ }
42
+
43
+ , show: function () {
44
+ var that = this
45
+ , e = $.Event('show')
46
+
47
+ this.$element.trigger(e)
48
+
49
+ if (this.isShown || e.isDefaultPrevented()) return
50
+
51
+ $('body').addClass('modal-open')
52
+
53
+ this.isShown = true
54
+
55
+ escape.call(this)
56
+ backdrop.call(this, function () {
57
+ var transition = $.support.transition && that.$element.hasClass('fade')
58
+
59
+ if (!that.$element.parent().length) {
60
+ that.$element.appendTo(document.body) //don't move modals dom position
61
+ }
62
+
63
+ that.$element
64
+ .show()
65
+
66
+ if (transition) {
67
+ that.$element[0].offsetWidth // force reflow
68
+ }
69
+
70
+ that.$element.addClass('in')
71
+
72
+ transition ?
73
+ that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
74
+ that.$element.trigger('shown')
75
+
76
+ })
77
+ }
78
+
79
+ , hide: function (e) {
80
+ e && e.preventDefault()
81
+
82
+ var that = this
83
+
84
+ e = $.Event('hide')
85
+
86
+ this.$element.trigger(e)
87
+
88
+ if (!this.isShown || e.isDefaultPrevented()) return
89
+
90
+ this.isShown = false
91
+
92
+ $('body').removeClass('modal-open')
93
+
94
+ escape.call(this)
95
+
96
+ this.$element.removeClass('in')
97
+
98
+ $.support.transition && this.$element.hasClass('fade') ?
99
+ hideWithTransition.call(this) :
100
+ hideModal.call(this)
101
+ }
102
+
103
+ }
104
+
105
+
106
+ /* MODAL PRIVATE METHODS
107
+ * ===================== */
108
+
109
+ function hideWithTransition() {
110
+ var that = this
111
+ , timeout = setTimeout(function () {
112
+ that.$element.off($.support.transition.end)
113
+ hideModal.call(that)
114
+ }, 500)
115
+
116
+ this.$element.one($.support.transition.end, function () {
117
+ clearTimeout(timeout)
118
+ hideModal.call(that)
119
+ })
120
+ }
121
+
122
+ function hideModal(that) {
123
+ this.$element
124
+ .hide()
125
+ .trigger('hidden')
126
+
127
+ backdrop.call(this)
128
+ }
129
+
130
+ function backdrop(callback) {
131
+ var that = this
132
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
133
+
134
+ if (this.isShown && this.options.backdrop) {
135
+ var doAnimate = $.support.transition && animate
136
+
137
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
138
+ .appendTo(document.body)
139
+
140
+ if (this.options.backdrop != 'static') {
141
+ this.$backdrop.click($.proxy(this.hide, this))
142
+ }
143
+
144
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
145
+
146
+ this.$backdrop.addClass('in')
147
+
148
+ doAnimate ?
149
+ this.$backdrop.one($.support.transition.end, callback) :
150
+ callback()
151
+
152
+ } else if (!this.isShown && this.$backdrop) {
153
+ this.$backdrop.removeClass('in')
154
+
155
+ $.support.transition && this.$element.hasClass('fade')?
156
+ this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
157
+ removeBackdrop.call(this)
158
+
159
+ } else if (callback) {
160
+ callback()
161
+ }
162
+ }
163
+
164
+ function removeBackdrop() {
165
+ this.$backdrop.remove()
166
+ this.$backdrop = null
167
+ }
168
+
169
+ function escape() {
170
+ var that = this
171
+ if (this.isShown && this.options.keyboard) {
172
+ $(document).on('keyup.dismiss.modal', function ( e ) {
173
+ e.which == 27 && that.hide()
174
+ })
175
+ } else if (!this.isShown) {
176
+ $(document).off('keyup.dismiss.modal')
177
+ }
178
+ }
179
+
180
+
181
+ /* MODAL PLUGIN DEFINITION
182
+ * ======================= */
183
+
184
+ $.fn.modal = function (option) {
185
+ return this.each(function () {
186
+ var $this = $(this)
187
+ , data = $this.data('modal')
188
+ , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
189
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
190
+ if (typeof option == 'string') data[option]()
191
+ else if (options.show) data.show()
192
+ })
193
+ }
194
+
195
+ $.fn.modal.defaults = {
196
+ backdrop: true
197
+ , keyboard: true
198
+ , show: true
199
+ }
200
+
201
+ $.fn.modal.Constructor = Modal
202
+
203
+
204
+ /* MODAL DATA-API
205
+ * ============== */
206
+
207
+ $(function () {
208
+ $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
209
+ var $this = $(this), href
210
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
211
+ , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
212
+
213
+ e.preventDefault()
214
+ $target.modal(option)
215
+ })
216
+ })
217
+
218
+ }(window.jQuery);