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,843 @@
|
|
1
|
+
;(function ($, window, document, undefined) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var Modernizr = Modernizr || false;
|
5
|
+
|
6
|
+
Foundation.libs.joyride = {
|
7
|
+
name : 'joyride',
|
8
|
+
|
9
|
+
version : '5.2.3',
|
10
|
+
|
11
|
+
defaults : {
|
12
|
+
expose : false, // turn on or off the expose feature
|
13
|
+
modal : true, // Whether to cover page with modal during the tour
|
14
|
+
tip_location : 'bottom', // 'top' or 'bottom' in relation to parent
|
15
|
+
nub_position : 'auto', // override on a per tooltip bases
|
16
|
+
scroll_speed : 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation
|
17
|
+
scroll_animation : 'linear', // supports 'swing' and 'linear', extend with jQuery UI.
|
18
|
+
timer : 0, // 0 = no timer , all other numbers = timer in milliseconds
|
19
|
+
start_timer_on_click : true, // true or false - true requires clicking the first button start the timer
|
20
|
+
start_offset : 0, // the index of the tooltip you want to start on (index of the li)
|
21
|
+
next_button : true, // true or false to control whether a next button is used
|
22
|
+
tip_animation : 'fade', // 'pop' or 'fade' in each tip
|
23
|
+
pause_after : [], // array of indexes where to pause the tour after
|
24
|
+
exposed : [], // array of expose elements
|
25
|
+
tip_animation_fade_speed : 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
|
26
|
+
cookie_monster : false, // true or false to control whether cookies are used
|
27
|
+
cookie_name : 'joyride', // Name the cookie you'll use
|
28
|
+
cookie_domain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
|
29
|
+
cookie_expires : 365, // set when you would like the cookie to expire.
|
30
|
+
tip_container : 'body', // Where will the tip be attached
|
31
|
+
abort_on_close : true, // When true, the close event will not fire any callback
|
32
|
+
tip_location_patterns : {
|
33
|
+
top: ['bottom'],
|
34
|
+
bottom: [], // bottom should not need to be repositioned
|
35
|
+
left: ['right', 'top', 'bottom'],
|
36
|
+
right: ['left', 'top', 'bottom']
|
37
|
+
},
|
38
|
+
post_ride_callback : function (){}, // A method to call once the tour closes (canceled or complete)
|
39
|
+
post_step_callback : function (){}, // A method to call after each step
|
40
|
+
pre_step_callback : function (){}, // A method to call before each step
|
41
|
+
pre_ride_callback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
|
42
|
+
post_expose_callback : function (){}, // A method to call after an element has been exposed
|
43
|
+
template : { // HTML segments for tip layout
|
44
|
+
link : '<a href="#close" class="joyride-close-tip">×</a>',
|
45
|
+
timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
|
46
|
+
tip : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
|
47
|
+
wrapper : '<div class="joyride-content-wrapper"></div>',
|
48
|
+
button : '<a href="#" class="small button joyride-next-tip"></a>',
|
49
|
+
modal : '<div class="joyride-modal-bg"></div>',
|
50
|
+
expose : '<div class="joyride-expose-wrapper"></div>',
|
51
|
+
expose_cover: '<div class="joyride-expose-cover"></div>'
|
52
|
+
},
|
53
|
+
expose_add_class : '' // One or more space-separated class names to be added to exposed element
|
54
|
+
},
|
55
|
+
|
56
|
+
init : function (scope, method, options) {
|
57
|
+
Foundation.inherit(this, 'throttle random_str');
|
58
|
+
|
59
|
+
this.settings = this.settings || $.extend({}, this.defaults, (options || method));
|
60
|
+
|
61
|
+
this.bindings(method, options)
|
62
|
+
},
|
63
|
+
|
64
|
+
events : function () {
|
65
|
+
var self = this;
|
66
|
+
|
67
|
+
$(this.scope)
|
68
|
+
.off('.joyride')
|
69
|
+
.on('click.fndtn.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
|
70
|
+
e.preventDefault();
|
71
|
+
|
72
|
+
if (this.settings.$li.next().length < 1) {
|
73
|
+
this.end();
|
74
|
+
} else if (this.settings.timer > 0) {
|
75
|
+
clearTimeout(this.settings.automate);
|
76
|
+
this.hide();
|
77
|
+
this.show();
|
78
|
+
this.startTimer();
|
79
|
+
} else {
|
80
|
+
this.hide();
|
81
|
+
this.show();
|
82
|
+
}
|
83
|
+
|
84
|
+
}.bind(this))
|
85
|
+
|
86
|
+
.on('click.fndtn.joyride', '.joyride-close-tip', function (e) {
|
87
|
+
e.preventDefault();
|
88
|
+
this.end(this.settings.abort_on_close);
|
89
|
+
}.bind(this));
|
90
|
+
|
91
|
+
$(window)
|
92
|
+
.off('.joyride')
|
93
|
+
.on('resize.fndtn.joyride', self.throttle(function () {
|
94
|
+
if ($('[' + self.attr_name() + ']').length > 0 && self.settings.$next_tip) {
|
95
|
+
if (self.settings.exposed.length > 0) {
|
96
|
+
var $els = $(self.settings.exposed);
|
97
|
+
|
98
|
+
$els.each(function () {
|
99
|
+
var $this = $(this);
|
100
|
+
self.un_expose($this);
|
101
|
+
self.expose($this);
|
102
|
+
});
|
103
|
+
}
|
104
|
+
|
105
|
+
if (self.is_phone()) {
|
106
|
+
self.pos_phone();
|
107
|
+
} else {
|
108
|
+
self.pos_default(false);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}, 100));
|
112
|
+
},
|
113
|
+
|
114
|
+
start : function () {
|
115
|
+
var self = this,
|
116
|
+
$this = $('[' + this.attr_name() + ']', this.scope),
|
117
|
+
integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
|
118
|
+
int_settings_count = integer_settings.length;
|
119
|
+
|
120
|
+
if (!$this.length > 0) return;
|
121
|
+
|
122
|
+
if (!this.settings.init) this.events();
|
123
|
+
|
124
|
+
this.settings = $this.data(this.attr_name(true) + '-init');
|
125
|
+
|
126
|
+
// non configureable settings
|
127
|
+
this.settings.$content_el = $this;
|
128
|
+
this.settings.$body = $(this.settings.tip_container);
|
129
|
+
this.settings.body_offset = $(this.settings.tip_container).position();
|
130
|
+
this.settings.$tip_content = this.settings.$content_el.find('> li');
|
131
|
+
this.settings.paused = false;
|
132
|
+
this.settings.attempts = 0;
|
133
|
+
|
134
|
+
// can we create cookies?
|
135
|
+
if (typeof $.cookie !== 'function') {
|
136
|
+
this.settings.cookie_monster = false;
|
137
|
+
}
|
138
|
+
|
139
|
+
// generate the tips and insert into dom.
|
140
|
+
if (!this.settings.cookie_monster || this.settings.cookie_monster && !$.cookie(this.settings.cookie_name)) {
|
141
|
+
this.settings.$tip_content.each(function (index) {
|
142
|
+
var $this = $(this);
|
143
|
+
this.settings = $.extend({}, self.defaults, self.data_options($this));
|
144
|
+
|
145
|
+
// Make sure that settings parsed from data_options are integers where necessary
|
146
|
+
var i = int_settings_count;
|
147
|
+
while (i--) {
|
148
|
+
self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10);
|
149
|
+
}
|
150
|
+
self.create({$li : $this, index : index});
|
151
|
+
});
|
152
|
+
|
153
|
+
// show first tip
|
154
|
+
if (!this.settings.start_timer_on_click && this.settings.timer > 0) {
|
155
|
+
this.show('init');
|
156
|
+
this.startTimer();
|
157
|
+
} else {
|
158
|
+
this.show('init');
|
159
|
+
}
|
160
|
+
|
161
|
+
}
|
162
|
+
},
|
163
|
+
|
164
|
+
resume : function () {
|
165
|
+
this.set_li();
|
166
|
+
this.show();
|
167
|
+
},
|
168
|
+
|
169
|
+
tip_template : function (opts) {
|
170
|
+
var $blank, content;
|
171
|
+
|
172
|
+
opts.tip_class = opts.tip_class || '';
|
173
|
+
|
174
|
+
$blank = $(this.settings.template.tip).addClass(opts.tip_class);
|
175
|
+
content = $.trim($(opts.li).html()) +
|
176
|
+
this.button_text(opts.button_text) +
|
177
|
+
this.settings.template.link +
|
178
|
+
this.timer_instance(opts.index);
|
179
|
+
|
180
|
+
$blank.append($(this.settings.template.wrapper));
|
181
|
+
$blank.first().attr(this.add_namespace('data-index'), opts.index);
|
182
|
+
$('.joyride-content-wrapper', $blank).append(content);
|
183
|
+
|
184
|
+
return $blank[0];
|
185
|
+
},
|
186
|
+
|
187
|
+
timer_instance : function (index) {
|
188
|
+
var txt;
|
189
|
+
|
190
|
+
if ((index === 0 && this.settings.start_timer_on_click && this.settings.timer > 0) || this.settings.timer === 0) {
|
191
|
+
txt = '';
|
192
|
+
} else {
|
193
|
+
txt = $(this.settings.template.timer)[0].outerHTML;
|
194
|
+
}
|
195
|
+
return txt;
|
196
|
+
},
|
197
|
+
|
198
|
+
button_text : function (txt) {
|
199
|
+
if (this.settings.next_button) {
|
200
|
+
txt = $.trim(txt) || 'Next';
|
201
|
+
txt = $(this.settings.template.button).append(txt)[0].outerHTML;
|
202
|
+
} else {
|
203
|
+
txt = '';
|
204
|
+
}
|
205
|
+
return txt;
|
206
|
+
},
|
207
|
+
|
208
|
+
create : function (opts) {
|
209
|
+
var buttonText = opts.$li.attr(this.add_namespace('data-button'))
|
210
|
+
|| opts.$li.attr(this.add_namespace('data-text')),
|
211
|
+
tipClass = opts.$li.attr('class'),
|
212
|
+
$tip_content = $(this.tip_template({
|
213
|
+
tip_class : tipClass,
|
214
|
+
index : opts.index,
|
215
|
+
button_text : buttonText,
|
216
|
+
li : opts.$li
|
217
|
+
}));
|
218
|
+
|
219
|
+
$(this.settings.tip_container).append($tip_content);
|
220
|
+
},
|
221
|
+
|
222
|
+
show : function (init) {
|
223
|
+
var $timer = null;
|
224
|
+
|
225
|
+
// are we paused?
|
226
|
+
if (this.settings.$li === undefined
|
227
|
+
|| ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
|
228
|
+
|
229
|
+
// don't go to the next li if the tour was paused
|
230
|
+
if (this.settings.paused) {
|
231
|
+
this.settings.paused = false;
|
232
|
+
} else {
|
233
|
+
this.set_li(init);
|
234
|
+
}
|
235
|
+
|
236
|
+
this.settings.attempts = 0;
|
237
|
+
|
238
|
+
if (this.settings.$li.length && this.settings.$target.length > 0) {
|
239
|
+
if (init) { //run when we first start
|
240
|
+
this.settings.pre_ride_callback(this.settings.$li.index(), this.settings.$next_tip);
|
241
|
+
if (this.settings.modal) {
|
242
|
+
this.show_modal();
|
243
|
+
}
|
244
|
+
}
|
245
|
+
|
246
|
+
this.settings.pre_step_callback(this.settings.$li.index(), this.settings.$next_tip);
|
247
|
+
|
248
|
+
if (this.settings.modal && this.settings.expose) {
|
249
|
+
this.expose();
|
250
|
+
}
|
251
|
+
|
252
|
+
this.settings.tip_settings = $.extend({}, this.settings, this.data_options(this.settings.$li));
|
253
|
+
|
254
|
+
this.settings.timer = parseInt(this.settings.timer, 10);
|
255
|
+
|
256
|
+
this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
|
257
|
+
|
258
|
+
// scroll if not modal
|
259
|
+
if (!/body/i.test(this.settings.$target.selector)) {
|
260
|
+
this.scroll_to();
|
261
|
+
}
|
262
|
+
|
263
|
+
if (this.is_phone()) {
|
264
|
+
this.pos_phone(true);
|
265
|
+
} else {
|
266
|
+
this.pos_default(true);
|
267
|
+
}
|
268
|
+
|
269
|
+
$timer = this.settings.$next_tip.find('.joyride-timer-indicator');
|
270
|
+
|
271
|
+
if (/pop/i.test(this.settings.tip_animation)) {
|
272
|
+
|
273
|
+
$timer.width(0);
|
274
|
+
|
275
|
+
if (this.settings.timer > 0) {
|
276
|
+
|
277
|
+
this.settings.$next_tip.show();
|
278
|
+
|
279
|
+
setTimeout(function () {
|
280
|
+
$timer.animate({
|
281
|
+
width: $timer.parent().width()
|
282
|
+
}, this.settings.timer, 'linear');
|
283
|
+
}.bind(this), this.settings.tip_animation_fade_speed);
|
284
|
+
|
285
|
+
} else {
|
286
|
+
this.settings.$next_tip.show();
|
287
|
+
|
288
|
+
}
|
289
|
+
|
290
|
+
|
291
|
+
} else if (/fade/i.test(this.settings.tip_animation)) {
|
292
|
+
|
293
|
+
$timer.width(0);
|
294
|
+
|
295
|
+
if (this.settings.timer > 0) {
|
296
|
+
|
297
|
+
this.settings.$next_tip
|
298
|
+
.fadeIn(this.settings.tip_animation_fade_speed)
|
299
|
+
.show();
|
300
|
+
|
301
|
+
setTimeout(function () {
|
302
|
+
$timer.animate({
|
303
|
+
width: $timer.parent().width()
|
304
|
+
}, this.settings.timer, 'linear');
|
305
|
+
}.bind(this), this.settings.tip_animation_fade_speed);
|
306
|
+
|
307
|
+
} else {
|
308
|
+
this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);
|
309
|
+
}
|
310
|
+
}
|
311
|
+
|
312
|
+
this.settings.$current_tip = this.settings.$next_tip;
|
313
|
+
|
314
|
+
// skip non-existant targets
|
315
|
+
} else if (this.settings.$li && this.settings.$target.length < 1) {
|
316
|
+
|
317
|
+
this.show();
|
318
|
+
|
319
|
+
} else {
|
320
|
+
|
321
|
+
this.end();
|
322
|
+
|
323
|
+
}
|
324
|
+
} else {
|
325
|
+
|
326
|
+
this.settings.paused = true;
|
327
|
+
|
328
|
+
}
|
329
|
+
|
330
|
+
},
|
331
|
+
|
332
|
+
is_phone : function () {
|
333
|
+
return matchMedia(Foundation.media_queries.small).matches &&
|
334
|
+
!matchMedia(Foundation.media_queries.medium).matches;
|
335
|
+
},
|
336
|
+
|
337
|
+
hide : function () {
|
338
|
+
if (this.settings.modal && this.settings.expose) {
|
339
|
+
this.un_expose();
|
340
|
+
}
|
341
|
+
|
342
|
+
if (!this.settings.modal) {
|
343
|
+
$('.joyride-modal-bg').hide();
|
344
|
+
}
|
345
|
+
|
346
|
+
// Prevent scroll bouncing...wait to remove from layout
|
347
|
+
this.settings.$current_tip.css('visibility', 'hidden');
|
348
|
+
setTimeout($.proxy(function() {
|
349
|
+
this.hide();
|
350
|
+
this.css('visibility', 'visible');
|
351
|
+
}, this.settings.$current_tip), 0);
|
352
|
+
this.settings.post_step_callback(this.settings.$li.index(),
|
353
|
+
this.settings.$current_tip);
|
354
|
+
},
|
355
|
+
|
356
|
+
set_li : function (init) {
|
357
|
+
if (init) {
|
358
|
+
this.settings.$li = this.settings.$tip_content.eq(this.settings.start_offset);
|
359
|
+
this.set_next_tip();
|
360
|
+
this.settings.$current_tip = this.settings.$next_tip;
|
361
|
+
} else {
|
362
|
+
this.settings.$li = this.settings.$li.next();
|
363
|
+
this.set_next_tip();
|
364
|
+
}
|
365
|
+
|
366
|
+
this.set_target();
|
367
|
+
},
|
368
|
+
|
369
|
+
set_next_tip : function () {
|
370
|
+
this.settings.$next_tip = $(".joyride-tip-guide").eq(this.settings.$li.index());
|
371
|
+
this.settings.$next_tip.data('closed', '');
|
372
|
+
},
|
373
|
+
|
374
|
+
set_target : function () {
|
375
|
+
var cl = this.settings.$li.attr(this.add_namespace('data-class')),
|
376
|
+
id = this.settings.$li.attr(this.add_namespace('data-id')),
|
377
|
+
$sel = function () {
|
378
|
+
if (id) {
|
379
|
+
return $(document.getElementById(id));
|
380
|
+
} else if (cl) {
|
381
|
+
return $('.' + cl).first();
|
382
|
+
} else {
|
383
|
+
return $('body');
|
384
|
+
}
|
385
|
+
};
|
386
|
+
|
387
|
+
this.settings.$target = $sel();
|
388
|
+
},
|
389
|
+
|
390
|
+
scroll_to : function () {
|
391
|
+
var window_half, tipOffset;
|
392
|
+
|
393
|
+
window_half = $(window).height() / 2;
|
394
|
+
tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight());
|
395
|
+
|
396
|
+
if (tipOffset != 0) {
|
397
|
+
$('html, body').stop().animate({
|
398
|
+
scrollTop: tipOffset
|
399
|
+
}, this.settings.scroll_speed, 'swing');
|
400
|
+
}
|
401
|
+
},
|
402
|
+
|
403
|
+
paused : function () {
|
404
|
+
return ($.inArray((this.settings.$li.index() + 1), this.settings.pause_after) === -1);
|
405
|
+
},
|
406
|
+
|
407
|
+
restart : function () {
|
408
|
+
this.hide();
|
409
|
+
this.settings.$li = undefined;
|
410
|
+
this.show('init');
|
411
|
+
},
|
412
|
+
|
413
|
+
pos_default : function (init) {
|
414
|
+
var $nub = this.settings.$next_tip.find('.joyride-nub'),
|
415
|
+
nub_width = Math.ceil($nub.outerWidth() / 2),
|
416
|
+
nub_height = Math.ceil($nub.outerHeight() / 2),
|
417
|
+
toggle = init || false;
|
418
|
+
|
419
|
+
// tip must not be "display: none" to calculate position
|
420
|
+
if (toggle) {
|
421
|
+
this.settings.$next_tip.css('visibility', 'hidden');
|
422
|
+
this.settings.$next_tip.show();
|
423
|
+
}
|
424
|
+
|
425
|
+
if (!/body/i.test(this.settings.$target.selector)) {
|
426
|
+
if (this.bottom()) {
|
427
|
+
if (this.rtl) {
|
428
|
+
this.settings.$next_tip.css({
|
429
|
+
top: (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight()),
|
430
|
+
left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
|
431
|
+
} else {
|
432
|
+
this.settings.$next_tip.css({
|
433
|
+
top: (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight()),
|
434
|
+
left: this.settings.$target.offset().left});
|
435
|
+
}
|
436
|
+
|
437
|
+
this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
|
438
|
+
|
439
|
+
} else if (this.top()) {
|
440
|
+
if (this.rtl) {
|
441
|
+
this.settings.$next_tip.css({
|
442
|
+
top: (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height),
|
443
|
+
left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
|
444
|
+
} else {
|
445
|
+
this.settings.$next_tip.css({
|
446
|
+
top: (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height),
|
447
|
+
left: this.settings.$target.offset().left});
|
448
|
+
}
|
449
|
+
|
450
|
+
this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
|
451
|
+
|
452
|
+
} else if (this.right()) {
|
453
|
+
|
454
|
+
this.settings.$next_tip.css({
|
455
|
+
top: this.settings.$target.offset().top,
|
456
|
+
left: (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width)});
|
457
|
+
|
458
|
+
this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
|
459
|
+
|
460
|
+
} else if (this.left()) {
|
461
|
+
|
462
|
+
this.settings.$next_tip.css({
|
463
|
+
top: this.settings.$target.offset().top,
|
464
|
+
left: (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width)});
|
465
|
+
|
466
|
+
this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
|
467
|
+
|
468
|
+
}
|
469
|
+
|
470
|
+
if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
|
471
|
+
|
472
|
+
$nub.removeClass('bottom')
|
473
|
+
.removeClass('top')
|
474
|
+
.removeClass('right')
|
475
|
+
.removeClass('left');
|
476
|
+
|
477
|
+
this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
|
478
|
+
|
479
|
+
this.settings.attempts++;
|
480
|
+
|
481
|
+
this.pos_default();
|
482
|
+
|
483
|
+
}
|
484
|
+
|
485
|
+
} else if (this.settings.$li.length) {
|
486
|
+
|
487
|
+
this.pos_modal($nub);
|
488
|
+
|
489
|
+
}
|
490
|
+
|
491
|
+
if (toggle) {
|
492
|
+
this.settings.$next_tip.hide();
|
493
|
+
this.settings.$next_tip.css('visibility', 'visible');
|
494
|
+
}
|
495
|
+
|
496
|
+
},
|
497
|
+
|
498
|
+
pos_phone : function (init) {
|
499
|
+
var tip_height = this.settings.$next_tip.outerHeight(),
|
500
|
+
tip_offset = this.settings.$next_tip.offset(),
|
501
|
+
target_height = this.settings.$target.outerHeight(),
|
502
|
+
$nub = $('.joyride-nub', this.settings.$next_tip),
|
503
|
+
nub_height = Math.ceil($nub.outerHeight() / 2),
|
504
|
+
toggle = init || false;
|
505
|
+
|
506
|
+
$nub.removeClass('bottom')
|
507
|
+
.removeClass('top')
|
508
|
+
.removeClass('right')
|
509
|
+
.removeClass('left');
|
510
|
+
|
511
|
+
if (toggle) {
|
512
|
+
this.settings.$next_tip.css('visibility', 'hidden');
|
513
|
+
this.settings.$next_tip.show();
|
514
|
+
}
|
515
|
+
|
516
|
+
if (!/body/i.test(this.settings.$target.selector)) {
|
517
|
+
|
518
|
+
if (this.top()) {
|
519
|
+
|
520
|
+
this.settings.$next_tip.offset({top: this.settings.$target.offset().top - tip_height - nub_height});
|
521
|
+
$nub.addClass('bottom');
|
522
|
+
|
523
|
+
} else {
|
524
|
+
|
525
|
+
this.settings.$next_tip.offset({top: this.settings.$target.offset().top + target_height + nub_height});
|
526
|
+
$nub.addClass('top');
|
527
|
+
|
528
|
+
}
|
529
|
+
|
530
|
+
} else if (this.settings.$li.length) {
|
531
|
+
this.pos_modal($nub);
|
532
|
+
}
|
533
|
+
|
534
|
+
if (toggle) {
|
535
|
+
this.settings.$next_tip.hide();
|
536
|
+
this.settings.$next_tip.css('visibility', 'visible');
|
537
|
+
}
|
538
|
+
},
|
539
|
+
|
540
|
+
pos_modal : function ($nub) {
|
541
|
+
this.center();
|
542
|
+
$nub.hide();
|
543
|
+
|
544
|
+
this.show_modal();
|
545
|
+
},
|
546
|
+
|
547
|
+
show_modal : function () {
|
548
|
+
if (!this.settings.$next_tip.data('closed')) {
|
549
|
+
var joyridemodalbg = $('.joyride-modal-bg');
|
550
|
+
if (joyridemodalbg.length < 1) {
|
551
|
+
$('body').append(this.settings.template.modal).show();
|
552
|
+
}
|
553
|
+
|
554
|
+
if (/pop/i.test(this.settings.tip_animation)) {
|
555
|
+
joyridemodalbg.show();
|
556
|
+
} else {
|
557
|
+
joyridemodalbg.fadeIn(this.settings.tip_animation_fade_speed);
|
558
|
+
}
|
559
|
+
}
|
560
|
+
},
|
561
|
+
|
562
|
+
expose : function () {
|
563
|
+
var expose,
|
564
|
+
exposeCover,
|
565
|
+
el,
|
566
|
+
origCSS,
|
567
|
+
origClasses,
|
568
|
+
randId = 'expose-' + this.random_str(6);
|
569
|
+
|
570
|
+
if (arguments.length > 0 && arguments[0] instanceof $) {
|
571
|
+
el = arguments[0];
|
572
|
+
} else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
|
573
|
+
el = this.settings.$target;
|
574
|
+
} else {
|
575
|
+
return false;
|
576
|
+
}
|
577
|
+
|
578
|
+
if(el.length < 1){
|
579
|
+
if(window.console){
|
580
|
+
console.error('element not valid', el);
|
581
|
+
}
|
582
|
+
return false;
|
583
|
+
}
|
584
|
+
|
585
|
+
expose = $(this.settings.template.expose);
|
586
|
+
this.settings.$body.append(expose);
|
587
|
+
expose.css({
|
588
|
+
top: el.offset().top,
|
589
|
+
left: el.offset().left,
|
590
|
+
width: el.outerWidth(true),
|
591
|
+
height: el.outerHeight(true)
|
592
|
+
});
|
593
|
+
|
594
|
+
exposeCover = $(this.settings.template.expose_cover);
|
595
|
+
|
596
|
+
origCSS = {
|
597
|
+
zIndex: el.css('z-index'),
|
598
|
+
position: el.css('position')
|
599
|
+
};
|
600
|
+
|
601
|
+
origClasses = el.attr('class') == null ? '' : el.attr('class');
|
602
|
+
|
603
|
+
el.css('z-index',parseInt(expose.css('z-index'))+1);
|
604
|
+
|
605
|
+
if (origCSS.position == 'static') {
|
606
|
+
el.css('position','relative');
|
607
|
+
}
|
608
|
+
|
609
|
+
el.data('expose-css',origCSS);
|
610
|
+
el.data('orig-class', origClasses);
|
611
|
+
el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
|
612
|
+
|
613
|
+
exposeCover.css({
|
614
|
+
top: el.offset().top,
|
615
|
+
left: el.offset().left,
|
616
|
+
width: el.outerWidth(true),
|
617
|
+
height: el.outerHeight(true)
|
618
|
+
});
|
619
|
+
|
620
|
+
if (this.settings.modal) this.show_modal();
|
621
|
+
|
622
|
+
this.settings.$body.append(exposeCover);
|
623
|
+
expose.addClass(randId);
|
624
|
+
exposeCover.addClass(randId);
|
625
|
+
el.data('expose', randId);
|
626
|
+
this.settings.post_expose_callback(this.settings.$li.index(), this.settings.$next_tip, el);
|
627
|
+
this.add_exposed(el);
|
628
|
+
},
|
629
|
+
|
630
|
+
un_expose : function () {
|
631
|
+
var exposeId,
|
632
|
+
el,
|
633
|
+
expose ,
|
634
|
+
origCSS,
|
635
|
+
origClasses,
|
636
|
+
clearAll = false;
|
637
|
+
|
638
|
+
if (arguments.length > 0 && arguments[0] instanceof $) {
|
639
|
+
el = arguments[0];
|
640
|
+
} else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
|
641
|
+
el = this.settings.$target;
|
642
|
+
} else {
|
643
|
+
return false;
|
644
|
+
}
|
645
|
+
|
646
|
+
if(el.length < 1){
|
647
|
+
if (window.console) {
|
648
|
+
console.error('element not valid', el);
|
649
|
+
}
|
650
|
+
return false;
|
651
|
+
}
|
652
|
+
|
653
|
+
exposeId = el.data('expose');
|
654
|
+
expose = $('.' + exposeId);
|
655
|
+
|
656
|
+
if (arguments.length > 1) {
|
657
|
+
clearAll = arguments[1];
|
658
|
+
}
|
659
|
+
|
660
|
+
if (clearAll === true) {
|
661
|
+
$('.joyride-expose-wrapper,.joyride-expose-cover').remove();
|
662
|
+
} else {
|
663
|
+
expose.remove();
|
664
|
+
}
|
665
|
+
|
666
|
+
origCSS = el.data('expose-css');
|
667
|
+
|
668
|
+
if (origCSS.zIndex == 'auto') {
|
669
|
+
el.css('z-index', '');
|
670
|
+
} else {
|
671
|
+
el.css('z-index', origCSS.zIndex);
|
672
|
+
}
|
673
|
+
|
674
|
+
if (origCSS.position != el.css('position')) {
|
675
|
+
if(origCSS.position == 'static') {// this is default, no need to set it.
|
676
|
+
el.css('position', '');
|
677
|
+
} else {
|
678
|
+
el.css('position', origCSS.position);
|
679
|
+
}
|
680
|
+
}
|
681
|
+
|
682
|
+
origClasses = el.data('orig-class');
|
683
|
+
el.attr('class', origClasses);
|
684
|
+
el.removeData('orig-classes');
|
685
|
+
|
686
|
+
el.removeData('expose');
|
687
|
+
el.removeData('expose-z-index');
|
688
|
+
this.remove_exposed(el);
|
689
|
+
},
|
690
|
+
|
691
|
+
add_exposed: function(el){
|
692
|
+
this.settings.exposed = this.settings.exposed || [];
|
693
|
+
if (el instanceof $ || typeof el === 'object') {
|
694
|
+
this.settings.exposed.push(el[0]);
|
695
|
+
} else if (typeof el == 'string') {
|
696
|
+
this.settings.exposed.push(el);
|
697
|
+
}
|
698
|
+
},
|
699
|
+
|
700
|
+
remove_exposed: function(el){
|
701
|
+
var search, i;
|
702
|
+
if (el instanceof $) {
|
703
|
+
search = el[0]
|
704
|
+
} else if (typeof el == 'string'){
|
705
|
+
search = el;
|
706
|
+
}
|
707
|
+
|
708
|
+
this.settings.exposed = this.settings.exposed || [];
|
709
|
+
i = this.settings.exposed.length;
|
710
|
+
|
711
|
+
while (i--) {
|
712
|
+
if (this.settings.exposed[i] == search) {
|
713
|
+
this.settings.exposed.splice(i, 1);
|
714
|
+
return;
|
715
|
+
}
|
716
|
+
}
|
717
|
+
},
|
718
|
+
|
719
|
+
center : function () {
|
720
|
+
var $w = $(window);
|
721
|
+
|
722
|
+
this.settings.$next_tip.css({
|
723
|
+
top : ((($w.height() - this.settings.$next_tip.outerHeight()) / 2) + $w.scrollTop()),
|
724
|
+
left : ((($w.width() - this.settings.$next_tip.outerWidth()) / 2) + $w.scrollLeft())
|
725
|
+
});
|
726
|
+
|
727
|
+
return true;
|
728
|
+
},
|
729
|
+
|
730
|
+
bottom : function () {
|
731
|
+
return /bottom/i.test(this.settings.tip_settings.tip_location);
|
732
|
+
},
|
733
|
+
|
734
|
+
top : function () {
|
735
|
+
return /top/i.test(this.settings.tip_settings.tip_location);
|
736
|
+
},
|
737
|
+
|
738
|
+
right : function () {
|
739
|
+
return /right/i.test(this.settings.tip_settings.tip_location);
|
740
|
+
},
|
741
|
+
|
742
|
+
left : function () {
|
743
|
+
return /left/i.test(this.settings.tip_settings.tip_location);
|
744
|
+
},
|
745
|
+
|
746
|
+
corners : function (el) {
|
747
|
+
var w = $(window),
|
748
|
+
window_half = w.height() / 2,
|
749
|
+
//using this to calculate since scroll may not have finished yet.
|
750
|
+
tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()),
|
751
|
+
right = w.width() + w.scrollLeft(),
|
752
|
+
offsetBottom = w.height() + tipOffset,
|
753
|
+
bottom = w.height() + w.scrollTop(),
|
754
|
+
top = w.scrollTop();
|
755
|
+
|
756
|
+
if (tipOffset < top) {
|
757
|
+
if (tipOffset < 0) {
|
758
|
+
top = 0;
|
759
|
+
} else {
|
760
|
+
top = tipOffset;
|
761
|
+
}
|
762
|
+
}
|
763
|
+
|
764
|
+
if (offsetBottom > bottom) {
|
765
|
+
bottom = offsetBottom;
|
766
|
+
}
|
767
|
+
|
768
|
+
return [
|
769
|
+
el.offset().top < top,
|
770
|
+
right < el.offset().left + el.outerWidth(),
|
771
|
+
bottom < el.offset().top + el.outerHeight(),
|
772
|
+
w.scrollLeft() > el.offset().left
|
773
|
+
];
|
774
|
+
},
|
775
|
+
|
776
|
+
visible : function (hidden_corners) {
|
777
|
+
var i = hidden_corners.length;
|
778
|
+
|
779
|
+
while (i--) {
|
780
|
+
if (hidden_corners[i]) return false;
|
781
|
+
}
|
782
|
+
|
783
|
+
return true;
|
784
|
+
},
|
785
|
+
|
786
|
+
nub_position : function (nub, pos, def) {
|
787
|
+
if (pos === 'auto') {
|
788
|
+
nub.addClass(def);
|
789
|
+
} else {
|
790
|
+
nub.addClass(pos);
|
791
|
+
}
|
792
|
+
},
|
793
|
+
|
794
|
+
startTimer : function () {
|
795
|
+
if (this.settings.$li.length) {
|
796
|
+
this.settings.automate = setTimeout(function () {
|
797
|
+
this.hide();
|
798
|
+
this.show();
|
799
|
+
this.startTimer();
|
800
|
+
}.bind(this), this.settings.timer);
|
801
|
+
} else {
|
802
|
+
clearTimeout(this.settings.automate);
|
803
|
+
}
|
804
|
+
},
|
805
|
+
|
806
|
+
end : function (abort) {
|
807
|
+
if (this.settings.cookie_monster) {
|
808
|
+
$.cookie(this.settings.cookie_name, 'ridden', { expires: this.settings.cookie_expires, domain: this.settings.cookie_domain });
|
809
|
+
}
|
810
|
+
|
811
|
+
if (this.settings.timer > 0) {
|
812
|
+
clearTimeout(this.settings.automate);
|
813
|
+
}
|
814
|
+
|
815
|
+
if (this.settings.modal && this.settings.expose) {
|
816
|
+
this.un_expose();
|
817
|
+
}
|
818
|
+
|
819
|
+
this.settings.$next_tip.data('closed', true);
|
820
|
+
|
821
|
+
$('.joyride-modal-bg').hide();
|
822
|
+
this.settings.$current_tip.hide();
|
823
|
+
|
824
|
+
if (typeof abort === 'undefined' || abort === false) {
|
825
|
+
this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
|
826
|
+
this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
|
827
|
+
}
|
828
|
+
|
829
|
+
$('.joyride-tip-guide').remove();
|
830
|
+
},
|
831
|
+
|
832
|
+
off : function () {
|
833
|
+
$(this.scope).off('.joyride');
|
834
|
+
$(window).off('.joyride');
|
835
|
+
$('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
|
836
|
+
$('.joyride-tip-guide, .joyride-modal-bg').remove();
|
837
|
+
clearTimeout(this.settings.automate);
|
838
|
+
this.settings = {};
|
839
|
+
},
|
840
|
+
|
841
|
+
reflow : function () {}
|
842
|
+
};
|
843
|
+
}(jQuery, window, window.document));
|