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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Gemfile +6 -2
- data/README.md +7 -1
- data/bin/wagon +3 -0
- data/generators/blank/Gemfile.tt +1 -3
- data/generators/blank/config/site.yml.tt +3 -3
- data/generators/bootstrap/config/site.yml.tt +3 -3
- data/generators/bootstrap3/Gemfile.tt +1 -3
- data/generators/bootstrap3/app/views/pages/index.liquid +21 -63
- data/generators/bootstrap3/app/views/pages/index.liquid.haml +15 -57
- data/generators/bootstrap3/config/deploy.yml +15 -15
- data/generators/bootstrap3/config/site.yml.tt +2 -2
- data/generators/bootstrap3/icon.png +0 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.svg +201 -200
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/generators/{bootstrap2/app/content_types → bootstrap3/public/images}/.empty_directory +0 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/affix.js +137 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/alert.js +88 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/button.js +107 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/carousel.js +205 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/collapse.js +170 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/dropdown.js +147 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/modal.js +243 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/popover.js +110 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/scrollspy.js +153 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/tab.js +125 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/tooltip.js +399 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/transition.js +48 -0
- data/generators/bootstrap3/public/javascripts/bootstrap.min.js +12 -6
- data/generators/bootstrap3/public/stylesheets/application.css +1 -0
- data/generators/bootstrap3/public/stylesheets/application.css.scss +8 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_alerts.scss +67 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_badges.scss +55 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_breadcrumbs.scss +26 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_button-groups.scss +226 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_buttons.scss +159 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_carousel.scss +232 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_close.scss +35 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_code.scss +63 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_component-animations.scss +29 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_dropdowns.scss +213 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_forms.scss +436 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_glyphicons.scss +233 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_grid.scss +84 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_input-groups.scss +162 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_jumbotron.scss +44 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_labels.scss +64 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_list-group.scss +110 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_media.scss +56 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_mixins.scss +947 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_modals.scss +139 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_navbar.scss +620 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_navs.scss +242 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_normalize.scss +423 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_pager.scss +55 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_pagination.scss +88 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_panels.scss +241 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_popovers.scss +133 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_print.scss +101 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_progress-bars.scss +80 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_responsive-utilities.scss +74 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_scaffolding.scss +134 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_tables.scss +233 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_theme.scss +247 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_tooltip.scss +95 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_type.scss +284 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_utilities.scss +56 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_variables.scss +833 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_wells.scss +29 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/bootstrap.css.scss +49 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap.css +2035 -3056
- data/generators/bootstrap3/public/stylesheets/bootstrap.css.scss +49 -0
- data/generators/cloned/Gemfile.tt +1 -3
- data/generators/content_type/app/content_types/%slug%.yml.tt +57 -0
- data/generators/content_type/data/{%name%.yml.tt → %slug%.yml.tt} +2 -2
- data/generators/{bootstrap2 → foundation5}/Gemfile.tt +1 -3
- data/generators/{bootstrap2/data → foundation5/app/content_types}/.empty_directory +0 -0
- data/generators/{foundation → foundation5}/app/views/pages/404.liquid +1 -4
- data/generators/{foundation → foundation5}/app/views/pages/404.liquid.haml +1 -1
- data/generators/foundation5/app/views/pages/index.liquid +196 -0
- data/generators/foundation5/app/views/pages/index.liquid.haml +157 -0
- data/generators/foundation5/config/deploy.yml +15 -0
- data/generators/{bootstrap2 → foundation5}/config/site.yml.tt +3 -4
- data/generators/{bootstrap2 → foundation5}/config/translations.yml +0 -0
- data/generators/{bootstrap2 → foundation5}/config.ru +0 -0
- data/generators/{bootstrap2/public/samples → foundation5/data}/.empty_directory +0 -0
- data/generators/foundation5/favicon.ico +0 -0
- data/generators/foundation5/icon.png +0 -0
- data/generators/{foundation/app/content_types → foundation5/public/fonts}/.empty_directory +0 -0
- data/generators/{foundation/data → foundation5/public/images}/.empty_directory +0 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.abide.js +299 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.accordion.js +59 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.alert.js +43 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.clearing.js +534 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.dropdown.js +311 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.equalizer.js +74 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.interchange.js +331 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.joyride.js +843 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.js +611 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.magellan.js +178 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.offcanvas.js +108 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.orbit.js +610 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.reveal.js +437 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.slider.js +199 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.tab.js +167 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.tooltip.js +298 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.topbar.js +425 -0
- data/generators/foundation5/public/javascripts/foundation.js +4161 -0
- data/generators/foundation5/public/javascripts/foundation.min.js +10 -0
- data/generators/{foundation → foundation5}/public/javascripts/vendor/custom.modernizr.js +0 -0
- data/generators/foundation5/public/javascripts/vendor/custom.modernizr.min.js +1 -0
- data/generators/foundation5/public/javascripts/vendor/fastclick.js +9 -0
- data/generators/foundation5/public/javascripts/vendor/fastclick.min.js +11 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.autocomplete.js +645 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.autocomplete.min.js +1 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.cookie.js +8 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.cookie.min.js +8 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.js +26 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.min.js +27 -0
- data/generators/foundation5/public/javascripts/vendor/modernizr.js +8 -0
- data/generators/foundation5/public/javascripts/vendor/modernizr.min.js +1 -0
- data/generators/foundation5/public/javascripts/vendor/placeholder.js +2 -0
- data/generators/foundation5/public/javascripts/vendor/placeholder.min.js +1 -0
- data/generators/{foundation/public/fonts → foundation5/public/samples}/.empty_directory +0 -0
- data/generators/foundation5/public/stylesheets/application.css +2 -0
- data/generators/foundation5/public/stylesheets/application.css.scss +3 -0
- data/generators/foundation5/public/stylesheets/foundation/_functions.scss +101 -0
- data/generators/foundation5/public/stylesheets/foundation/_settings.scss +1296 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_accordion.scss +53 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_alert-boxes.scss +126 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_block-grid.scss +132 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_breadcrumbs.scss +127 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_button-groups.scss +108 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_buttons.scss +222 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_clearing.scss +247 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_dropdown-buttons.scss +129 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_dropdown.scss +248 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_flex-video.scss +51 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_forms.scss +498 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_global.scss +434 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_grid.scss +260 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_inline-lists.scss +57 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_joyride.scss +220 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_keystrokes.scss +61 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_labels.scss +104 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_magellan.scss +34 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_offcanvas.scss +356 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_orbit.scss +423 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_pagination.scss +150 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_panels.scss +90 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_pricing-tables.scss +150 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_progress-bars.scss +79 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_range-slider.scss +148 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_reveal-new.scss +0 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_reveal.scss +216 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_side-nav.scss +115 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_split-buttons.scss +191 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_sub-nav.scss +125 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_switch.scss +294 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_tables.scss +129 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_tabs.scss +109 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_thumbs.scss +68 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_tooltips.scss +140 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_top-bar.scss +659 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_type.scss +513 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_visibility.scss +408 -0
- data/generators/foundation5/public/stylesheets/foundation.css +5398 -0
- data/generators/foundation5/public/stylesheets/foundation.css.scss +45 -0
- data/generators/foundation5/public/stylesheets/normalize.css +425 -0
- data/generators/foundation5/public/stylesheets/normalize.css.scss +425 -0
- data/generators/{foundation → line_case}/Gemfile.tt +1 -3
- data/generators/line_case/app/content_types/categories.yml +56 -0
- data/generators/line_case/app/content_types/emails.yml +35 -0
- data/generators/line_case/app/content_types/projects.yml +58 -0
- data/generators/{bootstrap2 → line_case}/app/views/pages/404.liquid.haml +3 -2
- data/generators/line_case/app/views/pages/email-registered.liquid.haml +13 -0
- data/generators/line_case/app/views/pages/index.liquid.haml +110 -0
- data/generators/line_case/app/views/pages/projects/content_type_template.liquid.haml +32 -0
- data/generators/line_case/app/views/snippets/newsletter_form.liquid.haml +14 -0
- data/generators/line_case/app/views/snippets/projects.liquid.haml +17 -0
- data/generators/line_case/app/views/snippets/social_links.liquid.haml +19 -0
- data/generators/line_case/config/deploy.yml +15 -0
- data/generators/{foundation → line_case}/config/site.yml.tt +3 -3
- data/generators/{foundation → line_case}/config/translations.yml +0 -0
- data/generators/{foundation → line_case}/config.ru +0 -0
- data/generators/line_case/data/categories.yml +8 -0
- data/generators/line_case/data/emails.yml +2 -0
- data/generators/line_case/data/projects.yml +39 -0
- data/generators/line_case/icon.png +0 -0
- data/generators/line_case/public/images/banner-header.png +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.abide.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.alerts.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.clearing.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.cookie.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.dropdown.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.forms.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.interchange.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.joyride.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.magellan.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.orbit.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.placeholder.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.reveal.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.section.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.tooltips.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.topbar.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation.min.js +0 -0
- data/generators/line_case/public/javascripts/vendor/custom.modernizr.js +4 -0
- data/generators/{foundation → line_case}/public/javascripts/vendor/jquery.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/vendor/zepto.js +0 -0
- data/generators/line_case/public/samples/projects/sample.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample2.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample3.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample4.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample5.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample6.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample7.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample8.jpeg +0 -0
- data/generators/line_case/public/stylesheets/_variables.css.sass +20 -0
- data/generators/line_case/public/stylesheets/foundation/_variables.scss +1290 -0
- data/generators/line_case/public/stylesheets/foundation/components/_alert-boxes.scss +107 -0
- data/generators/line_case/public/stylesheets/foundation/components/_block-grid.scss +71 -0
- data/generators/line_case/public/stylesheets/foundation/components/_breadcrumbs.scss +124 -0
- data/generators/line_case/public/stylesheets/foundation/components/_button-groups.scss +89 -0
- data/generators/line_case/public/stylesheets/foundation/components/_buttons.scss +230 -0
- data/generators/line_case/public/stylesheets/foundation/components/_clearing.scss +227 -0
- data/generators/line_case/public/stylesheets/foundation/components/_custom-forms.scss +278 -0
- data/generators/line_case/public/stylesheets/foundation/components/_dropdown-buttons.scss +115 -0
- data/generators/line_case/public/stylesheets/foundation/components/_dropdown.scss +151 -0
- data/generators/line_case/public/stylesheets/foundation/components/_flex-video.scss +46 -0
- data/generators/line_case/public/stylesheets/foundation/components/_forms.scss +411 -0
- data/generators/line_case/public/stylesheets/foundation/components/_global.scss +366 -0
- data/generators/line_case/public/stylesheets/foundation/components/_grid-5.scss +214 -0
- data/generators/line_case/public/stylesheets/foundation/components/_grid.scss +188 -0
- data/generators/line_case/public/stylesheets/foundation/components/_inline-lists.scss +53 -0
- data/generators/line_case/public/stylesheets/foundation/components/_joyride.scss +217 -0
- data/generators/line_case/public/stylesheets/foundation/components/_keystrokes.scss +57 -0
- data/generators/line_case/public/stylesheets/foundation/components/_labels.scss +85 -0
- data/generators/line_case/public/stylesheets/foundation/components/_magellan.scss +23 -0
- data/generators/line_case/public/stylesheets/foundation/components/_orbit.scss +340 -0
- data/generators/line_case/public/stylesheets/foundation/components/_pagination.scss +140 -0
- data/generators/line_case/public/stylesheets/foundation/components/_panels.scss +83 -0
- data/generators/line_case/public/stylesheets/foundation/components/_pricing-tables.scss +131 -0
- data/generators/line_case/public/stylesheets/foundation/components/_progress-bars.scss +71 -0
- data/generators/line_case/public/stylesheets/foundation/components/_reveal.scss +136 -0
- data/generators/line_case/public/stylesheets/foundation/components/_section.scss +391 -0
- data/generators/line_case/public/stylesheets/foundation/components/_side-nav.scss +69 -0
- data/generators/line_case/public/stylesheets/foundation/components/_split-buttons.scss +167 -0
- data/generators/line_case/public/stylesheets/foundation/components/_sub-nav.scss +84 -0
- data/generators/line_case/public/stylesheets/foundation/components/_switch.scss +266 -0
- data/generators/line_case/public/stylesheets/foundation/components/_tables.scss +84 -0
- data/generators/line_case/public/stylesheets/foundation/components/_thumbs.scss +53 -0
- data/generators/line_case/public/stylesheets/foundation/components/_tooltips.scss +117 -0
- data/generators/line_case/public/stylesheets/foundation/components/_top-bar.scss +576 -0
- data/generators/line_case/public/stylesheets/foundation/components/_type.scss +435 -0
- data/generators/line_case/public/stylesheets/foundation/components/_visibility.scss +322 -0
- data/generators/line_case/public/stylesheets/foundation.css.scss +43 -0
- data/generators/{foundation → line_case}/public/stylesheets/foundation.min.css +0 -0
- data/generators/{foundation/public/stylesheets/normalize.css → line_case/public/stylesheets/normalize.css.scss} +5 -5
- data/generators/line_case/public/stylesheets/pages.css.sass +163 -0
- data/generators/page/template.liquid.haml.tt +8 -5
- data/generators/page/template.liquid.tt +6 -2
- data/lib/locomotive/wagon/cli.rb +139 -43
- data/lib/locomotive/wagon/generators/content_type.rb +26 -10
- data/lib/locomotive/wagon/generators/page.rb +41 -25
- data/lib/locomotive/wagon/generators/site/base.rb +53 -0
- data/lib/locomotive/wagon/generators/site/blank.rb +9 -2
- data/lib/locomotive/wagon/generators/site/bootstrap2.rb +8 -2
- data/lib/locomotive/wagon/generators/site/bootstrap3.rb +20 -2
- data/lib/locomotive/wagon/generators/site/cloned.rb +4 -0
- data/lib/locomotive/wagon/generators/site/{foundation.rb → foundation4.rb} +10 -4
- data/lib/locomotive/wagon/generators/site/foundation5.rb +48 -0
- data/lib/locomotive/wagon/generators/site/line_case.rb +20 -0
- data/lib/locomotive/wagon/generators/site/unzip.rb +10 -2
- data/lib/locomotive/wagon/generators/site.rb +48 -2
- data/lib/locomotive/wagon/generators/snippet.rb +2 -1
- data/lib/locomotive/wagon/liquid/drops/content_types.rb +9 -3
- data/lib/locomotive/wagon/liquid/drops/page.rb +9 -1
- data/lib/locomotive/wagon/liquid/scopeable.rb +1 -1
- data/lib/locomotive/wagon/liquid/tags/fetch_page.rb +41 -0
- data/lib/locomotive/wagon/liquid/tags/model_form.rb +67 -0
- data/lib/locomotive/wagon/liquid/tags/path_helper.rb +2 -2
- data/lib/locomotive/wagon/liquid/tags/with_scope.rb +1 -1
- data/lib/locomotive/wagon/listen.rb +18 -10
- data/lib/locomotive/wagon/logger.rb +4 -0
- data/lib/locomotive/wagon/misc/core_ext.rb +8 -0
- data/lib/locomotive/wagon/misc/deployment_connection.rb +120 -0
- data/lib/locomotive/wagon/misc/hosting_api.rb +115 -0
- data/lib/locomotive/wagon/misc/httparty.rb +2 -0
- data/lib/locomotive/wagon/misc/livereload.rb +43 -0
- data/lib/locomotive/wagon/misc/mounter.rb +1 -1
- data/lib/locomotive/wagon/misc/tcp_port.rb +42 -0
- data/lib/locomotive/wagon/misc/thor.rb +15 -0
- data/lib/locomotive/wagon/server/entry_submission.rb +69 -38
- data/lib/locomotive/wagon/server/middleware.rb +4 -2
- data/lib/locomotive/wagon/server/page.rb +2 -2
- data/lib/locomotive/wagon/server.rb +11 -7
- data/lib/locomotive/wagon/version.rb +1 -1
- data/lib/locomotive/wagon.rb +141 -30
- data/locomotivecms_wagon.gemspec +7 -6
- data/spec/fixtures/default/app/content_types/bands.yml +3 -1
- data/spec/fixtures/default/app/views/pages/all.liquid.haml +3 -0
- data/spec/fixtures/default/app/views/pages/events.liquid.haml +21 -0
- data/spec/fixtures/default/app/views/pages/filtered.liquid.haml +11 -1
- data/spec/fixtures/default/app/views/pages/index.liquid.haml +1 -1
- data/spec/fixtures/default/data/bands.yml +3 -0
- data/spec/integration/server/basic_spec.rb +1 -0
- data/spec/integration/server/contact_form_spec.rb +1 -1
- data/spec/integration/server/liquid_spec.rb +8 -1
- data/spec/integration/server/new_contact_form_spec.rb +67 -0
- data/spec/integration/server/with_scope_spec.rb +10 -0
- data/spec/spec_helper.rb +3 -0
- metadata +339 -144
- data/generators/bootstrap2/app/views/pages/404.liquid +0 -13
- data/generators/bootstrap2/app/views/pages/index.liquid +0 -98
- data/generators/bootstrap2/app/views/pages/index.liquid.haml +0 -80
- data/generators/bootstrap2/app/views/snippets/footer.liquid +0 -3
- data/generators/bootstrap2/app/views/snippets/footer.liquid.haml +0 -2
- data/generators/bootstrap2/config/deploy.yml +0 -15
- data/generators/bootstrap2/public/fonts/FontAwesome.otf +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.eot +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.svg +0 -399
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.ttf +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.woff +0 -0
- data/generators/bootstrap2/public/javascripts/bootstrap.js +0 -2280
- data/generators/bootstrap2/public/javascripts/bootstrap.min.js +0 -6
- data/generators/bootstrap2/public/stylesheets/application.css.scss +0 -39
- data/generators/bootstrap2/public/stylesheets/bootstrap-responsive.css +0 -1109
- data/generators/bootstrap2/public/stylesheets/bootstrap-responsive.min.css +0 -9
- data/generators/bootstrap2/public/stylesheets/bootstrap.css +0 -5568
- data/generators/bootstrap2/public/stylesheets/bootstrap.min.css +0 -9
- data/generators/bootstrap2/public/stylesheets/fonts/awesome.css.scss +0 -3
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome-ie7.css +0 -1203
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome-ie7.min.css +0 -384
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome.css +0 -1470
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome.min.css +0 -403
- data/generators/bootstrap3/public/javascripts/bootstrap.js +0 -1999
- data/generators/bootstrap3/public/stylesheets/bootstrap-theme.css +0 -384
- data/generators/bootstrap3/public/stylesheets/bootstrap-theme.min.css +0 -1
- data/generators/bootstrap3/public/stylesheets/bootstrap.min.css +0 -9
- data/generators/content_type/app/content_types/%name%.yml.tt +0 -58
- data/generators/foundation/app/views/pages/index.liquid +0 -150
- data/generators/foundation/app/views/pages/index.liquid.haml +0 -125
- data/generators/foundation/app/views/snippets/footer.liquid +0 -16
- data/generators/foundation/app/views/snippets/footer.liquid.haml +0 -22
- data/generators/foundation/config/deploy.yml +0 -15
- data/generators/foundation/public/samples/.empty_directory +0 -1
- data/generators/foundation/public/stylesheets/foundation.css +0 -4727
@@ -0,0 +1,167 @@
|
|
1
|
+
;(function ($, window, document, undefined) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
Foundation.libs.tab = {
|
5
|
+
name : 'tab',
|
6
|
+
|
7
|
+
version : '5.2.3',
|
8
|
+
|
9
|
+
settings : {
|
10
|
+
active_class: 'active',
|
11
|
+
callback : function () {},
|
12
|
+
deep_linking: false,
|
13
|
+
scroll_to_content: true,
|
14
|
+
is_hover: false
|
15
|
+
},
|
16
|
+
|
17
|
+
default_tab_hashes: [],
|
18
|
+
|
19
|
+
init : function (scope, method, options) {
|
20
|
+
var self = this,
|
21
|
+
S = this.S;
|
22
|
+
|
23
|
+
this.bindings(method, options);
|
24
|
+
this.handle_location_hash_change();
|
25
|
+
|
26
|
+
// Store the default active tabs which will be referenced when the
|
27
|
+
// location hash is absent, as in the case of navigating the tabs and
|
28
|
+
// returning to the first viewing via the browser Back button.
|
29
|
+
S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
|
30
|
+
self.default_tab_hashes.push(this.hash);
|
31
|
+
});
|
32
|
+
},
|
33
|
+
|
34
|
+
events : function () {
|
35
|
+
var self = this,
|
36
|
+
S = this.S;
|
37
|
+
|
38
|
+
S(this.scope)
|
39
|
+
.off('.tab')
|
40
|
+
// Click event: tab title
|
41
|
+
.on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
|
42
|
+
var settings = S(this).closest('[' + self.attr_name() +']').data(self.attr_name(true) + '-init');
|
43
|
+
if (!settings.is_hover || Modernizr.touch) {
|
44
|
+
e.preventDefault();
|
45
|
+
e.stopPropagation();
|
46
|
+
self.toggle_active_tab(S(this).parent());
|
47
|
+
}
|
48
|
+
})
|
49
|
+
// Hover event: tab title
|
50
|
+
.on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
|
51
|
+
var settings = S(this).closest('[' + self.attr_name() +']').data(self.attr_name(true) + '-init');
|
52
|
+
if (settings.is_hover) self.toggle_active_tab(S(this).parent());
|
53
|
+
});
|
54
|
+
|
55
|
+
// Location hash change event
|
56
|
+
S(window).on('hashchange.fndtn.tab', function (e) {
|
57
|
+
e.preventDefault();
|
58
|
+
self.handle_location_hash_change();
|
59
|
+
});
|
60
|
+
},
|
61
|
+
|
62
|
+
handle_location_hash_change : function () {
|
63
|
+
var self = this,
|
64
|
+
S = this.S;
|
65
|
+
|
66
|
+
S('[' + this.attr_name() + ']', this.scope).each(function () {
|
67
|
+
var settings = S(this).data(self.attr_name(true) + '-init');
|
68
|
+
if (settings.deep_linking) {
|
69
|
+
// Match the location hash to a label
|
70
|
+
var hash = self.scope.location.hash;
|
71
|
+
if (hash != '') {
|
72
|
+
// Check whether the location hash references a tab content div or
|
73
|
+
// another element on the page (inside or outside the tab content div)
|
74
|
+
var hash_element = S(hash);
|
75
|
+
if (hash_element.hasClass('content') && hash_element.parent().hasClass('tab-content')) {
|
76
|
+
// Tab content div
|
77
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + hash + ']').parent());
|
78
|
+
} else {
|
79
|
+
// Not the tab content div. If inside the tab content, find the
|
80
|
+
// containing tab and toggle it as active.
|
81
|
+
var hash_tab_container_id = hash_element.closest('.content').attr('id');
|
82
|
+
if (hash_tab_container_id != undefined) {
|
83
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=#' + hash_tab_container_id + ']').parent(), hash);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
} else {
|
87
|
+
// Reference the default tab hashes which were initialized in the init function
|
88
|
+
for (var ind in self.default_tab_hashes) {
|
89
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + self.default_tab_hashes[ind] + ']').parent());
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
});
|
94
|
+
},
|
95
|
+
|
96
|
+
toggle_active_tab: function (tab, location_hash) {
|
97
|
+
var S = this.S,
|
98
|
+
tabs = tab.closest('[' + this.attr_name() + ']'),
|
99
|
+
anchor = tab.children('a').first(),
|
100
|
+
target_hash = '#' + anchor.attr('href').split('#')[1],
|
101
|
+
target = S(target_hash),
|
102
|
+
siblings = tab.siblings(),
|
103
|
+
settings = tabs.data(this.attr_name(true) + '-init');
|
104
|
+
|
105
|
+
// allow usage of data-tab-content attribute instead of href
|
106
|
+
if (S(this).data(this.data_attr('tab-content'))) {
|
107
|
+
target_hash = '#' + S(this).data(this.data_attr('tab-content')).split('#')[1];
|
108
|
+
target = S(target_hash);
|
109
|
+
}
|
110
|
+
|
111
|
+
if (settings.deep_linking) {
|
112
|
+
// Get the scroll Y position prior to moving to the hash ID
|
113
|
+
var cur_ypos = $('body,html').scrollTop();
|
114
|
+
|
115
|
+
// Update the location hash to preserve browser history
|
116
|
+
// Note that the hash does not need to correspond to the
|
117
|
+
// tab content ID anchor; it can be an ID inside or outside of the tab
|
118
|
+
// content div.
|
119
|
+
if (location_hash != undefined) {
|
120
|
+
window.location.hash = location_hash;
|
121
|
+
} else {
|
122
|
+
window.location.hash = target_hash;
|
123
|
+
}
|
124
|
+
|
125
|
+
if (settings.scroll_to_content) {
|
126
|
+
// If the user is requesting the content of a tab, then scroll to the
|
127
|
+
// top of the title area; otherwise, scroll to the element within
|
128
|
+
// the content area as defined by the hash value.
|
129
|
+
if (location_hash == undefined || location_hash == target_hash) {
|
130
|
+
tab.parent()[0].scrollIntoView();
|
131
|
+
} else {
|
132
|
+
S(target_hash)[0].scrollIntoView();
|
133
|
+
}
|
134
|
+
} else {
|
135
|
+
// Adjust the scrollbar to the Y position prior to setting the hash
|
136
|
+
// Only do this for the tab content anchor, otherwise there will be
|
137
|
+
// conflicts with in-tab anchor links nested in the tab-content div
|
138
|
+
if (location_hash == undefined || location_hash == target_hash) {
|
139
|
+
$('body,html').scrollTop(cur_ypos);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
// WARNING: The activation and deactivation of the tab content must
|
145
|
+
// occur after the deep linking in order to properly refresh the browser
|
146
|
+
// window (notably in Chrome).
|
147
|
+
tab.addClass(settings.active_class).triggerHandler('opened');
|
148
|
+
siblings.removeClass(settings.active_class);
|
149
|
+
target.siblings().removeClass(settings.active_class).end().addClass(settings.active_class);
|
150
|
+
settings.callback(tab);
|
151
|
+
target.triggerHandler('toggled', [tab]);
|
152
|
+
tabs.triggerHandler('toggled', [target]);
|
153
|
+
},
|
154
|
+
|
155
|
+
data_attr: function (str) {
|
156
|
+
if (this.namespace.length > 0) {
|
157
|
+
return this.namespace + '-' + str;
|
158
|
+
}
|
159
|
+
|
160
|
+
return str;
|
161
|
+
},
|
162
|
+
|
163
|
+
off : function () {},
|
164
|
+
|
165
|
+
reflow : function () {}
|
166
|
+
};
|
167
|
+
}(jQuery, window, window.document));
|
@@ -0,0 +1,298 @@
|
|
1
|
+
;(function ($, window, document, undefined) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
Foundation.libs.tooltip = {
|
5
|
+
name : 'tooltip',
|
6
|
+
|
7
|
+
version : '5.2.3',
|
8
|
+
|
9
|
+
settings : {
|
10
|
+
additional_inheritable_classes : [],
|
11
|
+
tooltip_class : '.tooltip',
|
12
|
+
append_to: 'body',
|
13
|
+
touch_close_text: 'Tap To Close',
|
14
|
+
disable_for_touch: false,
|
15
|
+
hover_delay: 200,
|
16
|
+
show_on : 'all',
|
17
|
+
tip_template : function (selector, content) {
|
18
|
+
return '<span data-selector="' + selector + '" class="'
|
19
|
+
+ Foundation.libs.tooltip.settings.tooltip_class.substring(1)
|
20
|
+
+ '">' + content + '<span class="nub"></span></span>';
|
21
|
+
}
|
22
|
+
},
|
23
|
+
|
24
|
+
cache : {},
|
25
|
+
|
26
|
+
init : function (scope, method, options) {
|
27
|
+
Foundation.inherit(this, 'random_str');
|
28
|
+
this.bindings(method, options);
|
29
|
+
},
|
30
|
+
|
31
|
+
should_show: function (target, tip) {
|
32
|
+
var settings = $.extend({}, this.settings, this.data_options(target));
|
33
|
+
|
34
|
+
if (settings.show_on === 'all') {
|
35
|
+
return true;
|
36
|
+
} else if (this.small() && settings.show_on === 'small') {
|
37
|
+
return true;
|
38
|
+
} else if (this.medium() && settings.show_on === 'medium') {
|
39
|
+
return true;
|
40
|
+
} else if (this.large() && settings.show_on === 'large') {
|
41
|
+
return true;
|
42
|
+
}
|
43
|
+
return false;
|
44
|
+
},
|
45
|
+
|
46
|
+
medium : function () {
|
47
|
+
return matchMedia(Foundation.media_queries['medium']).matches;
|
48
|
+
},
|
49
|
+
|
50
|
+
large : function () {
|
51
|
+
return matchMedia(Foundation.media_queries['large']).matches;
|
52
|
+
},
|
53
|
+
|
54
|
+
events : function (instance) {
|
55
|
+
var self = this,
|
56
|
+
S = self.S;
|
57
|
+
|
58
|
+
self.create(this.S(instance));
|
59
|
+
|
60
|
+
$(this.scope)
|
61
|
+
.off('.tooltip')
|
62
|
+
.on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip',
|
63
|
+
'[' + this.attr_name() + ']', function (e) {
|
64
|
+
var $this = S(this),
|
65
|
+
settings = $.extend({}, self.settings, self.data_options($this)),
|
66
|
+
is_touch = false;
|
67
|
+
|
68
|
+
if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type) && S(e.target).is('a')) {
|
69
|
+
return false;
|
70
|
+
}
|
71
|
+
|
72
|
+
if (/mouse/i.test(e.type) && self.ie_touch(e)) return false;
|
73
|
+
|
74
|
+
if ($this.hasClass('open')) {
|
75
|
+
if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) e.preventDefault();
|
76
|
+
self.hide($this);
|
77
|
+
} else {
|
78
|
+
if (settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
|
79
|
+
return;
|
80
|
+
} else if(!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
|
81
|
+
e.preventDefault();
|
82
|
+
S(settings.tooltip_class + '.open').hide();
|
83
|
+
is_touch = true;
|
84
|
+
}
|
85
|
+
|
86
|
+
if (/enter|over/i.test(e.type)) {
|
87
|
+
this.timer = setTimeout(function () {
|
88
|
+
var tip = self.showTip($this);
|
89
|
+
}.bind(this), self.settings.hover_delay);
|
90
|
+
} else if (e.type === 'mouseout' || e.type === 'mouseleave') {
|
91
|
+
clearTimeout(this.timer);
|
92
|
+
self.hide($this);
|
93
|
+
} else {
|
94
|
+
self.showTip($this);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
})
|
98
|
+
.on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', '[' + this.attr_name() + '].open', function (e) {
|
99
|
+
if (/mouse/i.test(e.type) && self.ie_touch(e)) return false;
|
100
|
+
|
101
|
+
if($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
|
102
|
+
return;
|
103
|
+
}
|
104
|
+
else if($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
|
105
|
+
self.convert_to_touch($(this));
|
106
|
+
} else {
|
107
|
+
self.hide($(this));
|
108
|
+
}
|
109
|
+
})
|
110
|
+
.on('DOMNodeRemoved DOMAttrModified', '[' + this.attr_name() + ']:not(a)', function (e) {
|
111
|
+
self.hide(S(this));
|
112
|
+
});
|
113
|
+
},
|
114
|
+
|
115
|
+
ie_touch : function (e) {
|
116
|
+
// How do I distinguish between IE11 and Windows Phone 8?????
|
117
|
+
return false;
|
118
|
+
},
|
119
|
+
|
120
|
+
showTip : function ($target) {
|
121
|
+
var $tip = this.getTip($target);
|
122
|
+
if (this.should_show($target, $tip)){
|
123
|
+
return this.show($target);
|
124
|
+
}
|
125
|
+
return;
|
126
|
+
},
|
127
|
+
|
128
|
+
getTip : function ($target) {
|
129
|
+
var selector = this.selector($target),
|
130
|
+
settings = $.extend({}, this.settings, this.data_options($target)),
|
131
|
+
tip = null;
|
132
|
+
|
133
|
+
if (selector) {
|
134
|
+
tip = this.S('span[data-selector="' + selector + '"]' + settings.tooltip_class);
|
135
|
+
}
|
136
|
+
|
137
|
+
return (typeof tip === 'object') ? tip : false;
|
138
|
+
},
|
139
|
+
|
140
|
+
selector : function ($target) {
|
141
|
+
var id = $target.attr('id'),
|
142
|
+
dataSelector = $target.attr(this.attr_name()) || $target.attr('data-selector');
|
143
|
+
|
144
|
+
if ((id && id.length < 1 || !id) && typeof dataSelector != 'string') {
|
145
|
+
dataSelector = this.random_str(6);
|
146
|
+
$target.attr('data-selector', dataSelector);
|
147
|
+
}
|
148
|
+
|
149
|
+
return (id && id.length > 0) ? id : dataSelector;
|
150
|
+
},
|
151
|
+
|
152
|
+
create : function ($target) {
|
153
|
+
var self = this,
|
154
|
+
settings = $.extend({}, this.settings, this.data_options($target)),
|
155
|
+
tip_template = this.settings.tip_template;
|
156
|
+
|
157
|
+
if (typeof settings.tip_template === 'string' && window.hasOwnProperty(settings.tip_template)) {
|
158
|
+
tip_template = window[settings.tip_template];
|
159
|
+
}
|
160
|
+
|
161
|
+
var $tip = $(tip_template(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
|
162
|
+
classes = this.inheritable_classes($target);
|
163
|
+
|
164
|
+
$tip.addClass(classes).appendTo(settings.append_to);
|
165
|
+
|
166
|
+
if (Modernizr.touch) {
|
167
|
+
$tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');
|
168
|
+
$tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function(e) {
|
169
|
+
self.hide($target);
|
170
|
+
});
|
171
|
+
}
|
172
|
+
|
173
|
+
$target.removeAttr('title').attr('title','');
|
174
|
+
},
|
175
|
+
|
176
|
+
reposition : function (target, tip, classes) {
|
177
|
+
var width, nub, nubHeight, nubWidth, column, objPos;
|
178
|
+
|
179
|
+
tip.css('visibility', 'hidden').show();
|
180
|
+
|
181
|
+
width = target.data('width');
|
182
|
+
nub = tip.children('.nub');
|
183
|
+
nubHeight = nub.outerHeight();
|
184
|
+
nubWidth = nub.outerHeight();
|
185
|
+
|
186
|
+
if (this.small()) {
|
187
|
+
tip.css({'width' : '100%' });
|
188
|
+
} else {
|
189
|
+
tip.css({'width' : (width) ? width : 'auto'});
|
190
|
+
}
|
191
|
+
|
192
|
+
objPos = function (obj, top, right, bottom, left, width) {
|
193
|
+
return obj.css({
|
194
|
+
'top' : (top) ? top : 'auto',
|
195
|
+
'bottom' : (bottom) ? bottom : 'auto',
|
196
|
+
'left' : (left) ? left : 'auto',
|
197
|
+
'right' : (right) ? right : 'auto'
|
198
|
+
}).end();
|
199
|
+
};
|
200
|
+
|
201
|
+
objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', target.offset().left);
|
202
|
+
|
203
|
+
if (this.small()) {
|
204
|
+
objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', 12.5, $(this.scope).width());
|
205
|
+
tip.addClass('tip-override');
|
206
|
+
objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
|
207
|
+
} else {
|
208
|
+
var left = target.offset().left;
|
209
|
+
if (Foundation.rtl) {
|
210
|
+
nub.addClass('rtl');
|
211
|
+
left = target.offset().left + target.outerWidth() - tip.outerWidth();
|
212
|
+
}
|
213
|
+
objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', left);
|
214
|
+
tip.removeClass('tip-override');
|
215
|
+
if (classes && classes.indexOf('tip-top') > -1) {
|
216
|
+
if (Foundation.rtl) nub.addClass('rtl');
|
217
|
+
objPos(tip, (target.offset().top - tip.outerHeight()), 'auto', 'auto', left)
|
218
|
+
.removeClass('tip-override');
|
219
|
+
} else if (classes && classes.indexOf('tip-left') > -1) {
|
220
|
+
objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left - tip.outerWidth() - nubHeight))
|
221
|
+
.removeClass('tip-override');
|
222
|
+
nub.removeClass('rtl');
|
223
|
+
} else if (classes && classes.indexOf('tip-right') > -1) {
|
224
|
+
objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left + target.outerWidth() + nubHeight))
|
225
|
+
.removeClass('tip-override');
|
226
|
+
nub.removeClass('rtl');
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
tip.css('visibility', 'visible').hide();
|
231
|
+
},
|
232
|
+
|
233
|
+
small : function () {
|
234
|
+
return matchMedia(Foundation.media_queries.small).matches &&
|
235
|
+
!matchMedia(Foundation.media_queries.medium).matches;
|
236
|
+
},
|
237
|
+
|
238
|
+
inheritable_classes : function ($target) {
|
239
|
+
var settings = $.extend({}, this.settings, this.data_options($target)),
|
240
|
+
inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'radius', 'round'].concat(settings.additional_inheritable_classes),
|
241
|
+
classes = $target.attr('class'),
|
242
|
+
filtered = classes ? $.map(classes.split(' '), function (el, i) {
|
243
|
+
if ($.inArray(el, inheritables) !== -1) {
|
244
|
+
return el;
|
245
|
+
}
|
246
|
+
}).join(' ') : '';
|
247
|
+
|
248
|
+
return $.trim(filtered);
|
249
|
+
},
|
250
|
+
|
251
|
+
convert_to_touch : function($target) {
|
252
|
+
var self = this,
|
253
|
+
$tip = self.getTip($target),
|
254
|
+
settings = $.extend({}, self.settings, self.data_options($target));
|
255
|
+
|
256
|
+
if ($tip.find('.tap-to-close').length === 0) {
|
257
|
+
$tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');
|
258
|
+
$tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function(e) {
|
259
|
+
self.hide($target);
|
260
|
+
});
|
261
|
+
}
|
262
|
+
|
263
|
+
$target.data('tooltip-open-event-type', 'touch');
|
264
|
+
},
|
265
|
+
|
266
|
+
show : function ($target) {
|
267
|
+
var $tip = this.getTip($target);
|
268
|
+
|
269
|
+
if ($target.data('tooltip-open-event-type') == 'touch') {
|
270
|
+
this.convert_to_touch($target);
|
271
|
+
}
|
272
|
+
|
273
|
+
this.reposition($target, $tip, $target.attr('class'));
|
274
|
+
$target.addClass('open');
|
275
|
+
$tip.fadeIn(150);
|
276
|
+
},
|
277
|
+
|
278
|
+
hide : function ($target) {
|
279
|
+
var $tip = this.getTip($target);
|
280
|
+
|
281
|
+
$tip.fadeOut(150, function() {
|
282
|
+
$tip.find('.tap-to-close').remove();
|
283
|
+
$tip.off('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');
|
284
|
+
$target.removeClass('open');
|
285
|
+
});
|
286
|
+
},
|
287
|
+
|
288
|
+
off : function () {
|
289
|
+
var self = this;
|
290
|
+
this.S(this.scope).off('.fndtn.tooltip');
|
291
|
+
this.S(this.settings.tooltip_class).each(function (i) {
|
292
|
+
$('[' + self.attr_name() + ']').eq(i).attr('title', $(this).text());
|
293
|
+
}).remove();
|
294
|
+
},
|
295
|
+
|
296
|
+
reflow : function () {}
|
297
|
+
};
|
298
|
+
}(jQuery, window, window.document));
|