From 5c231ceade17e7f5b1bba90e845dd2d17e54da1c Mon Sep 17 00:00:00 2001 From: Valentin Heinz Date: Sat, 8 Apr 2017 14:03:25 +0200 Subject: uikit demo theme ported to pelican (#385) --- uikit/static/js/components/search.min.js | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 uikit/static/js/components/search.min.js (limited to 'uikit/static/js/components/search.min.js') diff --git a/uikit/static/js/components/search.min.js b/uikit/static/js/components/search.min.js new file mode 100644 index 0000000..09fedd7 --- /dev/null +++ b/uikit/static/js/components/search.min.js @@ -0,0 +1,2 @@ +/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ +!function(e){var s;window.UIkit&&(s=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-search",["uikit"],function(){return s||e(UIkit)})}(function(e){"use strict";e.component("search",{defaults:{msgResultsHeader:"Search Results",msgMoreResults:"More Results",msgNoResults:"No results found",template:'',renderer:function(e){var s=this.options;this.dropdown.append(this.template({items:e.results||[],msgResultsHeader:s.msgResultsHeader,msgMoreResults:s.msgMoreResults,msgNoResults:s.msgNoResults})),this.show()}},boot:function(){e.$html.on("focus.search.uikit","[data-uk-search]",function(){var s=e.$(this);if(!s.data("search")){e.search(s,e.Utils.options(s.attr("data-uk-search")))}})},init:function(){var s=this;this.autocomplete=e.autocomplete(this.element,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-search"),this.autocomplete.input.on("keyup",function(){s.element[s.autocomplete.input.val()?"addClass":"removeClass"]("uk-active")}).closest("form").on("reset",function(){s.value="",s.element.removeClass("uk-active")}),this.on("selectitem.uk.autocomplete",function(e,t){t.url?location.href=t.url:t.moreresults&&s.autocomplete.input.closest("form").submit()}),this.element.data("search",this)}})}); \ No newline at end of file -- cgit