blazer-rails 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.bowerrc +3 -0
- data/.gitignore +9 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +85 -0
- data/Rakefile +1 -0
- data/assets/fonts/FontAwesome.otf +0 -0
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/javascripts/blazer.js +5 -0
- data/assets/stylesheets/blazer.scss.erb +12 -0
- data/blazer-rails.gemspec +26 -0
- data/bower.json +27 -0
- data/lib/blazer-rails.rb +2 -0
- data/lib/blazer-rails/engine.rb +13 -0
- data/lib/blazer-rails/version.rb +3 -0
- data/vendor/assets/components/jquery/.bower.json +25 -0
- data/vendor/assets/components/jquery/AUTHORS.txt +278 -0
- data/vendor/assets/components/jquery/LICENSE.txt +36 -0
- data/vendor/assets/components/jquery/README.md +65 -0
- data/vendor/assets/components/jquery/bower.json +14 -0
- data/vendor/assets/components/jquery/dist/jquery.js +9814 -0
- data/vendor/assets/components/jquery/dist/jquery.min.js +4 -0
- data/vendor/assets/components/jquery/dist/jquery.min.map +1 -0
- data/vendor/assets/components/jquery/external/sizzle/LICENSE.txt +36 -0
- data/vendor/assets/components/jquery/external/sizzle/dist/sizzle.js +2143 -0
- data/vendor/assets/components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/vendor/assets/components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/vendor/assets/components/jquery/src/.jshintrc +29 -0
- data/vendor/assets/components/jquery/src/ajax.js +845 -0
- data/vendor/assets/components/jquery/src/ajax/jsonp.js +100 -0
- data/vendor/assets/components/jquery/src/ajax/load.js +83 -0
- data/vendor/assets/components/jquery/src/ajax/parseJSON.js +13 -0
- data/vendor/assets/components/jquery/src/ajax/parseXML.js +27 -0
- data/vendor/assets/components/jquery/src/ajax/script.js +68 -0
- data/vendor/assets/components/jquery/src/ajax/var/location.js +3 -0
- data/vendor/assets/components/jquery/src/ajax/var/nonce.js +5 -0
- data/vendor/assets/components/jquery/src/ajax/var/rquery.js +3 -0
- data/vendor/assets/components/jquery/src/ajax/xhr.js +167 -0
- data/vendor/assets/components/jquery/src/attributes.js +11 -0
- data/vendor/assets/components/jquery/src/attributes/attr.js +142 -0
- data/vendor/assets/components/jquery/src/attributes/classes.js +177 -0
- data/vendor/assets/components/jquery/src/attributes/prop.js +125 -0
- data/vendor/assets/components/jquery/src/attributes/support.js +36 -0
- data/vendor/assets/components/jquery/src/attributes/val.js +177 -0
- data/vendor/assets/components/jquery/src/callbacks.js +232 -0
- data/vendor/assets/components/jquery/src/core.js +494 -0
- data/vendor/assets/components/jquery/src/core/access.js +65 -0
- data/vendor/assets/components/jquery/src/core/init.js +134 -0
- data/vendor/assets/components/jquery/src/core/parseHTML.js +41 -0
- data/vendor/assets/components/jquery/src/core/ready.js +103 -0
- data/vendor/assets/components/jquery/src/core/var/rsingleTag.js +5 -0
- data/vendor/assets/components/jquery/src/css.js +502 -0
- data/vendor/assets/components/jquery/src/css/addGetHookIf.js +24 -0
- data/vendor/assets/components/jquery/src/css/adjustCSS.js +65 -0
- data/vendor/assets/components/jquery/src/css/curCSS.js +60 -0
- data/vendor/assets/components/jquery/src/css/defaultDisplay.js +72 -0
- data/vendor/assets/components/jquery/src/css/hiddenVisibleSelectors.js +18 -0
- data/vendor/assets/components/jquery/src/css/showHide.js +48 -0
- data/vendor/assets/components/jquery/src/css/support.js +121 -0
- data/vendor/assets/components/jquery/src/css/var/cssExpand.js +3 -0
- data/vendor/assets/components/jquery/src/css/var/getStyles.js +15 -0
- data/vendor/assets/components/jquery/src/css/var/isHidden.js +16 -0
- data/vendor/assets/components/jquery/src/css/var/rmargin.js +3 -0
- data/vendor/assets/components/jquery/src/css/var/rnumnonpx.js +5 -0
- data/vendor/assets/components/jquery/src/css/var/swap.js +24 -0
- data/vendor/assets/components/jquery/src/data.js +187 -0
- data/vendor/assets/components/jquery/src/data/Data.js +200 -0
- data/vendor/assets/components/jquery/src/data/var/acceptData.js +18 -0
- data/vendor/assets/components/jquery/src/data/var/dataPriv.js +5 -0
- data/vendor/assets/components/jquery/src/data/var/dataUser.js +5 -0
- data/vendor/assets/components/jquery/src/deferred.js +158 -0
- data/vendor/assets/components/jquery/src/deprecated.js +32 -0
- data/vendor/assets/components/jquery/src/dimensions.js +54 -0
- data/vendor/assets/components/jquery/src/effects.js +629 -0
- data/vendor/assets/components/jquery/src/effects/Tween.js +121 -0
- data/vendor/assets/components/jquery/src/effects/animatedSelector.js +13 -0
- data/vendor/assets/components/jquery/src/event.js +711 -0
- data/vendor/assets/components/jquery/src/event/ajax.js +20 -0
- data/vendor/assets/components/jquery/src/event/alias.js +27 -0
- data/vendor/assets/components/jquery/src/event/focusin.js +53 -0
- data/vendor/assets/components/jquery/src/event/support.js +9 -0
- data/vendor/assets/components/jquery/src/event/trigger.js +183 -0
- data/vendor/assets/components/jquery/src/exports/amd.js +24 -0
- data/vendor/assets/components/jquery/src/exports/global.js +26 -0
- data/vendor/assets/components/jquery/src/intro.js +44 -0
- data/vendor/assets/components/jquery/src/jquery.js +37 -0
- data/vendor/assets/components/jquery/src/manipulation.js +481 -0
- data/vendor/assets/components/jquery/src/manipulation/_evalUrl.js +20 -0
- data/vendor/assets/components/jquery/src/manipulation/buildFragment.js +102 -0
- data/vendor/assets/components/jquery/src/manipulation/getAll.js +21 -0
- data/vendor/assets/components/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/vendor/assets/components/jquery/src/manipulation/support.js +33 -0
- data/vendor/assets/components/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/vendor/assets/components/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/vendor/assets/components/jquery/src/manipulation/var/rtagName.js +3 -0
- data/vendor/assets/components/jquery/src/manipulation/wrapMap.js +27 -0
- data/vendor/assets/components/jquery/src/offset.js +218 -0
- data/vendor/assets/components/jquery/src/outro.js +2 -0
- data/vendor/assets/components/jquery/src/queue.js +143 -0
- data/vendor/assets/components/jquery/src/queue/delay.js +22 -0
- data/vendor/assets/components/jquery/src/selector-native.js +211 -0
- data/vendor/assets/components/jquery/src/selector-sizzle.js +14 -0
- data/vendor/assets/components/jquery/src/selector.js +1 -0
- data/vendor/assets/components/jquery/src/serialize.js +125 -0
- data/vendor/assets/components/jquery/src/traversing.js +175 -0
- data/vendor/assets/components/jquery/src/traversing/findFilter.js +100 -0
- data/vendor/assets/components/jquery/src/traversing/var/dir.js +20 -0
- data/vendor/assets/components/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/vendor/assets/components/jquery/src/traversing/var/siblings.js +15 -0
- data/vendor/assets/components/jquery/src/var/arr.js +3 -0
- data/vendor/assets/components/jquery/src/var/class2type.js +5 -0
- data/vendor/assets/components/jquery/src/var/concat.js +5 -0
- data/vendor/assets/components/jquery/src/var/document.js +3 -0
- data/vendor/assets/components/jquery/src/var/documentElement.js +5 -0
- data/vendor/assets/components/jquery/src/var/hasOwn.js +5 -0
- data/vendor/assets/components/jquery/src/var/indexOf.js +5 -0
- data/vendor/assets/components/jquery/src/var/pnum.js +3 -0
- data/vendor/assets/components/jquery/src/var/push.js +5 -0
- data/vendor/assets/components/jquery/src/var/rcssNum.js +7 -0
- data/vendor/assets/components/jquery/src/var/rnotwhite.js +3 -0
- data/vendor/assets/components/jquery/src/var/slice.js +5 -0
- data/vendor/assets/components/jquery/src/var/support.js +5 -0
- data/vendor/assets/components/jquery/src/var/toString.js +5 -0
- data/vendor/assets/components/jquery/src/wrap.js +79 -0
- data/vendor/assets/components/uikit/.bower.json +34 -0
- data/vendor/assets/components/uikit/README.md +13 -0
- data/vendor/assets/components/uikit/bower.json +25 -0
- data/vendor/assets/components/uikit/css/components/accordion.almost-flat.css +39 -0
- data/vendor/assets/components/uikit/css/components/accordion.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/accordion.css +37 -0
- data/vendor/assets/components/uikit/css/components/accordion.gradient.css +39 -0
- data/vendor/assets/components/uikit/css/components/accordion.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/accordion.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/autocomplete.almost-flat.css +57 -0
- data/vendor/assets/components/uikit/css/components/autocomplete.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/autocomplete.css +55 -0
- data/vendor/assets/components/uikit/css/components/autocomplete.gradient.css +57 -0
- data/vendor/assets/components/uikit/css/components/autocomplete.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/autocomplete.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/datepicker.almost-flat.css +129 -0
- data/vendor/assets/components/uikit/css/components/datepicker.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/datepicker.css +123 -0
- data/vendor/assets/components/uikit/css/components/datepicker.gradient.css +139 -0
- data/vendor/assets/components/uikit/css/components/datepicker.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/datepicker.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/dotnav.almost-flat.css +128 -0
- data/vendor/assets/components/uikit/css/components/dotnav.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/dotnav.css +124 -0
- data/vendor/assets/components/uikit/css/components/dotnav.gradient.css +128 -0
- data/vendor/assets/components/uikit/css/components/dotnav.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/dotnav.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-advanced.almost-flat.css +78 -0
- data/vendor/assets/components/uikit/css/components/form-advanced.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-advanced.css +78 -0
- data/vendor/assets/components/uikit/css/components/form-advanced.gradient.css +78 -0
- data/vendor/assets/components/uikit/css/components/form-advanced.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-advanced.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-file.almost-flat.css +34 -0
- data/vendor/assets/components/uikit/css/components/form-file.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-file.css +34 -0
- data/vendor/assets/components/uikit/css/components/form-file.gradient.css +34 -0
- data/vendor/assets/components/uikit/css/components/form-file.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-file.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-password.almost-flat.css +34 -0
- data/vendor/assets/components/uikit/css/components/form-password.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-password.css +34 -0
- data/vendor/assets/components/uikit/css/components/form-password.gradient.css +34 -0
- data/vendor/assets/components/uikit/css/components/form-password.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-password.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-select.almost-flat.css +35 -0
- data/vendor/assets/components/uikit/css/components/form-select.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-select.css +35 -0
- data/vendor/assets/components/uikit/css/components/form-select.gradient.css +35 -0
- data/vendor/assets/components/uikit/css/components/form-select.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/form-select.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/htmleditor.almost-flat.css +222 -0
- data/vendor/assets/components/uikit/css/components/htmleditor.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/htmleditor.css +164 -0
- data/vendor/assets/components/uikit/css/components/htmleditor.gradient.css +229 -0
- data/vendor/assets/components/uikit/css/components/htmleditor.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/htmleditor.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/nestable.almost-flat.css +135 -0
- data/vendor/assets/components/uikit/css/components/nestable.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/nestable.css +132 -0
- data/vendor/assets/components/uikit/css/components/nestable.gradient.css +139 -0
- data/vendor/assets/components/uikit/css/components/nestable.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/nestable.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/notify.almost-flat.css +98 -0
- data/vendor/assets/components/uikit/css/components/notify.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/notify.css +92 -0
- data/vendor/assets/components/uikit/css/components/notify.gradient.css +98 -0
- data/vendor/assets/components/uikit/css/components/notify.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/notify.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/placeholder.almost-flat.css +29 -0
- data/vendor/assets/components/uikit/css/components/placeholder.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/placeholder.css +29 -0
- data/vendor/assets/components/uikit/css/components/placeholder.gradient.css +29 -0
- data/vendor/assets/components/uikit/css/components/placeholder.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/placeholder.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/progress.almost-flat.css +104 -0
- data/vendor/assets/components/uikit/css/components/progress.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/progress.css +94 -0
- data/vendor/assets/components/uikit/css/components/progress.gradient.css +112 -0
- data/vendor/assets/components/uikit/css/components/progress.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/progress.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/search.almost-flat.css +191 -0
- data/vendor/assets/components/uikit/css/components/search.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/search.css +189 -0
- data/vendor/assets/components/uikit/css/components/search.gradient.css +191 -0
- data/vendor/assets/components/uikit/css/components/search.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/search.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slidenav.almost-flat.css +98 -0
- data/vendor/assets/components/uikit/css/components/slidenav.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slidenav.css +98 -0
- data/vendor/assets/components/uikit/css/components/slidenav.gradient.css +98 -0
- data/vendor/assets/components/uikit/css/components/slidenav.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slidenav.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slider.almost-flat.css +85 -0
- data/vendor/assets/components/uikit/css/components/slider.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slider.css +85 -0
- data/vendor/assets/components/uikit/css/components/slider.gradient.css +85 -0
- data/vendor/assets/components/uikit/css/components/slider.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slider.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slideshow.almost-flat.css +144 -0
- data/vendor/assets/components/uikit/css/components/slideshow.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slideshow.css +144 -0
- data/vendor/assets/components/uikit/css/components/slideshow.gradient.css +144 -0
- data/vendor/assets/components/uikit/css/components/slideshow.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/slideshow.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/sortable.almost-flat.css +62 -0
- data/vendor/assets/components/uikit/css/components/sortable.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/sortable.css +62 -0
- data/vendor/assets/components/uikit/css/components/sortable.gradient.css +62 -0
- data/vendor/assets/components/uikit/css/components/sortable.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/sortable.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/sticky.almost-flat.css +23 -0
- data/vendor/assets/components/uikit/css/components/sticky.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/sticky.css +23 -0
- data/vendor/assets/components/uikit/css/components/sticky.gradient.css +23 -0
- data/vendor/assets/components/uikit/css/components/sticky.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/sticky.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/tooltip.almost-flat.css +118 -0
- data/vendor/assets/components/uikit/css/components/tooltip.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/tooltip.css +116 -0
- data/vendor/assets/components/uikit/css/components/tooltip.gradient.css +118 -0
- data/vendor/assets/components/uikit/css/components/tooltip.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/tooltip.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/upload.almost-flat.css +10 -0
- data/vendor/assets/components/uikit/css/components/upload.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/upload.css +10 -0
- data/vendor/assets/components/uikit/css/components/upload.gradient.css +10 -0
- data/vendor/assets/components/uikit/css/components/upload.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/components/upload.min.css +2 -0
- data/vendor/assets/components/uikit/css/uikit.almost-flat.css +9043 -0
- data/vendor/assets/components/uikit/css/uikit.almost-flat.min.css +2 -0
- data/vendor/assets/components/uikit/css/uikit.css +8743 -0
- data/vendor/assets/components/uikit/css/uikit.gradient.css +9106 -0
- data/vendor/assets/components/uikit/css/uikit.gradient.min.css +2 -0
- data/vendor/assets/components/uikit/css/uikit.min.css +2 -0
- data/vendor/assets/components/uikit/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/components/uikit/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/components/uikit/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/components/uikit/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/components/uikit/js/components/accordion.js +174 -0
- data/vendor/assets/components/uikit/js/components/accordion.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/autocomplete.js +334 -0
- data/vendor/assets/components/uikit/js/components/autocomplete.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/datepicker.js +3166 -0
- data/vendor/assets/components/uikit/js/components/datepicker.min.js +3 -0
- data/vendor/assets/components/uikit/js/components/form-password.js +67 -0
- data/vendor/assets/components/uikit/js/components/form-password.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/form-select.js +77 -0
- data/vendor/assets/components/uikit/js/components/form-select.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/grid-parallax.js +168 -0
- data/vendor/assets/components/uikit/js/components/grid-parallax.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/grid.js +527 -0
- data/vendor/assets/components/uikit/js/components/grid.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/htmleditor.js +635 -0
- data/vendor/assets/components/uikit/js/components/htmleditor.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/lightbox.js +590 -0
- data/vendor/assets/components/uikit/js/components/lightbox.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/nestable.js +653 -0
- data/vendor/assets/components/uikit/js/components/nestable.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/notify.js +189 -0
- data/vendor/assets/components/uikit/js/components/notify.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/pagination.js +147 -0
- data/vendor/assets/components/uikit/js/components/pagination.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/parallax.js +462 -0
- data/vendor/assets/components/uikit/js/components/parallax.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/search.js +92 -0
- data/vendor/assets/components/uikit/js/components/search.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/slider.js +540 -0
- data/vendor/assets/components/uikit/js/components/slider.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/slideset.js +514 -0
- data/vendor/assets/components/uikit/js/components/slideset.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/slideshow-fx.js +375 -0
- data/vendor/assets/components/uikit/js/components/slideshow-fx.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/slideshow.js +562 -0
- data/vendor/assets/components/uikit/js/components/slideshow.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/sortable.js +679 -0
- data/vendor/assets/components/uikit/js/components/sortable.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/sticky.js +358 -0
- data/vendor/assets/components/uikit/js/components/sticky.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/timepicker.js +192 -0
- data/vendor/assets/components/uikit/js/components/timepicker.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/tooltip.js +234 -0
- data/vendor/assets/components/uikit/js/components/tooltip.min.js +2 -0
- data/vendor/assets/components/uikit/js/components/upload.js +260 -0
- data/vendor/assets/components/uikit/js/components/upload.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/alert.js +66 -0
- data/vendor/assets/components/uikit/js/core/alert.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/button.js +157 -0
- data/vendor/assets/components/uikit/js/core/button.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/core.js +785 -0
- data/vendor/assets/components/uikit/js/core/core.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/cover.js +95 -0
- data/vendor/assets/components/uikit/js/core/cover.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/dropdown.js +525 -0
- data/vendor/assets/components/uikit/js/core/dropdown.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/grid.js +117 -0
- data/vendor/assets/components/uikit/js/core/grid.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/modal.js +393 -0
- data/vendor/assets/components/uikit/js/core/modal.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/nav.js +136 -0
- data/vendor/assets/components/uikit/js/core/nav.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/offcanvas.js +180 -0
- data/vendor/assets/components/uikit/js/core/offcanvas.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/scrollspy.js +209 -0
- data/vendor/assets/components/uikit/js/core/scrollspy.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/smooth-scroll.js +62 -0
- data/vendor/assets/components/uikit/js/core/smooth-scroll.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/switcher.js +305 -0
- data/vendor/assets/components/uikit/js/core/switcher.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/tab.js +167 -0
- data/vendor/assets/components/uikit/js/core/tab.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/toggle.js +120 -0
- data/vendor/assets/components/uikit/js/core/toggle.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/touch.js +175 -0
- data/vendor/assets/components/uikit/js/core/touch.min.js +2 -0
- data/vendor/assets/components/uikit/js/core/utility.js +319 -0
- data/vendor/assets/components/uikit/js/core/utility.min.js +2 -0
- data/vendor/assets/components/uikit/js/uikit.js +3811 -0
- data/vendor/assets/components/uikit/js/uikit.min.js +3 -0
- data/vendor/assets/components/uikit/less/components/accordion.less +94 -0
- data/vendor/assets/components/uikit/less/components/autocomplete.less +107 -0
- data/vendor/assets/components/uikit/less/components/datepicker.less +197 -0
- data/vendor/assets/components/uikit/less/components/dotnav.less +212 -0
- data/vendor/assets/components/uikit/less/components/form-advanced.less +128 -0
- data/vendor/assets/components/uikit/less/components/form-file.less +63 -0
- data/vendor/assets/components/uikit/less/components/form-password.less +74 -0
- data/vendor/assets/components/uikit/less/components/form-select.less +66 -0
- data/vendor/assets/components/uikit/less/components/htmleditor.less +269 -0
- data/vendor/assets/components/uikit/less/components/nestable.less +229 -0
- data/vendor/assets/components/uikit/less/components/notify.less +190 -0
- data/vendor/assets/components/uikit/less/components/placeholder.less +66 -0
- data/vendor/assets/components/uikit/less/components/progress.less +173 -0
- data/vendor/assets/components/uikit/less/components/search.less +309 -0
- data/vendor/assets/components/uikit/less/components/slidenav.less +183 -0
- data/vendor/assets/components/uikit/less/components/slider.less +131 -0
- data/vendor/assets/components/uikit/less/components/slideshow.less +208 -0
- data/vendor/assets/components/uikit/less/components/sortable.less +122 -0
- data/vendor/assets/components/uikit/less/components/sticky.less +54 -0
- data/vendor/assets/components/uikit/less/components/tooltip.less +177 -0
- data/vendor/assets/components/uikit/less/components/upload.less +34 -0
- data/vendor/assets/components/uikit/less/core/alert.less +141 -0
- data/vendor/assets/components/uikit/less/core/animation.less +599 -0
- data/vendor/assets/components/uikit/less/core/article.less +139 -0
- data/vendor/assets/components/uikit/less/core/badge.less +110 -0
- data/vendor/assets/components/uikit/less/core/base.less +563 -0
- data/vendor/assets/components/uikit/less/core/block.less +155 -0
- data/vendor/assets/components/uikit/less/core/breadcrumb.less +86 -0
- data/vendor/assets/components/uikit/less/core/button.less +406 -0
- data/vendor/assets/components/uikit/less/core/close.less +132 -0
- data/vendor/assets/components/uikit/less/core/column.less +209 -0
- data/vendor/assets/components/uikit/less/core/comment.less +172 -0
- data/vendor/assets/components/uikit/less/core/contrast.less +493 -0
- data/vendor/assets/components/uikit/less/core/cover.less +70 -0
- data/vendor/assets/components/uikit/less/core/description-list.less +71 -0
- data/vendor/assets/components/uikit/less/core/dropdown.less +280 -0
- data/vendor/assets/components/uikit/less/core/flex.less +320 -0
- data/vendor/assets/components/uikit/less/core/form.less +629 -0
- data/vendor/assets/components/uikit/less/core/grid.less +731 -0
- data/vendor/assets/components/uikit/less/core/icon.less +925 -0
- data/vendor/assets/components/uikit/less/core/list.less +102 -0
- data/vendor/assets/components/uikit/less/core/modal.less +343 -0
- data/vendor/assets/components/uikit/less/core/nav.less +468 -0
- data/vendor/assets/components/uikit/less/core/navbar.less +325 -0
- data/vendor/assets/components/uikit/less/core/offcanvas.less +168 -0
- data/vendor/assets/components/uikit/less/core/overlay.less +534 -0
- data/vendor/assets/components/uikit/less/core/pagination.less +197 -0
- data/vendor/assets/components/uikit/less/core/panel.less +332 -0
- data/vendor/assets/components/uikit/less/core/print.less +61 -0
- data/vendor/assets/components/uikit/less/core/subnav.less +213 -0
- data/vendor/assets/components/uikit/less/core/switcher.less +38 -0
- data/vendor/assets/components/uikit/less/core/tab.less +368 -0
- data/vendor/assets/components/uikit/less/core/table.less +147 -0
- data/vendor/assets/components/uikit/less/core/text.less +128 -0
- data/vendor/assets/components/uikit/less/core/thumbnail.less +122 -0
- data/vendor/assets/components/uikit/less/core/thumbnav.less +122 -0
- data/vendor/assets/components/uikit/less/core/utility.less +610 -0
- data/vendor/assets/components/uikit/less/core/variables.less +23 -0
- data/vendor/assets/components/uikit/less/uikit-variables.less +819 -0
- data/vendor/assets/components/uikit/less/uikit.less +52 -0
- data/vendor/assets/components/uikit/scss/components/accordion.scss +94 -0
- data/vendor/assets/components/uikit/scss/components/autocomplete.scss +107 -0
- data/vendor/assets/components/uikit/scss/components/datepicker.scss +197 -0
- data/vendor/assets/components/uikit/scss/components/dotnav.scss +212 -0
- data/vendor/assets/components/uikit/scss/components/form-advanced.scss +128 -0
- data/vendor/assets/components/uikit/scss/components/form-file.scss +63 -0
- data/vendor/assets/components/uikit/scss/components/form-password.scss +74 -0
- data/vendor/assets/components/uikit/scss/components/form-select.scss +66 -0
- data/vendor/assets/components/uikit/scss/components/htmleditor.scss +269 -0
- data/vendor/assets/components/uikit/scss/components/nestable.scss +229 -0
- data/vendor/assets/components/uikit/scss/components/notify.scss +190 -0
- data/vendor/assets/components/uikit/scss/components/placeholder.scss +66 -0
- data/vendor/assets/components/uikit/scss/components/progress.scss +173 -0
- data/vendor/assets/components/uikit/scss/components/search.scss +309 -0
- data/vendor/assets/components/uikit/scss/components/slidenav.scss +183 -0
- data/vendor/assets/components/uikit/scss/components/slider.scss +131 -0
- data/vendor/assets/components/uikit/scss/components/slideshow.scss +208 -0
- data/vendor/assets/components/uikit/scss/components/sortable.scss +122 -0
- data/vendor/assets/components/uikit/scss/components/sticky.scss +54 -0
- data/vendor/assets/components/uikit/scss/components/tooltip.scss +177 -0
- data/vendor/assets/components/uikit/scss/components/upload.scss +34 -0
- data/vendor/assets/components/uikit/scss/core/alert.scss +141 -0
- data/vendor/assets/components/uikit/scss/core/animation.scss +599 -0
- data/vendor/assets/components/uikit/scss/core/article.scss +139 -0
- data/vendor/assets/components/uikit/scss/core/badge.scss +110 -0
- data/vendor/assets/components/uikit/scss/core/base.scss +563 -0
- data/vendor/assets/components/uikit/scss/core/block.scss +155 -0
- data/vendor/assets/components/uikit/scss/core/breadcrumb.scss +86 -0
- data/vendor/assets/components/uikit/scss/core/button.scss +406 -0
- data/vendor/assets/components/uikit/scss/core/close.scss +132 -0
- data/vendor/assets/components/uikit/scss/core/column.scss +209 -0
- data/vendor/assets/components/uikit/scss/core/comment.scss +172 -0
- data/vendor/assets/components/uikit/scss/core/contrast.scss +493 -0
- data/vendor/assets/components/uikit/scss/core/cover.scss +70 -0
- data/vendor/assets/components/uikit/scss/core/description-list.scss +71 -0
- data/vendor/assets/components/uikit/scss/core/dropdown.scss +280 -0
- data/vendor/assets/components/uikit/scss/core/flex.scss +320 -0
- data/vendor/assets/components/uikit/scss/core/form.scss +629 -0
- data/vendor/assets/components/uikit/scss/core/grid.scss +731 -0
- data/vendor/assets/components/uikit/scss/core/icon.scss +925 -0
- data/vendor/assets/components/uikit/scss/core/list.scss +102 -0
- data/vendor/assets/components/uikit/scss/core/modal.scss +343 -0
- data/vendor/assets/components/uikit/scss/core/nav.scss +468 -0
- data/vendor/assets/components/uikit/scss/core/navbar.scss +325 -0
- data/vendor/assets/components/uikit/scss/core/offcanvas.scss +168 -0
- data/vendor/assets/components/uikit/scss/core/overlay.scss +534 -0
- data/vendor/assets/components/uikit/scss/core/pagination.scss +197 -0
- data/vendor/assets/components/uikit/scss/core/panel.scss +332 -0
- data/vendor/assets/components/uikit/scss/core/print.scss +61 -0
- data/vendor/assets/components/uikit/scss/core/subnav.scss +213 -0
- data/vendor/assets/components/uikit/scss/core/switcher.scss +38 -0
- data/vendor/assets/components/uikit/scss/core/tab.scss +368 -0
- data/vendor/assets/components/uikit/scss/core/table.scss +147 -0
- data/vendor/assets/components/uikit/scss/core/text.scss +128 -0
- data/vendor/assets/components/uikit/scss/core/thumbnail.scss +122 -0
- data/vendor/assets/components/uikit/scss/core/thumbnav.scss +122 -0
- data/vendor/assets/components/uikit/scss/core/utility.scss +610 -0
- data/vendor/assets/components/uikit/scss/core/variables.scss +23 -0
- data/vendor/assets/components/uikit/scss/uikit-mixins.scss +327 -0
- data/vendor/assets/components/uikit/scss/uikit-variables.scss +819 -0
- data/vendor/assets/components/uikit/scss/uikit.scss +52 -0
- metadata +567 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
|
2
|
+
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-sortable",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";function e(e){e=t.$(e);do{if(e.data("sortable"))return e;e=t.$(e).parent()}while(e.length);return e}function o(t,e){var o=t.parentNode;if(e.parentNode!=o)return!1;for(var a=t.previousSibling;a&&9!==a.nodeType;){if(a===e)return!0;a=a.previousSibling}return!1}function a(t,e){var o=e;if(o==t)return null;for(;o;){if(o.parentNode===t)return o;if(o=o.parentNode,!o||!o.ownerDocument||11===o.nodeType)break}return null}function n(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}var s,r,i,l,d,h,u,p,c,f,g="ontouchstart"in window||"MSGesture"in window||window.DocumentTouch&&document instanceof DocumentTouch;return t.component("sortable",{defaults:{animation:150,threshold:10,childClass:"uk-sortable-item",placeholderClass:"uk-sortable-placeholder",overClass:"uk-sortable-over",draggingClass:"uk-sortable-dragged",dragMovingClass:"uk-sortable-moving",baseClass:"uk-sortable",noDragClass:"uk-sortable-nodrag",emptyClass:"uk-sortable-empty",dragCustomClass:"",handleClass:!1,group:!1,stop:function(){},start:function(){},change:function(){}},boot:function(){t.ready(function(e){t.$("[data-uk-sortable]",e).each(function(){var e=t.$(this);e.data("sortable")||t.sortable(e,t.Utils.options(e.attr("data-uk-sortable")))})}),t.$html.on("mousemove touchmove",function(e){if(u){var o=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0]:e;(Math.abs(o.pageX-u.pos.x)>u.threshold||Math.abs(o.pageY-u.pos.y)>u.threshold)&&u.apply(o)}if(s){d||(d=!0,s.show(),s.$current.addClass(s.$sortable.options.placeholderClass),s.$sortable.element.children().addClass(s.$sortable.options.childClass),t.$html.addClass(s.$sortable.options.dragMovingClass));var a=s.data("mouse-offset"),n=parseInt(e.originalEvent.pageX,10)+a.left,r=parseInt(e.originalEvent.pageY,10)+a.top;if(s.css({left:n,top:r}),r+s.height()/3>document.body.offsetHeight)return;r<t.$win.scrollTop()?t.$win.scrollTop(t.$win.scrollTop()-Math.ceil(s.height()/3)):r+s.height()/3>window.innerHeight+t.$win.scrollTop()&&t.$win.scrollTop(t.$win.scrollTop()+Math.ceil(s.height()/3))}}),t.$html.on("mouseup touchend",function(t){if(u=h=!1,!r||!s)return r=s=null,void 0;var o=e(r),a=s.$sortable,n={type:t.type};o[0]&&a.dragDrop(n,a.element),a.dragEnd(n,a.element)})},init:function(){function e(){g?h.addEventListener("touchmove",b,!1):(h.addEventListener("mouseover",m,!1),h.addEventListener("mouseout",v,!1))}function o(){g?h.removeEventListener("touchmove",b,!1):(h.removeEventListener("mouseover",m,!1),h.removeEventListener("mouseout",v,!1))}function s(t){r&&d.dragMove(t,d)}function l(e){return function(o){var n,s,r;o&&(n=g&&o.touches&&o.touches[0]||{},s=n.target||o.target,g&&document.elementFromPoint&&(s=document.elementFromPoint(o.pageX-document.body.scrollLeft,o.pageY-document.body.scrollTop)),f=t.$(s)),t.$(s).hasClass(d.options.childClass)?e.apply(s,[o]):s!==h&&(r=a(h,s),r&&e.apply(r,[o]))}}var d=this,h=this.element[0];p=[],this.checkEmptyList(),this.element.data("sortable-group",this.options.group?this.options.group:t.Utils.uid("sortable-group"));var u=l(function(e){if(!e.data||!e.data.sortable){var o=t.$(e.target),a=o.is("a[href]")?o:o.parents("a[href]");if(!o.is(":input")){if(d.options.handleClass){var n=o.hasClass(d.options.handleClass)?o:o.closest("."+d.options.handleClass,d.element);if(!n.length)return}return e.preventDefault(),a.length&&a.one("click",function(t){t.preventDefault()}).one("mouseup touchend",function(){c||(a.trigger("click"),g&&a.attr("href").trim()&&(location.href=a.attr("href")))}),e.data=e.data||{},e.data.sortable=h,d.dragStart(e,this)}}}),m=l(t.Utils.debounce(function(t){return d.dragEnter(t,this)}),40),v=l(function(){var e=d.dragenterData(this);d.dragenterData(this,e-1),d.dragenterData(this)||(t.$(this).removeClass(d.options.overClass),d.dragenterData(this,!1))}),b=l(function(t){return r&&r!==this&&i!==this?(d.element.children().removeClass(d.options.overClass),i=this,d.moveElementNextTo(r,this),n(t)):!0});this.addDragHandlers=e,this.removeDragHandlers=o,window.addEventListener(g?"touchmove":"mousemove",s,!1),h.addEventListener(g?"touchstart":"mousedown",u,!1)},dragStart:function(e,o){c=!1,d=!1,l=!1;var a=this,n=t.$(e.target);if(!(!g&&2==e.button||n.is("."+a.options.noDragClass)||n.closest("."+a.options.noDragClass).length||n.is(":input"))){r=o,s&&s.remove();var i=t.$(r),h=i.offset();u={pos:{x:e.pageX,y:e.pageY},threshold:a.options.handleClass?1:a.options.threshold,apply:function(e){s=t.$('<div class="'+[a.options.draggingClass,a.options.dragCustomClass].join(" ")+'"></div>').css({display:"none",top:h.top,left:h.left,width:i.width(),height:i.height(),padding:i.css("padding")}).data({"mouse-offset":{left:h.left-parseInt(e.pageX,10),top:h.top-parseInt(e.pageY,10)},origin:a.element,index:i.index()}).append(i.html()).appendTo("body"),s.$current=i,s.$sortable=a,i.data({"start-list":i.parent(),"start-index":i.index(),"sortable-group":a.options.group}),a.addDragHandlers(),a.options.start(this,r),a.trigger("start.uk.sortable",[a,r]),c=!0,u=!1}}}},dragMove:function(e){f=t.$(document.elementFromPoint(e.pageX-(document.body.scrollLeft||document.scrollLeft||0),e.pageY-(document.body.scrollTop||document.documentElement.scrollTop||0)));var o,a=f.closest("."+this.options.baseClass),n=a.data("sortable-group"),s=t.$(r),i=s.parent(),l=s.data("sortable-group");a[0]!==i[0]&&void 0!==l&&n===l&&(a.data("sortable").addDragHandlers(),p.push(a),a.children().addClass(this.options.childClass),a.children().length>0?(o=f.closest("."+this.options.childClass),o.length?o.before(s):a.append(s)):f.append(s),UIkit.$doc.trigger("mouseover")),this.checkEmptyList(),this.checkEmptyList(i)},dragEnter:function(e,o){if(!r||r===o)return!0;var a=this.dragenterData(o);if(this.dragenterData(o,a+1),0===a){var n=t.$(o).parent(),s=t.$(r).data("start-list");if(n[0]!==s[0]){var i=n.data("sortable-group"),l=t.$(r).data("sortable-group");if((i||l)&&i!=l)return!1}t.$(o).addClass(this.options.overClass),this.moveElementNextTo(r,o)}return!1},dragEnd:function(e,o){var a=this;r&&(this.options.stop(o),this.trigger("stop.uk.sortable",[this])),r=null,i=null,p.push(this.element),p.forEach(function(e){t.$(e).children().each(function(){1===this.nodeType&&(t.$(this).removeClass(a.options.overClass).removeClass(a.options.placeholderClass).removeClass(a.options.childClass),a.dragenterData(this,!1))})}),p=[],t.$html.removeClass(this.options.dragMovingClass),this.removeDragHandlers(),s&&(s.remove(),s=null)},dragDrop:function(t){"drop"===t.type&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()),this.triggerChangeEvents()},triggerChangeEvents:function(){if(r){var e=t.$(r),o=s.data("origin"),a=e.closest("."+this.options.baseClass),n=[],i=t.$(r);o[0]===a[0]&&s.data("index")!=e.index()?n.push({sortable:this,mode:"moved"}):o[0]!=a[0]&&n.push({sortable:t.$(a).data("sortable"),mode:"added"},{sortable:t.$(o).data("sortable"),mode:"removed"}),n.forEach(function(t){t.sortable&&t.sortable.element.trigger("change.uk.sortable",[t.sortable,i,t.mode])})}},dragenterData:function(e,o){return e=t.$(e),1==arguments.length?parseInt(e.data("child-dragenter"),10)||0:(o?e.data("child-dragenter",Math.max(0,o)):e.removeData("child-dragenter"),void 0)},moveElementNextTo:function(e,a){l=!0;var n=this,s=t.$(e).parent().css("min-height",""),r=o(e,a)?a:a.nextSibling,i=s.children(),d=i.length;return n.options.animation?(s.css("min-height",s.height()),i.stop().each(function(){var e=t.$(this),o=e.position();o.width=e.width(),e.data("offset-before",o)}),a.parentNode.insertBefore(e,r),t.Utils.checkDisplay(n.element.parent()),i=s.children().each(function(){var e=t.$(this);e.data("offset-after",e.position())}).each(function(){var e=t.$(this),o=e.data("offset-before");e.css({position:"absolute",top:o.top,left:o.left,"min-width":o.width})}),i.each(function(){var e=t.$(this),o=(e.data("offset-before"),e.data("offset-after"));e.css("pointer-events","none").width(),setTimeout(function(){e.animate({top:o.top,left:o.left},n.options.animation,function(){e.css({position:"",top:"",left:"","min-width":"","pointer-events":""}).removeClass(n.options.overClass).removeData("child-dragenter"),d--,d||(s.css("min-height",""),t.Utils.checkDisplay(n.element.parent()))})},0)}),void 0):(a.parentNode.insertBefore(e,r),t.Utils.checkDisplay(n.element.parent()),void 0)},serialize:function(){var e,o,a=[];return this.element.children().each(function(n,s){e={};for(var r,i,l=0;l<s.attributes.length;l++)o=s.attributes[l],0===o.name.indexOf("data-")&&(r=o.name.substr(5),i=t.Utils.str2json(o.value),e[r]=i||"false"==o.value||"0"==o.value?i:o.value);a.push(e)}),a},checkEmptyList:function(e){e=e?t.$(e):this.element,this.options.emptyClass&&e[e.children().length?"removeClass":"addClass"](this.options.emptyClass)}}),t.sortable});
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
|
2
|
+
(function(addon) {
|
|
3
|
+
|
|
4
|
+
var component;
|
|
5
|
+
|
|
6
|
+
if (window.UIkit) {
|
|
7
|
+
component = addon(UIkit);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (typeof define == "function" && define.amd) {
|
|
11
|
+
define("uikit-sticky", ["uikit"], function(){
|
|
12
|
+
return component || addon(UIkit);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
})(function(UI){
|
|
17
|
+
|
|
18
|
+
"use strict";
|
|
19
|
+
|
|
20
|
+
var $win = UI.$win,
|
|
21
|
+
$doc = UI.$doc,
|
|
22
|
+
sticked = [],
|
|
23
|
+
direction = 1;
|
|
24
|
+
|
|
25
|
+
UI.component('sticky', {
|
|
26
|
+
|
|
27
|
+
defaults: {
|
|
28
|
+
top : 0,
|
|
29
|
+
bottom : 0,
|
|
30
|
+
animation : '',
|
|
31
|
+
clsinit : 'uk-sticky-init',
|
|
32
|
+
clsactive : 'uk-active',
|
|
33
|
+
clsinactive : '',
|
|
34
|
+
getWidthFrom : '',
|
|
35
|
+
showup : false,
|
|
36
|
+
boundary : false,
|
|
37
|
+
media : false,
|
|
38
|
+
target : false,
|
|
39
|
+
disabled : false
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
boot: function() {
|
|
43
|
+
|
|
44
|
+
// should be more efficient than using $win.scroll(checkscrollposition):
|
|
45
|
+
UI.$doc.on('scrolling.uk.document', function(e, data) {
|
|
46
|
+
if (!data || !data.dir) return;
|
|
47
|
+
direction = data.dir.y;
|
|
48
|
+
checkscrollposition();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
UI.$win.on('resize orientationchange', UI.Utils.debounce(function() {
|
|
52
|
+
|
|
53
|
+
if (!sticked.length) return;
|
|
54
|
+
|
|
55
|
+
for (var i = 0; i < sticked.length; i++) {
|
|
56
|
+
sticked[i].reset(true);
|
|
57
|
+
//sticked[i].self.computeWrapper();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
checkscrollposition();
|
|
61
|
+
}, 100));
|
|
62
|
+
|
|
63
|
+
// init code
|
|
64
|
+
UI.ready(function(context) {
|
|
65
|
+
|
|
66
|
+
setTimeout(function(){
|
|
67
|
+
|
|
68
|
+
UI.$("[data-uk-sticky]", context).each(function(){
|
|
69
|
+
|
|
70
|
+
var $ele = UI.$(this);
|
|
71
|
+
|
|
72
|
+
if(!$ele.data("sticky")) {
|
|
73
|
+
UI.sticky($ele, UI.Utils.options($ele.attr('data-uk-sticky')));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
checkscrollposition();
|
|
78
|
+
}, 0);
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
init: function() {
|
|
83
|
+
|
|
84
|
+
var boundary = this.options.boundary, boundtoparent;
|
|
85
|
+
|
|
86
|
+
this.wrapper = this.element.wrap('<div class="uk-sticky-placeholder"></div>').parent();
|
|
87
|
+
this.computeWrapper();
|
|
88
|
+
this.element.css('margin', 0);
|
|
89
|
+
|
|
90
|
+
if (boundary) {
|
|
91
|
+
|
|
92
|
+
if (boundary === true || boundary[0] === '!') {
|
|
93
|
+
|
|
94
|
+
boundary = boundary === true ? this.wrapper.parent() : this.wrapper.closest(boundary.substr(1));
|
|
95
|
+
boundtoparent = true;
|
|
96
|
+
|
|
97
|
+
} else if (typeof boundary === "string") {
|
|
98
|
+
boundary = UI.$(boundary);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
this.sticky = {
|
|
103
|
+
self : this,
|
|
104
|
+
options : this.options,
|
|
105
|
+
element : this.element,
|
|
106
|
+
currentTop : null,
|
|
107
|
+
wrapper : this.wrapper,
|
|
108
|
+
init : false,
|
|
109
|
+
getWidthFrom : UI.$(this.options.getWidthFrom || this.wrapper),
|
|
110
|
+
boundary : boundary,
|
|
111
|
+
boundtoparent : boundtoparent,
|
|
112
|
+
top : 0,
|
|
113
|
+
calcTop : function() {
|
|
114
|
+
|
|
115
|
+
var top = this.options.top;
|
|
116
|
+
|
|
117
|
+
// dynamic top parameter
|
|
118
|
+
if (this.options.top && typeof(this.options.top) == 'string') {
|
|
119
|
+
|
|
120
|
+
// e.g. 50vh
|
|
121
|
+
if (this.options.top.match(/^(-|)(\d+)vh$/)) {
|
|
122
|
+
top = window.innerHeight * parseInt(this.options.top, 10)/100;
|
|
123
|
+
// e.g. #elementId, or .class-1,class-2,.class-3 (first found is used)
|
|
124
|
+
} else {
|
|
125
|
+
|
|
126
|
+
var topElement = UI.$(this.options.top).first();
|
|
127
|
+
|
|
128
|
+
if (topElement.length && topElement.is(':visible')) {
|
|
129
|
+
top = -1 * ((topElement.offset().top + topElement.outerHeight()) - this.wrapper.offset().top);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
this.top = top;
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
reset: function(force) {
|
|
139
|
+
|
|
140
|
+
this.calcTop();
|
|
141
|
+
|
|
142
|
+
var finalize = function() {
|
|
143
|
+
this.element.css({"position":"", "top":"", "width":"", "left":"", "margin":"0"});
|
|
144
|
+
this.element.removeClass([this.options.animation, 'uk-animation-reverse', this.options.clsactive].join(' '));
|
|
145
|
+
this.element.addClass(this.options.clsinactive);
|
|
146
|
+
this.element.trigger('inactive.uk.sticky');
|
|
147
|
+
|
|
148
|
+
this.currentTop = null;
|
|
149
|
+
this.animate = false;
|
|
150
|
+
}.bind(this);
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
if (!force && this.options.animation && UI.support.animation && !UI.Utils.isInView(this.wrapper)) {
|
|
154
|
+
|
|
155
|
+
this.animate = true;
|
|
156
|
+
|
|
157
|
+
this.element.removeClass(this.options.animation).one(UI.support.animation.end, function(){
|
|
158
|
+
finalize();
|
|
159
|
+
}).width(); // force redraw
|
|
160
|
+
|
|
161
|
+
this.element.addClass(this.options.animation+' '+'uk-animation-reverse');
|
|
162
|
+
} else {
|
|
163
|
+
finalize();
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
check: function() {
|
|
168
|
+
|
|
169
|
+
if (this.options.disabled) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (this.options.media) {
|
|
174
|
+
|
|
175
|
+
switch(typeof(this.options.media)) {
|
|
176
|
+
case 'number':
|
|
177
|
+
if (window.innerWidth < this.options.media) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
case 'string':
|
|
182
|
+
if (window.matchMedia && !window.matchMedia(this.options.media).matches) {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
var scrollTop = $win.scrollTop(),
|
|
190
|
+
documentHeight = $doc.height(),
|
|
191
|
+
dwh = documentHeight - window.innerHeight,
|
|
192
|
+
extra = (scrollTop > dwh) ? dwh - scrollTop : 0,
|
|
193
|
+
elementTop = this.wrapper.offset().top,
|
|
194
|
+
etse = elementTop - this.top - extra,
|
|
195
|
+
active = (scrollTop >= etse);
|
|
196
|
+
|
|
197
|
+
if (active && this.options.showup) {
|
|
198
|
+
|
|
199
|
+
// set inactiv if scrolling down
|
|
200
|
+
if (direction == 1) {
|
|
201
|
+
active = false;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// set inactive when wrapper is still in view
|
|
205
|
+
if (direction == -1 && !this.element.hasClass(this.options.clsactive) && UI.Utils.isInView(this.wrapper)) {
|
|
206
|
+
active = false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return active;
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
this.sticky.calcTop();
|
|
215
|
+
|
|
216
|
+
sticked.push(this.sticky);
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
update: function() {
|
|
220
|
+
checkscrollposition(this.sticky);
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
enable: function() {
|
|
224
|
+
this.options.disabled = false;
|
|
225
|
+
this.update();
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
disable: function(force) {
|
|
229
|
+
this.options.disabled = true;
|
|
230
|
+
this.sticky.reset(force);
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
computeWrapper: function() {
|
|
234
|
+
|
|
235
|
+
this.wrapper.css({
|
|
236
|
+
'height' : ['absolute','fixed'].indexOf(this.element.css('position')) == -1 ? this.element.outerHeight() : '',
|
|
237
|
+
'float' : this.element.css('float') != 'none' ? this.element.css('float') : '',
|
|
238
|
+
'margin' : this.element.css('margin')
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
if (this.element.css('position') == 'fixed') {
|
|
242
|
+
this.element.css({
|
|
243
|
+
width: this.sticky.getWidthFrom.length ? this.sticky.getWidthFrom.width() : this.element.width()
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
function checkscrollposition(direction) {
|
|
250
|
+
|
|
251
|
+
var stickies = arguments.length ? arguments : sticked;
|
|
252
|
+
|
|
253
|
+
if (!stickies.length || $win.scrollTop() < 0) return;
|
|
254
|
+
|
|
255
|
+
var scrollTop = $win.scrollTop(),
|
|
256
|
+
documentHeight = $doc.height(),
|
|
257
|
+
windowHeight = $win.height(),
|
|
258
|
+
dwh = documentHeight - windowHeight,
|
|
259
|
+
extra = (scrollTop > dwh) ? dwh - scrollTop : 0,
|
|
260
|
+
newTop, containerBottom, stickyHeight, sticky;
|
|
261
|
+
|
|
262
|
+
for (var i = 0; i < stickies.length; i++) {
|
|
263
|
+
|
|
264
|
+
sticky = stickies[i];
|
|
265
|
+
|
|
266
|
+
if (!sticky.element.is(":visible") || sticky.animate) {
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (!sticky.check()) {
|
|
271
|
+
|
|
272
|
+
if (sticky.currentTop !== null) {
|
|
273
|
+
sticky.reset();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
} else {
|
|
277
|
+
|
|
278
|
+
if (sticky.top < 0) {
|
|
279
|
+
newTop = 0;
|
|
280
|
+
} else {
|
|
281
|
+
stickyHeight = sticky.element.outerHeight();
|
|
282
|
+
newTop = documentHeight - stickyHeight - sticky.top - sticky.options.bottom - scrollTop - extra;
|
|
283
|
+
newTop = newTop < 0 ? newTop + sticky.top : sticky.top;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (sticky.boundary && sticky.boundary.length) {
|
|
287
|
+
|
|
288
|
+
var bTop = sticky.boundary.offset().top;
|
|
289
|
+
|
|
290
|
+
if (sticky.boundtoparent) {
|
|
291
|
+
containerBottom = documentHeight - (bTop + sticky.boundary.outerHeight()) + parseInt(sticky.boundary.css('padding-bottom'));
|
|
292
|
+
} else {
|
|
293
|
+
containerBottom = documentHeight - bTop;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
newTop = (scrollTop + stickyHeight) > (documentHeight - containerBottom - (sticky.top < 0 ? 0 : sticky.top)) ? (documentHeight - containerBottom) - (scrollTop + stickyHeight) : newTop;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
if (sticky.currentTop != newTop) {
|
|
301
|
+
|
|
302
|
+
sticky.element.css({
|
|
303
|
+
position : "fixed",
|
|
304
|
+
top : newTop,
|
|
305
|
+
width : sticky.getWidthFrom.length ? sticky.getWidthFrom.width() : sticky.element.width()
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
if (!sticky.init) {
|
|
309
|
+
|
|
310
|
+
sticky.element.addClass(sticky.options.clsinit);
|
|
311
|
+
|
|
312
|
+
if (location.hash && scrollTop > 0 && sticky.options.target) {
|
|
313
|
+
|
|
314
|
+
var $target = UI.$(location.hash);
|
|
315
|
+
|
|
316
|
+
if ($target.length) {
|
|
317
|
+
|
|
318
|
+
setTimeout((function($target, sticky){
|
|
319
|
+
|
|
320
|
+
return function() {
|
|
321
|
+
|
|
322
|
+
sticky.element.width(); // force redraw
|
|
323
|
+
|
|
324
|
+
var offset = $target.offset(),
|
|
325
|
+
maxoffset = offset.top + $target.outerHeight(),
|
|
326
|
+
stickyOffset = sticky.element.offset(),
|
|
327
|
+
stickyHeight = sticky.element.outerHeight(),
|
|
328
|
+
stickyMaxOffset = stickyOffset.top + stickyHeight;
|
|
329
|
+
|
|
330
|
+
if (stickyOffset.top < maxoffset && offset.top < stickyMaxOffset) {
|
|
331
|
+
scrollTop = offset.top - stickyHeight - sticky.options.target;
|
|
332
|
+
window.scrollTo(0, scrollTop);
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
})($target, sticky), 0);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
sticky.element.addClass(sticky.options.clsactive).removeClass(sticky.options.clsinactive);
|
|
342
|
+
sticky.element.trigger('active.uk.sticky');
|
|
343
|
+
sticky.element.css('margin', '');
|
|
344
|
+
|
|
345
|
+
if (sticky.options.animation && sticky.init && !UI.Utils.isInView(sticky.wrapper)) {
|
|
346
|
+
sticky.element.addClass(sticky.options.animation);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
sticky.currentTop = newTop;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
sticky.init = true;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return UI.sticky;
|
|
358
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
|
2
|
+
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-sticky",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";function i(){var i=arguments.length?arguments:n;if(i.length&&!(e.scrollTop()<0))for(var o,a,r,h,p=e.scrollTop(),c=s.height(),l=e.height(),d=c-l,u=p>d?d-p:0,m=0;m<i.length;m++)if(h=i[m],h.element.is(":visible")&&!h.animate){if(h.check()){if(h.top<0?o=0:(r=h.element.outerHeight(),o=c-r-h.top-h.options.bottom-p-u,o=0>o?o+h.top:h.top),h.boundary&&h.boundary.length){var f=h.boundary.offset().top;a=h.boundtoparent?c-(f+h.boundary.outerHeight())+parseInt(h.boundary.css("padding-bottom")):c-f,o=p+r>c-a-(h.top<0?0:h.top)?c-a-(p+r):o}if(h.currentTop!=o){if(h.element.css({position:"fixed",top:o,width:h.getWidthFrom.length?h.getWidthFrom.width():h.element.width()}),!h.init&&(h.element.addClass(h.options.clsinit),location.hash&&p>0&&h.options.target)){var g=t.$(location.hash);g.length&&setTimeout(function(t,i){return function(){i.element.width();var e=t.offset(),s=e.top+t.outerHeight(),n=i.element.offset(),o=i.element.outerHeight(),a=n.top+o;n.top<s&&e.top<a&&(p=e.top-o-i.options.target,window.scrollTo(0,p))}}(g,h),0)}h.element.addClass(h.options.clsactive).removeClass(h.options.clsinactive),h.element.trigger("active.uk.sticky"),h.element.css("margin",""),h.options.animation&&h.init&&!t.Utils.isInView(h.wrapper)&&h.element.addClass(h.options.animation),h.currentTop=o}}else null!==h.currentTop&&h.reset();h.init=!0}}var e=t.$win,s=t.$doc,n=[],o=1;return t.component("sticky",{defaults:{top:0,bottom:0,animation:"",clsinit:"uk-sticky-init",clsactive:"uk-active",clsinactive:"",getWidthFrom:"",showup:!1,boundary:!1,media:!1,target:!1,disabled:!1},boot:function(){t.$doc.on("scrolling.uk.document",function(t,e){e&&e.dir&&(o=e.dir.y,i())}),t.$win.on("resize orientationchange",t.Utils.debounce(function(){if(n.length){for(var t=0;t<n.length;t++)n[t].reset(!0);i()}},100)),t.ready(function(e){setTimeout(function(){t.$("[data-uk-sticky]",e).each(function(){var i=t.$(this);i.data("sticky")||t.sticky(i,t.Utils.options(i.attr("data-uk-sticky")))}),i()},0)})},init:function(){var i,a=this.options.boundary;this.wrapper=this.element.wrap('<div class="uk-sticky-placeholder"></div>').parent(),this.computeWrapper(),this.element.css("margin",0),a&&(a===!0||"!"===a[0]?(a=a===!0?this.wrapper.parent():this.wrapper.closest(a.substr(1)),i=!0):"string"==typeof a&&(a=t.$(a))),this.sticky={self:this,options:this.options,element:this.element,currentTop:null,wrapper:this.wrapper,init:!1,getWidthFrom:t.$(this.options.getWidthFrom||this.wrapper),boundary:a,boundtoparent:i,top:0,calcTop:function(){var i=this.options.top;if(this.options.top&&"string"==typeof this.options.top)if(this.options.top.match(/^(-|)(\d+)vh$/))i=window.innerHeight*parseInt(this.options.top,10)/100;else{var e=t.$(this.options.top).first();e.length&&e.is(":visible")&&(i=-1*(e.offset().top+e.outerHeight()-this.wrapper.offset().top))}this.top=i},reset:function(i){this.calcTop();var e=function(){this.element.css({position:"",top:"",width:"",left:"",margin:"0"}),this.element.removeClass([this.options.animation,"uk-animation-reverse",this.options.clsactive].join(" ")),this.element.addClass(this.options.clsinactive),this.element.trigger("inactive.uk.sticky"),this.currentTop=null,this.animate=!1}.bind(this);!i&&this.options.animation&&t.support.animation&&!t.Utils.isInView(this.wrapper)?(this.animate=!0,this.element.removeClass(this.options.animation).one(t.support.animation.end,function(){e()}).width(),this.element.addClass(this.options.animation+" uk-animation-reverse")):e()},check:function(){if(this.options.disabled)return!1;if(this.options.media)switch(typeof this.options.media){case"number":if(window.innerWidth<this.options.media)return!1;break;case"string":if(window.matchMedia&&!window.matchMedia(this.options.media).matches)return!1}var i=e.scrollTop(),n=s.height(),a=n-window.innerHeight,r=i>a?a-i:0,h=this.wrapper.offset().top,p=h-this.top-r,c=i>=p;return c&&this.options.showup&&(1==o&&(c=!1),-1==o&&!this.element.hasClass(this.options.clsactive)&&t.Utils.isInView(this.wrapper)&&(c=!1)),c}},this.sticky.calcTop(),n.push(this.sticky)},update:function(){i(this.sticky)},enable:function(){this.options.disabled=!1,this.update()},disable:function(t){this.options.disabled=!0,this.sticky.reset(t)},computeWrapper:function(){this.wrapper.css({height:-1==["absolute","fixed"].indexOf(this.element.css("position"))?this.element.outerHeight():"","float":"none"!=this.element.css("float")?this.element.css("float"):"",margin:this.element.css("margin")}),"fixed"==this.element.css("position")&&this.element.css({width:this.sticky.getWidthFrom.length?this.sticky.getWidthFrom.width():this.element.width()})}}),t.sticky});
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
|
2
|
+
(function(addon) {
|
|
3
|
+
|
|
4
|
+
var component;
|
|
5
|
+
|
|
6
|
+
if (window.UIkit) {
|
|
7
|
+
component = addon(UIkit);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (typeof define == "function" && define.amd) {
|
|
11
|
+
define("uikit-timepicker", ["uikit"], function(){
|
|
12
|
+
return component || addon(UIkit);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
})(function(UI){
|
|
17
|
+
|
|
18
|
+
"use strict";
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
UI.component('timepicker', {
|
|
22
|
+
|
|
23
|
+
defaults: {
|
|
24
|
+
format : '24h',
|
|
25
|
+
delay : 0,
|
|
26
|
+
start : 0,
|
|
27
|
+
end : 24
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
boot: function() {
|
|
31
|
+
|
|
32
|
+
// init code
|
|
33
|
+
UI.$html.on("focus.timepicker.uikit", "[data-uk-timepicker]", function(e) {
|
|
34
|
+
|
|
35
|
+
var ele = UI.$(this);
|
|
36
|
+
|
|
37
|
+
if (!ele.data("timepicker")) {
|
|
38
|
+
var obj = UI.timepicker(ele, UI.Utils.options(ele.attr("data-uk-timepicker")));
|
|
39
|
+
|
|
40
|
+
setTimeout(function(){
|
|
41
|
+
obj.autocomplete.input.focus();
|
|
42
|
+
}, 40);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
init: function() {
|
|
48
|
+
|
|
49
|
+
var $this = this, times = getTimeRange(this.options.start, this.options.end), container;
|
|
50
|
+
|
|
51
|
+
this.options.minLength = 0;
|
|
52
|
+
this.options.template = '<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>';
|
|
53
|
+
|
|
54
|
+
this.options.source = function(release) {
|
|
55
|
+
release(times[$this.options.format] || times['12h']);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
if (this.element.is('input')) {
|
|
59
|
+
this.element.wrap('<div class="uk-autocomplete"></div>');
|
|
60
|
+
container = this.element.parent();
|
|
61
|
+
} else {
|
|
62
|
+
container = this.element.addClass('uk-autocomplete');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
this.autocomplete = UI.autocomplete(container, this.options);
|
|
66
|
+
this.autocomplete.dropdown.addClass('uk-dropdown-small uk-dropdown-scrollable');
|
|
67
|
+
|
|
68
|
+
this.autocomplete.on('show.uk.autocomplete', function() {
|
|
69
|
+
|
|
70
|
+
var selected = $this.autocomplete.dropdown.find('[data-value="'+$this.autocomplete.input.val()+'"]');
|
|
71
|
+
|
|
72
|
+
setTimeout(function(){
|
|
73
|
+
$this.autocomplete.pick(selected, true);
|
|
74
|
+
}, 10);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
this.autocomplete.input.on('focus', function(){
|
|
78
|
+
|
|
79
|
+
$this.autocomplete.value = Math.random();
|
|
80
|
+
$this.autocomplete.triggercomplete();
|
|
81
|
+
|
|
82
|
+
}).on('blur', UI.Utils.debounce(function() {
|
|
83
|
+
$this.checkTime();
|
|
84
|
+
}, 100));
|
|
85
|
+
|
|
86
|
+
this.element.data("timepicker", this);
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
checkTime: function() {
|
|
90
|
+
|
|
91
|
+
var arr, timeArray, meridian = 'AM', hour, minute, time = this.autocomplete.input.val();
|
|
92
|
+
|
|
93
|
+
if (this.options.format == '12h') {
|
|
94
|
+
arr = time.split(' ');
|
|
95
|
+
timeArray = arr[0].split(':');
|
|
96
|
+
meridian = arr[1];
|
|
97
|
+
} else {
|
|
98
|
+
timeArray = time.split(':');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
hour = parseInt(timeArray[0], 10);
|
|
102
|
+
minute = parseInt(timeArray[1], 10);
|
|
103
|
+
|
|
104
|
+
if (isNaN(hour)) hour = 0;
|
|
105
|
+
if (isNaN(minute)) minute = 0;
|
|
106
|
+
|
|
107
|
+
if (this.options.format == '12h') {
|
|
108
|
+
if (hour > 12) {
|
|
109
|
+
hour = 12;
|
|
110
|
+
} else if (hour < 0) {
|
|
111
|
+
hour = 12;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (meridian === 'am' || meridian === 'a') {
|
|
115
|
+
meridian = 'AM';
|
|
116
|
+
} else if (meridian === 'pm' || meridian === 'p') {
|
|
117
|
+
meridian = 'PM';
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (meridian !== 'AM' && meridian !== 'PM') {
|
|
121
|
+
meridian = 'AM';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
} else {
|
|
125
|
+
|
|
126
|
+
if (hour >= 24) {
|
|
127
|
+
hour = 23;
|
|
128
|
+
} else if (hour < 0) {
|
|
129
|
+
hour = 0;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (minute < 0) {
|
|
134
|
+
minute = 0;
|
|
135
|
+
} else if (minute >= 60) {
|
|
136
|
+
minute = 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
this.autocomplete.input.val(this.formatTime(hour, minute, meridian)).trigger('change');
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
formatTime: function(hour, minute, meridian) {
|
|
143
|
+
hour = hour < 10 ? '0' + hour : hour;
|
|
144
|
+
minute = minute < 10 ? '0' + minute : minute;
|
|
145
|
+
return hour + ':' + minute + (this.options.format == '12h' ? ' ' + meridian : '');
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// helper
|
|
150
|
+
|
|
151
|
+
function getTimeRange(start, end) {
|
|
152
|
+
|
|
153
|
+
start = start || 0;
|
|
154
|
+
end = end || 24;
|
|
155
|
+
|
|
156
|
+
var times = {'12h':[], '24h':[]}, i, h;
|
|
157
|
+
|
|
158
|
+
for (i = start, h=''; i<end; i++) {
|
|
159
|
+
|
|
160
|
+
h = ''+i;
|
|
161
|
+
|
|
162
|
+
if (i<10) h = '0'+h;
|
|
163
|
+
|
|
164
|
+
times['24h'].push({value: (h+':00')});
|
|
165
|
+
times['24h'].push({value: (h+':30')});
|
|
166
|
+
|
|
167
|
+
if (i === 0) {
|
|
168
|
+
h = 12;
|
|
169
|
+
times['12h'].push({value: (h+':00 AM')});
|
|
170
|
+
times['12h'].push({value: (h+':30 AM')});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (i > 0 && i<13 && i!==12) {
|
|
174
|
+
times['12h'].push({value: (h+':00 AM')});
|
|
175
|
+
times['12h'].push({value: (h+':30 AM')});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (i >= 12) {
|
|
179
|
+
|
|
180
|
+
h = h-12;
|
|
181
|
+
if (h === 0) h = 12;
|
|
182
|
+
if (h < 10) h = '0'+String(h);
|
|
183
|
+
|
|
184
|
+
times['12h'].push({value: (h+':00 PM')});
|
|
185
|
+
times['12h'].push({value: (h+':30 PM')});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return times;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
});
|