locomotivecms_wagon 1.4.0 → 1.5.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (352) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -0
  3. data/Gemfile +6 -2
  4. data/README.md +7 -1
  5. data/bin/wagon +3 -0
  6. data/generators/blank/Gemfile.tt +1 -3
  7. data/generators/blank/config/site.yml.tt +3 -3
  8. data/generators/bootstrap/config/site.yml.tt +3 -3
  9. data/generators/bootstrap3/Gemfile.tt +1 -3
  10. data/generators/bootstrap3/app/views/pages/index.liquid +21 -63
  11. data/generators/bootstrap3/app/views/pages/index.liquid.haml +15 -57
  12. data/generators/bootstrap3/config/deploy.yml +15 -15
  13. data/generators/bootstrap3/config/site.yml.tt +2 -2
  14. data/generators/bootstrap3/icon.png +0 -0
  15. data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.eot +0 -0
  16. data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.svg +201 -200
  17. data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  18. data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.woff +0 -0
  19. data/generators/{bootstrap2/app/content_types → bootstrap3/public/images}/.empty_directory +0 -0
  20. data/generators/bootstrap3/public/javascripts/bootstrap/affix.js +137 -0
  21. data/generators/bootstrap3/public/javascripts/bootstrap/alert.js +88 -0
  22. data/generators/bootstrap3/public/javascripts/bootstrap/button.js +107 -0
  23. data/generators/bootstrap3/public/javascripts/bootstrap/carousel.js +205 -0
  24. data/generators/bootstrap3/public/javascripts/bootstrap/collapse.js +170 -0
  25. data/generators/bootstrap3/public/javascripts/bootstrap/dropdown.js +147 -0
  26. data/generators/bootstrap3/public/javascripts/bootstrap/modal.js +243 -0
  27. data/generators/bootstrap3/public/javascripts/bootstrap/popover.js +110 -0
  28. data/generators/bootstrap3/public/javascripts/bootstrap/scrollspy.js +153 -0
  29. data/generators/bootstrap3/public/javascripts/bootstrap/tab.js +125 -0
  30. data/generators/bootstrap3/public/javascripts/bootstrap/tooltip.js +399 -0
  31. data/generators/bootstrap3/public/javascripts/bootstrap/transition.js +48 -0
  32. data/generators/bootstrap3/public/javascripts/bootstrap.min.js +12 -6
  33. data/generators/bootstrap3/public/stylesheets/application.css +1 -0
  34. data/generators/bootstrap3/public/stylesheets/application.css.scss +8 -0
  35. data/generators/bootstrap3/public/stylesheets/bootstrap/_alerts.scss +67 -0
  36. data/generators/bootstrap3/public/stylesheets/bootstrap/_badges.scss +55 -0
  37. data/generators/bootstrap3/public/stylesheets/bootstrap/_breadcrumbs.scss +26 -0
  38. data/generators/bootstrap3/public/stylesheets/bootstrap/_button-groups.scss +226 -0
  39. data/generators/bootstrap3/public/stylesheets/bootstrap/_buttons.scss +159 -0
  40. data/generators/bootstrap3/public/stylesheets/bootstrap/_carousel.scss +232 -0
  41. data/generators/bootstrap3/public/stylesheets/bootstrap/_close.scss +35 -0
  42. data/generators/bootstrap3/public/stylesheets/bootstrap/_code.scss +63 -0
  43. data/generators/bootstrap3/public/stylesheets/bootstrap/_component-animations.scss +29 -0
  44. data/generators/bootstrap3/public/stylesheets/bootstrap/_dropdowns.scss +213 -0
  45. data/generators/bootstrap3/public/stylesheets/bootstrap/_forms.scss +436 -0
  46. data/generators/bootstrap3/public/stylesheets/bootstrap/_glyphicons.scss +233 -0
  47. data/generators/bootstrap3/public/stylesheets/bootstrap/_grid.scss +84 -0
  48. data/generators/bootstrap3/public/stylesheets/bootstrap/_input-groups.scss +162 -0
  49. data/generators/bootstrap3/public/stylesheets/bootstrap/_jumbotron.scss +44 -0
  50. data/generators/bootstrap3/public/stylesheets/bootstrap/_labels.scss +64 -0
  51. data/generators/bootstrap3/public/stylesheets/bootstrap/_list-group.scss +110 -0
  52. data/generators/bootstrap3/public/stylesheets/bootstrap/_media.scss +56 -0
  53. data/generators/bootstrap3/public/stylesheets/bootstrap/_mixins.scss +947 -0
  54. data/generators/bootstrap3/public/stylesheets/bootstrap/_modals.scss +139 -0
  55. data/generators/bootstrap3/public/stylesheets/bootstrap/_navbar.scss +620 -0
  56. data/generators/bootstrap3/public/stylesheets/bootstrap/_navs.scss +242 -0
  57. data/generators/bootstrap3/public/stylesheets/bootstrap/_normalize.scss +423 -0
  58. data/generators/bootstrap3/public/stylesheets/bootstrap/_pager.scss +55 -0
  59. data/generators/bootstrap3/public/stylesheets/bootstrap/_pagination.scss +88 -0
  60. data/generators/bootstrap3/public/stylesheets/bootstrap/_panels.scss +241 -0
  61. data/generators/bootstrap3/public/stylesheets/bootstrap/_popovers.scss +133 -0
  62. data/generators/bootstrap3/public/stylesheets/bootstrap/_print.scss +101 -0
  63. data/generators/bootstrap3/public/stylesheets/bootstrap/_progress-bars.scss +80 -0
  64. data/generators/bootstrap3/public/stylesheets/bootstrap/_responsive-utilities.scss +74 -0
  65. data/generators/bootstrap3/public/stylesheets/bootstrap/_scaffolding.scss +134 -0
  66. data/generators/bootstrap3/public/stylesheets/bootstrap/_tables.scss +233 -0
  67. data/generators/bootstrap3/public/stylesheets/bootstrap/_theme.scss +247 -0
  68. data/generators/bootstrap3/public/stylesheets/bootstrap/_thumbnails.scss +38 -0
  69. data/generators/bootstrap3/public/stylesheets/bootstrap/_tooltip.scss +95 -0
  70. data/generators/bootstrap3/public/stylesheets/bootstrap/_type.scss +284 -0
  71. data/generators/bootstrap3/public/stylesheets/bootstrap/_utilities.scss +56 -0
  72. data/generators/bootstrap3/public/stylesheets/bootstrap/_variables.scss +833 -0
  73. data/generators/bootstrap3/public/stylesheets/bootstrap/_wells.scss +29 -0
  74. data/generators/bootstrap3/public/stylesheets/bootstrap/bootstrap.css.scss +49 -0
  75. data/generators/bootstrap3/public/stylesheets/bootstrap.css +2035 -3056
  76. data/generators/bootstrap3/public/stylesheets/bootstrap.css.scss +49 -0
  77. data/generators/cloned/Gemfile.tt +1 -3
  78. data/generators/content_type/app/content_types/%slug%.yml.tt +57 -0
  79. data/generators/content_type/data/{%name%.yml.tt → %slug%.yml.tt} +2 -2
  80. data/generators/{bootstrap2 → foundation5}/Gemfile.tt +1 -3
  81. data/generators/{bootstrap2/data → foundation5/app/content_types}/.empty_directory +0 -0
  82. data/generators/{foundation → foundation5}/app/views/pages/404.liquid +1 -4
  83. data/generators/{foundation → foundation5}/app/views/pages/404.liquid.haml +1 -1
  84. data/generators/foundation5/app/views/pages/index.liquid +196 -0
  85. data/generators/foundation5/app/views/pages/index.liquid.haml +157 -0
  86. data/generators/foundation5/config/deploy.yml +15 -0
  87. data/generators/{bootstrap2 → foundation5}/config/site.yml.tt +3 -4
  88. data/generators/{bootstrap2 → foundation5}/config/translations.yml +0 -0
  89. data/generators/{bootstrap2 → foundation5}/config.ru +0 -0
  90. data/generators/{bootstrap2/public/samples → foundation5/data}/.empty_directory +0 -0
  91. data/generators/foundation5/favicon.ico +0 -0
  92. data/generators/foundation5/icon.png +0 -0
  93. data/generators/{foundation/app/content_types → foundation5/public/fonts}/.empty_directory +0 -0
  94. data/generators/{foundation/data → foundation5/public/images}/.empty_directory +0 -0
  95. data/generators/foundation5/public/javascripts/foundation/foundation.abide.js +299 -0
  96. data/generators/foundation5/public/javascripts/foundation/foundation.accordion.js +59 -0
  97. data/generators/foundation5/public/javascripts/foundation/foundation.alert.js +43 -0
  98. data/generators/foundation5/public/javascripts/foundation/foundation.clearing.js +534 -0
  99. data/generators/foundation5/public/javascripts/foundation/foundation.dropdown.js +311 -0
  100. data/generators/foundation5/public/javascripts/foundation/foundation.equalizer.js +74 -0
  101. data/generators/foundation5/public/javascripts/foundation/foundation.interchange.js +331 -0
  102. data/generators/foundation5/public/javascripts/foundation/foundation.joyride.js +843 -0
  103. data/generators/foundation5/public/javascripts/foundation/foundation.js +611 -0
  104. data/generators/foundation5/public/javascripts/foundation/foundation.magellan.js +178 -0
  105. data/generators/foundation5/public/javascripts/foundation/foundation.offcanvas.js +108 -0
  106. data/generators/foundation5/public/javascripts/foundation/foundation.orbit.js +610 -0
  107. data/generators/foundation5/public/javascripts/foundation/foundation.reveal.js +437 -0
  108. data/generators/foundation5/public/javascripts/foundation/foundation.slider.js +199 -0
  109. data/generators/foundation5/public/javascripts/foundation/foundation.tab.js +167 -0
  110. data/generators/foundation5/public/javascripts/foundation/foundation.tooltip.js +298 -0
  111. data/generators/foundation5/public/javascripts/foundation/foundation.topbar.js +425 -0
  112. data/generators/foundation5/public/javascripts/foundation.js +4161 -0
  113. data/generators/foundation5/public/javascripts/foundation.min.js +10 -0
  114. data/generators/{foundation → foundation5}/public/javascripts/vendor/custom.modernizr.js +0 -0
  115. data/generators/foundation5/public/javascripts/vendor/custom.modernizr.min.js +1 -0
  116. data/generators/foundation5/public/javascripts/vendor/fastclick.js +9 -0
  117. data/generators/foundation5/public/javascripts/vendor/fastclick.min.js +11 -0
  118. data/generators/foundation5/public/javascripts/vendor/jquery.autocomplete.js +645 -0
  119. data/generators/foundation5/public/javascripts/vendor/jquery.autocomplete.min.js +1 -0
  120. data/generators/foundation5/public/javascripts/vendor/jquery.cookie.js +8 -0
  121. data/generators/foundation5/public/javascripts/vendor/jquery.cookie.min.js +8 -0
  122. data/generators/foundation5/public/javascripts/vendor/jquery.js +26 -0
  123. data/generators/foundation5/public/javascripts/vendor/jquery.min.js +27 -0
  124. data/generators/foundation5/public/javascripts/vendor/modernizr.js +8 -0
  125. data/generators/foundation5/public/javascripts/vendor/modernizr.min.js +1 -0
  126. data/generators/foundation5/public/javascripts/vendor/placeholder.js +2 -0
  127. data/generators/foundation5/public/javascripts/vendor/placeholder.min.js +1 -0
  128. data/generators/{foundation/public/fonts → foundation5/public/samples}/.empty_directory +0 -0
  129. data/generators/foundation5/public/stylesheets/application.css +2 -0
  130. data/generators/foundation5/public/stylesheets/application.css.scss +3 -0
  131. data/generators/foundation5/public/stylesheets/foundation/_functions.scss +101 -0
  132. data/generators/foundation5/public/stylesheets/foundation/_settings.scss +1296 -0
  133. data/generators/foundation5/public/stylesheets/foundation/components/_accordion.scss +53 -0
  134. data/generators/foundation5/public/stylesheets/foundation/components/_alert-boxes.scss +126 -0
  135. data/generators/foundation5/public/stylesheets/foundation/components/_block-grid.scss +132 -0
  136. data/generators/foundation5/public/stylesheets/foundation/components/_breadcrumbs.scss +127 -0
  137. data/generators/foundation5/public/stylesheets/foundation/components/_button-groups.scss +108 -0
  138. data/generators/foundation5/public/stylesheets/foundation/components/_buttons.scss +222 -0
  139. data/generators/foundation5/public/stylesheets/foundation/components/_clearing.scss +247 -0
  140. data/generators/foundation5/public/stylesheets/foundation/components/_dropdown-buttons.scss +129 -0
  141. data/generators/foundation5/public/stylesheets/foundation/components/_dropdown.scss +248 -0
  142. data/generators/foundation5/public/stylesheets/foundation/components/_flex-video.scss +51 -0
  143. data/generators/foundation5/public/stylesheets/foundation/components/_forms.scss +498 -0
  144. data/generators/foundation5/public/stylesheets/foundation/components/_global.scss +434 -0
  145. data/generators/foundation5/public/stylesheets/foundation/components/_grid.scss +260 -0
  146. data/generators/foundation5/public/stylesheets/foundation/components/_inline-lists.scss +57 -0
  147. data/generators/foundation5/public/stylesheets/foundation/components/_joyride.scss +220 -0
  148. data/generators/foundation5/public/stylesheets/foundation/components/_keystrokes.scss +61 -0
  149. data/generators/foundation5/public/stylesheets/foundation/components/_labels.scss +104 -0
  150. data/generators/foundation5/public/stylesheets/foundation/components/_magellan.scss +34 -0
  151. data/generators/foundation5/public/stylesheets/foundation/components/_offcanvas.scss +356 -0
  152. data/generators/foundation5/public/stylesheets/foundation/components/_orbit.scss +423 -0
  153. data/generators/foundation5/public/stylesheets/foundation/components/_pagination.scss +150 -0
  154. data/generators/foundation5/public/stylesheets/foundation/components/_panels.scss +90 -0
  155. data/generators/foundation5/public/stylesheets/foundation/components/_pricing-tables.scss +150 -0
  156. data/generators/foundation5/public/stylesheets/foundation/components/_progress-bars.scss +79 -0
  157. data/generators/foundation5/public/stylesheets/foundation/components/_range-slider.scss +148 -0
  158. data/generators/foundation5/public/stylesheets/foundation/components/_reveal-new.scss +0 -0
  159. data/generators/foundation5/public/stylesheets/foundation/components/_reveal.scss +216 -0
  160. data/generators/foundation5/public/stylesheets/foundation/components/_side-nav.scss +115 -0
  161. data/generators/foundation5/public/stylesheets/foundation/components/_split-buttons.scss +191 -0
  162. data/generators/foundation5/public/stylesheets/foundation/components/_sub-nav.scss +125 -0
  163. data/generators/foundation5/public/stylesheets/foundation/components/_switch.scss +294 -0
  164. data/generators/foundation5/public/stylesheets/foundation/components/_tables.scss +129 -0
  165. data/generators/foundation5/public/stylesheets/foundation/components/_tabs.scss +109 -0
  166. data/generators/foundation5/public/stylesheets/foundation/components/_thumbs.scss +68 -0
  167. data/generators/foundation5/public/stylesheets/foundation/components/_tooltips.scss +140 -0
  168. data/generators/foundation5/public/stylesheets/foundation/components/_top-bar.scss +659 -0
  169. data/generators/foundation5/public/stylesheets/foundation/components/_type.scss +513 -0
  170. data/generators/foundation5/public/stylesheets/foundation/components/_visibility.scss +408 -0
  171. data/generators/foundation5/public/stylesheets/foundation.css +5398 -0
  172. data/generators/foundation5/public/stylesheets/foundation.css.scss +45 -0
  173. data/generators/foundation5/public/stylesheets/normalize.css +425 -0
  174. data/generators/foundation5/public/stylesheets/normalize.css.scss +425 -0
  175. data/generators/{foundation → line_case}/Gemfile.tt +1 -3
  176. data/generators/line_case/app/content_types/categories.yml +56 -0
  177. data/generators/line_case/app/content_types/emails.yml +35 -0
  178. data/generators/line_case/app/content_types/projects.yml +58 -0
  179. data/generators/{bootstrap2 → line_case}/app/views/pages/404.liquid.haml +3 -2
  180. data/generators/line_case/app/views/pages/email-registered.liquid.haml +13 -0
  181. data/generators/line_case/app/views/pages/index.liquid.haml +110 -0
  182. data/generators/line_case/app/views/pages/projects/content_type_template.liquid.haml +32 -0
  183. data/generators/line_case/app/views/snippets/newsletter_form.liquid.haml +14 -0
  184. data/generators/line_case/app/views/snippets/projects.liquid.haml +17 -0
  185. data/generators/line_case/app/views/snippets/social_links.liquid.haml +19 -0
  186. data/generators/line_case/config/deploy.yml +15 -0
  187. data/generators/{foundation → line_case}/config/site.yml.tt +3 -3
  188. data/generators/{foundation → line_case}/config/translations.yml +0 -0
  189. data/generators/{foundation → line_case}/config.ru +0 -0
  190. data/generators/line_case/data/categories.yml +8 -0
  191. data/generators/line_case/data/emails.yml +2 -0
  192. data/generators/line_case/data/projects.yml +39 -0
  193. data/generators/line_case/icon.png +0 -0
  194. data/generators/line_case/public/images/banner-header.png +0 -0
  195. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.abide.js +0 -0
  196. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.alerts.js +0 -0
  197. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.clearing.js +0 -0
  198. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.cookie.js +0 -0
  199. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.dropdown.js +0 -0
  200. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.forms.js +0 -0
  201. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.interchange.js +0 -0
  202. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.joyride.js +0 -0
  203. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.js +0 -0
  204. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.magellan.js +0 -0
  205. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.orbit.js +0 -0
  206. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.placeholder.js +0 -0
  207. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.reveal.js +0 -0
  208. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.section.js +0 -0
  209. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.tooltips.js +0 -0
  210. data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.topbar.js +0 -0
  211. data/generators/{foundation → line_case}/public/javascripts/foundation.min.js +0 -0
  212. data/generators/line_case/public/javascripts/vendor/custom.modernizr.js +4 -0
  213. data/generators/{foundation → line_case}/public/javascripts/vendor/jquery.js +0 -0
  214. data/generators/{foundation → line_case}/public/javascripts/vendor/zepto.js +0 -0
  215. data/generators/line_case/public/samples/projects/sample.jpeg +0 -0
  216. data/generators/line_case/public/samples/projects/sample2.jpeg +0 -0
  217. data/generators/line_case/public/samples/projects/sample3.jpeg +0 -0
  218. data/generators/line_case/public/samples/projects/sample4.jpeg +0 -0
  219. data/generators/line_case/public/samples/projects/sample5.jpeg +0 -0
  220. data/generators/line_case/public/samples/projects/sample6.jpeg +0 -0
  221. data/generators/line_case/public/samples/projects/sample7.jpeg +0 -0
  222. data/generators/line_case/public/samples/projects/sample8.jpeg +0 -0
  223. data/generators/line_case/public/stylesheets/_variables.css.sass +20 -0
  224. data/generators/line_case/public/stylesheets/foundation/_variables.scss +1290 -0
  225. data/generators/line_case/public/stylesheets/foundation/components/_alert-boxes.scss +107 -0
  226. data/generators/line_case/public/stylesheets/foundation/components/_block-grid.scss +71 -0
  227. data/generators/line_case/public/stylesheets/foundation/components/_breadcrumbs.scss +124 -0
  228. data/generators/line_case/public/stylesheets/foundation/components/_button-groups.scss +89 -0
  229. data/generators/line_case/public/stylesheets/foundation/components/_buttons.scss +230 -0
  230. data/generators/line_case/public/stylesheets/foundation/components/_clearing.scss +227 -0
  231. data/generators/line_case/public/stylesheets/foundation/components/_custom-forms.scss +278 -0
  232. data/generators/line_case/public/stylesheets/foundation/components/_dropdown-buttons.scss +115 -0
  233. data/generators/line_case/public/stylesheets/foundation/components/_dropdown.scss +151 -0
  234. data/generators/line_case/public/stylesheets/foundation/components/_flex-video.scss +46 -0
  235. data/generators/line_case/public/stylesheets/foundation/components/_forms.scss +411 -0
  236. data/generators/line_case/public/stylesheets/foundation/components/_global.scss +366 -0
  237. data/generators/line_case/public/stylesheets/foundation/components/_grid-5.scss +214 -0
  238. data/generators/line_case/public/stylesheets/foundation/components/_grid.scss +188 -0
  239. data/generators/line_case/public/stylesheets/foundation/components/_inline-lists.scss +53 -0
  240. data/generators/line_case/public/stylesheets/foundation/components/_joyride.scss +217 -0
  241. data/generators/line_case/public/stylesheets/foundation/components/_keystrokes.scss +57 -0
  242. data/generators/line_case/public/stylesheets/foundation/components/_labels.scss +85 -0
  243. data/generators/line_case/public/stylesheets/foundation/components/_magellan.scss +23 -0
  244. data/generators/line_case/public/stylesheets/foundation/components/_orbit.scss +340 -0
  245. data/generators/line_case/public/stylesheets/foundation/components/_pagination.scss +140 -0
  246. data/generators/line_case/public/stylesheets/foundation/components/_panels.scss +83 -0
  247. data/generators/line_case/public/stylesheets/foundation/components/_pricing-tables.scss +131 -0
  248. data/generators/line_case/public/stylesheets/foundation/components/_progress-bars.scss +71 -0
  249. data/generators/line_case/public/stylesheets/foundation/components/_reveal.scss +136 -0
  250. data/generators/line_case/public/stylesheets/foundation/components/_section.scss +391 -0
  251. data/generators/line_case/public/stylesheets/foundation/components/_side-nav.scss +69 -0
  252. data/generators/line_case/public/stylesheets/foundation/components/_split-buttons.scss +167 -0
  253. data/generators/line_case/public/stylesheets/foundation/components/_sub-nav.scss +84 -0
  254. data/generators/line_case/public/stylesheets/foundation/components/_switch.scss +266 -0
  255. data/generators/line_case/public/stylesheets/foundation/components/_tables.scss +84 -0
  256. data/generators/line_case/public/stylesheets/foundation/components/_thumbs.scss +53 -0
  257. data/generators/line_case/public/stylesheets/foundation/components/_tooltips.scss +117 -0
  258. data/generators/line_case/public/stylesheets/foundation/components/_top-bar.scss +576 -0
  259. data/generators/line_case/public/stylesheets/foundation/components/_type.scss +435 -0
  260. data/generators/line_case/public/stylesheets/foundation/components/_visibility.scss +322 -0
  261. data/generators/line_case/public/stylesheets/foundation.css.scss +43 -0
  262. data/generators/{foundation → line_case}/public/stylesheets/foundation.min.css +0 -0
  263. data/generators/{foundation/public/stylesheets/normalize.css → line_case/public/stylesheets/normalize.css.scss} +5 -5
  264. data/generators/line_case/public/stylesheets/pages.css.sass +163 -0
  265. data/generators/page/template.liquid.haml.tt +8 -5
  266. data/generators/page/template.liquid.tt +6 -2
  267. data/lib/locomotive/wagon/cli.rb +139 -43
  268. data/lib/locomotive/wagon/generators/content_type.rb +26 -10
  269. data/lib/locomotive/wagon/generators/page.rb +41 -25
  270. data/lib/locomotive/wagon/generators/site/base.rb +53 -0
  271. data/lib/locomotive/wagon/generators/site/blank.rb +9 -2
  272. data/lib/locomotive/wagon/generators/site/bootstrap2.rb +8 -2
  273. data/lib/locomotive/wagon/generators/site/bootstrap3.rb +20 -2
  274. data/lib/locomotive/wagon/generators/site/cloned.rb +4 -0
  275. data/lib/locomotive/wagon/generators/site/{foundation.rb → foundation4.rb} +10 -4
  276. data/lib/locomotive/wagon/generators/site/foundation5.rb +48 -0
  277. data/lib/locomotive/wagon/generators/site/line_case.rb +20 -0
  278. data/lib/locomotive/wagon/generators/site/unzip.rb +10 -2
  279. data/lib/locomotive/wagon/generators/site.rb +48 -2
  280. data/lib/locomotive/wagon/generators/snippet.rb +2 -1
  281. data/lib/locomotive/wagon/liquid/drops/content_types.rb +9 -3
  282. data/lib/locomotive/wagon/liquid/drops/page.rb +9 -1
  283. data/lib/locomotive/wagon/liquid/scopeable.rb +1 -1
  284. data/lib/locomotive/wagon/liquid/tags/fetch_page.rb +41 -0
  285. data/lib/locomotive/wagon/liquid/tags/model_form.rb +67 -0
  286. data/lib/locomotive/wagon/liquid/tags/path_helper.rb +2 -2
  287. data/lib/locomotive/wagon/liquid/tags/with_scope.rb +1 -1
  288. data/lib/locomotive/wagon/listen.rb +18 -10
  289. data/lib/locomotive/wagon/logger.rb +4 -0
  290. data/lib/locomotive/wagon/misc/core_ext.rb +8 -0
  291. data/lib/locomotive/wagon/misc/deployment_connection.rb +120 -0
  292. data/lib/locomotive/wagon/misc/hosting_api.rb +115 -0
  293. data/lib/locomotive/wagon/misc/httparty.rb +2 -0
  294. data/lib/locomotive/wagon/misc/livereload.rb +43 -0
  295. data/lib/locomotive/wagon/misc/mounter.rb +1 -1
  296. data/lib/locomotive/wagon/misc/tcp_port.rb +42 -0
  297. data/lib/locomotive/wagon/misc/thor.rb +15 -0
  298. data/lib/locomotive/wagon/server/entry_submission.rb +69 -38
  299. data/lib/locomotive/wagon/server/middleware.rb +4 -2
  300. data/lib/locomotive/wagon/server/page.rb +2 -2
  301. data/lib/locomotive/wagon/server.rb +11 -7
  302. data/lib/locomotive/wagon/version.rb +1 -1
  303. data/lib/locomotive/wagon.rb +141 -30
  304. data/locomotivecms_wagon.gemspec +7 -6
  305. data/spec/fixtures/default/app/content_types/bands.yml +3 -1
  306. data/spec/fixtures/default/app/views/pages/all.liquid.haml +3 -0
  307. data/spec/fixtures/default/app/views/pages/events.liquid.haml +21 -0
  308. data/spec/fixtures/default/app/views/pages/filtered.liquid.haml +11 -1
  309. data/spec/fixtures/default/app/views/pages/index.liquid.haml +1 -1
  310. data/spec/fixtures/default/data/bands.yml +3 -0
  311. data/spec/integration/server/basic_spec.rb +1 -0
  312. data/spec/integration/server/contact_form_spec.rb +1 -1
  313. data/spec/integration/server/liquid_spec.rb +8 -1
  314. data/spec/integration/server/new_contact_form_spec.rb +67 -0
  315. data/spec/integration/server/with_scope_spec.rb +10 -0
  316. data/spec/spec_helper.rb +3 -0
  317. metadata +339 -144
  318. data/generators/bootstrap2/app/views/pages/404.liquid +0 -13
  319. data/generators/bootstrap2/app/views/pages/index.liquid +0 -98
  320. data/generators/bootstrap2/app/views/pages/index.liquid.haml +0 -80
  321. data/generators/bootstrap2/app/views/snippets/footer.liquid +0 -3
  322. data/generators/bootstrap2/app/views/snippets/footer.liquid.haml +0 -2
  323. data/generators/bootstrap2/config/deploy.yml +0 -15
  324. data/generators/bootstrap2/public/fonts/FontAwesome.otf +0 -0
  325. data/generators/bootstrap2/public/fonts/fontawesome-webfont.eot +0 -0
  326. data/generators/bootstrap2/public/fonts/fontawesome-webfont.svg +0 -399
  327. data/generators/bootstrap2/public/fonts/fontawesome-webfont.ttf +0 -0
  328. data/generators/bootstrap2/public/fonts/fontawesome-webfont.woff +0 -0
  329. data/generators/bootstrap2/public/javascripts/bootstrap.js +0 -2280
  330. data/generators/bootstrap2/public/javascripts/bootstrap.min.js +0 -6
  331. data/generators/bootstrap2/public/stylesheets/application.css.scss +0 -39
  332. data/generators/bootstrap2/public/stylesheets/bootstrap-responsive.css +0 -1109
  333. data/generators/bootstrap2/public/stylesheets/bootstrap-responsive.min.css +0 -9
  334. data/generators/bootstrap2/public/stylesheets/bootstrap.css +0 -5568
  335. data/generators/bootstrap2/public/stylesheets/bootstrap.min.css +0 -9
  336. data/generators/bootstrap2/public/stylesheets/fonts/awesome.css.scss +0 -3
  337. data/generators/bootstrap2/public/stylesheets/fonts/font-awesome-ie7.css +0 -1203
  338. data/generators/bootstrap2/public/stylesheets/fonts/font-awesome-ie7.min.css +0 -384
  339. data/generators/bootstrap2/public/stylesheets/fonts/font-awesome.css +0 -1470
  340. data/generators/bootstrap2/public/stylesheets/fonts/font-awesome.min.css +0 -403
  341. data/generators/bootstrap3/public/javascripts/bootstrap.js +0 -1999
  342. data/generators/bootstrap3/public/stylesheets/bootstrap-theme.css +0 -384
  343. data/generators/bootstrap3/public/stylesheets/bootstrap-theme.min.css +0 -1
  344. data/generators/bootstrap3/public/stylesheets/bootstrap.min.css +0 -9
  345. data/generators/content_type/app/content_types/%name%.yml.tt +0 -58
  346. data/generators/foundation/app/views/pages/index.liquid +0 -150
  347. data/generators/foundation/app/views/pages/index.liquid.haml +0 -125
  348. data/generators/foundation/app/views/snippets/footer.liquid +0 -16
  349. data/generators/foundation/app/views/snippets/footer.liquid.haml +0 -22
  350. data/generators/foundation/config/deploy.yml +0 -15
  351. data/generators/foundation/public/samples/.empty_directory +0 -1
  352. data/generators/foundation/public/stylesheets/foundation.css +0 -4727
@@ -0,0 +1,170 @@
1
+ /* ========================================================================
2
+ * Bootstrap: collapse.js v3.1.1
3
+ * http://getbootstrap.com/javascript/#collapse
4
+ * ========================================================================
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * ======================================================================== */
8
+
9
+
10
+ +function ($) {
11
+ 'use strict';
12
+
13
+ // COLLAPSE PUBLIC CLASS DEFINITION
14
+ // ================================
15
+
16
+ var Collapse = function (element, options) {
17
+ this.$element = $(element)
18
+ this.options = $.extend({}, Collapse.DEFAULTS, options)
19
+ this.transitioning = null
20
+
21
+ if (this.options.parent) this.$parent = $(this.options.parent)
22
+ if (this.options.toggle) this.toggle()
23
+ }
24
+
25
+ Collapse.DEFAULTS = {
26
+ toggle: true
27
+ }
28
+
29
+ Collapse.prototype.dimension = function () {
30
+ var hasWidth = this.$element.hasClass('width')
31
+ return hasWidth ? 'width' : 'height'
32
+ }
33
+
34
+ Collapse.prototype.show = function () {
35
+ if (this.transitioning || this.$element.hasClass('in')) return
36
+
37
+ var startEvent = $.Event('show.bs.collapse')
38
+ this.$element.trigger(startEvent)
39
+ if (startEvent.isDefaultPrevented()) return
40
+
41
+ var actives = this.$parent && this.$parent.find('> .panel > .in')
42
+
43
+ if (actives && actives.length) {
44
+ var hasData = actives.data('bs.collapse')
45
+ if (hasData && hasData.transitioning) return
46
+ actives.collapse('hide')
47
+ hasData || actives.data('bs.collapse', null)
48
+ }
49
+
50
+ var dimension = this.dimension()
51
+
52
+ this.$element
53
+ .removeClass('collapse')
54
+ .addClass('collapsing')
55
+ [dimension](0)
56
+
57
+ this.transitioning = 1
58
+
59
+ var complete = function () {
60
+ this.$element
61
+ .removeClass('collapsing')
62
+ .addClass('collapse in')
63
+ [dimension]('auto')
64
+ this.transitioning = 0
65
+ this.$element.trigger('shown.bs.collapse')
66
+ }
67
+
68
+ if (!$.support.transition) return complete.call(this)
69
+
70
+ var scrollSize = $.camelCase(['scroll', dimension].join('-'))
71
+
72
+ this.$element
73
+ .one($.support.transition.end, $.proxy(complete, this))
74
+ .emulateTransitionEnd(350)
75
+ [dimension](this.$element[0][scrollSize])
76
+ }
77
+
78
+ Collapse.prototype.hide = function () {
79
+ if (this.transitioning || !this.$element.hasClass('in')) return
80
+
81
+ var startEvent = $.Event('hide.bs.collapse')
82
+ this.$element.trigger(startEvent)
83
+ if (startEvent.isDefaultPrevented()) return
84
+
85
+ var dimension = this.dimension()
86
+
87
+ this.$element
88
+ [dimension](this.$element[dimension]())
89
+ [0].offsetHeight
90
+
91
+ this.$element
92
+ .addClass('collapsing')
93
+ .removeClass('collapse')
94
+ .removeClass('in')
95
+
96
+ this.transitioning = 1
97
+
98
+ var complete = function () {
99
+ this.transitioning = 0
100
+ this.$element
101
+ .trigger('hidden.bs.collapse')
102
+ .removeClass('collapsing')
103
+ .addClass('collapse')
104
+ }
105
+
106
+ if (!$.support.transition) return complete.call(this)
107
+
108
+ this.$element
109
+ [dimension](0)
110
+ .one($.support.transition.end, $.proxy(complete, this))
111
+ .emulateTransitionEnd(350)
112
+ }
113
+
114
+ Collapse.prototype.toggle = function () {
115
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
116
+ }
117
+
118
+
119
+ // COLLAPSE PLUGIN DEFINITION
120
+ // ==========================
121
+
122
+ var old = $.fn.collapse
123
+
124
+ $.fn.collapse = function (option) {
125
+ return this.each(function () {
126
+ var $this = $(this)
127
+ var data = $this.data('bs.collapse')
128
+ var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
129
+
130
+ if (!data && options.toggle && option == 'show') option = !option
131
+ if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
132
+ if (typeof option == 'string') data[option]()
133
+ })
134
+ }
135
+
136
+ $.fn.collapse.Constructor = Collapse
137
+
138
+
139
+ // COLLAPSE NO CONFLICT
140
+ // ====================
141
+
142
+ $.fn.collapse.noConflict = function () {
143
+ $.fn.collapse = old
144
+ return this
145
+ }
146
+
147
+
148
+ // COLLAPSE DATA-API
149
+ // =================
150
+
151
+ $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
152
+ var $this = $(this), href
153
+ var target = $this.attr('data-target')
154
+ || e.preventDefault()
155
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
156
+ var $target = $(target)
157
+ var data = $target.data('bs.collapse')
158
+ var option = data ? 'toggle' : $this.data()
159
+ var parent = $this.attr('data-parent')
160
+ var $parent = parent && $(parent)
161
+
162
+ if (!data || !data.transitioning) {
163
+ if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
164
+ $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
165
+ }
166
+
167
+ $target.collapse(option)
168
+ })
169
+
170
+ }(jQuery);
@@ -0,0 +1,147 @@
1
+ /* ========================================================================
2
+ * Bootstrap: dropdown.js v3.1.1
3
+ * http://getbootstrap.com/javascript/#dropdowns
4
+ * ========================================================================
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * ======================================================================== */
8
+
9
+
10
+ +function ($) {
11
+ 'use strict';
12
+
13
+ // DROPDOWN CLASS DEFINITION
14
+ // =========================
15
+
16
+ var backdrop = '.dropdown-backdrop'
17
+ var toggle = '[data-toggle=dropdown]'
18
+ var Dropdown = function (element) {
19
+ $(element).on('click.bs.dropdown', this.toggle)
20
+ }
21
+
22
+ Dropdown.prototype.toggle = function (e) {
23
+ var $this = $(this)
24
+
25
+ if ($this.is('.disabled, :disabled')) return
26
+
27
+ var $parent = getParent($this)
28
+ var isActive = $parent.hasClass('open')
29
+
30
+ clearMenus()
31
+
32
+ if (!isActive) {
33
+ if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
34
+ // if mobile we use a backdrop because click events don't delegate
35
+ $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
36
+ }
37
+
38
+ var relatedTarget = { relatedTarget: this }
39
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
40
+
41
+ if (e.isDefaultPrevented()) return
42
+
43
+ $parent
44
+ .toggleClass('open')
45
+ .trigger('shown.bs.dropdown', relatedTarget)
46
+
47
+ $this.focus()
48
+ }
49
+
50
+ return false
51
+ }
52
+
53
+ Dropdown.prototype.keydown = function (e) {
54
+ if (!/(38|40|27)/.test(e.keyCode)) return
55
+
56
+ var $this = $(this)
57
+
58
+ e.preventDefault()
59
+ e.stopPropagation()
60
+
61
+ if ($this.is('.disabled, :disabled')) return
62
+
63
+ var $parent = getParent($this)
64
+ var isActive = $parent.hasClass('open')
65
+
66
+ if (!isActive || (isActive && e.keyCode == 27)) {
67
+ if (e.which == 27) $parent.find(toggle).focus()
68
+ return $this.click()
69
+ }
70
+
71
+ var desc = ' li:not(.divider):visible a'
72
+ var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
73
+
74
+ if (!$items.length) return
75
+
76
+ var index = $items.index($items.filter(':focus'))
77
+
78
+ if (e.keyCode == 38 && index > 0) index-- // up
79
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
80
+ if (!~index) index = 0
81
+
82
+ $items.eq(index).focus()
83
+ }
84
+
85
+ function clearMenus(e) {
86
+ $(backdrop).remove()
87
+ $(toggle).each(function () {
88
+ var $parent = getParent($(this))
89
+ var relatedTarget = { relatedTarget: this }
90
+ if (!$parent.hasClass('open')) return
91
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
92
+ if (e.isDefaultPrevented()) return
93
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
94
+ })
95
+ }
96
+
97
+ function getParent($this) {
98
+ var selector = $this.attr('data-target')
99
+
100
+ if (!selector) {
101
+ selector = $this.attr('href')
102
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
103
+ }
104
+
105
+ var $parent = selector && $(selector)
106
+
107
+ return $parent && $parent.length ? $parent : $this.parent()
108
+ }
109
+
110
+
111
+ // DROPDOWN PLUGIN DEFINITION
112
+ // ==========================
113
+
114
+ var old = $.fn.dropdown
115
+
116
+ $.fn.dropdown = function (option) {
117
+ return this.each(function () {
118
+ var $this = $(this)
119
+ var data = $this.data('bs.dropdown')
120
+
121
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
122
+ if (typeof option == 'string') data[option].call($this)
123
+ })
124
+ }
125
+
126
+ $.fn.dropdown.Constructor = Dropdown
127
+
128
+
129
+ // DROPDOWN NO CONFLICT
130
+ // ====================
131
+
132
+ $.fn.dropdown.noConflict = function () {
133
+ $.fn.dropdown = old
134
+ return this
135
+ }
136
+
137
+
138
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
139
+ // ===================================
140
+
141
+ $(document)
142
+ .on('click.bs.dropdown.data-api', clearMenus)
143
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
144
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
145
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
146
+
147
+ }(jQuery);
@@ -0,0 +1,243 @@
1
+ /* ========================================================================
2
+ * Bootstrap: modal.js v3.1.1
3
+ * http://getbootstrap.com/javascript/#modals
4
+ * ========================================================================
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * ======================================================================== */
8
+
9
+
10
+ +function ($) {
11
+ 'use strict';
12
+
13
+ // MODAL CLASS DEFINITION
14
+ // ======================
15
+
16
+ var Modal = function (element, options) {
17
+ this.options = options
18
+ this.$element = $(element)
19
+ this.$backdrop =
20
+ this.isShown = null
21
+
22
+ if (this.options.remote) {
23
+ this.$element
24
+ .find('.modal-content')
25
+ .load(this.options.remote, $.proxy(function () {
26
+ this.$element.trigger('loaded.bs.modal')
27
+ }, this))
28
+ }
29
+ }
30
+
31
+ Modal.DEFAULTS = {
32
+ backdrop: true,
33
+ keyboard: true,
34
+ show: true
35
+ }
36
+
37
+ Modal.prototype.toggle = function (_relatedTarget) {
38
+ return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
39
+ }
40
+
41
+ Modal.prototype.show = function (_relatedTarget) {
42
+ var that = this
43
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
44
+
45
+ this.$element.trigger(e)
46
+
47
+ if (this.isShown || e.isDefaultPrevented()) return
48
+
49
+ this.isShown = true
50
+
51
+ this.escape()
52
+
53
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
54
+
55
+ this.backdrop(function () {
56
+ var transition = $.support.transition && that.$element.hasClass('fade')
57
+
58
+ if (!that.$element.parent().length) {
59
+ that.$element.appendTo(document.body) // don't move modals dom position
60
+ }
61
+
62
+ that.$element
63
+ .show()
64
+ .scrollTop(0)
65
+
66
+ if (transition) {
67
+ that.$element[0].offsetWidth // force reflow
68
+ }
69
+
70
+ that.$element
71
+ .addClass('in')
72
+ .attr('aria-hidden', false)
73
+
74
+ that.enforceFocus()
75
+
76
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
77
+
78
+ transition ?
79
+ that.$element.find('.modal-dialog') // wait for modal to slide in
80
+ .one($.support.transition.end, function () {
81
+ that.$element.focus().trigger(e)
82
+ })
83
+ .emulateTransitionEnd(300) :
84
+ that.$element.focus().trigger(e)
85
+ })
86
+ }
87
+
88
+ Modal.prototype.hide = function (e) {
89
+ if (e) e.preventDefault()
90
+
91
+ e = $.Event('hide.bs.modal')
92
+
93
+ this.$element.trigger(e)
94
+
95
+ if (!this.isShown || e.isDefaultPrevented()) return
96
+
97
+ this.isShown = false
98
+
99
+ this.escape()
100
+
101
+ $(document).off('focusin.bs.modal')
102
+
103
+ this.$element
104
+ .removeClass('in')
105
+ .attr('aria-hidden', true)
106
+ .off('click.dismiss.bs.modal')
107
+
108
+ $.support.transition && this.$element.hasClass('fade') ?
109
+ this.$element
110
+ .one($.support.transition.end, $.proxy(this.hideModal, this))
111
+ .emulateTransitionEnd(300) :
112
+ this.hideModal()
113
+ }
114
+
115
+ Modal.prototype.enforceFocus = function () {
116
+ $(document)
117
+ .off('focusin.bs.modal') // guard against infinite focus loop
118
+ .on('focusin.bs.modal', $.proxy(function (e) {
119
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
120
+ this.$element.focus()
121
+ }
122
+ }, this))
123
+ }
124
+
125
+ Modal.prototype.escape = function () {
126
+ if (this.isShown && this.options.keyboard) {
127
+ this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
128
+ e.which == 27 && this.hide()
129
+ }, this))
130
+ } else if (!this.isShown) {
131
+ this.$element.off('keyup.dismiss.bs.modal')
132
+ }
133
+ }
134
+
135
+ Modal.prototype.hideModal = function () {
136
+ var that = this
137
+ this.$element.hide()
138
+ this.backdrop(function () {
139
+ that.removeBackdrop()
140
+ that.$element.trigger('hidden.bs.modal')
141
+ })
142
+ }
143
+
144
+ Modal.prototype.removeBackdrop = function () {
145
+ this.$backdrop && this.$backdrop.remove()
146
+ this.$backdrop = null
147
+ }
148
+
149
+ Modal.prototype.backdrop = function (callback) {
150
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
151
+
152
+ if (this.isShown && this.options.backdrop) {
153
+ var doAnimate = $.support.transition && animate
154
+
155
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
156
+ .appendTo(document.body)
157
+
158
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
159
+ if (e.target !== e.currentTarget) return
160
+ this.options.backdrop == 'static'
161
+ ? this.$element[0].focus.call(this.$element[0])
162
+ : this.hide.call(this)
163
+ }, this))
164
+
165
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
166
+
167
+ this.$backdrop.addClass('in')
168
+
169
+ if (!callback) return
170
+
171
+ doAnimate ?
172
+ this.$backdrop
173
+ .one($.support.transition.end, callback)
174
+ .emulateTransitionEnd(150) :
175
+ callback()
176
+
177
+ } else if (!this.isShown && this.$backdrop) {
178
+ this.$backdrop.removeClass('in')
179
+
180
+ $.support.transition && this.$element.hasClass('fade') ?
181
+ this.$backdrop
182
+ .one($.support.transition.end, callback)
183
+ .emulateTransitionEnd(150) :
184
+ callback()
185
+
186
+ } else if (callback) {
187
+ callback()
188
+ }
189
+ }
190
+
191
+
192
+ // MODAL PLUGIN DEFINITION
193
+ // =======================
194
+
195
+ var old = $.fn.modal
196
+
197
+ $.fn.modal = function (option, _relatedTarget) {
198
+ return this.each(function () {
199
+ var $this = $(this)
200
+ var data = $this.data('bs.modal')
201
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
202
+
203
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
204
+ if (typeof option == 'string') data[option](_relatedTarget)
205
+ else if (options.show) data.show(_relatedTarget)
206
+ })
207
+ }
208
+
209
+ $.fn.modal.Constructor = Modal
210
+
211
+
212
+ // MODAL NO CONFLICT
213
+ // =================
214
+
215
+ $.fn.modal.noConflict = function () {
216
+ $.fn.modal = old
217
+ return this
218
+ }
219
+
220
+
221
+ // MODAL DATA-API
222
+ // ==============
223
+
224
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
225
+ var $this = $(this)
226
+ var href = $this.attr('href')
227
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
228
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
229
+
230
+ if ($this.is('a')) e.preventDefault()
231
+
232
+ $target
233
+ .modal(option, this)
234
+ .one('hide', function () {
235
+ $this.is(':visible') && $this.focus()
236
+ })
237
+ })
238
+
239
+ $(document)
240
+ .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
241
+ .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
242
+
243
+ }(jQuery);
@@ -0,0 +1,110 @@
1
+ /* ========================================================================
2
+ * Bootstrap: popover.js v3.1.1
3
+ * http://getbootstrap.com/javascript/#popovers
4
+ * ========================================================================
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * ======================================================================== */
8
+
9
+
10
+ +function ($) {
11
+ 'use strict';
12
+
13
+ // POPOVER PUBLIC CLASS DEFINITION
14
+ // ===============================
15
+
16
+ var Popover = function (element, options) {
17
+ this.init('popover', element, options)
18
+ }
19
+
20
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
21
+
22
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
23
+ placement: 'right',
24
+ trigger: 'click',
25
+ content: '',
26
+ template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
27
+ })
28
+
29
+
30
+ // NOTE: POPOVER EXTENDS tooltip.js
31
+ // ================================
32
+
33
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
34
+
35
+ Popover.prototype.constructor = Popover
36
+
37
+ Popover.prototype.getDefaults = function () {
38
+ return Popover.DEFAULTS
39
+ }
40
+
41
+ Popover.prototype.setContent = function () {
42
+ var $tip = this.tip()
43
+ var title = this.getTitle()
44
+ var content = this.getContent()
45
+
46
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
47
+ $tip.find('.popover-content')[ // we use append for html objects to maintain js events
48
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
49
+ ](content)
50
+
51
+ $tip.removeClass('fade top bottom left right in')
52
+
53
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
54
+ // this manually by checking the contents.
55
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
56
+ }
57
+
58
+ Popover.prototype.hasContent = function () {
59
+ return this.getTitle() || this.getContent()
60
+ }
61
+
62
+ Popover.prototype.getContent = function () {
63
+ var $e = this.$element
64
+ var o = this.options
65
+
66
+ return $e.attr('data-content')
67
+ || (typeof o.content == 'function' ?
68
+ o.content.call($e[0]) :
69
+ o.content)
70
+ }
71
+
72
+ Popover.prototype.arrow = function () {
73
+ return this.$arrow = this.$arrow || this.tip().find('.arrow')
74
+ }
75
+
76
+ Popover.prototype.tip = function () {
77
+ if (!this.$tip) this.$tip = $(this.options.template)
78
+ return this.$tip
79
+ }
80
+
81
+
82
+ // POPOVER PLUGIN DEFINITION
83
+ // =========================
84
+
85
+ var old = $.fn.popover
86
+
87
+ $.fn.popover = function (option) {
88
+ return this.each(function () {
89
+ var $this = $(this)
90
+ var data = $this.data('bs.popover')
91
+ var options = typeof option == 'object' && option
92
+
93
+ if (!data && option == 'destroy') return
94
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
95
+ if (typeof option == 'string') data[option]()
96
+ })
97
+ }
98
+
99
+ $.fn.popover.Constructor = Popover
100
+
101
+
102
+ // POPOVER NO CONFLICT
103
+ // ===================
104
+
105
+ $.fn.popover.noConflict = function () {
106
+ $.fn.popover = old
107
+ return this
108
+ }
109
+
110
+ }(jQuery);