foundation-rails 5.5.3.2 → 6.6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -2
- data/.ruby-version +1 -1
- data/.travis.yml +17 -4
- data/Appraisals +19 -0
- data/Gemfile +5 -2
- data/Gemfile.lock +210 -0
- data/LICENSE.txt +1 -1
- data/README.md +64 -28
- data/Rakefile +30 -0
- data/app/views/foundation/rails/styleguide/show.html.erb +10 -13
- data/bower.json +3 -2
- data/foundation-rails.gemspec +12 -7
- data/gemfiles/rails_4.1.gemfile +10 -0
- data/gemfiles/rails_4.1.gemfile.lock +181 -0
- data/gemfiles/rails_4.2.gemfile +10 -0
- data/gemfiles/rails_4.2.gemfile.lock +181 -0
- data/gemfiles/rails_5.0.gemfile +10 -0
- data/gemfiles/rails_5.0.gemfile.lock +196 -0
- data/gemfiles/rails_5.1.gemfile +10 -0
- data/gemfiles/rails_5.1.gemfile.lock +196 -0
- data/gemfiles/rails_5.2.gemfile +10 -0
- data/gemfiles/rails_5.2.gemfile.lock +196 -0
- data/lib/foundation/rails/engine.rb +2 -3
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/foundation-rails.rb +1 -0
- data/lib/generators/foundation/install_generator.rb +39 -27
- data/lib/generators/foundation/templates/_settings.scss +895 -0
- data/lib/generators/foundation/templates/application.html.erb +1 -2
- data/lib/generators/foundation/templates/application.html.haml +2 -4
- data/lib/generators/foundation/templates/application.html.slim +1 -3
- data/lib/generators/foundation/templates/browserslist +4 -0
- data/lib/generators/foundation/templates/foundation_and_overrides.scss +56 -0
- data/spec/features/generator_spec.rb +1 -1
- data/spec/support/helpers.rb +8 -2
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
- data/vendor/assets/js/foundation.cjs.js +12529 -0
- data/vendor/assets/js/foundation.cjs.js.map +1 -0
- data/vendor/assets/js/foundation.es6.js +11006 -0
- data/vendor/assets/js/foundation.es6.js.map +1 -0
- data/vendor/assets/js/foundation.esm.js +12490 -0
- data/vendor/assets/js/foundation.esm.js.map +1 -0
- data/vendor/assets/js/foundation.js +13897 -0
- data/vendor/assets/js/foundation.js.map +1 -0
- data/vendor/assets/js/foundation.min.js +2 -0
- data/vendor/assets/js/foundation.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.abide.js +1142 -0
- data/vendor/assets/js/plugins/foundation.abide.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.abide.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordion.js +661 -0
- data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordion.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.js +616 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.core.js +1180 -0
- data/vendor/assets/js/plugins/foundation.core.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.core.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.drilldown.js +968 -0
- data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.drilldown.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdown.js +1328 -0
- data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdown.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js +799 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.equalizer.js +614 -0
- data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.equalizer.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.interchange.js +796 -0
- data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.interchange.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.magellan.js +850 -0
- data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.magellan.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.js +1318 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.orbit.js +886 -0
- data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.orbit.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +585 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js +413 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js +394 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.reveal.js +1275 -0
- data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.reveal.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.slider.js +1346 -0
- data/vendor/assets/js/plugins/foundation.slider.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.slider.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.js +359 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.sticky.js +1105 -0
- data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.sticky.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tabs.js +792 -0
- data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tabs.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.toggler.js +704 -0
- data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.toggler.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tooltip.js +1333 -0
- data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tooltip.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.box.js +354 -0
- data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.box.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js +218 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.js +341 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +509 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.motion.js +274 -0
- data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.motion.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.nest.js +240 -0
- data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.nest.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.timer.js +226 -0
- data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.timer.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.touch.js +365 -0
- data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.touch.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.js +470 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -0
- data/vendor/assets/scss/_global.scss +244 -0
- data/vendor/assets/scss/components/_accordion-menu.scss +174 -0
- data/vendor/assets/scss/components/_accordion.scss +164 -0
- data/vendor/assets/scss/components/_badge.scss +63 -0
- data/vendor/assets/scss/components/_breadcrumbs.scss +119 -0
- data/vendor/assets/scss/components/_button-group.scss +304 -0
- data/vendor/assets/scss/components/_button.scss +428 -0
- data/vendor/assets/scss/components/_callout.scss +108 -0
- data/vendor/assets/scss/components/_card.scss +129 -0
- data/vendor/assets/scss/components/_close-button.scss +127 -0
- data/vendor/assets/scss/components/_drilldown.scss +140 -0
- data/vendor/assets/scss/components/_dropdown-menu.scss +279 -0
- data/vendor/assets/scss/components/_dropdown.scss +82 -0
- data/vendor/assets/scss/components/_flex-video.scss +1 -0
- data/vendor/assets/scss/components/_flex.scss +119 -0
- data/vendor/assets/scss/components/_float.scss +27 -0
- data/vendor/assets/scss/components/_label.scss +64 -0
- data/vendor/assets/scss/components/_media-object.scss +114 -0
- data/vendor/assets/scss/components/_menu-icon.scss +9 -0
- data/vendor/assets/scss/components/_menu.scss +495 -0
- data/vendor/assets/scss/components/_off-canvas.scss +511 -0
- data/vendor/assets/scss/components/_orbit.scss +197 -0
- data/vendor/assets/scss/components/_pagination.scss +201 -0
- data/vendor/assets/scss/components/_progress-bar.scss +63 -0
- data/vendor/assets/scss/components/_responsive-embed.scss +57 -0
- data/vendor/assets/scss/components/_reveal.scss +185 -0
- data/vendor/assets/scss/components/_slider.scss +137 -0
- data/vendor/assets/scss/components/_sticky.scss +39 -0
- data/vendor/assets/scss/components/_switch.scss +261 -0
- data/vendor/assets/scss/components/_table.scss +328 -0
- data/vendor/assets/scss/components/_tabs.scss +193 -0
- data/vendor/assets/scss/components/_thumbnail.scss +67 -0
- data/vendor/assets/scss/components/_title-bar.scss +84 -0
- data/vendor/assets/scss/components/_tooltip.scss +160 -0
- data/vendor/assets/scss/components/_top-bar.scss +175 -0
- data/vendor/assets/scss/components/_visibility.scss +135 -0
- data/vendor/assets/scss/forms/_checkbox.scss +41 -0
- data/vendor/assets/scss/forms/_error.scss +89 -0
- data/vendor/assets/scss/forms/_fieldset.scss +53 -0
- data/vendor/assets/scss/forms/_forms.scss +34 -0
- data/vendor/assets/scss/forms/_help-text.scss +30 -0
- data/vendor/assets/scss/forms/_input-group.scss +142 -0
- data/vendor/assets/scss/forms/_label.scss +50 -0
- data/vendor/assets/scss/forms/_meter.scss +116 -0
- data/vendor/assets/scss/forms/_progress.scss +94 -0
- data/vendor/assets/scss/forms/_range.scss +149 -0
- data/vendor/assets/scss/forms/_select.scss +90 -0
- data/vendor/assets/scss/forms/_text.scss +179 -0
- data/vendor/assets/scss/foundation.scss +155 -0
- data/vendor/assets/scss/grid/_classes.scss +189 -0
- data/vendor/assets/scss/grid/_column.scss +78 -0
- data/vendor/assets/scss/grid/_flex-grid.scss +260 -0
- data/vendor/assets/scss/grid/_grid.scss +48 -0
- data/vendor/assets/scss/grid/_gutter.scss +67 -0
- data/vendor/assets/scss/grid/_layout.scss +76 -0
- data/vendor/assets/scss/grid/_position.scss +100 -0
- data/vendor/assets/scss/grid/_row.scss +99 -0
- data/vendor/assets/scss/grid/_size.scss +24 -0
- data/vendor/assets/scss/motion-ui/_classes.scss +109 -0
- data/vendor/assets/scss/motion-ui/_settings.scss +62 -0
- data/vendor/assets/scss/motion-ui/effects/_fade.scss +29 -0
- data/vendor/assets/scss/motion-ui/effects/_hinge.scss +66 -0
- data/vendor/assets/scss/motion-ui/effects/_shake.scss +15 -0
- data/vendor/assets/scss/motion-ui/effects/_slide.scss +42 -0
- data/vendor/assets/scss/motion-ui/effects/_spin.scss +29 -0
- data/vendor/assets/scss/motion-ui/effects/_wiggle.scss +13 -0
- data/vendor/assets/scss/motion-ui/effects/_zoom.scss +15 -0
- data/vendor/assets/scss/motion-ui/motion-ui.scss +31 -0
- data/vendor/assets/scss/motion-ui/transitions/_fade.scss +30 -0
- data/vendor/assets/scss/motion-ui/transitions/_hinge.scss +44 -0
- data/vendor/assets/scss/motion-ui/transitions/_slide.scss +43 -0
- data/vendor/assets/scss/motion-ui/transitions/_spin.scss +40 -0
- data/vendor/assets/scss/motion-ui/transitions/_zoom.scss +41 -0
- data/vendor/assets/scss/motion-ui/util/_animation.scss +7 -0
- data/vendor/assets/scss/motion-ui/util/_args.scss +15 -0
- data/vendor/assets/scss/motion-ui/util/_function.scss +94 -0
- data/vendor/assets/scss/motion-ui/util/_keyframe.scss +136 -0
- data/vendor/assets/scss/motion-ui/util/_selector.scss +23 -0
- data/vendor/assets/scss/motion-ui/util/_series.scss +57 -0
- data/vendor/assets/scss/motion-ui/util/_string.scss +36 -0
- data/vendor/assets/scss/motion-ui/util/_transition.scss +45 -0
- data/vendor/assets/scss/motion-ui/util/_unit.scss +7 -0
- data/vendor/assets/scss/prototype/_arrow.scss +36 -0
- data/vendor/assets/scss/prototype/_border-box.scss +35 -0
- data/vendor/assets/scss/prototype/_border-none.scss +35 -0
- data/vendor/assets/scss/prototype/_bordered.scss +54 -0
- data/vendor/assets/scss/prototype/_box.scss +23 -0
- data/vendor/assets/scss/prototype/_display.scss +50 -0
- data/vendor/assets/scss/prototype/_font-styling.scss +95 -0
- data/vendor/assets/scss/prototype/_list-style-type.scss +95 -0
- data/vendor/assets/scss/prototype/_overflow.scss +72 -0
- data/vendor/assets/scss/prototype/_position.scss +114 -0
- data/vendor/assets/scss/prototype/_prototype.scss +87 -0
- data/vendor/assets/scss/prototype/_relation.scss +157 -0
- data/vendor/assets/scss/prototype/_rotate.scss +31 -0
- data/vendor/assets/scss/prototype/_rounded.scss +61 -0
- data/vendor/assets/scss/prototype/_separator.scss +96 -0
- data/vendor/assets/scss/prototype/_shadow.scss +43 -0
- data/vendor/assets/scss/prototype/_sizing.scss +73 -0
- data/vendor/assets/scss/prototype/_spacing.scss +179 -0
- data/vendor/assets/scss/prototype/_text-decoration.scss +48 -0
- data/vendor/assets/scss/prototype/_text-transformation.scss +48 -0
- data/vendor/assets/scss/prototype/_text-utilities.scss +88 -0
- data/vendor/assets/scss/settings/_settings.scss +895 -0
- data/vendor/assets/scss/typography/_alignment.scss +22 -0
- data/vendor/assets/scss/typography/_base.scss +474 -0
- data/vendor/assets/scss/typography/_helpers.scss +180 -0
- data/vendor/assets/scss/typography/_print.scss +96 -0
- data/vendor/assets/scss/typography/_typography.scss +26 -0
- data/vendor/assets/scss/util/_breakpoint.scss +435 -0
- data/vendor/assets/scss/util/_color.scss +139 -0
- data/vendor/assets/scss/util/_direction.scss +31 -0
- data/vendor/assets/scss/util/_flex.scss +90 -0
- data/vendor/assets/scss/util/_math.scss +147 -0
- data/vendor/assets/scss/util/_mixins.scss +373 -0
- data/vendor/assets/scss/util/_selector.scss +41 -0
- data/vendor/assets/scss/util/_typography.scss +26 -0
- data/vendor/assets/scss/util/_unit.scss +152 -0
- data/vendor/assets/scss/util/_util.scss +14 -0
- data/vendor/assets/scss/util/_value.scss +200 -0
- data/vendor/assets/scss/vendor/normalize.scss +281 -0
- data/vendor/assets/scss/xy-grid/_cell.scss +272 -0
- data/vendor/assets/scss/xy-grid/_classes.scss +493 -0
- data/vendor/assets/scss/xy-grid/_collapse.scss +75 -0
- data/vendor/assets/scss/xy-grid/_frame.scss +86 -0
- data/vendor/assets/scss/xy-grid/_grid.scss +37 -0
- data/vendor/assets/scss/xy-grid/_gutters.scss +45 -0
- data/vendor/assets/scss/xy-grid/_layout.scss +36 -0
- data/vendor/assets/scss/xy-grid/_position.scss +55 -0
- data/vendor/assets/scss/xy-grid/_xy-grid.scss +51 -0
- metadata +342 -83
- data/update-gem.sh +0 -20
- data/vendor/assets/javascripts/foundation/foundation.abide.js +0 -426
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +0 -125
- data/vendor/assets/javascripts/foundation/foundation.alert.js +0 -43
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +0 -586
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +0 -468
- data/vendor/assets/javascripts/foundation/foundation.equalizer.js +0 -104
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +0 -360
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +0 -935
- data/vendor/assets/javascripts/foundation/foundation.js +0 -732
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +0 -214
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +0 -225
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +0 -476
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +0 -522
- data/vendor/assets/javascripts/foundation/foundation.slider.js +0 -296
- data/vendor/assets/javascripts/foundation/foundation.tab.js +0 -247
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +0 -348
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +0 -458
- data/vendor/assets/javascripts/foundation.js +0 -17
- data/vendor/assets/javascripts/vendor/modernizr.js +0 -1406
- data/vendor/assets/stylesheets/foundation/_functions.scss +0 -156
- data/vendor/assets/stylesheets/foundation/_settings.scss +0 -1489
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +0 -161
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +0 -128
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +0 -133
- data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +0 -132
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +0 -208
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +0 -261
- data/vendor/assets/stylesheets/foundation/components/_clearing.scss +0 -260
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +0 -130
- data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +0 -269
- data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +0 -51
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +0 -607
- data/vendor/assets/stylesheets/foundation/components/_global.scss +0 -566
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +0 -292
- data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +0 -460
- data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +0 -58
- data/vendor/assets/stylesheets/foundation/components/_joyride.scss +0 -220
- data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +0 -60
- data/vendor/assets/stylesheets/foundation/components/_labels.scss +0 -106
- data/vendor/assets/stylesheets/foundation/components/_magellan.scss +0 -34
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +0 -606
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +0 -388
- data/vendor/assets/stylesheets/foundation/components/_pagination.scss +0 -163
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +0 -107
- data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +0 -150
- data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +0 -85
- data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +0 -177
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +0 -212
- data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +0 -120
- data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +0 -203
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +0 -125
- data/vendor/assets/stylesheets/foundation/components/_switches.scss +0 -241
- data/vendor/assets/stylesheets/foundation/components/_tables.scss +0 -135
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +0 -142
- data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +0 -66
- data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +0 -142
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +0 -745
- data/vendor/assets/stylesheets/foundation/components/_type.scss +0 -525
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +0 -425
- data/vendor/assets/stylesheets/foundation.scss +0 -42
- data/vendor/assets/stylesheets/normalize.scss +0 -424
@@ -1,586 +0,0 @@
|
|
1
|
-
;(function ($, window, document, undefined) {
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
Foundation.libs.clearing = {
|
5
|
-
name : 'clearing',
|
6
|
-
|
7
|
-
version : '5.5.3',
|
8
|
-
|
9
|
-
settings : {
|
10
|
-
templates : {
|
11
|
-
viewing : '<a href="#" class="clearing-close">×</a>' +
|
12
|
-
'<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
|
13
|
-
'<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>' +
|
14
|
-
'<a href="#" class="clearing-main-next"><span></span></a></div>' +
|
15
|
-
'<img class="clearing-preload-next" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
|
16
|
-
'<img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'
|
17
|
-
},
|
18
|
-
|
19
|
-
// comma delimited list of selectors that, on click, will close clearing,
|
20
|
-
// add 'div.clearing-blackout, div.visible-img' to close on background click
|
21
|
-
close_selectors : '.clearing-close, div.clearing-blackout',
|
22
|
-
|
23
|
-
// Default to the entire li element.
|
24
|
-
open_selectors : '',
|
25
|
-
|
26
|
-
// Image will be skipped in carousel.
|
27
|
-
skip_selector : '',
|
28
|
-
|
29
|
-
touch_label : '',
|
30
|
-
|
31
|
-
// event initializer and locks
|
32
|
-
init : false,
|
33
|
-
locked : false
|
34
|
-
},
|
35
|
-
|
36
|
-
init : function (scope, method, options) {
|
37
|
-
var self = this;
|
38
|
-
Foundation.inherit(this, 'throttle image_loaded');
|
39
|
-
|
40
|
-
this.bindings(method, options);
|
41
|
-
|
42
|
-
if (self.S(this.scope).is('[' + this.attr_name() + ']')) {
|
43
|
-
this.assemble(self.S('li', this.scope));
|
44
|
-
} else {
|
45
|
-
self.S('[' + this.attr_name() + ']', this.scope).each(function () {
|
46
|
-
self.assemble(self.S('li', this));
|
47
|
-
});
|
48
|
-
}
|
49
|
-
},
|
50
|
-
|
51
|
-
events : function (scope) {
|
52
|
-
var self = this,
|
53
|
-
S = self.S,
|
54
|
-
$scroll_container = $('.scroll-container');
|
55
|
-
|
56
|
-
if ($scroll_container.length > 0) {
|
57
|
-
this.scope = $scroll_container;
|
58
|
-
}
|
59
|
-
|
60
|
-
S(this.scope)
|
61
|
-
.off('.clearing')
|
62
|
-
.on('click.fndtn.clearing', 'ul[' + this.attr_name() + '] li ' + this.settings.open_selectors,
|
63
|
-
function (e, current, target) {
|
64
|
-
var current = current || S(this),
|
65
|
-
target = target || current,
|
66
|
-
next = current.next('li'),
|
67
|
-
settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init'),
|
68
|
-
image = S(e.target);
|
69
|
-
|
70
|
-
e.preventDefault();
|
71
|
-
|
72
|
-
if (!settings) {
|
73
|
-
self.init();
|
74
|
-
settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
|
75
|
-
}
|
76
|
-
|
77
|
-
// if clearing is open and the current image is
|
78
|
-
// clicked, go to the next image in sequence
|
79
|
-
if (target.hasClass('visible') &&
|
80
|
-
current[0] === target[0] &&
|
81
|
-
next.length > 0 && self.is_open(current)) {
|
82
|
-
target = next;
|
83
|
-
image = S('img', target);
|
84
|
-
}
|
85
|
-
|
86
|
-
// set current and target to the clicked li if not otherwise defined.
|
87
|
-
self.open(image, current, target);
|
88
|
-
self.update_paddles(target);
|
89
|
-
})
|
90
|
-
|
91
|
-
.on('click.fndtn.clearing', '.clearing-main-next',
|
92
|
-
function (e) { self.nav(e, 'next') })
|
93
|
-
.on('click.fndtn.clearing', '.clearing-main-prev',
|
94
|
-
function (e) { self.nav(e, 'prev') })
|
95
|
-
.on('click.fndtn.clearing', this.settings.close_selectors,
|
96
|
-
function (e) { Foundation.libs.clearing.close(e, this) });
|
97
|
-
|
98
|
-
$(document).on('keydown.fndtn.clearing',
|
99
|
-
function (e) { self.keydown(e) });
|
100
|
-
|
101
|
-
S(window).off('.clearing').on('resize.fndtn.clearing',
|
102
|
-
function () { self.resize() });
|
103
|
-
|
104
|
-
this.swipe_events(scope);
|
105
|
-
},
|
106
|
-
|
107
|
-
swipe_events : function (scope) {
|
108
|
-
var self = this,
|
109
|
-
S = self.S;
|
110
|
-
|
111
|
-
S(this.scope)
|
112
|
-
.on('touchstart.fndtn.clearing', '.visible-img', function (e) {
|
113
|
-
if (!e.touches) { e = e.originalEvent; }
|
114
|
-
var data = {
|
115
|
-
start_page_x : e.touches[0].pageX,
|
116
|
-
start_page_y : e.touches[0].pageY,
|
117
|
-
start_time : (new Date()).getTime(),
|
118
|
-
delta_x : 0,
|
119
|
-
is_scrolling : undefined
|
120
|
-
};
|
121
|
-
|
122
|
-
S(this).data('swipe-transition', data);
|
123
|
-
e.stopPropagation();
|
124
|
-
})
|
125
|
-
.on('touchmove.fndtn.clearing', '.visible-img', function (e) {
|
126
|
-
if (!e.touches) {
|
127
|
-
e = e.originalEvent;
|
128
|
-
}
|
129
|
-
// Ignore pinch/zoom events
|
130
|
-
if (e.touches.length > 1 || e.scale && e.scale !== 1) {
|
131
|
-
return;
|
132
|
-
}
|
133
|
-
|
134
|
-
var data = S(this).data('swipe-transition');
|
135
|
-
|
136
|
-
if (typeof data === 'undefined') {
|
137
|
-
data = {};
|
138
|
-
}
|
139
|
-
|
140
|
-
data.delta_x = e.touches[0].pageX - data.start_page_x;
|
141
|
-
|
142
|
-
if (Foundation.rtl) {
|
143
|
-
data.delta_x = -data.delta_x;
|
144
|
-
}
|
145
|
-
|
146
|
-
if (typeof data.is_scrolling === 'undefined') {
|
147
|
-
data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
|
148
|
-
}
|
149
|
-
|
150
|
-
if (!data.is_scrolling && !data.active) {
|
151
|
-
e.preventDefault();
|
152
|
-
var direction = (data.delta_x < 0) ? 'next' : 'prev';
|
153
|
-
data.active = true;
|
154
|
-
self.nav(e, direction);
|
155
|
-
}
|
156
|
-
})
|
157
|
-
.on('touchend.fndtn.clearing', '.visible-img', function (e) {
|
158
|
-
S(this).data('swipe-transition', {});
|
159
|
-
e.stopPropagation();
|
160
|
-
});
|
161
|
-
},
|
162
|
-
|
163
|
-
assemble : function ($li) {
|
164
|
-
var $el = $li.parent();
|
165
|
-
|
166
|
-
if ($el.parent().hasClass('carousel')) {
|
167
|
-
return;
|
168
|
-
}
|
169
|
-
|
170
|
-
$el.after('<div id="foundationClearingHolder"></div>');
|
171
|
-
|
172
|
-
var grid = $el.detach(),
|
173
|
-
grid_outerHTML = '';
|
174
|
-
|
175
|
-
if (grid[0] == null) {
|
176
|
-
return;
|
177
|
-
} else {
|
178
|
-
grid_outerHTML = grid[0].outerHTML;
|
179
|
-
}
|
180
|
-
|
181
|
-
var holder = this.S('#foundationClearingHolder'),
|
182
|
-
settings = $el.data(this.attr_name(true) + '-init'),
|
183
|
-
data = {
|
184
|
-
grid : '<div class="carousel">' + grid_outerHTML + '</div>',
|
185
|
-
viewing : settings.templates.viewing
|
186
|
-
},
|
187
|
-
wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
|
188
|
-
data.grid + '</div></div>',
|
189
|
-
touch_label = this.settings.touch_label;
|
190
|
-
|
191
|
-
if (Modernizr.touch) {
|
192
|
-
wrapper = $(wrapper).find('.clearing-touch-label').html(touch_label).end();
|
193
|
-
}
|
194
|
-
|
195
|
-
holder.after(wrapper).remove();
|
196
|
-
},
|
197
|
-
|
198
|
-
open : function ($image, current, target) {
|
199
|
-
var self = this,
|
200
|
-
body = $(document.body),
|
201
|
-
root = target.closest('.clearing-assembled'),
|
202
|
-
container = self.S('div', root).first(),
|
203
|
-
visible_image = self.S('.visible-img', container),
|
204
|
-
image = self.S('img', visible_image).not($image),
|
205
|
-
label = self.S('.clearing-touch-label', container),
|
206
|
-
error = false,
|
207
|
-
loaded = {};
|
208
|
-
|
209
|
-
// Event to disable scrolling on touch devices when Clearing is activated
|
210
|
-
$('body').on('touchmove', function (e) {
|
211
|
-
e.preventDefault();
|
212
|
-
});
|
213
|
-
|
214
|
-
image.error(function () {
|
215
|
-
error = true;
|
216
|
-
});
|
217
|
-
|
218
|
-
function startLoad() {
|
219
|
-
setTimeout(function () {
|
220
|
-
this.image_loaded(image, function () {
|
221
|
-
if (image.outerWidth() === 1 && !error) {
|
222
|
-
startLoad.call(this);
|
223
|
-
} else {
|
224
|
-
cb.call(this, image);
|
225
|
-
}
|
226
|
-
}.bind(this));
|
227
|
-
}.bind(this), 100);
|
228
|
-
}
|
229
|
-
|
230
|
-
function cb (image) {
|
231
|
-
var $image = $(image);
|
232
|
-
$image.css('visibility', 'visible');
|
233
|
-
$image.trigger('imageVisible');
|
234
|
-
// toggle the gallery
|
235
|
-
body.css('overflow', 'hidden');
|
236
|
-
root.addClass('clearing-blackout');
|
237
|
-
container.addClass('clearing-container');
|
238
|
-
visible_image.show();
|
239
|
-
this.fix_height(target)
|
240
|
-
.caption(self.S('.clearing-caption', visible_image), self.S('img', target))
|
241
|
-
.center_and_label(image, label)
|
242
|
-
.shift(current, target, function () {
|
243
|
-
target.closest('li').siblings().removeClass('visible');
|
244
|
-
target.closest('li').addClass('visible');
|
245
|
-
});
|
246
|
-
visible_image.trigger('opened.fndtn.clearing')
|
247
|
-
}
|
248
|
-
|
249
|
-
if (!this.locked()) {
|
250
|
-
visible_image.trigger('open.fndtn.clearing');
|
251
|
-
// set the image to the selected thumbnail
|
252
|
-
loaded = this.load($image);
|
253
|
-
if (loaded.interchange) {
|
254
|
-
image
|
255
|
-
.attr('data-interchange', loaded.interchange)
|
256
|
-
.foundation('interchange', 'reflow');
|
257
|
-
} else {
|
258
|
-
image
|
259
|
-
.attr('src', loaded.src)
|
260
|
-
.attr('data-interchange', '');
|
261
|
-
}
|
262
|
-
image.css('visibility', 'hidden');
|
263
|
-
|
264
|
-
startLoad.call(this);
|
265
|
-
}
|
266
|
-
},
|
267
|
-
|
268
|
-
close : function (e, el) {
|
269
|
-
e.preventDefault();
|
270
|
-
|
271
|
-
var root = (function (target) {
|
272
|
-
if (/blackout/.test(target.selector)) {
|
273
|
-
return target;
|
274
|
-
} else {
|
275
|
-
return target.closest('.clearing-blackout');
|
276
|
-
}
|
277
|
-
}($(el))),
|
278
|
-
body = $(document.body), container, visible_image;
|
279
|
-
|
280
|
-
if (el === e.target && root) {
|
281
|
-
body.css('overflow', '');
|
282
|
-
container = $('div', root).first();
|
283
|
-
visible_image = $('.visible-img', container);
|
284
|
-
visible_image.trigger('close.fndtn.clearing');
|
285
|
-
this.settings.prev_index = 0;
|
286
|
-
$('ul[' + this.attr_name() + ']', root)
|
287
|
-
.attr('style', '').closest('.clearing-blackout')
|
288
|
-
.removeClass('clearing-blackout');
|
289
|
-
container.removeClass('clearing-container');
|
290
|
-
visible_image.hide();
|
291
|
-
visible_image.trigger('closed.fndtn.clearing');
|
292
|
-
}
|
293
|
-
|
294
|
-
// Event to re-enable scrolling on touch devices
|
295
|
-
$('body').off('touchmove');
|
296
|
-
|
297
|
-
return false;
|
298
|
-
},
|
299
|
-
|
300
|
-
is_open : function (current) {
|
301
|
-
return current.parent().prop('style').length > 0;
|
302
|
-
},
|
303
|
-
|
304
|
-
keydown : function (e) {
|
305
|
-
var clearing = $('.clearing-blackout ul[' + this.attr_name() + ']'),
|
306
|
-
NEXT_KEY = this.rtl ? 37 : 39,
|
307
|
-
PREV_KEY = this.rtl ? 39 : 37,
|
308
|
-
ESC_KEY = 27;
|
309
|
-
|
310
|
-
if (e.which === NEXT_KEY) {
|
311
|
-
this.go(clearing, 'next');
|
312
|
-
}
|
313
|
-
if (e.which === PREV_KEY) {
|
314
|
-
this.go(clearing, 'prev');
|
315
|
-
}
|
316
|
-
if (e.which === ESC_KEY) {
|
317
|
-
this.S('a.clearing-close').trigger('click.fndtn.clearing');
|
318
|
-
}
|
319
|
-
},
|
320
|
-
|
321
|
-
nav : function (e, direction) {
|
322
|
-
var clearing = $('ul[' + this.attr_name() + ']', '.clearing-blackout');
|
323
|
-
|
324
|
-
e.preventDefault();
|
325
|
-
this.go(clearing, direction);
|
326
|
-
},
|
327
|
-
|
328
|
-
resize : function () {
|
329
|
-
var image = $('img', '.clearing-blackout .visible-img'),
|
330
|
-
label = $('.clearing-touch-label', '.clearing-blackout');
|
331
|
-
|
332
|
-
if (image.length) {
|
333
|
-
this.center_and_label(image, label);
|
334
|
-
image.trigger('resized.fndtn.clearing')
|
335
|
-
}
|
336
|
-
},
|
337
|
-
|
338
|
-
// visual adjustments
|
339
|
-
fix_height : function (target) {
|
340
|
-
var lis = target.parent().children(),
|
341
|
-
self = this;
|
342
|
-
|
343
|
-
lis.each(function () {
|
344
|
-
var li = self.S(this),
|
345
|
-
image = li.find('img');
|
346
|
-
|
347
|
-
if (li.height() > image.outerHeight()) {
|
348
|
-
li.addClass('fix-height');
|
349
|
-
}
|
350
|
-
})
|
351
|
-
.closest('ul')
|
352
|
-
.width(lis.length * 100 + '%');
|
353
|
-
|
354
|
-
return this;
|
355
|
-
},
|
356
|
-
|
357
|
-
update_paddles : function (target) {
|
358
|
-
target = target.closest('li');
|
359
|
-
var visible_image = target
|
360
|
-
.closest('.carousel')
|
361
|
-
.siblings('.visible-img');
|
362
|
-
|
363
|
-
if (target.next().length > 0) {
|
364
|
-
this.S('.clearing-main-next', visible_image).removeClass('disabled');
|
365
|
-
} else {
|
366
|
-
this.S('.clearing-main-next', visible_image).addClass('disabled');
|
367
|
-
}
|
368
|
-
|
369
|
-
if (target.prev().length > 0) {
|
370
|
-
this.S('.clearing-main-prev', visible_image).removeClass('disabled');
|
371
|
-
} else {
|
372
|
-
this.S('.clearing-main-prev', visible_image).addClass('disabled');
|
373
|
-
}
|
374
|
-
},
|
375
|
-
|
376
|
-
center_and_label : function (target, label) {
|
377
|
-
if (!this.rtl && label.length > 0) {
|
378
|
-
label.css({
|
379
|
-
marginLeft : -(label.outerWidth() / 2),
|
380
|
-
marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10
|
381
|
-
});
|
382
|
-
} else {
|
383
|
-
label.css({
|
384
|
-
marginRight : -(label.outerWidth() / 2),
|
385
|
-
marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,
|
386
|
-
left: 'auto',
|
387
|
-
right: '50%'
|
388
|
-
});
|
389
|
-
}
|
390
|
-
return this;
|
391
|
-
},
|
392
|
-
|
393
|
-
// image loading and preloading
|
394
|
-
|
395
|
-
load : function ($image) {
|
396
|
-
var href,
|
397
|
-
interchange,
|
398
|
-
closest_a;
|
399
|
-
|
400
|
-
if ($image[0].nodeName === 'A') {
|
401
|
-
href = $image.attr('href');
|
402
|
-
interchange = $image.data('clearing-interchange');
|
403
|
-
} else {
|
404
|
-
closest_a = $image.closest('a');
|
405
|
-
href = closest_a.attr('href');
|
406
|
-
interchange = closest_a.data('clearing-interchange');
|
407
|
-
}
|
408
|
-
|
409
|
-
this.preload($image);
|
410
|
-
|
411
|
-
return {
|
412
|
-
'src': href ? href : $image.attr('src'),
|
413
|
-
'interchange': href ? interchange : $image.data('clearing-interchange')
|
414
|
-
}
|
415
|
-
},
|
416
|
-
|
417
|
-
preload : function ($image) {
|
418
|
-
this
|
419
|
-
.img($image.closest('li').next(), 'next')
|
420
|
-
.img($image.closest('li').prev(), 'prev');
|
421
|
-
},
|
422
|
-
|
423
|
-
img : function (img, sibling_type) {
|
424
|
-
if (img.length) {
|
425
|
-
var preload_img = $('.clearing-preload-' + sibling_type),
|
426
|
-
new_a = this.S('a', img),
|
427
|
-
src,
|
428
|
-
interchange,
|
429
|
-
image;
|
430
|
-
|
431
|
-
if (new_a.length) {
|
432
|
-
src = new_a.attr('href');
|
433
|
-
interchange = new_a.data('clearing-interchange');
|
434
|
-
} else {
|
435
|
-
image = this.S('img', img);
|
436
|
-
src = image.attr('src');
|
437
|
-
interchange = image.data('clearing-interchange');
|
438
|
-
}
|
439
|
-
|
440
|
-
if (interchange) {
|
441
|
-
preload_img.attr('data-interchange', interchange);
|
442
|
-
} else {
|
443
|
-
preload_img.attr('src', src);
|
444
|
-
preload_img.attr('data-interchange', '');
|
445
|
-
}
|
446
|
-
}
|
447
|
-
return this;
|
448
|
-
},
|
449
|
-
|
450
|
-
// image caption
|
451
|
-
|
452
|
-
caption : function (container, $image) {
|
453
|
-
var caption = $image.attr('data-caption');
|
454
|
-
|
455
|
-
if (caption) {
|
456
|
-
var containerPlain = container.get(0);
|
457
|
-
containerPlain.innerHTML = caption;
|
458
|
-
container.show();
|
459
|
-
} else {
|
460
|
-
container
|
461
|
-
.text('')
|
462
|
-
.hide();
|
463
|
-
}
|
464
|
-
return this;
|
465
|
-
},
|
466
|
-
|
467
|
-
// directional methods
|
468
|
-
|
469
|
-
go : function ($ul, direction) {
|
470
|
-
var current = this.S('.visible', $ul),
|
471
|
-
target = current[direction]();
|
472
|
-
|
473
|
-
// Check for skip selector.
|
474
|
-
if (this.settings.skip_selector && target.find(this.settings.skip_selector).length != 0) {
|
475
|
-
target = target[direction]();
|
476
|
-
}
|
477
|
-
|
478
|
-
if (target.length) {
|
479
|
-
this.S('img', target)
|
480
|
-
.trigger('click.fndtn.clearing', [current, target])
|
481
|
-
.trigger('change.fndtn.clearing');
|
482
|
-
}
|
483
|
-
},
|
484
|
-
|
485
|
-
shift : function (current, target, callback) {
|
486
|
-
var clearing = target.parent(),
|
487
|
-
old_index = this.settings.prev_index || target.index(),
|
488
|
-
direction = this.direction(clearing, current, target),
|
489
|
-
dir = this.rtl ? 'right' : 'left',
|
490
|
-
left = parseInt(clearing.css('left'), 10),
|
491
|
-
width = target.outerWidth(),
|
492
|
-
skip_shift;
|
493
|
-
|
494
|
-
var dir_obj = {};
|
495
|
-
|
496
|
-
// we use jQuery animate instead of CSS transitions because we
|
497
|
-
// need a callback to unlock the next animation
|
498
|
-
// needs support for RTL **
|
499
|
-
if (target.index() !== old_index && !/skip/.test(direction)) {
|
500
|
-
if (/left/.test(direction)) {
|
501
|
-
this.lock();
|
502
|
-
dir_obj[dir] = left + width;
|
503
|
-
clearing.animate(dir_obj, 300, this.unlock());
|
504
|
-
} else if (/right/.test(direction)) {
|
505
|
-
this.lock();
|
506
|
-
dir_obj[dir] = left - width;
|
507
|
-
clearing.animate(dir_obj, 300, this.unlock());
|
508
|
-
}
|
509
|
-
} else if (/skip/.test(direction)) {
|
510
|
-
// the target image is not adjacent to the current image, so
|
511
|
-
// do we scroll right or not
|
512
|
-
skip_shift = target.index() - this.settings.up_count;
|
513
|
-
this.lock();
|
514
|
-
|
515
|
-
if (skip_shift > 0) {
|
516
|
-
dir_obj[dir] = -(skip_shift * width);
|
517
|
-
clearing.animate(dir_obj, 300, this.unlock());
|
518
|
-
} else {
|
519
|
-
dir_obj[dir] = 0;
|
520
|
-
clearing.animate(dir_obj, 300, this.unlock());
|
521
|
-
}
|
522
|
-
}
|
523
|
-
|
524
|
-
callback();
|
525
|
-
},
|
526
|
-
|
527
|
-
direction : function ($el, current, target) {
|
528
|
-
var lis = this.S('li', $el),
|
529
|
-
li_width = lis.outerWidth() + (lis.outerWidth() / 4),
|
530
|
-
up_count = Math.floor(this.S('.clearing-container').outerWidth() / li_width) - 1,
|
531
|
-
target_index = lis.index(target),
|
532
|
-
response;
|
533
|
-
|
534
|
-
this.settings.up_count = up_count;
|
535
|
-
|
536
|
-
if (this.adjacent(this.settings.prev_index, target_index)) {
|
537
|
-
if ((target_index > up_count) && target_index > this.settings.prev_index) {
|
538
|
-
response = 'right';
|
539
|
-
} else if ((target_index > up_count - 1) && target_index <= this.settings.prev_index) {
|
540
|
-
response = 'left';
|
541
|
-
} else {
|
542
|
-
response = false;
|
543
|
-
}
|
544
|
-
} else {
|
545
|
-
response = 'skip';
|
546
|
-
}
|
547
|
-
|
548
|
-
this.settings.prev_index = target_index;
|
549
|
-
|
550
|
-
return response;
|
551
|
-
},
|
552
|
-
|
553
|
-
adjacent : function (current_index, target_index) {
|
554
|
-
for (var i = target_index + 1; i >= target_index - 1; i--) {
|
555
|
-
if (i === current_index) {
|
556
|
-
return true;
|
557
|
-
}
|
558
|
-
}
|
559
|
-
return false;
|
560
|
-
},
|
561
|
-
|
562
|
-
// lock management
|
563
|
-
|
564
|
-
lock : function () {
|
565
|
-
this.settings.locked = true;
|
566
|
-
},
|
567
|
-
|
568
|
-
unlock : function () {
|
569
|
-
this.settings.locked = false;
|
570
|
-
},
|
571
|
-
|
572
|
-
locked : function () {
|
573
|
-
return this.settings.locked;
|
574
|
-
},
|
575
|
-
|
576
|
-
off : function () {
|
577
|
-
this.S(this.scope).off('.fndtn.clearing');
|
578
|
-
this.S(window).off('.fndtn.clearing');
|
579
|
-
},
|
580
|
-
|
581
|
-
reflow : function () {
|
582
|
-
this.init();
|
583
|
-
}
|
584
|
-
};
|
585
|
-
|
586
|
-
}(jQuery, window, window.document));
|