~ubuntuone-hackers/online-services-common-js/trunk

« back to all changes in this revision

Viewing changes to build/navbar-autocomplete/navbar-autocomplete-min.js

  • Committer: jonas-drange
  • Date: 2014-05-14 09:56:38 UTC
  • mfrom: (32.1.4 searchbar-as-module)
  • Revision ID: jonas.drange@canonical.com-20140514095638-kdlj966519ezk7y3
[r=stephen-stewart] - new module 'searchbar', which now builds only one module, 'searchbar-autocomplete'
- removing all search code in navbar
- bumping ulysses dep to 42

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
YUI.add("navbar-autocomplete",function(e,t){"use strict";(function(){function n(e,n){var r,i,s=n.collapse,o=n.input;if(!s.get("state"))return;if(!t)throw new Error("baseCollapseHeight was falsy or 0");e.type==="autocompleteListPlugin:visibleChange"&&!e.newVal?i=0:i=o.ac.get("listNode").get("scrollHeight"),r=s.getAttrs(["duration","easing"]),r.height=t+i+"px",s.get("host").transition(r)}var t,r=e.all(".ues-navbar");r.size()&&r.each(function(r,i){var s=r.one(".autocomplete"),o,u;if(!s)return;o=s.one('input[type="search"]');if(!o)throw new Error("autocomplete is missing input");o.plug(e.Plugin.AutoComplete,{resultTextLocator:"text",resultHighlighter:"phraseMatch",tabSelect:!0}),o.ac.after(["clear","results","visibleChange"],n,window,{collapse:s.collapse,input:o}),s.collapse.once("open",function(e){t=e.target.get("host").get("scrollHeight")}),u=o.ac.get("boundingBox"),u.addClass("ues-autocomplete").addClass("ues-dropdown"),u.one("ul").addClass("ues-dropdown-menu"),o.ac.before("visibleChange",function(e){u.toggleClass("open",e.newVal)})})})()},"0.0.1",{requires:["node","autocomplete","autocomplete-highlighters"]});