~ubuntu-branches/debian/jessie/loggerhead/jessie

« back to all changes in this revision

Viewing changes to loggerhead/static/javascript/yui/build/widget/widget-min.js

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio, Jelmer Vernooij, Andrew Starr-Bochicchio
  • Date: 2014-03-11 13:25:26 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20140311132526-0pzd6w6qm33b6vof
Tags: 1.19~bzr479+dfsg-1
[ Jelmer Vernooij ]
* Remove myself from uploaders.

[ Andrew Starr-Bochicchio ]
* Use machine readable copyright format.
* Add get-orig-source target that strips out the bundled
  copy of YUI3 and create a DFSG clean tarball (Closes: #737427).
  We already use the system copy anyways.
* In debian/watch, use the dversionmangle option to remove the dfsg
  before version number comparison.
* Bump Standards-Version to 3.9.5, no changes needed.
* Add myself to Uploaders.
* Run wrap-and-sort over debian/control.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
3
 
Code licensed under the BSD License:
4
 
http://developer.yahoo.net/yui/license.txt
5
 
version: 3.0.0pr2
6
 
*/
7
 
YUI.add("widget",function(F){var T=F.Lang;function k(L){this._plugins={};this.after("init",function(Y,O){this._initPlugins(O);});this.after("destroy",this._destroyPlugins);}k.prototype={plug:function(Y){if(Y){if(T.isArray(Y)){var O=Y.length;for(var L=0;L<O;L++){this.plug(Y[L]);}}else{if(T.isFunction(Y)){this._plug(Y);}else{this._plug(Y.fn,Y.cfg);}}}return this;},unplug:function(L){if(L){this._unplug(L);}else{for(L in this._plugins){if(F.Object.owns(this._plugins,L)){this._unplug(L);}}}return this;},hasPlugin:function(L){return(this._plugins[L]&&this[L]);},_initPlugins:function(L){var Y=this._getClasses(),m;for(var O=0;O<Y.length;O++){m=Y[O];if(m.PLUGINS){this.plug(m.PLUGINS);}}if(L&&L.plugins){this.plug(L.plugins);}},_destroyPlugins:function(){this._unplug();},_plug:function(Y,L){if(Y&&Y.NS){var O=Y.NS;L=L||{};L.owner=this;if(this.hasPlugin(O)){this[O].setAtts(L);}else{this[O]=new Y(L);this._plugins[O]=Y;}}},_unplug:function(L){if(L){if(this[L]){this[L].destroy();delete this[L];}if(this._plugins[L]){delete this._plugins[L];}}}};F.PluginHost=k;var c="widget",P="content",e="visible",g="hidden",h="disabled",H="focus",D="blur",A="hasFocus",J="width",a="height",l="",b="-",j="boundingBox",W="contentBox",S="parentNode",C="firstChild",d="ownerDocument",f="body",E="tabIndex",I="locale",K="initValue",U="id",V="render",B="rendered",Z="destroyed",N="contentUpdate",M=F.Object,i=F.Node,Q=F.ClassNameManager;var X={};function G(L){this._yuid=F.guid(c);this._strings={};G.superclass.constructor.apply(this,arguments);}G._buildCfg={aggregates:["PLUGINS","HTML_PARSER"]};G.NAME=c;G.UI_SRC="ui";var R=G.UI_SRC;G.ATTRS={rendered:{value:false,readOnly:true},boundingBox:{value:null,set:function(L){return this._setBoundingBox(L);},writeOnce:true},contentBox:{value:null,set:function(L){return this._setContentBox(L);},writeOnce:true},tabIndex:{value:0},hasFocus:{value:false},disabled:{value:false},visible:{value:true},height:{value:l},width:{value:l},moveStyles:{value:false},locale:{value:"en"},strings:{set:function(L){return this._setStrings(L,this.get(I));},get:function(){return this.getStrings(this.get(I));}}};G._NAME_LOWERCASE=G.NAME.toLowerCase();G.getClassName=function(){var L=F.Array(arguments,0,true);L.splice(0,0,this._NAME_LOWERCASE);return Q.getClassName.apply(Q,L);};G.getByNode=function(L){var O,Y=G.getClassName();L=i.get(L);if(L){L=(L.hasClass(Y))?L:L.ancestor("."+Y);if(L){O=X[L.get(U)];}}return O||null;};G.HTML_PARSER={};F.extend(G,F.Base,{getClassName:function(){var L=F.Array(arguments,0,true);L.splice(0,0,this._name);return Q.getClassName.apply(Q,L);},initializer:function(L){this.publish(N,{preventable:false});this._name=this.constructor.NAME.toLowerCase();var Y=this.get(j).get(U);if(Y){X[Y]=this;}var O=this._parseHTML(this.get(W));if(O){F.aggregate(L,O,false);}F.PluginHost.call(this,L);},destructor:function(){var L=this.get(j);F.Event.purgeElement(L,true);var O=L.get(U);if(O&&O in X){delete X[O];}},render:function(L){if(this.get(Z)){return;}if(!this.get(B)){this.publish(V,{queuable:false,defaultFn:this._defRenderFn});L=(L)?i.get(L):null;if(L&&!L.inDoc()){L=null;}this.fire(V,null,L);}return this;},_defRenderFn:function(O,L){this._renderUI(L);this._bindUI();this._syncUI();this.renderer();this._set(B,true);},renderer:function(){this.renderUI();this.bindUI();this.syncUI();},bindUI:function(){},renderUI:function(){},syncUI:function(){},hide:function(){return this.set(e,false);},show:function(){return this.set(e,true);},focus:function(){return this.set(A,true);},blur:function(){return this.set(A,false);},enable:function(){return this.set(h,false);},disable:function(){return this.set(h,true);},_parseHTML:function(O){var L=this._getHtmlParser(),Y,m;if(L&&O&&O.hasChildNodes()){M.each(L,function(p,n,q){m=null;if(T.isFunction(p)){m=p.call(this,O);}else{if(T.isArray(p)){m=O.queryAll(p[0]);}else{m=O.query(p);}}if(m!==null&&m!==undefined){Y=Y||{};Y[n]=m;}},this);}return Y;},_moveStyles:function(n,p){var m=this.WRAP_STYLES,q=n.getStyle("position"),O=this.get(W),o=[0,0],Y,L;if(!this.get("height")){Y=O.get("offsetHeight");}if(!this.get("width")){L=O.get("offsetWidth");}if(q==="absolute"){o=n.getXY();p.setStyles({right:"auto",bottom:"auto"});n.setStyles({right:"auto",bottom:"auto"});}F.each(m,function(t,r){var u=n.getStyle(r);p.setStyle(r,u);if(t===false){n.setStyle(r,"");}else{n.setStyle(r,t);}});if(q==="absolute"){p.setXY(o);}if(Y){this.set("height",Y);}if(L){this.set("width",L);}},_renderBox:function(O){var Y=this.get(W),m=this.get(j),n=m.get(d)||Y.get(d),L;if(!m.compareTo(Y.get(S))){if(this.get("moveStyles")){this._moveStyles(Y,m);}if(Y.inDoc(n)){Y.get(S).replaceChild(m,Y);}m.appendChild(Y);}if(!m.inDoc(n)&&!O){L=i.get(f);if(L.get(C)){L.insertBefore(m,L.get(C));}else{L.appendChild(m);}}else{if(O&&!O.compareTo(m.get(S))){O.appendChild(m);}}},_setBoundingBox:function(L){return this._setBox(L,this.BOUNDING_TEMPLATE);},_setContentBox:function(L){return this._setBox(L,this.CONTENT_TEMPLATE);},_setBox:function(Y,O){Y=i.get(Y)||i.create(O);var L=F.stamp(Y);if(!Y.get(U)){Y.set(U,L);}return Y;},_renderUI:function(L){this._renderBoxClassNames();this._renderBox(L);},_renderBoxClassNames:function(){var o=this._getClasses(),m=this.get(j),O=this.get(W),Y;m.addClass(G.getClassName());for(var n=2,L=o.length;n<L;++n){Y=o[n].NAME;if(Y){m.addClass(Q.getClassName(Y.toLowerCase()));}}O.addClass(this.getClassName(P));},_bindUI:function(){this.after("visibleChange",this._afterVisibleChange);this.after("disabledChange",this._afterDisabledChange);this.after("heightChange",this._afterHeightChange);this.after("widthChange",this._afterWidthChange);this.after("hasFocusChange",this._afterHasFocusChange);this._bindDOMListeners();},_bindDOMListeners:function(){this.get(j).on(H,F.bind(this._onFocus,this));this.get(j).on(D,F.bind(this._onBlur,this));},_syncUI:function(){this._uiSetVisible(this.get(e));this._uiSetDisabled(this.get(h));this._uiSetHeight(this.get(a));this._uiSetWidth(this.get(J));this._uiSetHasFocus(this.get(A));this._uiSetTabIndex(this.get(E));
8
 
},_uiSetHeight:function(L){if(T.isNumber(L)){L=L+this.DEF_UNIT;}this.get(j).setStyle(a,L);},_uiSetWidth:function(L){if(T.isNumber(L)){L=L+this.DEF_UNIT;}this.get(j).setStyle(J,L);},_uiSetVisible:function(Y){var O=this.get(j),L=this.getClassName(g);if(Y===true){O.removeClass(L);}else{O.addClass(L);}},_uiSetDisabled:function(Y){var O=this.get(j),L=this.getClassName(h);if(Y===true){O.addClass(L);}else{O.removeClass(L);}},_uiSetHasFocus:function(m,Y){var O=this.get(j),L=this.getClassName(H);if(m===true){O.addClass(L);if(Y!==R){O.focus();}}else{O.removeClass(L);if(Y!==R){O.blur();}}},_uiSetTabIndex:function(L){this.get(j).set(E,L);},_afterVisibleChange:function(L){this._uiSetVisible(L.newVal);},_afterDisabledChange:function(L){this._uiSetDisabled(L.newVal);},_afterHeightChange:function(L){this._uiSetHeight(L.newVal);},_afterWidthChange:function(L){this._uiSetWidth(L.newVal);},_afterHasFocusChange:function(L){this._uiSetHasFocus(L.newVal,L.src);},_onFocus:function(L){this.set(A,true,{src:R});},_onBlur:function(L){this.set(A,false,{src:R});},toString:function(){return this.constructor.NAME+"["+this._yuid+"]";},DEF_UNIT:"px",CONTENT_TEMPLATE:"<div></div>",BOUNDING_TEMPLATE:"<div></div>",WRAP_STYLES:{height:"100%",width:"100%",zIndex:false,position:"static",top:"0",left:"0",bottom:"",right:"",padding:"",margin:""},_setStrings:function(O,L){var Y=this._strings;L=L.toLowerCase();if(!Y[L]){Y[L]={};}F.aggregate(Y[L],O,true);return Y[L];},_getStrings:function(L){return this._strings[L.toLowerCase()];},getStrings:function(r){r=(r||this.get(I)).toLowerCase();var p=this.getDefaultLocale().toLowerCase(),O=this._getStrings(p),q=(O)?F.merge(O):{},o=r.split(b);if(r!==p||o.length>1){var L="";for(var m=0,Y=o.length;m<Y;++m){L+=o[m];var n=this._getStrings(L);if(n){F.aggregate(q,n,true);}L+=b;}}return q;},getString:function(Y,O){O=(O||this.get(I)).toLowerCase();var m=(this.getDefaultLocale()).toLowerCase(),n=this._getStrings(m)||{},o=n[Y],L=O.lastIndexOf(b);if(O!==m||L!=-1){do{n=this._getStrings(O);if(n&&Y in n){o=n[Y];break;}L=O.lastIndexOf(b);if(L!=-1){O=O.substring(0,L);}}while(L!=-1);}return o;},getDefaultLocale:function(){return this._conf.get(I,K);},_strings:null,_getHtmlParser:function(){if(!this._HTML_PARSER){var Y=this._getClasses(),n={};for(var O=0,L=Y.length;O<L;O++){var m=Y[O].HTML_PARSER;if(m){F.mix(n,m,true);}}this._HTML_PARSER=n;}return this._HTML_PARSER;}});G.PLUGINS=[];F.mix(G,F.PluginHost,false,null,1);F.Widget=G;},"3.0.0pr2",{requires:["base","node","classnamemanager"]});
 
 
b'\\ No newline at end of file'