uikit2-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +66 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/uikit2/rails.rb +8 -0
- data/lib/uikit2/rails/version.rb +5 -0
- data/uikit2-rails.gemspec +25 -0
- data/vendor/assets/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/javascripts/uikit.js +3537 -0
- data/vendor/assets/javascripts/uikit/components/accordion.js +172 -0
- data/vendor/assets/javascripts/uikit/components/accordion.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/autocomplete.js +334 -0
- data/vendor/assets/javascripts/uikit/components/autocomplete.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/datepicker.js +3166 -0
- data/vendor/assets/javascripts/uikit/components/datepicker.min.js +3 -0
- data/vendor/assets/javascripts/uikit/components/form-password.js +67 -0
- data/vendor/assets/javascripts/uikit/components/form-password.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/form-select.js +70 -0
- data/vendor/assets/javascripts/uikit/components/form-select.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/grid.js +523 -0
- data/vendor/assets/javascripts/uikit/components/grid.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/htmleditor.js +623 -0
- data/vendor/assets/javascripts/uikit/components/htmleditor.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/lightbox.js +555 -0
- data/vendor/assets/javascripts/uikit/components/lightbox.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/nestable.js +638 -0
- data/vendor/assets/javascripts/uikit/components/nestable.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/notify.js +189 -0
- data/vendor/assets/javascripts/uikit/components/notify.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/pagination.js +147 -0
- data/vendor/assets/javascripts/uikit/components/pagination.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/parallax.js +417 -0
- data/vendor/assets/javascripts/uikit/components/parallax.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/search.js +92 -0
- data/vendor/assets/javascripts/uikit/components/search.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/slider.js +520 -0
- data/vendor/assets/javascripts/uikit/components/slider.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/slideset.js +502 -0
- data/vendor/assets/javascripts/uikit/components/slideset.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/slideshow-fx.js +375 -0
- data/vendor/assets/javascripts/uikit/components/slideshow-fx.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/slideshow.js +545 -0
- data/vendor/assets/javascripts/uikit/components/slideshow.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/sortable.js +664 -0
- data/vendor/assets/javascripts/uikit/components/sortable.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/sticky.js +349 -0
- data/vendor/assets/javascripts/uikit/components/sticky.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/timepicker.js +192 -0
- data/vendor/assets/javascripts/uikit/components/timepicker.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/tooltip.js +234 -0
- data/vendor/assets/javascripts/uikit/components/tooltip.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/upload.js +260 -0
- data/vendor/assets/javascripts/uikit/components/upload.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/alert.js +66 -0
- data/vendor/assets/javascripts/uikit/core/alert.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/button.js +157 -0
- data/vendor/assets/javascripts/uikit/core/button.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/core.js +725 -0
- data/vendor/assets/javascripts/uikit/core/core.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/cover.js +95 -0
- data/vendor/assets/javascripts/uikit/core/cover.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/dropdown.js +421 -0
- data/vendor/assets/javascripts/uikit/core/dropdown.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/grid.js +114 -0
- data/vendor/assets/javascripts/uikit/core/grid.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/modal.js +372 -0
- data/vendor/assets/javascripts/uikit/core/modal.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/nav.js +136 -0
- data/vendor/assets/javascripts/uikit/core/nav.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/offcanvas.js +180 -0
- data/vendor/assets/javascripts/uikit/core/offcanvas.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/scrollspy.js +208 -0
- data/vendor/assets/javascripts/uikit/core/scrollspy.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/smooth-scroll.js +62 -0
- data/vendor/assets/javascripts/uikit/core/smooth-scroll.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/switcher.js +304 -0
- data/vendor/assets/javascripts/uikit/core/switcher.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/tab.js +165 -0
- data/vendor/assets/javascripts/uikit/core/tab.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/toggle.js +120 -0
- data/vendor/assets/javascripts/uikit/core/toggle.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/touch.js +173 -0
- data/vendor/assets/javascripts/uikit/core/touch.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/utility.js +239 -0
- data/vendor/assets/javascripts/uikit/core/utility.min.js +2 -0
- data/vendor/assets/stylesheets/uikit.almost-flat.css +8551 -0
- data/vendor/assets/stylesheets/uikit.css +8252 -0
- data/vendor/assets/stylesheets/uikit.gradient.css +8614 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.css +39 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.css +37 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.gradient.css +39 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.css +52 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.css +50 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.css +52 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.css +129 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.css +123 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.css +139 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.css +128 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.css +124 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.css +128 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.css +78 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.css +78 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.css +78 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.gradient.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.gradient.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.css +35 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.css +35 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.gradient.css +35 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.css +222 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.css +164 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.css +229 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.css +135 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.css +132 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.gradient.css +139 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/notify.css +92 -0
- data/vendor/assets/stylesheets/uikit/components/notify.gradient.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/notify.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/notify.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.css +29 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.css +29 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.css +29 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.css +104 -0
- data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/progress.css +94 -0
- data/vendor/assets/stylesheets/uikit/components/progress.gradient.css +112 -0
- data/vendor/assets/stylesheets/uikit/components/progress.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/progress.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/search.almost-flat.css +191 -0
- data/vendor/assets/stylesheets/uikit/components/search.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/search.css +189 -0
- data/vendor/assets/stylesheets/uikit/components/search.gradient.css +191 -0
- data/vendor/assets/stylesheets/uikit/components/search.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/search.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.css +85 -0
- data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slider.css +85 -0
- data/vendor/assets/stylesheets/uikit/components/slider.gradient.css +85 -0
- data/vendor/assets/stylesheets/uikit/components/slider.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slider.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.css +140 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.css +140 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.css +140 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.css +62 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.css +62 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.gradient.css +62 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.css +31 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.css +31 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.gradient.css +31 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.css +118 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.css +116 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.css +118 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.css +10 -0
- data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/upload.css +10 -0
- data/vendor/assets/stylesheets/uikit/components/upload.gradient.css +10 -0
- data/vendor/assets/stylesheets/uikit/components/upload.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/upload.min.css +2 -0
- metadata +295 -0
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
!function(e){"use strict";function t(t,o,i,n){if(t=e.$(t),o=e.$(o),i=i||window.innerWidth,n=n||t.offset(),o.length){var s=o.outerWidth();if(t.css("min-width",s),"right"==e.langdirection){var d=i-(o.offset().left+s),r=i-(t.offset().left+t.outerWidth());t.css("margin-right",d-r)}else t.css("margin-left",o.offset().left-n.left)}}var o,i=!1;e.component("dropdown",{defaults:{mode:"hover",remaintime:800,justify:!1,boundary:e.$win,delay:0,hoverDelayIdle:250},remainIdle:!1,boot:function(){var t=e.support.touch?"click":"mouseenter";e.$html.on(t+".dropdown.uikit","[data-uk-dropdown]",function(o){var i=e.$(this);if(!i.data("dropdown")){var n=e.dropdown(i,e.Utils.options(i.attr("data-uk-dropdown")));("click"==t||"mouseenter"==t&&"hover"==n.options.mode)&&n.element.trigger(t),n.element.find(".uk-dropdown").length&&o.preventDefault()}})},init:function(){var t=this;this.dropdown=this.find(".uk-dropdown"),this.centered=this.dropdown.hasClass("uk-dropdown-center"),this.justified=this.options.justify?e.$(this.options.justify):!1,this.boundary=e.$(this.options.boundary),this.flipped=this.dropdown.hasClass("uk-dropdown-flip"),this.boundary.length||(this.boundary=e.$win),this.element.attr("aria-haspopup","true"),this.element.attr("aria-expanded",this.element.hasClass("uk-open")),"click"==this.options.mode||e.support.touch?this.on("click.uikit.dropdown",function(o){var i=e.$(o.target);i.parents(".uk-dropdown").length||((i.is("a[href='#']")||i.parent().is("a[href='#']")||t.dropdown.length&&!t.dropdown.is(":visible"))&&o.preventDefault(),i.blur()),t.element.hasClass("uk-open")?(!t.dropdown.find(o.target).length||i.is(".uk-dropdown-close")||i.parents(".uk-dropdown-close").length)&&t.hide():t.show()}):this.on("mouseenter",function(){t.trigger("pointerenter.uk.dropdown",[t]),t.remainIdle&&clearTimeout(t.remainIdle),o&&clearTimeout(o),i&&i==t||(o=i&&i!=t?setTimeout(function(){o=setTimeout(t.show.bind(t),t.options.delay)},t.options.hoverDelayIdle):setTimeout(t.show.bind(t),t.options.delay))}).on("mouseleave",function(){o&&clearTimeout(o),t.remainIdle=setTimeout(function(){i&&i==t&&t.hide()},t.options.remaintime),t.trigger("pointerleave.uk.dropdown",[t])}).on("click",function(o){var n=e.$(o.target);t.remainIdle&&clearTimeout(t.remainIdle),i&&i==t||((n.is("a[href='#']")||n.parent().is("a[href='#']"))&&o.preventDefault(),t.show())})},show:function(){e.$html.off("click.outer.dropdown"),i&&i!=this&&i.hide(!0),o&&clearTimeout(o),this.trigger("beforeshow.uk.dropdown",[this]),this.checkDimensions(),this.element.addClass("uk-open"),this.element.attr("aria-expanded","true"),this.trigger("show.uk.dropdown",[this]),e.Utils.checkDisplay(this.dropdown,!0),i=this,this.registerOuterClick()},hide:function(e){this.trigger("beforehide.uk.dropdown",[this,e]),this.element.removeClass("uk-open"),this.remainIdle&&clearTimeout(this.remainIdle),this.remainIdle=!1,this.element.attr("aria-expanded","false"),this.trigger("hide.uk.dropdown",[this,e]),i==this&&(i=!1)},registerOuterClick:function(){var t=this;e.$html.off("click.outer.dropdown"),setTimeout(function(){e.$html.on("click.outer.dropdown",function(n){o&&clearTimeout(o);e.$(n.target);i!=t||t.element.find(n.target).length||(t.hide(!0),e.$html.off("click.outer.dropdown"))})},10)},checkDimensions:function(){if(this.dropdown.length){this.justified&&this.justified.length&&this.dropdown.css("min-width","");var o=this,i=this.dropdown.css("margin-"+e.langdirection,""),n=i.show().offset(),s=i.outerWidth(),d=this.boundary.width(),r=this.boundary.offset()?this.boundary.offset().left:0;this.centered&&(i.css("margin-"+e.langdirection,-1*(parseFloat(s)/2-i.parent().width()/2)),n=i.offset(),(s+n.left>d||n.left<0)&&(i.css("margin-"+e.langdirection,""),n=i.offset())),this.justified&&this.justified.length&&(t(i,this.justified,d,n),n=i.offset()),s+(n.left-r)>d&&(i.addClass("uk-dropdown-flip"),n=i.offset()),n.left-r<0&&(i.addClass("uk-dropdown-stack"),i.hasClass("uk-dropdown-flip")&&(this.flipped||(i.removeClass("uk-dropdown-flip"),n=i.offset(),i.addClass("uk-dropdown-flip")),setTimeout(function(){(i.offset().left-r<0||!o.flipped&&i.outerWidth()+(n.left-r)<d)&&i.removeClass("uk-dropdown-flip")},0)),this.trigger("stack.uk.dropdown",[this])),i.css("display","")}}}),e.component("dropdownOverlay",{defaults:{justify:!1,cls:"",duration:200},boot:function(){e.ready(function(t){e.$("[data-uk-dropdown-overlay]",t).each(function(){var t=e.$(this);t.data("dropdownOverlay")||e.dropdownOverlay(t,e.Utils.options(t.attr("data-uk-dropdown-overlay")))})})},init:function(){var o=this;this.justified=this.options.justify?e.$(this.options.justify):!1,this.overlay=this.element.find("uk-dropdown-overlay"),this.overlay.length||(this.overlay=e.$('<div class="uk-dropdown-overlay"></div>').appendTo(this.element)),this.overlay.addClass(this.options.cls),this.on({"beforeshow.uk.dropdown":function(e,i){o.dropdown=i,o.justified&&o.justified.length&&t(o.overlay.css({display:"block","margin-left":"","margin-right":""}),o.justified,o.justified.outerWidth())},"show.uk.dropdown":function(){var t=o.dropdown.dropdown.outerHeight(!0);o.dropdown.element.removeClass("uk-open"),o.overlay.stop().css("display","block").animate({height:t},o.options.duration,function(){o.dropdown.dropdown.css("visibility",""),o.dropdown.element.addClass("uk-open"),e.Utils.checkDisplay(o.dropdown.dropdown,!0)}),o.pointerleave=!1},"hide.uk.dropdown":function(){o.overlay.stop().animate({height:0},o.options.duration)},"pointerenter.uk.dropdown":function(){clearTimeout(o.remainIdle)},"pointerleave.uk.dropdown":function(){o.pointerleave=!0}}),this.overlay.on({mouseenter:function(){o.remainIdle&&(clearTimeout(o.dropdown.remainIdle),clearTimeout(o.remainIdle))},mouseleave:function(){o.pointerleave&&i&&(o.remainIdle=setTimeout(function(){i&&i.hide()},i.options.remaintime))}})}})}(UIkit);
|
@@ -0,0 +1,114 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(UI) {
|
3
|
+
|
4
|
+
"use strict";
|
5
|
+
|
6
|
+
var grids = [];
|
7
|
+
|
8
|
+
UI.component('gridMatchHeight', {
|
9
|
+
|
10
|
+
defaults: {
|
11
|
+
"target" : false,
|
12
|
+
"row" : true,
|
13
|
+
"ignorestacked" : false
|
14
|
+
},
|
15
|
+
|
16
|
+
boot: function() {
|
17
|
+
|
18
|
+
// init code
|
19
|
+
UI.ready(function(context) {
|
20
|
+
|
21
|
+
UI.$("[data-uk-grid-match]", context).each(function() {
|
22
|
+
var grid = UI.$(this), obj;
|
23
|
+
|
24
|
+
if (!grid.data("gridMatchHeight")) {
|
25
|
+
obj = UI.gridMatchHeight(grid, UI.Utils.options(grid.attr("data-uk-grid-match")));
|
26
|
+
}
|
27
|
+
});
|
28
|
+
});
|
29
|
+
},
|
30
|
+
|
31
|
+
init: function() {
|
32
|
+
|
33
|
+
var $this = this;
|
34
|
+
|
35
|
+
this.columns = this.element.children();
|
36
|
+
this.elements = this.options.target ? this.find(this.options.target) : this.columns;
|
37
|
+
|
38
|
+
if (!this.columns.length) return;
|
39
|
+
|
40
|
+
UI.$win.on('load resize orientationchange', (function() {
|
41
|
+
|
42
|
+
var fn = function() {
|
43
|
+
$this.match();
|
44
|
+
};
|
45
|
+
|
46
|
+
UI.$(function() { fn(); });
|
47
|
+
|
48
|
+
return UI.Utils.debounce(fn, 50);
|
49
|
+
})());
|
50
|
+
|
51
|
+
UI.$html.on("changed.uk.dom", function(e) {
|
52
|
+
$this.columns = $this.element.children();
|
53
|
+
$this.elements = $this.options.target ? $this.find($this.options.target) : $this.columns;
|
54
|
+
$this.match();
|
55
|
+
});
|
56
|
+
|
57
|
+
this.on("display.uk.check", function(e) {
|
58
|
+
if(this.element.is(":visible")) this.match();
|
59
|
+
}.bind(this));
|
60
|
+
|
61
|
+
grids.push(this);
|
62
|
+
},
|
63
|
+
|
64
|
+
match: function() {
|
65
|
+
|
66
|
+
var firstvisible = this.columns.filter(":visible:first");
|
67
|
+
|
68
|
+
if (!firstvisible.length) return;
|
69
|
+
|
70
|
+
var stacked = Math.ceil(100 * parseFloat(firstvisible.css('width')) / parseFloat(firstvisible.parent().css('width'))) >= 100;
|
71
|
+
|
72
|
+
if (stacked && !this.options.ignorestacked) {
|
73
|
+
this.revert();
|
74
|
+
} else {
|
75
|
+
UI.Utils.matchHeights(this.elements, this.options);
|
76
|
+
}
|
77
|
+
|
78
|
+
return this;
|
79
|
+
},
|
80
|
+
|
81
|
+
revert: function() {
|
82
|
+
this.elements.css('min-height', '');
|
83
|
+
return this;
|
84
|
+
}
|
85
|
+
});
|
86
|
+
|
87
|
+
UI.component('gridMargin', {
|
88
|
+
|
89
|
+
defaults: {
|
90
|
+
"cls": "uk-grid-margin"
|
91
|
+
},
|
92
|
+
|
93
|
+
boot: function() {
|
94
|
+
|
95
|
+
// init code
|
96
|
+
UI.ready(function(context) {
|
97
|
+
|
98
|
+
UI.$("[data-uk-grid-margin]", context).each(function() {
|
99
|
+
var grid = UI.$(this), obj;
|
100
|
+
|
101
|
+
if (!grid.data("gridMargin")) {
|
102
|
+
obj = UI.gridMargin(grid, UI.Utils.options(grid.attr("data-uk-grid-margin")));
|
103
|
+
}
|
104
|
+
});
|
105
|
+
});
|
106
|
+
},
|
107
|
+
|
108
|
+
init: function() {
|
109
|
+
|
110
|
+
var stackMargin = UI.stackMargin(this.element, this.options);
|
111
|
+
}
|
112
|
+
});
|
113
|
+
|
114
|
+
})(UIkit);
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
!function(t){"use strict";var i=[];t.component("gridMatchHeight",{defaults:{target:!1,row:!0,ignorestacked:!1},boot:function(){t.ready(function(i){t.$("[data-uk-grid-match]",i).each(function(){var i,n=t.$(this);n.data("gridMatchHeight")||(i=t.gridMatchHeight(n,t.Utils.options(n.attr("data-uk-grid-match"))))})})},init:function(){var n=this;this.columns=this.element.children(),this.elements=this.options.target?this.find(this.options.target):this.columns,this.columns.length&&(t.$win.on("load resize orientationchange",function(){var i=function(){n.match()};return t.$(function(){i()}),t.Utils.debounce(i,50)}()),t.$html.on("changed.uk.dom",function(){n.columns=n.element.children(),n.elements=n.options.target?n.find(n.options.target):n.columns,n.match()}),this.on("display.uk.check",function(){this.element.is(":visible")&&this.match()}.bind(this)),i.push(this))},match:function(){var i=this.columns.filter(":visible:first");if(i.length){var n=Math.ceil(100*parseFloat(i.css("width"))/parseFloat(i.parent().css("width")))>=100;return n&&!this.options.ignorestacked?this.revert():t.Utils.matchHeights(this.elements,this.options),this}},revert:function(){return this.elements.css("min-height",""),this}}),t.component("gridMargin",{defaults:{cls:"uk-grid-margin"},boot:function(){t.ready(function(i){t.$("[data-uk-grid-margin]",i).each(function(){var i,n=t.$(this);n.data("gridMargin")||(i=t.gridMargin(n,t.Utils.options(n.attr("data-uk-grid-margin"))))})})},init:function(){t.stackMargin(this.element,this.options)}})}(UIkit);
|
@@ -0,0 +1,372 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(UI) {
|
3
|
+
|
4
|
+
"use strict";
|
5
|
+
|
6
|
+
var active = false, activeCount = 0, $html = UI.$html, body;
|
7
|
+
|
8
|
+
UI.component('modal', {
|
9
|
+
|
10
|
+
defaults: {
|
11
|
+
keyboard: true,
|
12
|
+
bgclose: true,
|
13
|
+
minScrollHeight: 150,
|
14
|
+
center: false,
|
15
|
+
modal: true
|
16
|
+
},
|
17
|
+
|
18
|
+
scrollable: false,
|
19
|
+
transition: false,
|
20
|
+
|
21
|
+
init: function() {
|
22
|
+
|
23
|
+
if (!body) body = UI.$('body');
|
24
|
+
|
25
|
+
if (!this.element.length) return;
|
26
|
+
|
27
|
+
var $this = this;
|
28
|
+
|
29
|
+
this.paddingdir = "padding-" + (UI.langdirection == 'left' ? "right":"left");
|
30
|
+
this.dialog = this.find(".uk-modal-dialog");
|
31
|
+
|
32
|
+
this.active = false;
|
33
|
+
|
34
|
+
// Update ARIA
|
35
|
+
this.element.attr('aria-hidden', this.element.hasClass("uk-open"));
|
36
|
+
|
37
|
+
this.on("click", ".uk-modal-close", function(e) {
|
38
|
+
e.preventDefault();
|
39
|
+
$this.hide();
|
40
|
+
}).on("click", function(e) {
|
41
|
+
|
42
|
+
var target = UI.$(e.target);
|
43
|
+
|
44
|
+
if (target[0] == $this.element[0] && $this.options.bgclose) {
|
45
|
+
$this.hide();
|
46
|
+
}
|
47
|
+
});
|
48
|
+
},
|
49
|
+
|
50
|
+
toggle: function() {
|
51
|
+
return this[this.isActive() ? "hide" : "show"]();
|
52
|
+
},
|
53
|
+
|
54
|
+
show: function() {
|
55
|
+
|
56
|
+
if (!this.element.length) return;
|
57
|
+
|
58
|
+
var $this = this;
|
59
|
+
|
60
|
+
if (this.isActive()) return;
|
61
|
+
|
62
|
+
if (this.options.modal && active) {
|
63
|
+
active.hide(true);
|
64
|
+
}
|
65
|
+
|
66
|
+
this.element.removeClass("uk-open").show();
|
67
|
+
this.resize();
|
68
|
+
|
69
|
+
if (this.options.modal) {
|
70
|
+
active = this;
|
71
|
+
}
|
72
|
+
|
73
|
+
this.active = true;
|
74
|
+
|
75
|
+
activeCount++;
|
76
|
+
|
77
|
+
this.element.addClass("uk-open");
|
78
|
+
|
79
|
+
$html.addClass("uk-modal-page").height(); // force browser engine redraw
|
80
|
+
|
81
|
+
// Update ARIA
|
82
|
+
this.element.attr('aria-hidden', 'false');
|
83
|
+
|
84
|
+
this.element.trigger("show.uk.modal");
|
85
|
+
|
86
|
+
UI.Utils.checkDisplay(this.dialog, true);
|
87
|
+
|
88
|
+
return this;
|
89
|
+
},
|
90
|
+
|
91
|
+
hide: function(force) {
|
92
|
+
|
93
|
+
if (!force && UI.support.transition) {
|
94
|
+
|
95
|
+
var $this = this;
|
96
|
+
|
97
|
+
this.one(UI.support.transition.end, function() {
|
98
|
+
$this._hide();
|
99
|
+
}).removeClass("uk-open");
|
100
|
+
|
101
|
+
} else {
|
102
|
+
|
103
|
+
this._hide();
|
104
|
+
}
|
105
|
+
|
106
|
+
return this;
|
107
|
+
},
|
108
|
+
|
109
|
+
resize: function() {
|
110
|
+
|
111
|
+
var bodywidth = body.width();
|
112
|
+
|
113
|
+
this.scrollbarwidth = window.innerWidth - bodywidth;
|
114
|
+
|
115
|
+
body.css(this.paddingdir, this.scrollbarwidth);
|
116
|
+
|
117
|
+
this.element.css('overflow-y', this.scrollbarwidth ? 'scroll' : 'auto');
|
118
|
+
|
119
|
+
if (!this.updateScrollable() && this.options.center) {
|
120
|
+
|
121
|
+
var dh = this.dialog.outerHeight(),
|
122
|
+
pad = parseInt(this.dialog.css('margin-top'), 10) + parseInt(this.dialog.css('margin-bottom'), 10);
|
123
|
+
|
124
|
+
if ((dh + pad) < window.innerHeight) {
|
125
|
+
this.dialog.css({'top': (window.innerHeight/2 - dh/2) - pad });
|
126
|
+
} else {
|
127
|
+
this.dialog.css({'top': ''});
|
128
|
+
}
|
129
|
+
}
|
130
|
+
},
|
131
|
+
|
132
|
+
updateScrollable: function() {
|
133
|
+
|
134
|
+
// has scrollable?
|
135
|
+
var scrollable = this.dialog.find('.uk-overflow-container:visible:first');
|
136
|
+
|
137
|
+
if (scrollable.length) {
|
138
|
+
|
139
|
+
scrollable.css("height", 0);
|
140
|
+
|
141
|
+
var offset = Math.abs(parseInt(this.dialog.css("margin-top"), 10)),
|
142
|
+
dh = this.dialog.outerHeight(),
|
143
|
+
wh = window.innerHeight,
|
144
|
+
h = wh - 2*(offset < 20 ? 20:offset) - dh;
|
145
|
+
|
146
|
+
scrollable.css("height", h < this.options.minScrollHeight ? "":h);
|
147
|
+
|
148
|
+
return true;
|
149
|
+
}
|
150
|
+
|
151
|
+
return false;
|
152
|
+
},
|
153
|
+
|
154
|
+
_hide: function() {
|
155
|
+
|
156
|
+
this.active = false;
|
157
|
+
activeCount--;
|
158
|
+
|
159
|
+
this.element.hide().removeClass("uk-open");
|
160
|
+
|
161
|
+
// Update ARIA
|
162
|
+
this.element.attr('aria-hidden', 'true');
|
163
|
+
|
164
|
+
if (!activeCount) {
|
165
|
+
$html.removeClass("uk-modal-page");
|
166
|
+
body.css(this.paddingdir, "");
|
167
|
+
}
|
168
|
+
|
169
|
+
if(active===this) active = false;
|
170
|
+
|
171
|
+
this.trigger("hide.uk.modal");
|
172
|
+
},
|
173
|
+
|
174
|
+
isActive: function() {
|
175
|
+
return this.active;
|
176
|
+
}
|
177
|
+
|
178
|
+
});
|
179
|
+
|
180
|
+
UI.component('modalTrigger', {
|
181
|
+
|
182
|
+
boot: function() {
|
183
|
+
|
184
|
+
// init code
|
185
|
+
UI.$html.on("click.modal.uikit", "[data-uk-modal]", function(e) {
|
186
|
+
|
187
|
+
var ele = UI.$(this);
|
188
|
+
|
189
|
+
if (ele.is("a")) {
|
190
|
+
e.preventDefault();
|
191
|
+
}
|
192
|
+
|
193
|
+
if (!ele.data("modalTrigger")) {
|
194
|
+
var modal = UI.modalTrigger(ele, UI.Utils.options(ele.attr("data-uk-modal")));
|
195
|
+
modal.show();
|
196
|
+
}
|
197
|
+
|
198
|
+
});
|
199
|
+
|
200
|
+
// close modal on esc button
|
201
|
+
UI.$html.on('keydown.modal.uikit', function (e) {
|
202
|
+
|
203
|
+
if (active && e.keyCode === 27 && active.options.keyboard) { // ESC
|
204
|
+
e.preventDefault();
|
205
|
+
active.hide();
|
206
|
+
}
|
207
|
+
});
|
208
|
+
|
209
|
+
UI.$win.on("resize orientationchange", UI.Utils.debounce(function(){
|
210
|
+
if (active) active.resize();
|
211
|
+
}, 150));
|
212
|
+
},
|
213
|
+
|
214
|
+
init: function() {
|
215
|
+
|
216
|
+
var $this = this;
|
217
|
+
|
218
|
+
this.options = UI.$.extend({
|
219
|
+
"target": $this.element.is("a") ? $this.element.attr("href") : false
|
220
|
+
}, this.options);
|
221
|
+
|
222
|
+
this.modal = UI.modal(this.options.target, this.options);
|
223
|
+
|
224
|
+
this.on("click", function(e) {
|
225
|
+
e.preventDefault();
|
226
|
+
$this.show();
|
227
|
+
});
|
228
|
+
|
229
|
+
//methods
|
230
|
+
this.proxy(this.modal, "show hide isActive");
|
231
|
+
}
|
232
|
+
});
|
233
|
+
|
234
|
+
UI.modal.dialog = function(content, options) {
|
235
|
+
|
236
|
+
var modal = UI.modal(UI.$(UI.modal.dialog.template).appendTo("body"), options);
|
237
|
+
|
238
|
+
modal.on("hide.uk.modal", function(){
|
239
|
+
if (modal.persist) {
|
240
|
+
modal.persist.appendTo(modal.persist.data("modalPersistParent"));
|
241
|
+
modal.persist = false;
|
242
|
+
}
|
243
|
+
modal.element.remove();
|
244
|
+
});
|
245
|
+
|
246
|
+
setContent(content, modal);
|
247
|
+
|
248
|
+
return modal;
|
249
|
+
};
|
250
|
+
|
251
|
+
UI.modal.dialog.template = '<div class="uk-modal"><div class="uk-modal-dialog" style="min-height:0;"></div></div>';
|
252
|
+
|
253
|
+
UI.modal.alert = function(content, options) {
|
254
|
+
|
255
|
+
options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, options);
|
256
|
+
|
257
|
+
var modal = UI.modal.dialog(([
|
258
|
+
'<div class="uk-margin uk-modal-content">'+String(content)+'</div>',
|
259
|
+
'<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-primary uk-modal-close">'+options.labels.Ok+'</button></div>'
|
260
|
+
]).join(""), options);
|
261
|
+
|
262
|
+
modal.on('show.uk.modal', function(){
|
263
|
+
setTimeout(function(){
|
264
|
+
modal.element.find('button:first').focus();
|
265
|
+
}, 50);
|
266
|
+
});
|
267
|
+
|
268
|
+
return modal.show();
|
269
|
+
};
|
270
|
+
|
271
|
+
UI.modal.confirm = function(content, onconfirm, options) {
|
272
|
+
|
273
|
+
onconfirm = UI.$.isFunction(onconfirm) ? onconfirm : function(){};
|
274
|
+
options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, options);
|
275
|
+
|
276
|
+
var modal = UI.modal.dialog(([
|
277
|
+
'<div class="uk-margin uk-modal-content">'+String(content)+'</div>',
|
278
|
+
'<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-modal-close">'+options.labels.Cancel+'</button> <button class="uk-button uk-button-primary js-modal-confirm">'+options.labels.Ok+'</button></div>'
|
279
|
+
]).join(""), options);
|
280
|
+
|
281
|
+
modal.element.find(".js-modal-confirm").on("click", function(){
|
282
|
+
onconfirm();
|
283
|
+
modal.hide();
|
284
|
+
});
|
285
|
+
|
286
|
+
modal.on('show.uk.modal', function(){
|
287
|
+
setTimeout(function(){
|
288
|
+
modal.element.find('.js-modal-confirm').focus();
|
289
|
+
}, 50);
|
290
|
+
});
|
291
|
+
|
292
|
+
return modal.show();
|
293
|
+
};
|
294
|
+
|
295
|
+
UI.modal.prompt = function(text, value, onsubmit, options) {
|
296
|
+
|
297
|
+
onsubmit = UI.$.isFunction(onsubmit) ? onsubmit : function(value){};
|
298
|
+
options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, options);
|
299
|
+
|
300
|
+
var modal = UI.modal.dialog(([
|
301
|
+
text ? '<div class="uk-modal-content uk-form">'+String(text)+'</div>':'',
|
302
|
+
'<div class="uk-margin-small-top uk-modal-content uk-form"><p><input type="text" class="uk-width-1-1"></p></div>',
|
303
|
+
'<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-modal-close">'+options.labels.Cancel+'</button> <button class="uk-button uk-button-primary js-modal-ok">'+options.labels.Ok+'</button></div>'
|
304
|
+
]).join(""), options),
|
305
|
+
|
306
|
+
input = modal.element.find("input[type='text']").val(value || '').on('keyup', function(e){
|
307
|
+
if (e.keyCode == 13) {
|
308
|
+
modal.element.find(".js-modal-ok").trigger('click');
|
309
|
+
}
|
310
|
+
});
|
311
|
+
|
312
|
+
modal.element.find(".js-modal-ok").on("click", function(){
|
313
|
+
if (onsubmit(input.val())!==false){
|
314
|
+
modal.hide();
|
315
|
+
}
|
316
|
+
});
|
317
|
+
|
318
|
+
modal.on('show.uk.modal', function(){
|
319
|
+
setTimeout(function(){
|
320
|
+
input.focus();
|
321
|
+
}, 50);
|
322
|
+
});
|
323
|
+
|
324
|
+
return modal.show();
|
325
|
+
};
|
326
|
+
|
327
|
+
UI.modal.blockUI = function(content, options) {
|
328
|
+
|
329
|
+
var modal = UI.modal.dialog(([
|
330
|
+
'<div class="uk-margin uk-modal-content">'+String(content || '<div class="uk-text-center">...</div>')+'</div>'
|
331
|
+
]).join(""), UI.$.extend({bgclose:false, keyboard:false, modal:false}, options));
|
332
|
+
|
333
|
+
modal.content = modal.element.find('.uk-modal-content:first');
|
334
|
+
|
335
|
+
return modal.show();
|
336
|
+
};
|
337
|
+
|
338
|
+
|
339
|
+
UI.modal.labels = {
|
340
|
+
'Ok': 'Ok',
|
341
|
+
'Cancel': 'Cancel'
|
342
|
+
};
|
343
|
+
|
344
|
+
|
345
|
+
// helper functions
|
346
|
+
function setContent(content, modal){
|
347
|
+
|
348
|
+
if(!modal) return;
|
349
|
+
|
350
|
+
if (typeof content === 'object') {
|
351
|
+
|
352
|
+
// convert DOM object to a jQuery object
|
353
|
+
content = content instanceof jQuery ? content : UI.$(content);
|
354
|
+
|
355
|
+
if(content.parent().length) {
|
356
|
+
modal.persist = content;
|
357
|
+
modal.persist.data("modalPersistParent", content.parent());
|
358
|
+
}
|
359
|
+
}else if (typeof content === 'string' || typeof content === 'number') {
|
360
|
+
// just insert the data as innerHTML
|
361
|
+
content = UI.$('<div></div>').html(content);
|
362
|
+
}else {
|
363
|
+
// unsupported data type!
|
364
|
+
content = UI.$('<div></div>').html('UIkit.modal Error: Unsupported data type: ' + typeof content);
|
365
|
+
}
|
366
|
+
|
367
|
+
content.appendTo(modal.element.find('.uk-modal-dialog'));
|
368
|
+
|
369
|
+
return modal;
|
370
|
+
}
|
371
|
+
|
372
|
+
})(UIkit);
|