From 20723b4192c643ef430974b6550aeca4f71d2014 Mon Sep 17 00:00:00 2001 From: Chad Auld Date: Thu, 20 Aug 2009 17:28:12 -0700 Subject: [PATCH] Making the api and example documentation part of the phploader package itself. Will remove from yui2-docs. --- README | 6 + api_docs/PHP.YAHOO_util_Loader.html | 1271 +++++++++++++++++ api_docs/assets/ac-js | 145 ++ api_docs/assets/api-js | 42 + api_docs/assets/api.css | 241 ++++ api_docs/assets/reset-fonts-grids-min.css | 7 + api_docs/assets/yui.png | Bin 0 -> 7648 bytes api_docs/index.html | 121 ++ examples/assets/bg_hd.gif | Bin 0 -> 96 bytes examples/assets/custom/custom.css | 3 + examples/assets/custom/data.js | 1 + examples/assets/dpSyntaxHighlighter.css | 190 +++ examples/assets/dpSyntaxHighlighter.js | 805 +++++++++++ examples/assets/example-hd-bg.gif | Bin 0 -> 1487 bytes examples/assets/favicon.ico | Bin 0 -> 6598 bytes examples/assets/reset-fonts-grids-min.css | 7 + examples/assets/yui.css | 322 +++++ examples/assets/yui.gif | Bin 0 -> 5901 bytes examples/assets/yuilib.jpg | Bin 0 -> 9186 bytes examples/inc/config.inc | 3 + examples/inc/footer.inc | 17 + examples/inc/header.inc | 25 + examples/inc/moduleNames.inc | 103 ++ examples/inc/phploader.inc | 9 + examples/inc/resources.inc | 8 + examples/inc/support.inc | 18 + examples/index.php | 224 +++ examples/phploader-advanced.php | 101 ++ examples/phploader-advanced_source.php | 38 + examples/phploader-basic.php | 96 ++ examples/phploader-basic_source.php | 34 + .../phploader-custom-modules-with-yui.php | 194 +++ ...ploader-custom-modules-with-yui_source.php | 93 ++ examples/phploader-custom-modules.php | 192 +++ examples/phploader-custom-modules_source.php | 94 ++ examples/phploader-local-combo-handler.php | 101 ++ lib/meta/config_2.7.0.php | 2 +- lib/meta/config_3.0.0b1.php | 2 +- phploader/combo.php | 2 +- phploader/loader.php | 2 +- phploader/test/2.0.php | 2 +- phploader/test/json.php | 14 +- phploader/test/loader-inc.php | 2 +- phploader/test/test-loader.php | 28 +- phploader/test/test.php | 2 +- phploader/test/testall.php | 6 +- phploader/test/testcallback.php | 6 +- phploader/test/verify.php | 2 +- phploader/test/yui.php | 4 +- 49 files changed, 4548 insertions(+), 37 deletions(-) create mode 100644 api_docs/PHP.YAHOO_util_Loader.html create mode 100644 api_docs/assets/ac-js create mode 100644 api_docs/assets/api-js create mode 100644 api_docs/assets/api.css create mode 100644 api_docs/assets/reset-fonts-grids-min.css create mode 100644 api_docs/assets/yui.png create mode 100644 api_docs/index.html create mode 100644 examples/assets/bg_hd.gif create mode 100644 examples/assets/custom/custom.css create mode 100644 examples/assets/custom/data.js create mode 100644 examples/assets/dpSyntaxHighlighter.css create mode 100644 examples/assets/dpSyntaxHighlighter.js create mode 100644 examples/assets/example-hd-bg.gif create mode 100755 examples/assets/favicon.ico create mode 100644 examples/assets/reset-fonts-grids-min.css create mode 100644 examples/assets/yui.css create mode 100644 examples/assets/yui.gif create mode 100644 examples/assets/yuilib.jpg create mode 100644 examples/inc/config.inc create mode 100644 examples/inc/footer.inc create mode 100644 examples/inc/header.inc create mode 100644 examples/inc/moduleNames.inc create mode 100644 examples/inc/phploader.inc create mode 100644 examples/inc/resources.inc create mode 100644 examples/inc/support.inc create mode 100644 examples/index.php create mode 100644 examples/phploader-advanced.php create mode 100644 examples/phploader-advanced_source.php create mode 100644 examples/phploader-basic.php create mode 100644 examples/phploader-basic_source.php create mode 100644 examples/phploader-custom-modules-with-yui.php create mode 100644 examples/phploader-custom-modules-with-yui_source.php create mode 100644 examples/phploader-custom-modules.php create mode 100644 examples/phploader-custom-modules_source.php create mode 100644 examples/phploader-local-combo-handler.php diff --git a/README b/README index c8a5b70..30656d2 100644 --- a/README +++ b/README @@ -48,3 +48,9 @@ phploader/combo.php phploader/tests Contains a number of tests and example loader scripts + +examples + Contains YUI PHP Loader example documentation and working code samples + +api_docs + Contains the standard YUI API style documentation diff --git a/api_docs/PHP.YAHOO_util_Loader.html b/api_docs/PHP.YAHOO_util_Loader.html new file mode 100644 index 0000000..e495864 --- /dev/null +++ b/api_docs/PHP.YAHOO_util_Loader.html @@ -0,0 +1,1271 @@ + + + + + API: phploader PHP.YAHOO_util_Loader (YUI Library) + + + + + + + + + + +
+
+

Yahoo! UI Library

+

phploader  1.0.0beta

+ Yahoo! UI Library + > phploader + > PHP.YAHOO_util_Loader + +
+
+ Search: +
+   +
+
+
+
+ +
+
+
+
+
+ Filters + + + +
+
+ +

+ + + + + Class PHP.YAHOO_util_Loader + + + +

+ + + + + +
+ The YUI PHP loader base class which provides dynamic server-side loading for YUI +
+ +
+

Constructor

+
+
+ PHP.YAHOO_util_Loader + + ( + + + + yuiVersion + + , + cacheKey + + , + modules + + , + noYUI + ) + +
+
+
Parameters:
+
+ yuiVersion + <string> + + Defines which version of YUI metadata to load +
+
+ cacheKey + <string> + + Unique APC cache key. This is combined with the YUI base +so that updates to YUI will force a new cache entry. However, if your custom config +changes, this key should be changed (otherwise the old values will be used until the cache expires). +
+
+ modules + <array> + + A list of custom modules +
+
+ noYUI + <boolean> + + Pass true if you do not want the YUI metadata +
+
+ + +
+
+
+
+ +
+
+

Properties

+
+
+

allowRollups + - boolean +

+
+
+ Should we allow rollups +
+
+ + +
+ Default Value: true +
+ + +
+
+
+

base + - string +

+
+
+ The base directory +
+
+ + +
+ Default Value: http://yui.yahooapis.com/[YUI VERSION]/build/ +
+ + +
+
+
+

combine + - boolean +

+
+
+ Combined into a single request using the combo service to pontentially reduce the number of http requests required. +
+
+ + +
+ Default Value: false +
+ + +
+
+
+

comboBase + - string +

+
+
+ The base path to the combo service. Uses the Yahoo! CDN service by default. +You do not have to set this property to use the combine option. YUI PHP Loader ships +with an intrinsic, lightweight combo-handler as well (see combo.php). +
+
+ + +
+ Default Value: http://yui.yahooapis.com/combo? +
+ + +
+
+
+

filterList + - array +

+
+
+ A list of modules to apply the filter to. If not supplied, all +modules will have any defined filters applied. Tip: Useful for debugging. +
+
+ + +
+ Default Value: null +
+ + +
+
+
+

loadOptional + - boolean +

+
+
+ Whether or not to load optional dependencies for the requested modules +
+
+ + +
+ Default Value: false +
+ + +
+
+
+

rollupsToTop + - boolean +

+
+
+ Force rollup modules to be sorted as moved to the top of +the stack when performing an automatic rollup. This has a very small performance consequence. +
+
+ + +
+ Default Value: false +
+ + +
+
+
+
+ +
+ +
+
+

Methods

+
+
+

+ css

+
+ + + + + string + css + ( + ) + + +
+ Used to output each of the required link tags +
+ +
+ + +
+
Returns: + + string +
+
(e.g.)
+
+ + + + +
+ +
+
+
+
+

+ css_data

+
+ + + + + array + css_data + ( + ) + + +
+ Used to fetch an array of the required CSS components +
+ +
+ + +
+
Returns: + + array +
+
Returns an array of data about each of the identified JavaScript components
+
+ + + + +
+ +
+
+
+
+

+ css_embed

+
+ + + + + string + css_embed + ( + ) + + +
+ Used to embed the raw CSS +
+ +
+ + +
+
Returns: + + string +
+
(e.g.) Returns the style tag(s) with the CSS inline
+
+ + + + +
+ +
+
+
+
+

+ css_json

+
+ + + + + string + css_json + ( + ) + + +
+ Used to fetch a JSON object with the required CSS components +
+ +
+ + +
+
Returns: + + string +
+
Returns a JSON object containing urls for each CSS component
+
+ + + + +
+ +
+
+
+
+

+ css_raw

+
+ + + + + string + css_raw + ( + ) + + +
+ Used to produce the raw CSS code inline without the actual style tags +
+ +
+ + +
+
Returns: + + string +
+
Returns the raw CSS code inline without the actual style tags
+
+ + + + +
+ +
+
+
+
+

+ data

+
+ + + + + string + data + ( + + + moduleType + + + , + allowRollups + + + , + skipSort + + + ) + + +
+ Used to output an Array which contains data about the required JavaScript & CSS components +
+ +
+ +
+
Parameters:
+
+ moduleType + <string> + + Type of html tag to return (i.e.) js or css. Default is both. +
+
+ allowRollups + <boolean> + + +
+
+ skipSort + <boolean> + + +
+
+ +
+
Returns: + + string +
+
+
+ + + + +
+ +
+
+
+
+

+ embed

+
+ + + + + string + embed + ( + + + moduleType + + + , + skipSort + + + ) + + +
+ Used to output each of the required html tags inline (i.e.) script and/or style +
+ +
+ +
+
Parameters:
+
+ moduleType + <string> + + Type of html tag to return (i.e.) js or css. Default is both. +
+
+ skipSort + <boolean> + + +
+
+ +
+
Returns: + + string +
+
Returns the style tag(s) with the CSS inline and/or the script tag(s) with the JavaScript inline
+
+ + + + +
+ +
+
+
+
+

+ getRemoteContent

+
+ + + + + + getRemoteContent + ( + + + url + + + ) + + +
+ Retrieve the contents of a remote resource +
+ +
+ +
+
Parameters:
+
+ url + <string> + + URL to fetch data from +
+
+ + + + + +
+ +
+
+
+
+

+ getUrl

+
+ + + + + void + getUrl + ( + + + name + + + ) + + +
+ Retrieve the calculated url for the component in question +
+ +
+ +
+
Parameters:
+
+ name + <string> + + YUI component name +
+
+ +
+
Returns: + + void +
+
+
+ + + + +
+ +
+
+
+
+

+ json

+
+ + + + + string + json + ( + + + moduleType + + + , + allowRollups + + + , + skipSort + + + , + full + + + ) + + +
+ Used to fetch a JSON object with the required JavaScript and CSS components +
+ +
+ +
+
Parameters:
+
+ moduleType + <string> + + +
+
+ allowRollups + <boolean> + + +
+
+ skipSort + <boolean> + + +
+
+ full + <boolean> + + +
+
+ +
+
Returns: + + string +
+
Returns a JSON object with the required JavaScript and CSS components
+
+ + + + +
+ +
+
+
+
+

+ load

+
+ + + + + void + load + ( + + + string + + + ) + + +
+ Used to load YUI and/or custom components +
+ +
+ +
+
Parameters:
+
+ string + <object> + + $varname [, string $... ] List of component names +
+
+ +
+
Returns: + + void +
+
+
+ + + + +
+ +
+
+
+
+

+ raw

+
+ + + + + string + raw + ( + + + moduleType + + + , + allowRollups + + + , + skipSort + + + ) + + +
+ Used to produce the raw Javacript and CSS code inline without the actual script or style tags +
+ +
+ +
+
Parameters:
+
+ moduleType + <string> + + +
+
+ allowRollups + <boolean> + + +
+
+ skipSort + <boolean> + + +
+
+ +
+
Returns: + + string +
+
Returns the raw JavaScript and/or CSS code inline without the actual style tags
+
+ + + + +
+ +
+
+
+
+

+ script

+
+ + + + + string + script + ( + ) + + +
+ Used to output each of the required script tags +
+ +
+ + +
+
Returns: + + string +
+
+
+ + + + +
+ +
+
+
+
+

+ script_data

+
+ + + + + array + script_data + ( + ) + + +
+ Used to fetch an array of the required JavaScript components +
+ +
+ + +
+
Returns: + + array +
+
Returns an array of data about each of the identified JavaScript components
+
+ + + + +
+ +
+
+
+
+

+ script_embed

+
+ + + + + string + script_embed + ( + ) + + +
+ Used to embed the raw JavaScript inline +
+ +
+ + +
+
Returns: + + string +
+
Returns the script tag(s) with the JavaScript inline
+
+ + + + +
+ +
+
+
+
+

+ script_json

+
+ + + + + string + script_json + ( + ) + + +
+ Used to fetch a JSON object with the required JavaScript components +
+ +
+ + +
+
Returns: + + string +
+
Returns a JSON object containing urls for each JavaScript component
+
+ + + + +
+ +
+
+
+
+

+ script_raw

+
+ + + + + string + script_raw + ( + ) + + +
+ Used to produce the raw JavaScript code inline without the actual script tags +
+ +
+ + +
+
Returns: + + string +
+
Returns the raw JavaScript code inline without the actual script tags
+
+ + + + +
+ +
+
+
+
+

+ setLoaded

+
+ + + + + void + setLoaded + ( + + + string + + + ) + + +
+ Used to specify modules that are already on the page that should not be loaded again +
+ +
+ +
+
Parameters:
+
+ string + <object> + + $varname [, string $... ] List of module names +
+
+ +
+
Returns: + + void +
+
+
+ + + + +
+ +
+
+
+
+

+ tags

+
+ + + + + string + tags + ( + + + moduleType + + + , + skipSort + + + ) + + +
+ Used to output each of the required html tags (i.e.) script or link +
+ +
+ +
+
Parameters:
+
+ moduleType + <string> + + Type of html tag to return (i.e.) js or css. Default is both. +
+
+ skipSort + <boolean> + + +
+
+ +
+
Returns: + + string +
+
+
+ + + + +
+ +
+
+
+
+
+ +
+ +
+ + +
+ +
+ +
+ +
+
+
+ +
+
+
+
+ Copyright © 2009 Yahoo! Inc. All rights reserved. +
+
+ + + diff --git a/api_docs/assets/ac-js b/api_docs/assets/ac-js new file mode 100644 index 0000000..96603be --- /dev/null +++ b/api_docs/assets/ac-js @@ -0,0 +1,145 @@ +(function() { + var Event=YAHOO.util.Event, + Dom=YAHOO.util.Dom, + oACDS, oAutoComp, + show = { + 'private': false, + 'protected': false, + 'deprecated': false + }; + +Event.onAvailable('yui-classopts-form', function() { + //Checkboxes are available.. + var handleClick = function(e) { + var id, checked = false; + if (YAHOO.lang.isString(e)) { + id = e; + } else { + var tar = Event.getTarget(e); + id = tar.id; + } + var el = Dom.get(id); + checked = el.checked; + + var className = id; + if (checked) { + show[id.replace('show_', '')] = true; + Dom.addClass(document.body, className); + YAHOO.util.Cookie.setSub('yuidoc', id, 'checked'); + } else { + show[id.replace('show_', '')] = false; + Dom.removeClass(document.body, className); + YAHOO.util.Cookie.setSub('yuidoc', id, ''); + } + }; + + var checkCookie = function(id) { + var value = YAHOO.util.Cookie.getSub('yuidoc', id), + el = Dom.get(id); + if (value === 'checked') { + el.checked = true; + } else { + el.checked = false; + } + }; + + var els = ['show_deprecated', 'show_protected', 'show_private']; + + for (var i = 0; i < els.length; i++) { + Event.on(els[i], 'click', handleClick); + checkCookie(els[i]); + handleClick(els[i]); + } + +}); + +//Starting the AutoComplete code + var getResults = function(query) { + var results = []; + if(query && query.length > 0) { + + var q = query.toLowerCase(); + + for (var i=0, len=ALL_YUI_PROPS.length; i -1 ) { + results.push([query, prop]); + } + } + } + } + + return results; + }; + + // Define Custom Event handlers + var myOnDataReturn = function(sType, aArgs) { + var oAutoComp = aArgs[0]; + var query = aArgs[1]; + var aResults = aArgs[2]; + + if(aResults.length == 0) { + if (query.length > 0) { + oAutoComp.setBody("
Not found
"); + } + } + }; + + var myOnItemSelect = function(sType, aArgs) { + var ac = aArgs[0]; + var item = aArgs[2]; + location.href = item[1].url; + }; + + + Event.onAvailable("searchresults", function() { + + // Instantiate JS Function DataSource + oACDS = new YAHOO.widget.DS_JSFunction(getResults); + oACDS.maxCacheEntries = 30; + + // Instantiate AutoComplete + oAutoComp = new YAHOO.widget.AutoComplete('searchinput','searchresults', oACDS); + //oAutoComp.alwaysShowContainer = true; + oAutoComp.queryDelay = 0.2; + oAutoComp.maxResultsDisplayed = 200; + oAutoComp.minQueryLength = 0; + oAutoComp.formatResult = function(oResultItem, query) { + var sMarkup = "" + oResultItem[1].host + ' ' + oResultItem[1].name + ''; + return sMarkup; + }; + + // Subscribe to Custom Events + oAutoComp.dataReturnEvent.subscribe(myOnDataReturn); + oAutoComp.itemSelectEvent.subscribe(myOnItemSelect); + + // Set initial content in the container + oAutoComp.sendQuery(Dom.get("searchinput").value); + + }); + + var validateForm = function() { + return false; + }; + + YAHOO.util.Event.onAvailable('classTab', function() { + var tabs = new YAHOO.widget.TabView('classTab'); + }); + /* + YAHOO.util.Event.onAvailable('codeTree', function() { + var tree1 = new YAHOO.widget.TreeView('codeTree'); + tree1.render(); + }); + */ + +})(); diff --git a/api_docs/assets/api-js b/api_docs/assets/api-js new file mode 100644 index 0000000..e8132e0 --- /dev/null +++ b/api_docs/assets/api-js @@ -0,0 +1,42 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.6.0 +*/ +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.6.0",build:"1321"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(R,O,S,Q,P){var M=(YAHOO.lang.isString(R))?[R]:R;for(var N=0;N-1;Q--){W=(this._removeListener(N[Q],M,V,Y)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[4];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.override){if(W.override===true){U=W.obj;}else{U=W.override;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this._removeListener(O,N.type,N.fn,N.capture);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P-1;O--){N=I[O];if(N){M._removeListener(N[M.EL],N[M.TYPE],N[M.FN],N[M.CAPTURE],O);}}N=null;}G=null;M._simpleRemove(window,"unload",M._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener; +/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ +if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{}; +var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C0){if(!aCache){this._aCache=[];}else{var nCacheLength=aCache.length;if(nCacheLength>0){var oResponse=null;this.fireEvent("cacheRequestEvent",{request:oRequest,callback:oCallback,caller:oCaller});for(var i=nCacheLength-1;i>=0;i--){var oCacheElem=aCache[i];if(this.isCacheHit(oRequest,oCacheElem.request)){oResponse=oCacheElem.response;this.fireEvent("cacheResponseEvent",{request:oRequest,response:oResponse,callback:oCallback,caller:oCaller});if(i=this.maxCacheEntries){aCache.shift();}var oCacheElem={request:oRequest,response:oResponse};aCache[aCache.length]=oCacheElem;this.fireEvent("responseCacheEvent",{request:oRequest,response:oResponse});},flushCache:function(){if(this._aCache){this._aCache=[];this.fireEvent("cacheFlushEvent");}},setInterval:function(nMsec,oRequest,oCallback,oCaller){if(lang.isNumber(nMsec)&&(nMsec>=0)){var oSelf=this;var nId=setInterval(function(){oSelf.makeConnection(oRequest,oCallback,oCaller);},nMsec);this._aIntervals.push(nId);return nId;}else{}},clearInterval:function(nId){var tracker=this._aIntervals||[];for(var i=tracker.length-1;i>-1;i--){if(tracker[i]===nId){tracker.splice(i,1);clearInterval(nId);}}},clearAllIntervals:function(){var tracker=this._aIntervals||[];for(var i=tracker.length-1;i>-1;i--){clearInterval(tracker[i]);}tracker=[];},sendRequest:function(oRequest,oCallback,oCaller){var oCachedResponse=this.getCachedResponse(oRequest,oCallback,oCaller);if(oCachedResponse){DS.issueCallback(oCallback,[oRequest,oCachedResponse],false,oCaller);return null;}return this.makeConnection(oRequest,oCallback,oCaller);},makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oRawResponse=this.liveData;this.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);return tId;},handleResponse:function(oRequest,oRawResponse,oCallback,oCaller,tId){this.fireEvent("responseEvent",{tId:tId,request:oRequest,response:oRawResponse,callback:oCallback,caller:oCaller});var xhr=(this.dataType==DS.TYPE_XHR)?true:false;var oParsedResponse=null;var oFullResponse=oRawResponse;if(this.responseType===DS.TYPE_UNKNOWN){var ctype=(oRawResponse&&oRawResponse.getResponseHeader)?oRawResponse.getResponseHeader["Content-Type"]:null;if(ctype){if(ctype.indexOf("text/xml")>-1){this.responseType=DS.TYPE_XML;}else{if(ctype.indexOf("application/json")>-1){this.responseType=DS.TYPE_JSON;}else{if(ctype.indexOf("text/plain")>-1){this.responseType=DS.TYPE_TEXT;}}}}else{if(YAHOO.lang.isArray(oRawResponse)){this.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse&&oRawResponse.nodeType&&oRawResponse.nodeType==9){this.responseType=DS.TYPE_XML;}else{if(oRawResponse&&oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){this.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){this.responseType=DS.TYPE_TEXT;}}}}}}}switch(this.responseType){case DS.TYPE_JSARRAY:if(xhr&&oRawResponse&&oRawResponse.responseText){oFullResponse=oRawResponse.responseText;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseArrayData(oRequest,oFullResponse); +break;case DS.TYPE_JSON:if(xhr&&oRawResponse&&oRawResponse.responseText){oFullResponse=oRawResponse.responseText;}try{if(lang.isString(oFullResponse)){if(lang.JSON){oFullResponse=lang.JSON.parse(oFullResponse);}else{if(window.JSON&&JSON.parse){oFullResponse=JSON.parse(oFullResponse);}else{if(oFullResponse.parseJSON){oFullResponse=oFullResponse.parseJSON();}else{while(oFullResponse.length>0&&(oFullResponse.charAt(0)!="{")&&(oFullResponse.charAt(0)!="[")){oFullResponse=oFullResponse.substring(1,oFullResponse.length);}if(oFullResponse.length>0){var objEnd=Math.max(oFullResponse.lastIndexOf("]"),oFullResponse.lastIndexOf("}"));oFullResponse=oFullResponse.substring(0,objEnd+1);oFullResponse=eval("("+oFullResponse+")");}}}}}}catch(e){}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseJSONData(oRequest,oFullResponse);break;case DS.TYPE_HTMLTABLE:if(xhr&&oRawResponse.responseText){oFullResponse=oRawResponse.responseText;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseHTMLTableData(oRequest,oFullResponse);break;case DS.TYPE_XML:if(xhr&&oRawResponse.responseXML){oFullResponse=oRawResponse.responseXML;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseXMLData(oRequest,oFullResponse);break;case DS.TYPE_TEXT:if(xhr&&lang.isString(oRawResponse.responseText)){oFullResponse=oRawResponse.responseText;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseTextData(oRequest,oFullResponse);break;default:oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseData(oRequest,oFullResponse);break;}oParsedResponse=oParsedResponse||{};if(!oParsedResponse.results){oParsedResponse.results=[];}if(!oParsedResponse.meta){oParsedResponse.meta={};}if(oParsedResponse&&!oParsedResponse.error){oParsedResponse=this.doBeforeCallback(oRequest,oFullResponse,oParsedResponse,oCallback);this.fireEvent("responseParseEvent",{request:oRequest,response:oParsedResponse,callback:oCallback,caller:oCaller});this.addToCache(oRequest,oParsedResponse);}else{oParsedResponse.error=true;this.fireEvent("dataErrorEvent",{request:oRequest,response:oRawResponse,callback:oCallback,caller:oCaller,message:DS.ERROR_DATANULL});}oParsedResponse.tId=tId;DS.issueCallback(oCallback,[oRequest,oParsedResponse],oParsedResponse.error,oCaller);},doBeforeParseData:function(oRequest,oFullResponse,oCallback){return oFullResponse;},doBeforeCallback:function(oRequest,oFullResponse,oParsedResponse,oCallback){return oParsedResponse;},parseData:function(oRequest,oFullResponse){if(lang.isValue(oFullResponse)){var oParsedResponse={results:oFullResponse,meta:{}};return oParsedResponse;}return null;},parseArrayData:function(oRequest,oFullResponse){if(lang.isArray(oFullResponse)){var results=[],i,j,rec,field,data;if(lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;for(i=fields.length-1;i>=0;--i){if(typeof fields[i]!=="object"){fields[i]={key:fields[i]};}}var parsers={},p;for(i=fields.length-1;i>=0;--i){p=(typeof fields[i].parser==="function"?fields[i].parser:DS.Parser[fields[i].parser+""])||fields[i].converter;if(p){parsers[fields[i].key]=p;}}var arrType=lang.isArray(oFullResponse[0]);for(i=oFullResponse.length-1;i>-1;i--){var oResult={};rec=oFullResponse[i];if(typeof rec==="object"){for(j=fields.length-1;j>-1;j--){field=fields[j];data=arrType?rec[j]:rec[field.key];if(parsers[field.key]){data=parsers[field.key].call(this,data);}if(data===undefined){data=null;}oResult[field.key]=data;}}else{if(lang.isString(rec)){for(j=fields.length-1;j>-1;j--){field=fields[j];data=rec;if(parsers[field.key]){data=parsers[field.key].call(this,data);}if(data===undefined){data=null;}oResult[field.key]=data;}}}results[i]=oResult;}}else{results=oFullResponse;}var oParsedResponse={results:results};return oParsedResponse;}return null;},parseTextData:function(oRequest,oFullResponse){if(lang.isString(oFullResponse)){if(lang.isString(this.responseSchema.recordDelim)&&lang.isString(this.responseSchema.fieldDelim)){var oParsedResponse={results:[]};var recDelim=this.responseSchema.recordDelim;var fieldDelim=this.responseSchema.fieldDelim;if(oFullResponse.length>0){var newLength=oFullResponse.length-recDelim.length;if(oFullResponse.substr(newLength)==recDelim){oFullResponse=oFullResponse.substr(0,newLength);}if(oFullResponse.length>0){var recordsarray=oFullResponse.split(recDelim);for(var i=0,len=recordsarray.length,recIdx=0;i0)){var fielddataarray=recordsarray[i].split(fieldDelim);var oResult={};if(lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;for(var j=fields.length-1;j>-1;j--){try{var data=fielddataarray[j];if(lang.isString(data)){if(data.charAt(0)=='"'){data=data.substr(1);}if(data.charAt(data.length-1)=='"'){data=data.substr(0,data.length-1);}var field=fields[j];var key=(lang.isValue(field.key))?field.key:field;if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}else{bError=true;}}catch(e){bError=true;}}}else{oResult=fielddataarray;}if(!bError){oParsedResponse.results[recIdx++]=oResult;}}}}}return oParsedResponse;}}return null;},parseXMLResult:function(result){var oResult={},schema=this.responseSchema;try{for(var m=schema.fields.length-1;m>=0;m--){var field=schema.fields[m];var key=(lang.isValue(field.key))?field.key:field;var data=null;var xmlAttr=result.attributes.getNamedItem(key);if(xmlAttr){data=xmlAttr.value;}else{var xmlNode=result.getElementsByTagName(key);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0)){data=xmlNode.item(0).firstChild.nodeValue;var item=xmlNode.item(0);data=(item.text)?item.text:(item.textContent)?item.textContent:null; +if(!data){var datapieces=[];for(var j=0,len=item.childNodes.length;j0){data=datapieces.join("");}}}}if(data===null){data="";}if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}}catch(e){}return oResult;},parseXMLData:function(oRequest,oFullResponse){var bError=false,schema=this.responseSchema,oParsedResponse={meta:{}},xmlList=null,metaNode=schema.metaNode,metaLocators=schema.metaFields||{},i,k,loc,v;try{xmlList=(schema.resultNode)?oFullResponse.getElementsByTagName(schema.resultNode):null;metaNode=metaNode?oFullResponse.getElementsByTagName(metaNode)[0]:oFullResponse;if(metaNode){for(k in metaLocators){if(lang.hasOwnProperty(metaLocators,k)){loc=metaLocators[k];v=metaNode.getElementsByTagName(loc)[0];if(v){v=v.firstChild.nodeValue;}else{v=metaNode.attributes.getNamedItem(loc);if(v){v=v.value;}}if(lang.isValue(v)){oParsedResponse.meta[k]=v;}}}}}catch(e){}if(!xmlList||!lang.isArray(schema.fields)){bError=true;}else{oParsedResponse.results=[];for(i=xmlList.length-1;i>=0;--i){var oResult=this.parseXMLResult(xmlList.item(i));oParsedResponse.results[i]=oResult;}}if(bError){oParsedResponse.error=true;}else{}return oParsedResponse;},parseJSONData:function(oRequest,oFullResponse){var oParsedResponse={results:[],meta:{}};if(lang.isObject(oFullResponse)&&this.responseSchema.resultsList){var schema=this.responseSchema,fields=schema.fields,resultsList=oFullResponse,results=[],metaFields=schema.metaFields||{},fieldParsers=[],fieldPaths=[],simpleFields=[],bError=false,i,len,j,v,key,parser,path;var buildPath=function(needle){var path=null,keys=[],i=0;if(needle){needle=needle.replace(/\[(['"])(.*?)\1\]/g,function(x,$1,$2){keys[i]=$2;return".@"+(i++);}).replace(/\[(\d+)\]/g,function(x,$1){keys[i]=parseInt($1,10)|0;return".@"+(i++);}).replace(/^\./,"");if(!/[^\w\.\$@]/.test(needle)){path=needle.split(".");for(i=path.length-1;i>=0;--i){if(path[i].charAt(0)==="@"){path[i]=keys[parseInt(path[i].substr(1),10)];}}}else{}}return path;};var walkPath=function(path,origin){var v=origin,i=0,len=path.length;for(;i1){fieldPaths[fieldPaths.length]={key:key,path:path};}else{simpleFields[simpleFields.length]={key:key,path:path[0]};}}else{}}for(i=resultsList.length-1;i>=0;--i){var r=resultsList[i],rec={};for(j=simpleFields.length-1;j>=0;--j){rec[simpleFields[j].key]=(r[simpleFields[j].path]!==undefined)?r[simpleFields[j].path]:r[j];}for(j=fieldPaths.length-1;j>=0;--j){rec[fieldPaths[j].key]=walkPath(fieldPaths[j].path,r);}for(j=fieldParsers.length-1;j>=0;--j){var p=fieldParsers[j].key;rec[p]=fieldParsers[j].parser(rec[p]);if(rec[p]===undefined){rec[p]=null;}}results[i]=rec;}}else{results=resultsList;}for(key in metaFields){if(lang.hasOwnProperty(metaFields,key)){path=buildPath(metaFields[key]);if(path){v=walkPath(path,oFullResponse);oParsedResponse.meta[key]=v;}}}}else{oParsedResponse.error=true;}oParsedResponse.results=results;}else{oParsedResponse.error=true;}return oParsedResponse;},parseHTMLTableData:function(oRequest,oFullResponse){var bError=false;var elTable=oFullResponse;var fields=this.responseSchema.fields;var oParsedResponse={results:[]};for(var i=0;i-1;j--){var elRow=elTbody.rows[j];var oResult={};for(var k=fields.length-1;k>-1;k--){var field=fields[k];var key=(lang.isValue(field.key))?field.key:field;var data=elRow.cells[k].innerHTML;if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}oParsedResponse.results[j]=oResult;}}if(bError){oParsedResponse.error=true;}else{}return oParsedResponse;}};lang.augmentProto(DS,util.EventProvider);util.LocalDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_LOCAL;if(oLiveData){if(YAHOO.lang.isArray(oLiveData)){this.responseType=DS.TYPE_JSARRAY;}else{if(oLiveData.nodeType&&oLiveData.nodeType==9){this.responseType=DS.TYPE_XML;}else{if(oLiveData.nodeName&&(oLiveData.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;oLiveData=oLiveData.cloneNode(true);}else{if(YAHOO.lang.isString(oLiveData)){this.responseType=DS.TYPE_TEXT;}else{if(YAHOO.lang.isObject(oLiveData)){this.responseType=DS.TYPE_JSON;}}}}}}else{oLiveData=[];this.responseType=DS.TYPE_JSARRAY;}this.constructor.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.LocalDataSource,DS);lang.augmentObject(util.LocalDataSource,DS);util.FunctionDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_JSFUNCTION;oLiveData=oLiveData||function(){};this.constructor.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.FunctionDataSource,DS,{makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oRawResponse=this.liveData(oRequest);if(this.responseType===DS.TYPE_UNKNOWN){if(YAHOO.lang.isArray(oRawResponse)){this.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse&&oRawResponse.nodeType&&oRawResponse.nodeType==9){this.responseType=DS.TYPE_XML; +}else{if(oRawResponse&&oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){this.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){this.responseType=DS.TYPE_TEXT;}}}}}}this.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);return tId;}});lang.augmentObject(util.FunctionDataSource,DS);util.ScriptNodeDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_SCRIPTNODE;oLiveData=oLiveData||"";this.constructor.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.ScriptNodeDataSource,DS,{getUtility:util.Get,asyncMode:"allowAll",scriptCallbackParam:"callback",generateRequestCallback:function(id){return"&"+this.scriptCallbackParam+"=YAHOO.util.ScriptNodeDataSource.callbacks["+id+"]";},makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});if(util.ScriptNodeDataSource._nPending===0){util.ScriptNodeDataSource.callbacks=[];util.ScriptNodeDataSource._nId=0;}var id=util.ScriptNodeDataSource._nId;util.ScriptNodeDataSource._nId++;var oSelf=this;util.ScriptNodeDataSource.callbacks[id]=function(oRawResponse){if((oSelf.asyncMode!=="ignoreStaleResponses")||(id===util.ScriptNodeDataSource.callbacks.length-1)){if(oSelf.responseType===DS.TYPE_UNKNOWN){if(YAHOO.lang.isArray(oRawResponse)){oSelf.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse.nodeType&&oRawResponse.nodeType==9){oSelf.responseType=DS.TYPE_XML;}else{if(oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){oSelf.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){oSelf.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){oSelf.responseType=DS.TYPE_TEXT;}}}}}}oSelf.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);}else{}delete util.ScriptNodeDataSource.callbacks[id];};util.ScriptNodeDataSource._nPending++;var sUri=this.liveData+oRequest+this.generateRequestCallback(id);this.getUtility.script(sUri,{autopurge:true,onsuccess:util.ScriptNodeDataSource._bumpPendingDown,onfail:util.ScriptNodeDataSource._bumpPendingDown});return tId;}});lang.augmentObject(util.ScriptNodeDataSource,DS);lang.augmentObject(util.ScriptNodeDataSource,{_nId:0,_nPending:0,callbacks:[]});util.XHRDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_XHR;this.connMgr=this.connMgr||util.Connect;oLiveData=oLiveData||"";this.constructor.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.XHRDataSource,DS,{connMgr:null,connXhrMode:"allowAll",connMethodPost:false,connTimeout:0,makeConnection:function(oRequest,oCallback,oCaller){var oRawResponse=null;var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oSelf=this;var oConnMgr=this.connMgr;var oQueue=this._oQueue;var _xhrSuccess=function(oResponse){if(oResponse&&(this.asyncMode=="ignoreStaleResponses")&&(oResponse.tId!=oQueue.conn.tId)){return null;}else{if(!oResponse){this.fireEvent("dataErrorEvent",{request:oRequest,callback:oCallback,caller:oCaller,message:DS.ERROR_DATANULL});DS.issueCallback(oCallback,[oRequest,{error:true}],true,oCaller);return null;}else{if(this.responseType===DS.TYPE_UNKNOWN){var ctype=(oResponse.getResponseHeader)?oResponse.getResponseHeader["Content-Type"]:null;if(ctype){if(ctype.indexOf("text/xml")>-1){this.responseType=DS.TYPE_XML;}else{if(ctype.indexOf("application/json")>-1){this.responseType=DS.TYPE_JSON;}else{if(ctype.indexOf("text/plain")>-1){this.responseType=DS.TYPE_TEXT;}}}}}this.handleResponse(oRequest,oResponse,oCallback,oCaller,tId);}}};var _xhrFailure=function(oResponse){this.fireEvent("dataErrorEvent",{request:oRequest,callback:oCallback,caller:oCaller,message:DS.ERROR_DATAINVALID});if(lang.isString(this.liveData)&&lang.isString(oRequest)&&(this.liveData.lastIndexOf("?")!==this.liveData.length-1)&&(oRequest.indexOf("?")!==0)){}oResponse=oResponse||{};oResponse.error=true;DS.issueCallback(oCallback,[oRequest,oResponse],true,oCaller);return null;};var _xhrCallback={success:_xhrSuccess,failure:_xhrFailure,scope:this};if(lang.isNumber(this.connTimeout)){_xhrCallback.timeout=this.connTimeout;}if(this.connXhrMode=="cancelStaleRequests"){if(oQueue.conn){if(oConnMgr.abort){oConnMgr.abort(oQueue.conn);oQueue.conn=null;}else{}}}if(oConnMgr&&oConnMgr.asyncRequest){var sLiveData=this.liveData;var isPost=this.connMethodPost;var sMethod=(isPost)?"POST":"GET";var sUri=(isPost||!lang.isValue(oRequest))?sLiveData:sLiveData+oRequest;var sRequest=(isPost)?oRequest:null;if(this.connXhrMode!="queueRequests"){oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,_xhrCallback,sRequest);}else{if(oQueue.conn){var allRequests=oQueue.requests;allRequests.push({request:oRequest,callback:_xhrCallback});if(!oQueue.interval){oQueue.interval=setInterval(function(){if(oConnMgr.isCallInProgress(oQueue.conn)){return ;}else{if(allRequests.length>0){sUri=(isPost||!lang.isValue(allRequests[0].request))?sLiveData:sLiveData+allRequests[0].request;sRequest=(isPost)?allRequests[0].request:null;oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,allRequests[0].callback,sRequest);allRequests.shift();}else{clearInterval(oQueue.interval);oQueue.interval=null;}}},50);}}else{oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,_xhrCallback,sRequest);}}}else{DS.issueCallback(oCallback,[oRequest,{error:true}],true,oCaller);}return tId;}});lang.augmentObject(util.XHRDataSource,DS);util.DataSource=function(oLiveData,oConfigs){oConfigs=oConfigs||{};var dataType=oConfigs.dataType;if(dataType){if(dataType==DS.TYPE_LOCAL){lang.augmentObject(util.DataSource,util.LocalDataSource);return new util.LocalDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_XHR){lang.augmentObject(util.DataSource,util.XHRDataSource);return new util.XHRDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_SCRIPTNODE){lang.augmentObject(util.DataSource,util.ScriptNodeDataSource); +return new util.ScriptNodeDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_JSFUNCTION){lang.augmentObject(util.DataSource,util.FunctionDataSource);return new util.FunctionDataSource(oLiveData,oConfigs);}}}}}if(YAHOO.lang.isString(oLiveData)){lang.augmentObject(util.DataSource,util.XHRDataSource);return new util.XHRDataSource(oLiveData,oConfigs);}else{if(YAHOO.lang.isFunction(oLiveData)){lang.augmentObject(util.DataSource,util.FunctionDataSource);return new util.FunctionDataSource(oLiveData,oConfigs);}else{lang.augmentObject(util.DataSource,util.LocalDataSource);return new util.LocalDataSource(oLiveData,oConfigs);}}};lang.augmentObject(util.DataSource,DS);})();YAHOO.util.Number={format:function(B,F){F=F||{};if(!YAHOO.lang.isNumber(B)){B*=1;}if(YAHOO.lang.isNumber(B)){var D=(B<0);var J=B+"";var G=(F.decimalSeparator)?F.decimalSeparator:".";var H;if(YAHOO.lang.isNumber(F.decimalPlaces)){var I=F.decimalPlaces;var C=Math.pow(10,I);J=Math.round(B*C)/C+"";H=J.lastIndexOf(".");if(I>0){if(H<0){J+=G;H=J.length-1;}else{if(G!=="."){J=J.replace(".",G);}}while((J.length-1-H)-1)?H:J.length;var K=J.substring(H);var A=-1;for(var E=H;E>0;E--){A++;if((A%3===0)&&(E!==H)&&(!D||(E>1))){K=L+K;}K=J.charAt(E-1)+K;}J=K;}J=(F.prefix)?F.prefix+J:J;J=(F.suffix)?J+F.suffix:J;return J;}else{return B;}}};(function(){var A=function(C,E,D){if(typeof D==="undefined"){D=10;}for(;parseInt(C,10)1;D/=10){C=E.toString()+C;}return C.toString();};var B={formats:{a:function(D,C){return C.a[D.getDay()];},A:function(D,C){return C.A[D.getDay()];},b:function(D,C){return C.b[D.getMonth()];},B:function(D,C){return C.B[D.getMonth()];},C:function(C){return A(parseInt(C.getFullYear()/100,10),0);},d:["getDate","0"],e:["getDate"," "],g:function(C){return A(parseInt(B.formats.G(C)%100,10),0);},G:function(E){var F=E.getFullYear();var D=parseInt(B.formats.V(E),10);var C=parseInt(B.formats.W(E),10);if(C>D){F++;}else{if(C===0&&D>=52){F--;}}return F;},H:["getHours","0"],I:function(D){var C=D.getHours()%12;return A(C===0?12:C,0);},j:function(G){var F=new Date(""+G.getFullYear()+"/1/1 GMT");var D=new Date(""+G.getFullYear()+"/"+(G.getMonth()+1)+"/"+G.getDate()+" GMT");var C=D-F;var E=parseInt(C/60000/60/24,10)+1;return A(E,0,100);},k:["getHours"," "],l:function(D){var C=D.getHours()%12;return A(C===0?12:C," ");},m:function(C){return A(C.getMonth()+1,0);},M:["getMinutes","0"],p:function(D,C){return C.p[D.getHours()>=12?1:0];},P:function(D,C){return C.P[D.getHours()>=12?1:0];},s:function(D,C){return parseInt(D.getTime()/1000,10);},S:["getSeconds","0"],u:function(C){var D=C.getDay();return D===0?7:D;},U:function(F){var C=parseInt(B.formats.j(F),10);var E=6-F.getDay();var D=parseInt((C+E)/7,10);return A(D,0);},V:function(F){var E=parseInt(B.formats.W(F),10);var C=(new Date(""+F.getFullYear()+"/1/1")).getDay();var D=E+(C>4||C<=1?0:1);if(D===53&&(new Date(""+F.getFullYear()+"/12/31")).getDay()<4){D=1;}else{if(D===0){D=B.formats.V(new Date(""+(F.getFullYear()-1)+"/12/31"));}}return A(D,0);},w:"getDay",W:function(F){var C=parseInt(B.formats.j(F),10);var E=7-B.formats.u(F);var D=parseInt((C+E)/7,10);return A(D,0,10);},y:function(C){return A(C.getFullYear()%100,0);},Y:"getFullYear",z:function(E){var D=E.getTimezoneOffset();var C=A(parseInt(Math.abs(D/60),10),0);var F=A(Math.abs(D%60),0);return(D>0?"-":"+")+C+F;},Z:function(C){var D=C.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");if(D.length>4){D=B.formats.z(C);}return D;},"%":function(C){return"%";}},aggregates:{c:"locale",D:"%m/%d/%y",F:"%Y-%m-%d",h:"%b",n:"\n",r:"locale",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},format:function(G,F,D){F=F||{};if(!(G instanceof Date)){return YAHOO.lang.isValue(G)?G:"";}var H=F.format||"%m/%d/%Y";if(H==="YYYY/MM/DD"){H="%Y/%m/%d";}else{if(H==="DD/MM/YYYY"){H="%d/%m/%Y";}else{if(H==="MM/DD/YYYY"){H="%m/%d/%Y";}}}D=D||"en";if(!(D in YAHOO.util.DateLocale)){if(D.replace(/-[a-zA-Z]+$/,"") in YAHOO.util.DateLocale){D=D.replace(/-[a-zA-Z]+$/,"");}else{D="en";}}var J=YAHOO.util.DateLocale[D];var C=function(L,K){var M=B.aggregates[K];return(M==="locale"?J[K]:M);};var E=function(L,K){var M=B.formats[K];if(typeof M==="string"){return G[M]();}else{if(typeof M==="function"){return M.call(G,G,J);}else{if(typeof M==="object"&&typeof M[0]==="string"){return A(G[M[0]](),M[1]);}else{return K;}}}};while(H.match(/%[cDFhnrRtTxX]/)){H=H.replace(/%([cDFhnrRtTxX])/g,C);}var I=H.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,E);C=E=undefined;return I;}};YAHOO.namespace("YAHOO.util");YAHOO.util.Date=B;YAHOO.util.DateLocale={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%d/%m/%y",X:"%T"};YAHOO.util.DateLocale["en"]=YAHOO.lang.merge(YAHOO.util.DateLocale,{});YAHOO.util.DateLocale["en-US"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"],{c:"%a %d %b %Y %I:%M:%S %p %Z",x:"%m/%d/%Y",X:"%I:%M:%S %p"});YAHOO.util.DateLocale["en-GB"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"],{r:"%l:%M:%S %P %Z"});YAHOO.util.DateLocale["en-AU"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"]);})();YAHOO.register("datasource",YAHOO.util.DataSource,{version:"2.6.0",build:"1321"});/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.6.0 +*/ +YAHOO.widget.DS_JSArray=YAHOO.util.LocalDataSource;YAHOO.widget.DS_JSFunction=YAHOO.util.FunctionDataSource;YAHOO.widget.DS_XHR=function(B,A,D){var C=new YAHOO.util.XHRDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_ScriptNode=function(B,A,D){var C=new YAHOO.util.ScriptNodeDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_XHR.TYPE_JSON=YAHOO.util.DataSourceBase.TYPE_JSON;YAHOO.widget.DS_XHR.TYPE_XML=YAHOO.util.DataSourceBase.TYPE_XML;YAHOO.widget.DS_XHR.TYPE_FLAT=YAHOO.util.DataSourceBase.TYPE_TEXT;YAHOO.widget.AutoComplete=function(G,B,J,C){if(G&&B&&J){if(J instanceof YAHOO.util.DataSourceBase){this.dataSource=J;}else{return ;}this.key=0;var D=J.responseSchema;if(J._aDeprecatedSchema){var K=J._aDeprecatedSchema;if(YAHOO.lang.isArray(K)){if((J.responseType===YAHOO.util.DataSourceBase.TYPE_JSON)||(J.responseType===YAHOO.util.DataSourceBase.TYPE_UNKNOWN)){D.resultsList=K[0];this.key=K[1];D.fields=(K.length<3)?null:K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_XML){D.resultNode=K[0];this.key=K[1];D.fields=K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_TEXT){D.recordDelim=K[0];D.fieldDelim=K[1];}}}J.responseSchema=D;}}if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._elTextbox=document.getElementById(G);}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._elTextbox=G;}YAHOO.util.Dom.addClass(this._elTextbox,"yui-ac-input");}else{return ;}if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._elContainer=document.getElementById(B);}else{this._elContainer=B;}if(this._elContainer.style.display=="none"){}var E=this._elContainer.parentNode;var A=E.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(E,"yui-ac");}else{}}else{return ;}if(this.dataSource.dataType===YAHOO.util.DataSourceBase.TYPE_LOCAL){this.applyLocalFilter=true;}if(C&&(C.constructor==Object)){for(var I in C){if(I){this[I]=C[I];}}}this._initContainerEl();this._initProps();this._initListEl();this._initContainerHelperEls();var H=this;var F=this._elTextbox;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(B,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(B,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(B,"click",H._onContainerClick,H);YAHOO.util.Event.addListener(B,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(B,"resize",H._onContainerResize,H);YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);YAHOO.util.Event.addListener(window,"unload",H._onWindowUnload,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerPopulateEvent=new YAHOO.util.CustomEvent("containerPopulate",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);this.textboxChangeEvent=new YAHOO.util.CustomEvent("textboxChange",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.applyLocalFilter=null;YAHOO.widget.AutoComplete.prototype.queryMatchCase=false;YAHOO.widget.AutoComplete.prototype.queryMatchContains=false;YAHOO.widget.AutoComplete.prototype.queryMatchSubset=false;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.typeAheadDelay=0.5;YAHOO.widget.AutoComplete.prototype.queryInterval=500;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.suppressInputUpdate=false;YAHOO.widget.AutoComplete.prototype.resultTypeList=true;YAHOO.widget.AutoComplete.prototype.queryQuestionMark=true;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.getInputEl=function(){return this._elTextbox;};YAHOO.widget.AutoComplete.prototype.getContainerEl=function(){return this._elContainer; +};YAHOO.widget.AutoComplete.prototype.isFocused=function(){return(this._bFocused===null)?false:this._bFocused;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getListEl=function(){return this._elList;};YAHOO.widget.AutoComplete.prototype.getListItemMatch=function(A){if(A._sResultMatch){return A._sResultMatch;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemIndex=function(A){if(YAHOO.lang.isNumber(A._nItemIndex)){return A._nItemIndex;}else{return null;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(B){if(this._elHeader){var A=this._elHeader;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setFooter=function(B){if(this._elFooter){var A=this._elFooter;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(this._elBody){var B=this._elBody;YAHOO.util.Event.purgeElement(B,true);if(A){B.innerHTML=A;B.style.display="block";}else{B.innerHTML="";B.style.display="none";}this._elList=null;}};YAHOO.widget.AutoComplete.prototype.generateRequest=function(B){var A=this.dataSource.dataType;if(A===YAHOO.util.DataSourceBase.TYPE_XHR){if(!this.dataSource.connMethodPost){B=(this.queryQuestionMark?"?":"")+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}else{B=(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}else{if(A===YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE){B="&"+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}return B;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(B){var A=(this.delimChar)?this._elTextbox.value+B:B;this._sendQuery(A);};YAHOO.widget.AutoComplete.prototype.collapseContainer=function(){this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype.getSubsetMatches=function(E){var D,C,A;for(var B=E.length;B>=this.minQueryLength;B--){A=this.generateRequest(E.substr(0,B));this.dataRequestEvent.fire(this,D,A);C=this.dataSource.getCachedResponse(A);if(C){return this.filterResults.apply(this.dataSource,[E,C,C,{scope:this}]);}}return null;};YAHOO.widget.AutoComplete.prototype.preparseRawResponse=function(C,B,A){var D=((this.responseStripAfter!=="")&&(B.indexOf))?B.indexOf(this.responseStripAfter):-1;if(D!=-1){B=B.substring(0,D);}return B;};YAHOO.widget.AutoComplete.prototype.filterResults=function(J,L,P,K){if(J&&J!==""){P=YAHOO.widget.AutoComplete._cloneObject(P);var H=K.scope,O=this,B=P.results,M=[],D=false,I=(O.queryMatchCase||H.queryMatchCase),A=(O.queryMatchContains||H.queryMatchContains);for(var C=B.length-1;C>=0;C--){var F=B[C];var E=null;if(YAHOO.lang.isString(F)){E=F;}else{if(YAHOO.lang.isArray(F)){E=F[0];}else{if(this.responseSchema.fields){var N=this.responseSchema.fields[0].key||this.responseSchema.fields[0];E=F[N];}else{if(this.key){E=F[this.key];}}}}if(YAHOO.lang.isString(E)){var G=(I)?E.indexOf(decodeURIComponent(J)):E.toLowerCase().indexOf(decodeURIComponent(J).toLowerCase());if((!A&&(G===0))||(A&&(G>-1))){M.unshift(F);}}}P.results=M;}else{}return P;};YAHOO.widget.AutoComplete.prototype.handleResponse=function(C,A,B){if((this instanceof YAHOO.widget.AutoComplete)&&this._sName){this._populateList(C,A,B);}};YAHOO.widget.AutoComplete.prototype.doBeforeLoadData=function(C,A,B){return true;};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,D,A){var C=(A)?A:"";return C;};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(D,A,C,B){return true;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=this._elTextbox;var D=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerPopulateEvent.unsubscribeAll();this.containerExpandEvent.unsubscribeAll();this.typeAheadEvent.unsubscribeAll();this.itemMouseOverEvent.unsubscribeAll();this.itemMouseOutEvent.unsubscribeAll();this.itemArrowToEvent.unsubscribeAll();this.itemArrowFromEvent.unsubscribeAll();this.itemSelectEvent.unsubscribeAll();this.unmatchedItemSelectEvent.unsubscribeAll();this.selectionEnforceEvent.unsubscribeAll();this.containerCollapseEvent.unsubscribeAll();this.textboxBlurEvent.unsubscribeAll();this.textboxChangeEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(A,true);YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null;}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerPopulateEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete.prototype.textboxChangeEvent=null;YAHOO.widget.AutoComplete._nIndex=0; +YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._elTextbox=null;YAHOO.widget.AutoComplete.prototype._elContainer=null;YAHOO.widget.AutoComplete.prototype._elContent=null;YAHOO.widget.AutoComplete.prototype._elHeader=null;YAHOO.widget.AutoComplete.prototype._elBody=null;YAHOO.widget.AutoComplete.prototype._elFooter=null;YAHOO.widget.AutoComplete.prototype._elShadow=null;YAHOO.widget.AutoComplete.prototype._elIFrame=null;YAHOO.widget.AutoComplete.prototype._bFocused=null;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._elList=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sPastSelections="";YAHOO.widget.AutoComplete.prototype._sInitInputValue=null;YAHOO.widget.AutoComplete.prototype._elCurListItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var B=this.minQueryLength;if(!YAHOO.lang.isNumber(B)){this.minQueryLength=1;}var E=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(E)||(E<1)){this.maxResultsDisplayed=10;}var F=this.queryDelay;if(!YAHOO.lang.isNumber(F)||(F<0)){this.queryDelay=0.2;}var C=this.typeAheadDelay;if(!YAHOO.lang.isNumber(C)||(C<0)){this.typeAheadDelay=0.2;}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A];}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null;}}var D=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(D)||(D<0)){this.animSpeed=0.3;}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._elContent,{},this.animSpeed);}else{this._oAnim.duration=this.animSpeed;}}if(this.forceSelection&&A){}};YAHOO.widget.AutoComplete.prototype._initContainerHelperEls=function(){if(this.useShadow&&!this._elShadow){var A=document.createElement("div");A.className="yui-ac-shadow";A.style.width=0;A.style.height=0;this._elShadow=this._elContainer.appendChild(A);}if(this.useIFrame&&!this._elIFrame){var B=document.createElement("iframe");B.src=this._iFrameSrc;B.frameBorder=0;B.scrolling="no";B.style.position="absolute";B.style.width=0;B.style.height=0;B.tabIndex=-1;B.style.padding=0;this._elIFrame=this._elContainer.appendChild(B);}};YAHOO.widget.AutoComplete.prototype._initContainerEl=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var C=document.createElement("div");C.className="yui-ac-content";C.style.display="none";this._elContent=this._elContainer.appendChild(C);var B=document.createElement("div");B.className="yui-ac-hd";B.style.display="none";this._elHeader=this._elContent.appendChild(B);var D=document.createElement("div");D.className="yui-ac-bd";this._elBody=this._elContent.appendChild(D);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._elFooter=this._elContent.appendChild(A);}else{}};YAHOO.widget.AutoComplete.prototype._initListEl=function(){var C=this.maxResultsDisplayed;var A=this._elList||document.createElement("ul");var B;while(A.childNodes.length=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)||(A==229)){return true;}return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(G){if(this.minQueryLength<0){this._toggleContainer(false);return ;}var I=(this.delimChar)?this.delimChar:null;if(I){var B=-1;for(var F=I.length-1;F>=0;F--){var D=G.lastIndexOf(I[F]);if(D>B){B=D;}}if(I[F]==" "){for(var E=I.length-1;E>=0;E--){if(G[B-1]==I[E]){B--;break;}}}if(B>-1){var H=B+1;while(G.charAt(H)==" "){H+=1;}this._sPastSelections=G.substring(0,H);G=G.substr(H);}else{this._sPastSelections="";}}if((G&&(G.length0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}this._toggleContainer(false);return ;}G=encodeURIComponent(G);this._nDelayID=-1;if(this.dataSource.queryMatchSubset||this.queryMatchSubset){var A=this.getSubsetMatches(G);if(A){this.handleResponse(G,A,{query:G});return ;}}if(this.responseStripAfter){this.dataSource.doBeforeParseData=this.preparseRawResponse;}if(this.applyLocalFilter){this.dataSource.doBeforeCallback=this.filterResults;}var C=this.generateRequest(G);this.dataRequestEvent.fire(this,G,C);this.dataSource.sendRequest(C,{success:this.handleResponse,failure:this.handleResponse,scope:this,argument:{query:G}});};YAHOO.widget.AutoComplete.prototype._populateList=function(K,F,C){if(this._nTypeAheadDelayID!=-1){clearTimeout(this._nTypeAheadDelayID);}K=(C&&C.query)?C.query:K;var H=this.doBeforeLoadData(K,F,C);if(H&&!F.error){this.dataReturnEvent.fire(this,K,F.results);if(this._bFocused||(this._bFocused===null)){var M=decodeURIComponent(K); +this._sCurQuery=M;this._bItemSelected=false;var R=F.results,A=Math.min(R.length,this.maxResultsDisplayed),J=(this.dataSource.responseSchema.fields)?(this.dataSource.responseSchema.fields[0].key||this.dataSource.responseSchema.fields[0]):0;if(A>0){if(!this._elList||(this._elList.childNodes.length=0;Q--){var P=I[Q],E=R[Q];if(this.resultTypeList){var B=[];B[0]=(YAHOO.lang.isString(E))?E:E[J]||E[this.key];var L=this.dataSource.responseSchema.fields;if(YAHOO.lang.isArray(L)&&(L.length>1)){for(var N=1,S=L.length;N=A;O--){G=I[O];G.style.display="none";}}this._nDisplayedItems=A;this.containerPopulateEvent.fire(this,K,R);if(this.autoHighlight){var D=this._elList.firstChild;this._toggleHighlight(D,"to");this.itemArrowToEvent.fire(this,D);this._typeAhead(D,K);}else{this._toggleHighlight(this._elCurListItem,"from");}H=this.doBeforeExpandContainer(this._elTextbox,this._elContainer,K,R);this._toggleContainer(H);}else{this._toggleContainer(false);}return ;}}else{this.dataErrorEvent.fire(this,K);}};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var C=this._elTextbox.value;var B=(this.delimChar)?this.delimChar[0]:null;var A=(B)?C.lastIndexOf(B,C.length-2):-1;if(A>-1){this._elTextbox.value=C.substring(0,A);}else{this._elTextbox.value="";}this._sPastSelections=this._elTextbox.value;this.selectionEnforceEvent.fire(this);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var A=null;for(var B=this._nDisplayedItems-1;B>=0;B--){var C=this._elList.childNodes[B];var D=(""+C._sResultMatch).toLowerCase();if(D==this._sCurQuery.toLowerCase()){A=C;break;}}return(A);};YAHOO.widget.AutoComplete.prototype._typeAhead=function(B,D){if(!this.typeAhead||(this._nKeyCode==8)){return ;}var A=this,C=this._elTextbox;if(C.setSelectionRange||C.createTextRange){this._nTypeAheadDelayID=setTimeout(function(){var F=C.value.length;A._updateValue(B);var G=C.value.length;A._selectText(C,F,G);var E=C.value.substr(F,G);A.typeAheadEvent.fire(A,D,E);},(this.typeAheadDelay*1000));}};YAHOO.widget.AutoComplete.prototype._selectText=function(D,A,B){if(D.setSelectionRange){D.setSelectionRange(A,B);}else{if(D.createTextRange){var C=D.createTextRange();C.moveStart("character",A);C.moveEnd("character",B-D.value.length);C.select();}else{D.select();}}};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(D){var E=this._elContent.offsetWidth+"px";var B=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){var C=this._elIFrame;if(D){C.style.width=E;C.style.height=B;C.style.padding="";}else{C.style.width=0;C.style.height=0;C.style.padding=0;}}if(this.useShadow&&this._elShadow){var A=this._elShadow;if(D){A.style.width=E;A.style.height=B;}else{A.style.width=0;A.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(I){var D=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return ;}if(!I){this._toggleHighlight(this._elCurListItem,"from");this._nDisplayedItems=0;this._sCurQuery=null;if(!this._bContainerOpen){this._elContent.style.display="none";return ;}}var A=this._oAnim;if(A&&A.getEl()&&(this.animHoriz||this.animVert)){if(A.isAnimated()){A.stop(true);}var G=this._elContent.cloneNode(true);D.appendChild(G);G.style.top="-9000px";G.style.width="";G.style.height="";G.style.display="";var F=G.offsetWidth;var C=G.offsetHeight;var B=(this.animHoriz)?0:F;var E=(this.animVert)?0:C;A.attributes=(I)?{width:{to:F},height:{to:C}}:{width:{to:B},height:{to:E}};if(I&&!this._bContainerOpen){this._elContent.style.width=B+"px";this._elContent.style.height=E+"px";}else{this._elContent.style.width=F+"px";this._elContent.style.height=C+"px";}D.removeChild(G);G=null;var H=this;var J=function(){A.onComplete.unsubscribeAll();if(I){H._toggleContainerHelpers(true);H._bContainerOpen=I;H.containerExpandEvent.fire(H);}else{H._elContent.style.display="none";H._bContainerOpen=I;H.containerCollapseEvent.fire(H);}};this._toggleContainerHelpers(false);this._elContent.style.display="";A.onComplete.subscribe(J);A.animate();}else{if(I){this._elContent.style.display="";this._toggleContainerHelpers(true);this._bContainerOpen=I;this.containerExpandEvent.fire(this);}else{this._toggleContainerHelpers(false);this._elContent.style.display="none";this._bContainerOpen=I;this.containerCollapseEvent.fire(this);}}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){if(A){var B=this.highlightClassName;if(this._elCurListItem){YAHOO.util.Dom.removeClass(this._elCurListItem,B);this._elCurListItem=null;}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);this._elCurListItem=A;}}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(B,C){if(B==this._elCurListItem){return ;}var A=this.prehighlightClassName;if((C=="mouseover")&&A){YAHOO.util.Dom.addClass(B,A);}else{YAHOO.util.Dom.removeClass(B,A);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(C){if(!this.suppressInputUpdate){var F=this._elTextbox;var E=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=C._sResultMatch;var D="";if(E){D=this._sPastSelections;D+=B+E;if(E!=" "){D+=" ";}}else{D=B;}F.value=D;if(F.type=="textarea"){F.scrollTop=F.scrollHeight;}var A=F.value.length;this._selectText(F,A,A);this._elCurListItem=C;}};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._sPastSelections=this._elTextbox.value;this._clearInterval();this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._elCurListItem){this._selectItem(this._elCurListItem); +}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var F=this._elCurListItem;var E=-1;if(F){E=F._nItemIndex;}var C=(G==40)?(E+1):(E-1);if(C<-2||C>=this._nDisplayedItems){return ;}if(F){this._toggleHighlight(F,"from");this.itemArrowFromEvent.fire(this,F);}if(C==-1){if(this.delimChar){this._elTextbox.value=this._sPastSelections+this._sCurQuery;}else{this._elTextbox.value=this._sCurQuery;}return ;}if(C==-2){this._toggleContainer(false);return ;}var D=this._elList.childNodes[C];var A=this._elContent;var B=((YAHOO.util.Dom.getStyle(A,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(A,"overflowY")=="auto"));if(B&&(C>-1)&&(C(A.scrollTop+A.offsetHeight)){A.scrollTop=(D.offsetTop+D.offsetHeight)-A.offsetHeight;}else{if((D.offsetTop+D.offsetHeight)(A.scrollTop+A.offsetHeight)){this._elContent.scrollTop=(D.offsetTop+D.offsetHeight)-A.offsetHeight;}}}}this._toggleHighlight(D,"to");this.itemArrowToEvent.fire(this,D);if(this.typeAhead){this._updateValue(D);}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return ;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseover");}else{C._toggleHighlight(D,"to");}C.itemMouseOverEvent.fire(C,D);break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=true;return ;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return ;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseout");}else{C._toggleHighlight(D,"from");}C.itemMouseOutEvent.fire(C,D);break;case"ul":C._toggleHighlight(C._elCurListItem,"to");break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=false;return ;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerClick=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return ;case"li":C._toggleHighlight(D,"to");C._selectItem(D);return ;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._elTextbox.focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,B){var C=A.keyCode;if(B._nTypeAheadDelayID!=-1){clearTimeout(B._nTypeAheadDelayID);}switch(C){case 9:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 27:B._toggleContainer(false);return ;case 39:B._jumpSelection();break;case 38:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;case 40:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;default:B._bItemSelected=false;B._toggleHighlight(B._elCurListItem,"from");B.textboxKeyEvent.fire(B,C);break;}if(C===18){B._enableIntervalDetection();}B._nKeyCode=C;};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,B){var C=A.keyCode;if(YAHOO.env.ua.opera||(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&(YAHOO.env.ua.webkit<420)){switch(C){case 9:if(B._bContainerOpen){if(B.delimChar){YAHOO.util.Event.stopEvent(A);}if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;default:break;}}else{if(C==229){B._enableIntervalDetection();}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(A,C){var B=this.value;C._initProps();var D=A.keyCode;if(C._isIgnoreKey(D)){return ;}if(C._nDelayID!=-1){clearTimeout(C._nDelayID);}C._nDelayID=setTimeout(function(){C._sendQuery(B);},(C.queryDelay*1000));};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){if(!B._bFocused){B._elTextbox.setAttribute("autocomplete","off");B._bFocused=true;B._sInitInputValue=B._elTextbox.value;B.textboxFocusEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,C){if(!C._bOverContainer||(C._nKeyCode==9)){if(!C._bItemSelected){var B=C._textMatchesOption();if(!C._bContainerOpen||(C._bContainerOpen&&(B===null))){if(C.forceSelection){C._clearSelection();}else{C.unmatchedItemSelectEvent.fire(C,C._sCurQuery);}}else{if(C.forceSelection){C._selectItem(B);}}}if(C._bContainerOpen){C._toggleContainer(false);}C._clearInterval();C._bFocused=false;if(C._sInitInputValue!==C._elTextbox.value){C.textboxChangeEvent.fire(C);}C.textboxBlurEvent.fire(C);}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._elTextbox&&B.allowBrowserAutocomplete){B._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return this.generateRequest(A);};YAHOO.widget.AutoComplete.prototype.getListItems=function(){var C=[],B=this._elList.childNodes;for(var A=B.length-1;A>=0;A--){C[A]=B[A];}return C;};YAHOO.widget.AutoComplete._cloneObject=function(D){if(!YAHOO.lang.isValue(D)){return D; +}var F={};if(YAHOO.lang.isFunction(D)){F=D;}else{if(YAHOO.lang.isArray(D)){var E=[];for(var C=0,B=D.length;C0){for(var B=0,A=D.length;B0){var B=(A===false?function(K){return K;}:decodeURIComponent);if(/[^=]+=[^=;]?(?:; [^=]+=[^=]?)?/.test(I)){var G=I.split(/;\s/g);var H=null;var C=null;var E=null;for(var D=0,F=G.length;D2$8pWbs`^{+J>5OS z*~HOMLyDqhkdy=qkR{s^1bBfr8L%&gZia7$j|S|6;FAp*w(o`kA9NAqgDmrAi;yT; zlq`XpMMy&qIV5M;)7{h4+wZ?tWjG>osjT|-d#Ij4_wWC!D>EY_Uc88mC_qFdU)x8g zH+K&9PKThCMg^d>*2d5){)Y2JuUu!ZoU7? z-TQ?yi>SpQsLPrMmH;(s!_tptqmRwE*bTT;}P9{0# zCZ85&lIJ61Mw8;|>e8>>xV*8{J4^cCx%u9Y-q~4brwgr&rrS=FR+_f6D_a$y|vpPu60`r zt@ctkyRy1W8!*WWQlliX>yP&uWe9$sq;L1fz7bS`EAP0ltxG*&IN1Ha_ z_WsceH{ZLqwRU-BiKIp&YK;kRHLX=lKC(e&g)iR|`K&-ADhUX9GMeu7M}u)b&hsh# zH^m??`ormZul=QGZY*_L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%hz*}NBj0RS0oKVlD@=;l`&VYsb2eMHbg~A z=ya=8OE+B1|wo@QkUWUb6TJ%To) zDEPQAwb>Ae`eFe~S(K?vzO(V>s1?q3WrHPVUXPgkq^XIjc0vlx(JB>DQB^td*4_yG z6P&<4ZbnQ{X+5`!Ht3!5aTY4~Fa`(%q)8I>wfZb_Z40D~J$OKCmCo*H2Bx8~F|mWe>(F?5WlcDlnURNL zL0LnOp`Xm>NdYS!$YpJfKSD@CwoahWAkO7HN!hvMvN_fdnrb(h;t~f}wxH)VCHRJt zDB?x;a5t;gwS!<=sT2y#wYK1C;UY_<-#-e`SOc(Z>Ba~fUA86UuK8pY$`~~uMiuuZ z6{4f?5#;$l#y)x?`0Q#EIVe?qbc9!St=;;JPea=W7L{YTHt_HoY5%vPK{euq zh*)cNgfgw;`>voG_$d8>2dxPjX1liLJyr;@Vl8L4KveGrO}2t_NGF*1;9{mqB@Qpc z0!+*kKJeEEIkU!E)~?zg{|gO0dlqr_HPv7e5r5$Y&MD14Yuo-`fB^t`D5<3U{)_tn O0000 + + + + API: phploader (YUI Library) + + + + + + + + + + +
+
+

Yahoo! UI Library

+

phploader  1.0.0beta

+ Yahoo! UI Library + > phploader + + +
+
+ Search: +
+   +
+
+
+
+ +
+
+
+
+
+ Filters + + + +
+
+ + +

Module: phploader + + + +

+
+ Used to specify JavaScript and CSS module requirements. It maintains a dependency +tree for these modules so when a module is requested, all of the other modules it +depends on are included as well. By default, the YUI Library is configured, and +other modules and their dependencies can be added via PHP. +
+ + + +
+
+ +

This module contains the following classes:

+ + +
+
+ +
+
+ +
+
+
+ +
+
+
+
+ Copyright © 2009 Yahoo! Inc. All rights reserved. +
+
+ + + diff --git a/examples/assets/bg_hd.gif b/examples/assets/bg_hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..c10acba460e4e67dcfdb5f979bdd5f5477279e7c GIT binary patch literal 96 zcmZ?wbhEHbWMq(J*v!E2@a@-|&p++H@Z{v}mj|ytd;Rs-^G`o6K770F?87%-e=%SH g#h)x-F&z*IGJ}DI*I=qkwyDA#N0wg-LW~U707hdXa{vGU literal 0 HcmV?d00001 diff --git a/examples/assets/custom/custom.css b/examples/assets/custom/custom.css new file mode 100644 index 0000000..2366403 --- /dev/null +++ b/examples/assets/custom/custom.css @@ -0,0 +1,3 @@ +.last { + color: red; +} \ No newline at end of file diff --git a/examples/assets/custom/data.js b/examples/assets/custom/data.js new file mode 100644 index 0000000..c2ce915 --- /dev/null +++ b/examples/assets/custom/data.js @@ -0,0 +1 @@ +var JSONString = '[{"itemText" : "List item 2"}, {"itemText" : "List item 3"}, {"itemText" : "List item 4, with custom class"}]'; \ No newline at end of file diff --git a/examples/assets/dpSyntaxHighlighter.css b/examples/assets/dpSyntaxHighlighter.css new file mode 100644 index 0000000..5fcbdf3 --- /dev/null +++ b/examples/assets/dpSyntaxHighlighter.css @@ -0,0 +1,190 @@ +/* Give syntax-highlighting textareas some height for unsupported browsers */ + +textarea.JScript, textarea.HTML, textarea.XML {height:10em;} + +/* Main style for the table */ + +.dp-highlighter { + width: 100%; + overflow: auto; + line-height: 100% !important; + margin:0 0 1em 0; +} + +.dp-highlighter table { + width:99% !important; + margin: 2px 0px 2px 0px !important; + border-collapse: collapse; + border-bottom: 2px solid #eee; + background-color: #fff; +} + +.dp-highlighter tbody.hide { display: none; } +.dp-highlighter tbody.show { display: table-row-group; _display: block; } + +.dp-highlighter td +{ + font-family: Courier New; + font-size: 11px; +} + +/* Styles for the tools */ + +.dp-highlighter .tools-corner { + background-color: #eee; + font-size: 9px; +} + +.dp-highlighter .tools { + background-color: #eee; + padding: 3px 8px 3px 10px; + border-bottom: 1px solid gray; + font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; + color: silver; +} + +.dp-highlighter .tools-corner { + background-color: #eee; +} + +.dp-highlighter .tools a { + font-size: 9px; + color: gray; + text-decoration: none; +} + +.dp-highlighter .tools a:hover { + color: red; + text-decoration: underline; +} + +/* Gutter with line number */ + +.dp-highlighter .gutter { + padding-right: 5px; + padding-left: 10px; + width: 5px; + background-color: #eee; + border-right: 1px solid gray; + color: gray; + text-align: right; + vertical-align: top; +} + +/* Single line style */ + +.dp-highlighter .line1, .line2 { + padding-left: 10px; + /*border-bottom: 1px solid #F7F7F7;*/ + white-space:nowrap; +} + +.dp-highlighter .line2 { + /*background-color: #F7F7F7;*/ +} + +/* About dialog styles */ + +.dp-about { + background-color: #fff; + margin: 0px; +} + +.dp-about table { + width: 100%; + height: 100%; + font-size: 11px; + font-family: Tahoma, Verdana, Arial, sans-serif !important; +} + +.dp-about td { + padding: 10px; + vertical-align: top; +} + +.dp-about .copy { + border-bottom: 1px solid #ACA899; + height: 95%; +} + +.dp-about .title { + color: red; + font-weight: bold; +} + +.dp-about .para { + margin-bottom: 4px; +} + +.dp-about .footer { + background-color: #ECEADB; + border-top: 1px solid #fff; + text-align: right; +} + +.dp-about .close { + font-size: 11px; + font-family: Tahoma, Verdana, Arial, sans-serif !important; + background-color: #ECEADB; + width: 60px; + height: 22px; +} + +/* Language specific styles */ + +.dp-c {} +.dp-c .comment { color: green; } +.dp-c .string { color: blue; } +.dp-c .preprocessor { color: gray; } +.dp-c .keyword { color: blue; } +.dp-c .vars { color: #d00; } +/* +.dp-vb {} +.dp-vb .comment { color: green; } +.dp-vb .string { color: blue; } +.dp-vb .preprocessor { color: gray; } +.dp-vb .keyword { color: blue; } + +.dp-sql {} +.dp-sql .comment { color: green; } +.dp-sql .string { color: red; } +.dp-sql .keyword { color: blue; } +.dp-sql .func { color: #ff1493; } +.dp-sql .op { color: #808080; } +*/ +.dp-xml {} +.dp-xml .cdata { color: #ff1493; } +.dp-xml .comments { color: green; } +.dp-xml .tag { color: blue; } +.dp-xml .tag-name { color: black; font-weight: bold; } +.dp-xml .attribute { color: red; } +.dp-xml .attribute-value { color: blue; } +/* +.dp-delphi {} +.dp-delphi .comment { color: #008200; font-style: italic; } +.dp-delphi .string { color: blue; } +.dp-delphi .number { color: blue; } +.dp-delphi .directive { color: #008284; } +.dp-delphi .keyword { font-weight: bold; color: navy; } +.dp-delphi .vars { color: #000; } + +.dp-py {} +.dp-py .comment { color: green; } +.dp-py .string { color: red; } +.dp-py .docstring { color: brown; } +.dp-py .keyword { color: blue; font-weight: bold;} +.dp-py .builtins { color: #ff1493; } +.dp-py .magicmethods { color: #808080; } +.dp-py .exceptions { color: brown; } +.dp-py .types { color: brown; font-style: italic; } +.dp-py .commonlibs { color: #8A2BE2; font-style: italic; }*/ + + +.dp-css .keyword { color: red; } +.dp-css .value { color: #ff1493; } +.dp-css .comment { color: green; } +.dp-css .string { color: blue; } +.dp-css .preprocessor { color: gray; } +.dp-css .keyword { color: blue; } +.dp-css .vars { color: #d00; } +.dp-css .colors { font-weight: bold; } diff --git a/examples/assets/dpSyntaxHighlighter.js b/examples/assets/dpSyntaxHighlighter.js new file mode 100644 index 0000000..94ad098 --- /dev/null +++ b/examples/assets/dpSyntaxHighlighter.js @@ -0,0 +1,805 @@ +/** + * Code Syntax Highlighter. + * Version 1.3.0 + * Copyright (C) 2004 Alex Gorbatchev. + * http://www.dreamprojections.com/syntaxhighlighter/ + * + * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General + * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +// +// create namespaces +// +var dp = { + sh : // dp.sh + { + Utils : {}, // dp.sh.Utils + Brushes : {}, // dp.sh.Brushes + Strings : {}, + Version : '1.3.0' + } +}; + +dp.sh.Strings = { + AboutDialog : 'About...

dp.SyntaxHighlighter

Version: {V}

http://www.dreamprojections.com/SyntaxHighlighter

©2004-2005 Alex Gorbatchev. All right reserved.
', + + // tools + ExpandCode : '+ expand code', + ViewPlain : 'view plain', + Print : 'print', + CopyToClipboard : 'copy to clipboard', + About : '?', + + CopiedToClipboard : 'The code is in your clipboard now.' +}; + +dp.SyntaxHighlighter = dp.sh; + +// +// Dialog and toolbar functions +// + +dp.sh.Utils.Expand = function(sender) +{ + var table = sender; + var span = sender; + + // find the span in which the text label and pipe contained so we can hide it + while(span != null && span.tagName != 'SPAN') + span = span.parentNode; + + // find the table + while(table != null && table.tagName != 'TABLE') + table = table.parentNode; + + // remove the 'expand code' button + span.parentNode.removeChild(span); + + table.tBodies[0].className = 'show'; + table.parentNode.style.height = '100%'; // containing div isn't getting updated properly when the TBODY is shown +} + +// opens a new windows and puts the original unformatted source code inside. +dp.sh.Utils.ViewSource = function(sender) +{ + var code = sender.parentNode.originalCode; + var wnd = window.open('', '_blank', 'width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1'); + + code = code.replace(/' + code + ''); + wnd.document.close(); +} + +// copies the original source code in to the clipboard (IE only) +dp.sh.Utils.ToClipboard = function(sender) +{ + var code = sender.parentNode.originalCode; + + // This works only for IE. There's a way to make it work with Mozilla as well, + // but it requires security settings changed on the client, which isn't by + // default, so 99% of users won't have it working anyways. + if(window.clipboardData) + { + window.clipboardData.setData('text', code); + + alert(dp.sh.Strings.CopiedToClipboard); + } +} + +// creates an invisible iframe, puts the original source code inside and prints it +dp.sh.Utils.PrintSource = function(sender) +{ + var td = sender.parentNode; + var code = td.processedCode; + var iframe = document.createElement('IFRAME'); + var doc = null; + var wnd = + + // this hides the iframe + iframe.style.cssText = 'position:absolute; width:0px; height:0px; left:-5px; top:-5px;'; + + td.appendChild(iframe); + + doc = iframe.contentWindow.document; + code = code.replace(/' + code + ''); + doc.close(); + + iframe.contentWindow.focus(); + iframe.contentWindow.print(); + + td.removeChild(iframe); +} + +dp.sh.Utils.About = function() +{ + var wnd = window.open('', '_blank', 'dialog,width=320,height=150,scrollbars=0'); + var doc = wnd.document; + + var styles = document.getElementsByTagName('style'); + var links = document.getElementsByTagName('link'); + + doc.write(dp.sh.Strings.AboutDialog.replace('{V}', dp.sh.Version)); + + // copy over ALL the styles from the parent page + for(var i = 0; i < styles.length; i++) + doc.write(''); + + for(var i = 0; i < links.length; i++) + if(links[i].rel.toLowerCase() == 'stylesheet') + doc.write(''); + + doc.close(); + wnd.focus(); +} + +// +// Match object +// +dp.sh.Match = function(value, index, css) +{ + this.value = value; + this.index = index; + this.length = value.length; + this.css = css; +} + +// +// Highlighter object +// +dp.sh.Highlighter = function() +{ + this.addGutter = true; + this.addControls = true; + this.collapse = false; + this.tabsToSpaces = true; +} + +// static callback for the match sorting +dp.sh.Highlighter.SortCallback = function(m1, m2) +{ + // sort matches by index first + if(m1.index < m2.index) + return -1; + else if(m1.index > m2.index) + return 1; + else + { + // if index is the same, sort by length + if(m1.length < m2.length) + return -1; + else if(m1.length > m2.length) + return 1; + } + return 0; +} + +// gets a list of all matches for a given regular expression +dp.sh.Highlighter.prototype.GetMatches = function(regex, css) +{ + var index = 0; + var match = null; + + while((match = regex.exec(this.code)) != null) + { + this.matches[this.matches.length] = new dp.sh.Match(match[0], match.index, css); + } +} + +dp.sh.Highlighter.prototype.AddBit = function(str, css) +{ + var span = document.createElement('span'); + + str = str.replace(/&/g, '&'); + str = str.replace(/ /g, ' '); + str = str.replace(/'); + + // when adding a piece of code, check to see if it has line breaks in it + // and if it does, wrap individual line breaks with span tags + if(css != null) + { + var regex = new RegExp('
', 'gi'); + + if(regex.test(str)) + { + var lines = str.split(' 
'); + + str = ''; + + for(var i = 0; i < lines.length; i++) + { + span = document.createElement('SPAN'); + span.className = css; + span.innerHTML = lines[i]; + + this.div.appendChild(span); + + // don't add a
for the last line + if(i + 1 < lines.length) + this.div.appendChild(document.createElement('BR')); + } + } + else + { + span.className = css; + span.innerHTML = str; + this.div.appendChild(span); + } + } + else + { + span.innerHTML = str; + this.div.appendChild(span); + } +} + +// checks if one match is inside any other match +dp.sh.Highlighter.prototype.IsInside = function(match) +{ + if(match == null || match.length == 0) + return; + + for(var i = 0; i < this.matches.length; i++) + { + var c = this.matches[i]; + + if(c == null) + continue; + + if((match.index > c.index) && (match.index <= c.index + c.length)) + return true; + } + + return false; +} + +dp.sh.Highlighter.prototype.ProcessRegexList = function() +{ + for(var i = 0; i < this.regexList.length; i++) + this.GetMatches(this.regexList[i].regex, this.regexList[i].css); +} + +dp.sh.Highlighter.prototype.ProcessSmartTabs = function(code) +{ + var lines = code.split('\n'); + var result = ''; + var tabSize = 4; + var tab = '\t'; + + // This function inserts specified amount of spaces in the string + // where a tab is while removing that given tab. + function InsertSpaces(line, pos, count) + { + var left = line.substr(0, pos); + var right = line.substr(pos + 1, line.length); // pos + 1 will get rid of the tab + var spaces = ''; + + for(var i = 0; i < count; i++) + spaces += ' '; + + return left + spaces + right; + } + + // This function process one line for 'smart tabs' + function ProcessLine(line, tabSize) + { + if(line.indexOf(tab) == -1) + return line; + + var pos = 0; + + while((pos = line.indexOf(tab)) != -1) + { + // This is pretty much all there is to the 'smart tabs' logic. + // Based on the position within the line and size of a tab, + // calculate the amount of spaces we need to insert. + var spaces = tabSize - pos % tabSize; + + line = InsertSpaces(line, pos, spaces); + } + + return line; + } + + // Go through all the lines and do the 'smart tabs' magic. + for(var i = 0; i < lines.length; i++) + result += ProcessLine(lines[i], tabSize) + '\n'; + + return result; +} + +dp.sh.Highlighter.prototype.SwitchToTable = function() +{ + // thanks to Lachlan Donald from SitePoint.com for this
tag fix. + var html = this.div.innerHTML.replace(/<(br)\/?>/gi, '\n'); + var lines = html.split('\n'); + var row = null; + var cell = null; + var tBody = null; + var html = ''; + var pipe = ' | '; + + // creates an anchor to a utility + function UtilHref(util, text) + { + return '' + text + ''; + } + + tBody = document.createElement('TBODY'); // can be created and all others go to tBodies collection. + + this.table.appendChild(tBody); + + if(this.addGutter == true) + { + row = tBody.insertRow(-1); + cell = row.insertCell(-1); + cell.className = 'tools-corner'; + } + + if(this.addControls == true) + { + var tHead = document.createElement('THEAD'); // controls will be placed in here + this.table.appendChild(tHead); + + row = tHead.insertRow(-1); + + // add corner if there's a gutter + if(this.addGutter == true) + { + cell = row.insertCell(-1); + cell.className = 'tools-corner'; + } + + cell = row.insertCell(-1); + + // preserve some variables for the controls + cell.originalCode = this.originalCode; + cell.processedCode = this.code; + cell.className = 'tools'; + + if(this.collapse == true) + { + tBody.className = 'hide'; + cell.innerHTML += '' + UtilHref('Expand', dp.sh.Strings.ExpandCode) + '' + pipe + ''; + } + + cell.innerHTML += UtilHref('ViewSource', dp.sh.Strings.ViewPlain) + pipe + UtilHref('PrintSource', dp.sh.Strings.Print); + + // IE has this clipboard object which is easy enough to use + if(window.clipboardData) + cell.innerHTML += pipe + UtilHref('ToClipboard', dp.sh.Strings.CopyToClipboard); + + cell.innerHTML += pipe + UtilHref('About', dp.sh.Strings.About); + } + + for(var i = 0, lineIndex = this.firstLine; i < lines.length - 1; i++, lineIndex++) + { + row = tBody.insertRow(-1); + + if(this.addGutter == true) + { + cell = row.insertCell(-1); + cell.className = 'gutter'; + cell.innerHTML = lineIndex; + } + + cell = row.insertCell(-1); + cell.className = 'line' + (i % 2 + 1); // uses .line1 and .line2 css styles for alternating lines + cell.innerHTML = lines[i]; + } + + this.div.innerHTML = ''; +} + +dp.sh.Highlighter.prototype.Highlight = function(code) +{ + function Trim(str) + { + return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1'); + } + + function Chop(str) + { + return str.replace(/\n*$/, '').replace(/^\n*/, ''); + } + + function Unindent(str) + { + var lines = str.split('\n'); + var indents = new Array(); + var regex = new RegExp('^\\s*', 'g'); + var min = 1000; + + // go through every line and check for common number of indents + for(var i = 0; i < lines.length && min > 0; i++) + { + if(Trim(lines[i]).length == 0) + continue; + + var matches = regex.exec(lines[i]); + + if(matches != null && matches.length > 0) + min = Math.min(matches[0].length, min); + } + + // trim minimum common number of white space from the begining of every line + if(min > 0) + for(var i = 0; i < lines.length; i++) + lines[i] = lines[i].substr(min); + + return lines.join('\n'); + } + + // This function returns a portions of the string from pos1 to pos2 inclusive + function Copy(string, pos1, pos2) + { + return string.substr(pos1, pos2 - pos1); + } + + var pos = 0; + + this.originalCode = code; + this.code = Chop(Unindent(code)); + this.div = document.createElement('DIV'); + this.table = document.createElement('TABLE'); + this.matches = new Array(); + + if(this.CssClass != null) + this.table.className = this.CssClass; + + // replace tabs with spaces + if(this.tabsToSpaces == true) + this.code = this.ProcessSmartTabs(this.code); + + this.table.border = 0; + this.table.cellSpacing = 0; + this.table.cellPadding = 0; + + this.ProcessRegexList(); + + // if no matches found, add entire code as plain text + if(this.matches.length == 0) + { + this.AddBit(this.code, null); + this.SwitchToTable(); + return; + } + + // sort the matches + this.matches = this.matches.sort(dp.sh.Highlighter.SortCallback); + + // The following loop checks to see if any of the matches are inside + // of other matches. This process would get rid of highligting strings + // inside comments, keywords inside strings and so on. + for(var i = 0; i < this.matches.length; i++) + if(this.IsInside(this.matches[i])) + this.matches[i] = null; + + // Finally, go through the final list of matches and pull the all + // together adding everything in between that isn't a match. + for(var i = 0; i < this.matches.length; i++) + { + var match = this.matches[i]; + + if(match == null || match.length == 0) + continue; + + this.AddBit(Copy(this.code, pos, match.index), null); + this.AddBit(match.value, match.css); + + pos = match.index + match.length; + } + + this.AddBit(this.code.substr(pos), null); + + this.SwitchToTable(); +} + +dp.sh.Highlighter.prototype.GetKeywords = function(str) +{ + return '\\b' + str.replace(/ /g, '\\b|\\b') + '\\b'; +} + +// highlightes all elements identified by name and gets source code from specified property +dp.sh.HighlightAll = function(name, showGutter /* optional */, showControls /* optional */, collapseAll /* optional */, firstLine /* optional */) +{ + function FindValue() + { + var a = arguments; + + for(var i = 0; i < a.length; i++) + { + if(a[i] == null) + continue; + + if(typeof(a[i]) == 'string' && a[i] != '') + return a[i] + ''; + + if(typeof(a[i]) == 'object' && a[i].value != '') + return a[i].value + ''; + } + + return null; + } + + function IsOptionSet(value, list) + { + for(var i = 0; i < list.length; i++) + if(list[i] == value) + return true; + + return false; + } + + function GetOptionValue(name, list, defaultValue) + { + var regex = new RegExp('^' + name + '\\[(\\w+)\\]$', 'gi'); + var matches = null; + + for(var i = 0; i < list.length; i++) + if((matches = regex.exec(list[i])) != null) + return matches[1]; + + return defaultValue; + } + + var elements = document.getElementsByName(name); + var highlighter = null; + var registered = new Object(); + var propertyName = 'value'; + + // if no code blocks found, leave + if(elements == null) + return; + + // register all brushes + for(var brush in dp.sh.Brushes) + { + var aliases = dp.sh.Brushes[brush].Aliases; + + if(aliases == null) + continue; + + for(var i = 0; i < aliases.length; i++) + registered[aliases[i]] = brush; + } + + for(var i = 0; i < elements.length; i++) + { + var element = elements[i]; + var options = FindValue( + element.attributes['class'], element.className, + element.attributes['language'], element.language + ); + var language = ''; + + if(options == null) + continue; + + options = options.split(':'); + + language = options[0].toLowerCase(); + + if(registered[language] == null) + continue; + + // instantiate a brush + highlighter = new dp.sh.Brushes[registered[language]](); + + // hide the original element + element.style.display = 'none'; + + highlighter.addGutter = (showGutter == null) ? !IsOptionSet('nogutter', options) : showGutter; + highlighter.addControls = (showControls == null) ? !IsOptionSet('nocontrols', options) : showControls; + highlighter.collapse = (collapseAll == null) ? IsOptionSet('collapse', options) : collapseAll; + + // first line idea comes from Andrew Collington, thanks! + highlighter.firstLine = (firstLine == null) ? parseInt(GetOptionValue('firstline', options, 1)) : firstLine; + + highlighter.Highlight(element[propertyName]); + + // place the result table inside a div + var div = document.createElement('DIV'); + + div.className = 'dp-highlighter'; + div.appendChild(highlighter.table); + + element.parentNode.insertBefore(div, element); + } +} + + +dp.sh.Brushes.Xml = function() +{ + this.CssClass = 'dp-xml'; +} + +dp.sh.Brushes.Xml.prototype = new dp.sh.Highlighter(); +dp.sh.Brushes.Xml.Aliases = ['xml', 'xhtml', 'xslt', 'html', 'xhtml']; + +dp.sh.Brushes.Xml.prototype.ProcessRegexList = function() +{ + function push(array, value) + { + array[array.length] = value; + } + + /* If only there was a way to get index of a group within a match, the whole XML + could be matched with the expression looking something like that: + + () + | () + | (<)*(\w+)*\s*(\w+)\s*=\s*(".*?"|'.*?'|\w+)(/*>)* + | () + */ + var index = 0; + var match = null; + var regex = null; + + // Match CDATA in the following format + // <\!\[[\w\s]*?\[(.|\s)*?\]\]> + this.GetMatches(new RegExp('<\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\]>', 'gm'), 'cdata'); + + // Match comments + // + this.GetMatches(new RegExp('', 'gm'), 'comments'); + + // Match attributes and their values + // (\w+)\s*=\s*(".*?"|\'.*?\'|\w+)* + regex = new RegExp('([\\w-\.]+)\\s*=\\s*(".*?"|\'.*?\'|\\w+)*', 'gm'); + while((match = regex.exec(this.code)) != null) + { + push(this.matches, new dp.sh.Match(match[1], match.index, 'attribute')); + + // if xml is invalid and attribute has no property value, ignore it + if(match[2] != undefined) + { + push(this.matches, new dp.sh.Match(match[2], match.index + match[0].indexOf(match[2]), 'attribute-value')); + } + } + + // Match opening and closing tag brackets + // + this.GetMatches(new RegExp('', 'gm'), 'tag'); + + // Match tag names + // 2DMT7{-^frOVv~QkPP&Ewq->nsP|D1x-16aL6T+fS1y->At;?rCzDB|UT?Kn!l4k)^P(uaoX&VWPDLVS z3^V9-9LI%%!9*fqvszIE(P_0zD&=vzEoQSQ2rh>sl}cr^+0oI_$ml469m^7AOPfd(=_d{J75s9+iVaBkbZwW7K_qR%xHAj zZA^+0cp;Nc8x49<6f&7K%Vrbt1j8^{Hj8K=L<8$}Xgn5AC6gKeKwua}V6zDW0ky+n zPoiu?Rem84SSyDdxl|Me9*rCY$wnJQ@)2dcAg=HN`NnMuR|* zD2N=->(D$dS0plOHDk$SLWdv_09wr!r`?{fnB8U%1p_?KN&d%Fyp;aus(YhvenKL9 zEqOgl(J`p%+jYPBy@S-_&Etzpk|12+#`W#@(A zhTf0QpWXgq#MHZ=n9i*1S=FSyQZ&77VCc`5O}C1cxkIuU-T0K!2kk|dPt*-6I)~0* zlB4$nhWdWPi^}cyCsppkmsLccPjtVtW8L+i`<&LMi^Y*uYp2V*&V6w(iB9iyet-Ji zE^gtL*CQ=opLw|!>3FcY`%3@H8CC0#Ty`w{r0UeSCC481Kat;Ruc|?1ibbS9pwe&aT#R+%DO!J$i(uMa1rzv{|hT2OWx6~*_%5`JYm*@H#8hc!=^BT9m z+%&J7E#ACn?_jQQp?`4SYGp~Ms(0dE;PK_cq|z;$f2jHTPb(&=Mx1xf)WWVGo*X$> z*l@N>?i$%zR=R4|rAGz6xmzUTqzg_;#`$Eox|(stz^sBx^0xAdCkjR}PF8-fVWfY? z#2S~h^p|R&Tn)6wYt_;jHNEOO?9t)N6)U8{56g}{Rdu}G+fh+CC3FX^oA8yYynezC z+3NZgJ9al*D`EHc1PT{3@-?QnZqD&cuDSQBz+7{08!`Ee%vn@c&|TRww})9IX)1XB z>b&Gvnd;oK35u~c7pf?C7VjDBl2q-PvbcZT9;piP-Q0a-@m%tS+}ZfYi)XEp6Oyq) gN%dXecuDQ}@=FVLc0apP+!WuqblxeMyjZg0UuMopT>t<8 literal 0 HcmV?d00001 diff --git a/examples/assets/favicon.ico b/examples/assets/favicon.ico new file mode 100755 index 0000000000000000000000000000000000000000..06acd8a79b6eb13f0b9cdcac4d5b6cd78e6ca1e1 GIT binary patch literal 6598 zcmeHLJ&)T)5FLt?mImUZ;OYtk(pB*_!MSp0xynyS?ar-T+raVQ!tSDW3*p-Q3|?iI z*Q!`Rh8uULI|-1relxpEQanjPfJ<@-IN)$T-puUmXeEIpiYTG+ct}iNdPKiM4u{Tu z6cPOr6P=wA;!^tKi0HS3==j*#9|uI62SksMGX_5cbG^fq6XBvfcLH~)R1^gy16D4w zmNg-$FfExoK&~Tm?VFivrm4XtW_o&AASf->EAG zdj{>FA)JB3L`Rbi{RDnEv5Pn7c5(hYSP2)C*cPM6=GleqseGg2e4XXRazs=@} zy42H*KRJ*jal&CThI_HrT$fLbDStNe^=qxyuZ&)v8T0Mf%s;=^`U0mYvK-5-H6*j) zIpHURo`d;!V;>ENmeSPH>FHN`{MgdT$yexp2-UZLUv}s3CeTgbzdV7oqizDXG=V{z zTwU?*SVFaFAVK1F>UL5)T>aH}S8i|p2JA~8?&nav!*<=>E_Us2S9F^0ir+U;uCOEi z;Ewmk?`hG;H_;s>s=WvnDK)r}u;mHy5>86dRswsI=4Y}M?sFRT#IsewB{)9{L20hQ z{yusPWxcGzd8$!6p|z(l`A}smp;4(?qwQ<9)W(q1a^VQL1a}r3dSe8k8J|s1znj~)|N$`BivoLJ&6y#T2_mM#p>PFS{+_D)rhavMxa+~ ztkb#){K*8|Ggx@u`x|6QYQfKO3sS|l%*3|24f0B!_j0tvedKmIak30@B=&hJk|xUx z_J&3x*OV>st+mTUi7b!eHQpQ9#ppt0F)2jm=hVYHB}*HTo5;z6j%WaXPMO^xk0tk! z)5!M&0h{l)Dfu}Sud?J>_0V(bcXUj&0w-W5wxu7D-L0EIH-Z1}1p0T9;z0d=9M>Ht zf%^R7<0PpU{ zP|%G4zQxcge3F261x8qpv5MI1sB-iz(KM;Fon literal 0 HcmV?d00001 diff --git a/examples/assets/reset-fonts-grids-min.css b/examples/assets/reset-fonts-grids-min.css new file mode 100644 index 0000000..3d81c15 --- /dev/null +++ b/examples/assets/reset-fonts-grids-min.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.6.0 +*/ +html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}del,ins{text-decoration:none;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}body{text-align:center;}#ft{clear:both;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;min-width:750px;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;} .yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#bd:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#bd,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;} diff --git a/examples/assets/yui.css b/examples/assets/yui.css new file mode 100644 index 0000000..e3db5ba --- /dev/null +++ b/examples/assets/yui.css @@ -0,0 +1,322 @@ +/* +Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.4.0 +*/ +html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}legend{color:#000;} + +body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;} + +body{text-align:center;}#ft{clear:both;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.301em;min-width:750px;}#doc2{width:73.074em;*width:71.313em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.117em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.3207em;*width:12.0106em;}.yui-t1 #yui-main .yui-b{margin-left:13.3207em;*margin-left:13.0106em;}.yui-t2 .yui-b{float:left;width:13.8456em;*width:13.512em;}.yui-t2 #yui-main .yui-b{margin-left:14.8456em;*margin-left:14.512em;}.yui-t3 .yui-b{float:left;width:23.0759em;*width:22.52em;}.yui-t3 #yui-main .yui-b{margin-left:24.0759em;*margin-left:23.52em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.512em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.512em;}.yui-t5 .yui-b{float:right;width:18.4608em;*width:18.016em;}.yui-t5 #yui-main .yui-b{margin-right:19.4608em;*margin-right:19.016em;}.yui-t6 .yui-b{float:right;width:23.0759em;*width:22.52em;}.yui-t6 #yui-main .yui-b{margin-right:24.0759em;*margin-right:23.52em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gb .yui-u,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;margin-left:2%;width:32%;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:.8%;}.yui-gb .yui-u{float:right;}.yui-gb div.first{margin-left:0;float:left;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-g div.first,.yui-gc div.first,.yui-gc div.first div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first{float:left;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g div.first{*margin:0;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-gc div.first,.yui-gc div.first,.yui-gd .yui-g,.yui-gd .yui-u{width:66%;}.yui-gd div.first,.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf div.first{width:24%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first {float:left;}.yui-ge div.first,.yui-gf .yui-g,.yui-gf .yui-u{width:74.2%;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}#bd:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#bd,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}.yui-gb .yui-u{float:left;} + +blockquote,ul,ol,dl { + margin:1em; +} +ol,ul,dl { + margin-left:2em; +} +ol li { + list-style: decimal outside; +} +ul li { + list-style: disc outside; +} + +/* +AutoComplete Control CSS: +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.6.0 +*/ +.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;} + +/*begin YDN/YUI styles*/ +#bd {padding-top:1em;} +.yui-gb:after{clear:none;} +#doc3 {min-width:950px;} +h1, h2, h3, h4, h5, h6 {font-weight:bold; color:#E76300;} +h1, h2, h3, h4, h5, h6, p {line-height:1.2em; font-size:100%; margin:1em 0 0 0;} +h1.first-content, h2.first-content, h3.first-content {margin-top:0; padding-top:0; border:none;} /*if an h is the first thing on the page or in a section, it should be flush with the top border of its content area; otherwise, its content area should be padded to create space.*/ +p { margin-bottom:1em } +h1 { font-size: 136%; padding:0; padding-top:18px} +.wiki h1 { font-size: 120%; padding:0; margin-bottom:1em} +h2 { font-size: 110%; margin-top:1.5em; margin-bottom:.2em; padding:1em 0 0 0; border-top:1px dashed #C3D2DC;} +h2.first { border-top:none; margin-top:0; margin-bottom:.2em;} +#doc3 h2.first { float:none; /*float specified to resolve conflict on generic float declaration for .first in grids*/} +h4 {margin-top:1em; color: #000;} +ul, ol, dl, dd {margin-left:30px;} +dt { font-weight:bold; } +ul, ol {margin-bottom:.7em;} +ul {list-style:disc;} +ol {list-style:decimal;} +strong {font-weight:bold;} +em {font-style:italic;} + +a, a code {color:#0000de;} +a:visited, a:visited code {color:#639;} +a:active, a:active code {color: #f00;} + +h1 a { color:#E76300; } +h1 a:visited {color:#E76300} + +#logo_pane { display: none; } + +#ygma { margin:.5em auto 1em auto; } + +#bd ol {} +#bd ol li p { margin-left:0} +#bd ol li ol {list-style:lower-alpha} +#bd ol li ol li {margin-bottom:1em} +#bd ol li ol li ol{list-style:lower-roman} +#bd ol li ol li ol li {margin-bottom:1em} + +#bd p.errormessage {background:url(http://l.yimg.com/a/i/us/search/gr/alertbubble.gif) 0 0 no-repeat; padding-left:30px; margin:2em 2em 2em 1em; font-weight:bold} + +/*formerly #bd targeting*/ +ul {margin-top:2px; } +ul.topspace { margin-top:1em } +ul li { margin:0 17px 0 7px; } +ul li ul { margin-top:0em } +ul.plain {margin-top: 0; list-style: none;} +ul.plain ul {margin-top: 0; list-style: none;} +ul.jump {list-style: none; margin-top: 1em;} +ul.jump li {margin-top: .5em;} + +/*#bd table { margin:10px 17px; width:720px; }*/ +/*#bd th { background:#B6CDE1; padding:2px; color:#fff; vertical-align:top} +#bd td { padding:2px; vertical-align:top} +#bd td.even { background:red; }*/ + +h2.classname { border-top:none; margin-top:0; margin-bottom:.2em; font-size: 130%; color:#000000} +h3.breadcrumb { border-top:none; margin-top:0; margin-bottom:.2em; font-size: 80%; color:#000000} +h3.methods { border-top:none; margin-top:0; margin-bottom:.2em; font-size: 100%; color:#000000} + +.screenshot {border:thin solid #999999; margin:8px;} + +#toc {background-color:#ecf5fa; padding:0; border:1px solid #89d } +#toc ul {margin:0; padding:0;} +#toc ul li {list-style:none; padding:0; margin:0; font-size:85%; } +#toc ul li.selected { font-weight:bold; color:#fff; background:#f82; padding:0; } +#toc ul li.selected a { color:#fff; } +#toc ul li a { display:block; padding:2px 2px 2px 10px; text-decoration:none; } +#toc ul li a:hover { color:#fff; background:#e60; } +#toc ul li em { display:none; } +#toc ul li.sect { font-weight:bold; color:#fff; background:#89d; padding:2px 0; text-indent:2px; margin-top:2px;} +#toc ul li.first {margin-top:0;} + +#ft { margin-top:4em } +#ft p { padding-bottom:2em; margin:0; text-align:center; font-size:80%; line-height:1.4em} +#ft p.first { padding:1em 0 0 0; margin:0; } + +#pagetitle {background: url(http://l.yimg.com/a/i/ydn/bg_hd.gif) 0 0 repeat-x #B6CDE1; border: 1px solid #93B2CC; } +#pagetitle h1 {text-indent:15px; padding:4px 0 2px 0; background: url(http://l.yimg.com/a/i/ydn/title_h_bg.gif) 0 0 no-repeat; margin:0; color:#000; font-size:120%; font-weight:bold; position:relative; left:-1px; top:-1px; margin-right:-2px;} +#pagetitle h1 em {color:#FF9933; font-size:60%; font-weight:bold; font-style:normal; position:relative; top:-6px} + +#ygunav {background:#eee; border-bottom:2px solid #ccc; padding:0 10px;font-size:78%;text-align:right;margin-bottom:6px;height:2.5em;line-height:2.5em;} +html>body #ygunav {overflow:hidden;} +#ygunav strong {font-family:verdana;} +#ygunav p {display:inline;margin:0;padding:0;} +#ygunav p em {float:left;text-align:left;font-style:normal; padding-top:.7em} +* html #ygunav p em {margin-top:1px;} +#ygunav p em i {visibility:hidden;} +#ygunav a {color:#000;} +#ygunav form {display:inline;margin:0 0 0 1em;} +#ygsp {width:8em;font-size:110%;padding:0;vertical-align:middle;} +#ygunav .ygbt {background:#dcdcdc;font:110% verdana;position:relative;top:1px;} +* html #ygunav .ygbt {top:4px;} +* html>body #ygunav .ygbt {line-height:0;top:-4px;} +#ygunav label {color:#666;font-family:tahoma;top:1px;} + +#bd ol.getstarted { margin:0; padding:0; } +#bd ol.getstarted li { font-weight:bold; color:#668AA8; margin-bottom:1em; padding-left:20px; list-style-type:none;} +#bd ol.getstarted li p { color:#000; font-weight:normal; margin:0 0 0 20px; padding:0 } + +/* removing +#bd p {margin-bottom:8px;} +*/ + +#promo {zoom:1;border: 1px solid #B6CDE1; padding:1em; /*position:relative;*/ background-color:#FFF5DF;} +/*#promo ul {margin-bottom:0;}*/ +#promo h1 {margin-top:0; padding-top:0} +#promo h2 {line-height:1.2em; color:#668AA8; margin-top:0; padding-top:0; border:none; font-size:100%} +#promo p {line-height:1.2em; font-weight:400;} +#promo h1 em {float:right; top:0; right:0; font-style:normal; font-size:80%} +#promo h4 { color:#E76300; } +#promo.component div {width:48%; float:left;} +#promo:after {content:'.';visibility:hidden;clear:left;height:0;display:block;} +#promo p#api {margin-top:.2em;} +#promo #download img {float:left; padding:0 0.5em 0.5em 0;} +#promo #blog {clear:left;} + + +code {font-family:"Courier New"; font-size: 100%; font-weight:bolder;} + +div.apisummary {height:auto; margin:10px 0; width:auto; zoom:1;} +div.apisummary table {font-size:inherit;font:100%; border-collapse:separate; border:1px solid #666666; border-left:none;} +#doc3 div.apisummary table td, #doc3 div.apisummary table th {padding:.35em; vertical-align:top;} +div.apisummary table th { background:#B6CDE1; color:#fff; vertical-align:top; font-weight:bold;} +div.apisummary table td { border-top:1px solid #666666;} +div.apisummary table td, div.apisummary table th { border-left:1px solid #666666;} +div.apisummary table tr { background-color:#ddd;} +div.apisummary table tr.odd { background-color:#fff; } +div.apisummary table tfoot tr { background-color:#fff; } + +dl#menuwidgets dt {font-weight:bold;} +dl#menuwidgets {margin:0 0 0 1.5em;} +img.example {clear:right;margin-bottom:10px;margin-left:10px;border:0;float:right;border:1px solid #999;} + +/*YUI theater box on main page top right corner*/ +#yui-theater {width:316px; overflow:hidden;} +#yui-theater h3 {margin:0; padding:0; color:#E76300; font-size:100%; font-weight:bold; font-stretch:expanded;} +#yui-theater h2 {margin:0 0 10px 0; padding:0; border:none; color:#000; font-size:122%; font-weight:bold;} +#yui-theater p {margin:7px 0 0 0;} +#yui-theater div {float:right; font-size:85%;} + +/*rss reader styles*/ +p.loading-content {background-image:url(http://l.yimg.com/a/i/ydn/yuiweb/img/busy_arrow.gif); background-position:top left; background-repeat:no-repeat; height:20px;padding:4px 0 0 25px; margin:0;} +#doc3 ul.yuirssreader {margin:0; padding:0;} +#doc3 ul.yuirssreader li {list-style-type:none;padding:5px 0 0 12px; margin:0;} +#doc3 ul.yuirssreader li p {margin:0; padding:0;} +ul.yuirssreader cite {color:#666666; margin:0;} +span.yuirssreader-date {font-size:77%; color:#E76300;} +img.rssbadge {display:inline;border:none !important;} + +#index-secondary {width:316px;float:right;margin-left:10px;} +#index-main {margin-right:331px;} +#index-main #promo li {list-style-type:none;font-size:92%;margin-top:2px;} +#index-main #promo ul {margin:0;} + +/*styles for right gutter on component pages*/ +#cheatsheet h3 {margin-top:0;} +#cheatsheet img, #componentvideo img {margin:.5em 0 .2em 0; border:1px solid #999;} +#cheatsheet p {margin:0; font-size:77%;} +#cheatsheet h4, .example-container h4, #examples h4 {margin:0.2em 0 .1em 0; color:#668AA8; font-size:92%;} +#examples ul, #morereading ul, #module ul {font-size:85%; list-style:circle; margin:0 0 1em 10px;} +#examples p, #componentvideo p {font-size:85%; margin:0 0 .2em 0;} +#examples li.selected {font-weight:bold;} + +/*styles for example pages*/ +.example .promo {background-color:#89d;border-color:#666666; padding:1em;} +.example .promo h1, .example .promo h2, .example .promo h3 {color:#FFCC66;} +.example .promo h1 {font-size:159%; padding-top:0; margin-top:0;} +.exampleIntro, .exampleIntro p, .exampleIntro a, .exampleIntro a code {color:#fff;} +.example .promo p {margin-top:.7em;} + +.example cite.byline {display:block; padding:0.5em; background-color:#eee; border:1px solid #000;margin-bottom:5px} + +firstContent {margin-top:0; padding-top:0;} +#logger {margin-top:1em;} +.example-container {background-color:#F1F6F7;} + +.example-container .bd {padding:1em; position:relative; z-index:1; zoom:1;} +.example-container .bd .bd {padding:0; position:static;} /* Reset to defaults to ensure styles are only applied to the top-level .bd of .example-container */ +.example-container>.bd:after {content:'.';visibility:hidden;clear:left;height:0;display:block;} +.example-container .exampleHd {background: url(example-hd-bg.gif) 0 0 repeat-x #4E4D4C; } +.example-container h3 {margin:.2em 0 .4em 0;} +.example .example-container h1, .example .example-container h2, .example .example-container h3, .example .example-container h4, .example .example-container h5, .example .example-container h6 {color:#E76300; font-weight:bold;} +.example-container a {color:#000;} +.example-container a:visited, .example-container a:visited code {color:#000;} +.example-container a:active, .example-container a:active code {color: #000;} + +#loggerGloss {margin-top:.5em; font-size:85%;} +#loggerDiv {font-size:77%;text-align:left;margin-top:.5em; visibility:hidden; height:280px; } /*gets turned on by script when loaded */ +#loggerDiv.yui-log {padding:.4em;width:96%;background-color:#FBE7D9;border:1px solid #666;font-family:monospace;z-index:9000;} +#loggerDiv.yui-log p {margin:1px;padding:.1em;} +#loggerDiv.yui-log .yui-log-hd {margin:0; padding:0; background-color:#CECCCC;} +#loggerDiv.yui-log .yui-log-hd h4 {display:none;} +#loggerDiv.yui-log .yui-log-bd {width:100%;height:20em;background-color:#FFF;border:1px solid #ECECEC;overflow-y:auto;overflow-x:hidden;} +#loggerDiv.yui-log .yui-log-bd pre {border-top:1px solid #ECECEC;} +#loggerDiv.yui-log .yui-log-bd code p {margin:1px 0;} +#loggerDiv.yui-log .yui-log-ft .yui-log-categoryfilters {margin-top:.5em;clear:right;} +#loggerDiv.yui-log .yui-log-ft .yui-log-sourcefilters {margin-top:.5em;border:none; clear:both;} +#loggerDiv.yui-log .yui-log-btns {margin-top:.2em;padding:.2em;background: url(bg_hd.gif) 0 0 repeat-x #CECCCC; text-align:right; float:none; position:static;} +#loggerDiv.yui-log .yui-log-filtergrp {margin-right:.3em; float:left; display:block} +#loggerDiv.yui-log .yui-log-ft {margin-top:.3em;margin-bottom:.3em; font-family:verdana; zoom:1;} +/*bug in Safari when this is applied to .yui-log-ft:*/ +#loggerDiv.yui-log:after {content:'.';visibility:hidden;clear:both;height:0;display:block;} +.example-container.newWindow {text-align:center;} +p.newWindowButton {text-align:right; margin-top:0; padding:.5em;} +.bd p.newWindowButton {text-align:center;} /*when new window is required and button appears in middle of example body*/ +p.loggerButton {text-align:center;} +#loggerLink a, #newWindowLink a {font-size:115%; font-weight:bold; color:#000099;} +#newWindowLink a {font-size:107%;} +#loggerModule {padding-bottom:.2em;} + +/*right column navigation on example rosters*/ +#exampleToc {background-color:#ecf5fa; padding:0; border:1px solid #89d; margin-top:.5em;} +#exampleToc ul {margin:0; padding:0; font-size:85%; } +#exampleToc ul li {list-style:none; padding:0; margin:0; } +#exampleToc ul li.selected { font-weight:bold; color:#fff; background:#000099; padding:0; } +#exampleToc ul li.selected a { color:#fff; } +#exampleToc ul li a { display:block; padding:2px 2px 2px 10px; text-decoration:none; } +#exampleToc ul li a:hover { color:#fff; background:#e60; } +#exampleToc ul li.selected a code { color:#fff; } + +/*theater page styles*/ +.theater h1 {border-bottom:1px dashed #CCC; margin-bottom:1em;padding-bottom:.2em;} +.theater img {border:1px solid #666;} +.theater img.last {border:1px solid #666;} +.theater p.details {font-size:77%; color:#666; margin:.2em 0 0 0; padding:0;} +.theater p.description, #doc3 .theater ul li {font-size:85%; margin:0; padding:0; color:#333;} + +#readmePanel .hd { font-weight:bold; font-size:129%; color:#fff; background:#89d; } +#readmePanel .bd {text-align:left; overflow:auto;} +#readmePanel .ft {text-align:right; background-color:#E7E7E7; font-size:85%;} +/* Browser specific (not valid) styles to make preformatted text wrap */ +#readmePanel .bd pre { + white-space: pre-wrap; /* css-3 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ + font-size: 100%; + color:#000033;} + +/*ed eliot's server-side delicious badge css*/ + #delicious-badge {margin-top:.6em; font: 85% Arial, sans-serif; border: 1px solid #b1b1b1; } +#delicious-badge .bookmark { background: url(http://images.del.icio.us/static/img/delicious.small.gif) no-repeat left center; padding-left: 15px; font-weight: bold; } +#delicious-badge p, #delicious-badge div { padding: 7px; margin: 0; text-align: center; } +#delicious-badge a { color: #00f; text-decoration: none; } +#delicious-badge div { background: #eee; } +#delicious-badge div span { font-weight: bold; color: #000; } +#delicious-badge ul, #delicious-badge li { display: inline; list-style: none; padding: 0; margin: 0; } +#delicious-badge li { margin-left: 5px; } +#delicious-badge li span { position: absolute; left: -999px; width: 999px; } +#delicious-badge .saved-by { color: #999; } +#delicious-badge .saved-by span { background: #00f; padding: 3px; color: #fff; } +#delicious-badge .be-first { font-size: 85%; color: #999; } +#delicious-badge .tag-size-1 { font-size: 100%; } +#delicious-badge .tag-size-2 { font-size: 107%; } +#delicious-badge .tag-size-3 { font-size: 114%; } +#delicious-badge .tag-size-4 { font-size: 122%; } +#delicious-badge .tag-size-5 { font-size: 129%; } + +/*faq page:*/ +.yui-ge .yui-g {width:98%;} +.yui-ge .yui-g .yui-u {width:48.1%;} +#questions {margin:1em 0 2em 0; padding:0.5em; border:1px solid #838383; background-color:#E6E6E6;} +#questions ul {margin:0; list-style:none;} +#yui-main #questions li {padding-bottom:.2em; font-size:85%; margin:0;} +#questions li a {display:block; padding:.6em; text-decoration:none;} +#questions li a:hover {background-color:#F6F6F6;} + +/*for notes on file includes*/ +#configuratorBadge {display:block; float:left; margin:0 .5em .5em 0;} +.include-notice {clear:left; border:1px solid #6F7EA1; background:#eee; font:77% verdana; padding:.7em;} +.include-notice p.firstP {margin-top:0;} +.include-notice p.lastP {margin-bottom:0;} +.include-notice strong {color:#990000;} +.configurator-notice p {font-size:85%;} + +/*for site search suggest via autocomplete*/ +#ygunav {overflow:visible !important;} +#sitesearch {float:right; width:40em; position:relative; text-align:right;} +#searchinput {width:15em; font-size:11px; font-weight:bold; position:relative; top:2px;} +#searchcontainer {text-align:left; width:40em; overflow:hidden; line-height:normal; position:absolute;} +#searchcontainer .yui-ac-bd {font-size:10px; color:#666; background-color:#EAEFF2; text-align:left;} +#searchcontainer li {overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; cursor:pointer; padding-top:2px; } +#searchcontainer em {font-style:normal; font-weight:bold; color:#000033;} +.yui-ac-ft {padding:3px; font-size:10px; text-align:right;} +#searchcontainer .yui-ac-highlight {background-color:#87A4D6;} diff --git a/examples/assets/yui.gif b/examples/assets/yui.gif new file mode 100644 index 0000000000000000000000000000000000000000..5033ff576c02636bc8bbe69addcf7751861bab20 GIT binary patch literal 5901 zcmV+o7xL&wNk%w1VaNbo0M!5hgR{ii?D6#Z`u+a?=IigO%-PlF>$B3^%H-?q_4wrR z^_|4hyw~CS{Qc|h@Y3n+eXqiy$kg%k^`ynt-0AL-xybGD_3-!k=kM|0?D50gzTmL&EVYV=uT=~K3GI5j z3kC*D#uiE6v^u#s@XAC6U|!->?yjAF&+q&He=Zev2UKua6bp2CfQ^oTf`fAl8HZ*E z0Cta?n=X+YC3ABOWf(4^b`^OG6EOt`3?V(Uw6(UkxU(S)F*~3(mQ|RUstXG-u(G+! z%so821rrN9k^l$6LpCK93k4cH&EdB^8V3b2($k-!E@M_0qIIe}tgZ(d6cjqOI{p6t z00ROvkWa&c3MDE9BQZzQu>&D8P;e&BmcV}oBr=G$K+qf#*fOXpz$1eJeiu`wq>!P9 zIgZora1aH+oe&TeP|d6NDg=f9XCZh9o#oGf(W6L{=39ESUj`mA5GJrR%po!z6hdg# zDs(6=l}Qck(~%(rM~~JlB^ar1tJfYy!^&Ms0qH)149un5A!z2D3Wk0ZfY5MftDaf8 zdhKU)X@WeKP=G<%-$ZpZ&IcO< z1|R50sJCE&2K)CGG;=<%1Asy@inh66D!HGBj9Bc%bhn^4WjWA+@CK8~}N#>xV&LE*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4~H_@qi=>tmdg(Q{v+&c}t89A13+9}0d zwNyUlbabIMo#eI$s2>ENz9a*uA$Wu5puk`G#-z$_CG>ahd#P&x1WM!{*yblDL#Mg# zy@3M)V47Ht36acgH5hCp{mVf7(%{yA%zi4X(>eZ<`>)M?s^b59FBCx7x7K|m7*1|a z6ID*#MKD+(Uy7KbP22wt_;*HDLHjT67Gwkx4|?k3e|?6TzFOz5nlY5SFEXbTpzP%~ zw^x7acJqdbfd5Y)K`6edVJ;i)pY^Aw!Qs7w->uaG!@gJj?Km?Qa?}e&y@OXd7U7@= z0fov6A&BCwsc>oSuE=s0(ap*F?Ue8)ed?|#Q{o4PZ&nPro7_i|1fVvz7Kw7lB61La zuM6@K_;=MWcK*%8UwZP3iEPky;^*84N?a|aTlPyJ`-6vbY$1{3kNpq$trh(-UB0Wx sw8D0OtCgf@@w3y2ziffY0@Bygsj~Y{Obg2+k?-cyZ>s-ikA%k literal 0 HcmV?d00001 diff --git a/examples/inc/config.inc b/examples/inc/config.inc new file mode 100644 index 0000000..190b31e --- /dev/null +++ b/examples/inc/config.inc @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/examples/inc/footer.inc b/examples/inc/footer.inc new file mode 100644 index 0000000..f4e1905 --- /dev/null +++ b/examples/inc/footer.inc @@ -0,0 +1,17 @@ +
+

Copyright © Yahoo! Inc. All rights reserved.

+

Privacy Policy - + Terms of Service - + Copyright Policy - + Job Openings

+
+ + + + + + + + diff --git a/examples/inc/header.inc b/examples/inc/header.inc new file mode 100644 index 0000000..6f351ea --- /dev/null +++ b/examples/inc/header.inc @@ -0,0 +1,25 @@ + + + + + YUI Library: YUI Loader Utility + + + + + + + +
+
+ +
+

YUI Library: YUI PHP Loader Utility

+
+
diff --git a/examples/inc/moduleNames.inc b/examples/inc/moduleNames.inc new file mode 100644 index 0000000..4396784 --- /dev/null +++ b/examples/inc/moduleNames.inc @@ -0,0 +1,103 @@ +YUI ComponentModule Name"; + +$keys = array_keys($mmap); + +$i = 0; +foreach ($keys as $mname) { + $moduleNamesTable .= " 0) { + $moduleNamesTable .= " class='odd'"; + }; + + $mhome = (isset($moduleHomes[$mname])) ? $moduleHomes[$mname] : $mname; + + $moduleNamesTable .= ">$mmap[$mname]$mname"; +} + +$moduleNamesTable .= ""; + +$rollupNamesTable = ""; + +$keys = array_keys($rmap); + +$i = 0; +foreach ($keys as $rname) { + $rollupNamesTable .= " 0) { + $rollupNamesTable .= " class='odd'"; + }; + + $rollupNamesTable .= ">"; +} + +$rollupNamesTable .= "
YUI RollupProvides
$rname$rmap[$rname]
"; + +?> diff --git a/examples/inc/phploader.inc b/examples/inc/phploader.inc new file mode 100644 index 0000000..2ddddda --- /dev/null +++ b/examples/inc/phploader.inc @@ -0,0 +1,9 @@ +

YUI PHP Loader Utility Examples:

+ + diff --git a/examples/inc/resources.inc b/examples/inc/resources.inc new file mode 100644 index 0000000..22e3991 --- /dev/null +++ b/examples/inc/resources.inc @@ -0,0 +1,8 @@ +

More YUI Loader Utility Resources:

+ \ No newline at end of file diff --git a/examples/inc/support.inc b/examples/inc/support.inc new file mode 100644 index 0000000..7eb2216 --- /dev/null +++ b/examples/inc/support.inc @@ -0,0 +1,18 @@ +

Support & Community

+

The YUI Library and related topics are discussed on the on the ydn-javascript mailing list.

+ +
+ + + + + +
+
+ +

In addition, please visit the YUIBlog for updates and articles about the YUI Library written by the library's developers.

+ +

Filing Bugs & Feature Requests

+ +

The YUI Library's public bug tracking and feature request repositories are located on the YUILibrary.com site. Before filing new feature requests or bug reports, please review our reporting guidelines.

+ diff --git a/examples/index.php b/examples/index.php new file mode 100644 index 0000000..5e4172c --- /dev/null +++ b/examples/index.php @@ -0,0 +1,224 @@ + +
+
+
+
+ +
+

Yahoo! UI Library: YUI PHP Loader

+ +

The YUI PHP Loader Utility is a server-side utility that allows you to load specific YUI components and their dependencies into your page via PHP. YUI PHP Loader can operate as a holistic solution by loading all of your necessary YUI components, or it can be used to add one or more components to a page on which some YUI content already exists.

+ +

YUI PHP Loader adds value in the following ways:

+
    +
  1. Reliable, sorted loading of dependencies: YUI comprises more than two-dozen components, many of which work together to provide the best possible compromise between compartmentalization and code reuse. Because of this, YUI components often need to load with specific dependencies in a specific order. YUI PHP Loader understands which components depend on one another, and based on this knowledge it ensures that the right resources are loaded in the right order.
  2. +
  3. Automatic use of rolled-up files. YUI PHP Loader knows about all of the built-in rollup files that ship with YUI — like the yahoo-dom-event.js file that contains the Yahoo Global Object, the Dom Collection, and the Event Utility, three components that are commonly used together. By automatically using rolled-up files when it makes sense to do so, the YUI PHP Loader helps you reduce HTTP requests and thereby keep your page as efficient as possible.
  4. + +
+ +

As you think about how you want to load YUI on the page, you may find it useful to refer to this overview of some of the most common loading strategies and their relative merits:

+ + + + +
+ +

Getting Started

+ +

After downloading YUI PHP Loader the archive needs to be extracted somewhere within the servers webroot (e.g.) htdocs/phploader. To begin using the loader you must include the base class file and call the YAHOO_util_Loader constructor with a YUI version number to create an instance of the Loader. The chosen version must have corresponding metadata available within your local YUI PHP Loader installation.

+ + +

Simple Use Case: Adding YUI Components to the Page with the load() Method

+ +

YUI PHP Loader makes it a simple thing to get started using YUI components. After creating an instance of YAHOO_util_Loader tell it what you want to load, and let it sort out all of the dependencies on your behalf. When you are ready to output the CSS and/or JavaScript files simply call the tags() method. Since we will cover the benefits of using rollup files later in this document we will turn them off for this first example.

+ + + +

Configuration Options

+ +

The following configuration options are supported by the YUI PHP Loader Utility. +These can be set individually on a YUI PHP Loader instance:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Configuration OptionPurpose
base(string) Allows you to specify a different location (as a full or relative filepath) for the YUI build directory. By default, YUI PHP Loader will serve files from Yahoo's servers.
filter + (string) A filter to apply to result urls. This filter will modify the default + path for all modules. The default path for the YUI library is the + minified version of the files (e.g., event-min.js). The valid filters are: +
+
YUI_DEBUG
+
Selects the debug versions of the library (e.g., event-debug.js). + This option will automatically include the logger widget
+
YUI_RAW
+
Selects the non-minified version of the library (e.g., event.js). +
+
allowRollups(boolean) Should Loader use aggregate files (like yahoo-dom-event.js or utilities.js) that combine several YUI components in a single HTTP request? Default: true.
loadOptional(boolean) Should loader load optional dependencies for the components you're requesting? (Note: If you only want some but not all optional dependencies, you can list out the dependencies you want as part of your required list.) Default: false.
combine(boolean) If set to true, YUI files will be combined into a single request using the combo service provided on the Yahoo! CDN
comboBase + (string) The base path to the Yahoo! CDN service. Default: http://yui.yahooapis.com/combo?
+ Note: YUI PHP Loader also ships with an intrinsic, lightweight combo-handler (see combo.php). Refer to the included examples for a use case on this. +
+
+ +

YUI Module Names

+ +

Each YUI component has a corresponding module name that is used as a unique identifier within YUI scripts. For example, the Event Utility is internally referred to as "event". YUI PHP Loader loads components based on these unique module names. Here is the full list of YUI module names. All except YUI PHP Loader itself can be loaded via the Loader component.

+ +
+ +
+ +

YUI ships with some aggregate or "rollup" files, each comprising two or more modules, to help you reduce the number of HTTP requests you make while loading YUI content. Each aggregate file has its own module name. Moreover, some modules provide the functionality of one or more modules in the above list.

+ +

When you choose to allowRollups, YUI PHP Loader will choose the most appropriate set of files to meet your requirements while using the smallest number of included files. You can also specify an aggregate file directly as a requirement by requesting it by its own module name. The following is a list of modules that aggregate or include multiple modules:

+ +
+ +
+ +

Refining Our Use Case: Cutting out extra HTTP requests

+ +

As noted in the configuration table the YUI PHP Loader provides some additional parameters that give us even more control over the loading and performance of our component selections. By simply enabling rollups in this example we can cut down the total HTTP requests from 9 to 5. If we enabled combo handling in addition to rollups we can reduce this down to just 2 HTTP requests; one per tag type (i.e.) link and script.

+ + +

In addition to the tags() method there are a number of other class methods that will allow you to do things like embed the code inline and fetch the CSS & JavaScript seperately which is not a bad idea since there are well known performance benefits to placing CSS in the document head and JavaScript near the bottom of your document. For more information on these and other methods please refer to the API documents.

+ +

Understanding the Metadata

+ +

YUI PHP Loader relies on metadata files to calculate module dependencies, rollups, sort order, etc. The metadata files are located in the lib/meta folder. By default YUI PHP Loader ships with metadata for the latest YUI releases; both versions 2 and 3. Additional metadata can be added as needed to support older and/or newer YUI releases. YUI PHP Loader uses pre-built PHP config files first, but is capable of parsing YUI JSON metadata files if no PHP config file is available. The naming convention for PHP config files is config_{yui version}.php (e.g.) config_.php. The naming convention for JSON config files is json_{yui version}.txt (e.g.) json_.txt.

+ + + +
+ +
+ +
+ +
+ + +
+
+ +
+
+ + \ No newline at end of file diff --git a/examples/phploader-advanced.php b/examples/phploader-advanced.php new file mode 100644 index 0000000..5b072ef --- /dev/null +++ b/examples/phploader-advanced.php @@ -0,0 +1,101 @@ + + +
+
+
+
+ + +
+

YUI PHP Loader Utility: Using YUI Loader to Load the Calendar Control (Advanced)

+ +
+

In this example, we bring a YUI component onto the page using the YUI PHP Loader Utility. This example implements YUI PHP Loader via a YAHOO_util_Loader instance. We include the YUI PHP Loader script file, then specify in configuration which component we want loaded on the page — and what we want to do once it is loaded.

+

This example loads in new window to demonstrate a somewhat more advanced use case — a page with no other content, wherein the Loader is introducing YUI into a simple context.

+
+ + +
+ +

Advanced Use Case: Using YUI PHP Loader to Load the Calendar Control

+ +

This example implements the YUI PHP Loader Utility to load the Calendar Control.

+ +

The workflow happens in four steps:

+
    +
  1. Include the YUI PHP Loader class file
  2. +
  3. Create a YAHOO_util_YUILoader instance: Set configuration flags as needed, call the load method with a list of components to load, and define what to do once the components are loaded (in this case, once the components are loaded we instantiate a Calendar Control on the page).
  4. +
  5. Ouput YUI CSS <link> nodes
  6. +
  7. Ouput YUI JavaScript <script> nodes
  8. +
+

Here's what that looks like in terms of raw source — this is the full source code for this example:

+ + +

This code executes the following steps in order:

+
    +
  1. YUI PHP Loader loads taking the configuration settings into account. It gets instructions about what components are required and how to configure them.
  2. +
  3. YUI PHP Loader checks the dependency tree. Loader knows that Calendar requires the Yahoo Global Object, the Dom Collection, the Event Utility, and the Calendar Control file as well as Calendar's CSS file. It knows that it can get Yahoo, Dom and Event in a single file, so it uses a rollup for those and loads that rolled up JavaScript file via a <script> node that it inserts on the page. It waits for that file to load, then loads the Calendar Control's JavaScript file; this must be loaded after Yahoo, Dom and Event are in place.
  4. +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ \ No newline at end of file diff --git a/examples/phploader-advanced_source.php b/examples/phploader-advanced_source.php new file mode 100644 index 0000000..b46813e --- /dev/null +++ b/examples/phploader-advanced_source.php @@ -0,0 +1,38 @@ +load("calendar"); +?> + + + + YUI PHP Loader Utility Advanced Example: Loading YUI Calendar with the YUI PHP Loader Utility + css(); + ?> + + + + +

YUI PHP Loader Utility Advanced Example: Loading the YUI Calendar Control with the YUI PHP Loader Utility

+ +

In this example, we bring a YUI component onto the page using the YUI PHP Loader Utility. This example implements YUI PHP Loader via a YAHOO_util_Loader instance. We include the YUI PHP Loader class file, then specify in configuration which component we want loaded on the page — and what we want to do once it is loaded. The main difference between this advanced example and the simple one show here is that this one outputs the CSS and JavaScript files separately with two different method calls. The CSS files are included in the document head and the JavaScript files are included just before the closing body node. This is done in accordance with the best practice performance recommendations outlined here.

+ +
+ +script(); +?> + + + diff --git a/examples/phploader-basic.php b/examples/phploader-basic.php new file mode 100644 index 0000000..63ea239 --- /dev/null +++ b/examples/phploader-basic.php @@ -0,0 +1,96 @@ + + +
+
+
+
+ + +
+

YUI PHP Loader Utility: Using YUI Loader to Load the Calendar Control (Simple)

+ +
+

In this example, we bring a YUI component onto the page using the YUI PHP Loader Utility. This example implements YUI PHP Loader via a YAHOO_util_Loader instance. We include the YUI PHP Loader class file, then specify in configuration which component we want loaded on the page — and what we want to do once it is loaded.

+

This example loads in new window to demonstrate the simplest use case — a page with no other content, wherein the Loader is introducing YUI into a simple context.

+
+ + +
+ +

A Simple Use Case: Using YUI PHP Loader to Load the Calendar Control

+ +

This example implements the YUI PHP Loader Utility to load the Calendar Control.

+ +

The workflow happens in three steps:

+
    +
  1. Include the YUI PHP Loader class file
  2. +
  3. Create a YAHOO_util_YUILoader instance: Set configuration flags as needed, call the load method with a list of components to load, and define what to do once the components are loaded (in this case, once the components are loaded we instantiate a Calendar Control on the page).
  4. +
  5. Ouput Loader results
  6. +
+

Here's what that looks like in terms of raw source — this is the full source code for this example:

+ + +

This code executes the following steps in order:

+
    +
  1. YUI PHP Loader loads taking the configuration settings into account. It gets instructions about what components are required and how to configure them.
  2. +
  3. YUI PHP Loader checks the dependency tree. Loader knows that Calendar requires the Yahoo Global Object, the Dom Collection, the Event Utility, and the Calendar Control file as well as Calendar's CSS file. It knows that it can get Yahoo, Dom and Event in a single file, so it uses a rollup for those and loads that rolled up JavaScript file via a <script> node that it inserts on the page. It waits for that file to load, then loads the Calendar Control's JavaScript file; this must be loaded after Yahoo, Dom and Event are in place.
  4. +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+ \ No newline at end of file diff --git a/examples/phploader-basic_source.php b/examples/phploader-basic_source.php new file mode 100644 index 0000000..4e00422 --- /dev/null +++ b/examples/phploader-basic_source.php @@ -0,0 +1,34 @@ +load("calendar"); +?> + + + + YUI PHP Loader Utility Basic Example: Loading YUI Calendar with the YUI PHP Loader Utility + tags(); + ?> + + + + +

YUI PHP Loader Utility Basic Example: Loading the YUI Calendar Control with the YUI PHP Loader Utility

+ +

In this example, we bring a YUI component onto the page using the YUI PHP Loader Utility. This example implements YUI PHP Loader via a YAHOO_util_Loader instance. We include the YUI PHP Loader class file, then specify in configuration which component we want loaded on the page — and what we want to do once it is loaded.

+ +
+ + + + diff --git a/examples/phploader-custom-modules-with-yui.php b/examples/phploader-custom-modules-with-yui.php new file mode 100644 index 0000000..cf9372f --- /dev/null +++ b/examples/phploader-custom-modules-with-yui.php @@ -0,0 +1,194 @@ + + +
+
+
+
+ + +
+

YUI PHP Loader Utility: Adding Custom Modules with YUI Dependencies

+
+

The YUI PHP Loader Utility is designed, of course, to + help you put YUI components on the page. While the YUI PHP Loader is great at loading YUI resources it is important + to point out that it can also be a great resource for loading custom non-YUI JavaScript and CSS resources on the page + as well. These can be mixed in with YUI dependencies and/or be all custom modules.

+ +

This example shows you how to create a set of custom (non-YUI) modules that have YUI component dependencies and + load them via YUI PHP Loader.

+
+ + + +

Defining a Custom Module with YUI Component Dependencies

+ +

+ The YAHOO_util_Loader class constructor accepts three parameters: +

+
    +
  1. cacheKey: Unique name to use as the APC cache key. Module calculations + are cached for performance if the environment supports APC.
  2. +
  3. modules: A list of custom modules
  4. +
  5. noYUI: Enable or disable the base YUI metadata
  6. +
+ +

The modules parameter expects an associative array. The array should consist of custom JavaScript and/or + CSS modules defined using the following format:

+ + + +

Note: The module names must be unique and should not conflict with any of the existing YUI + component names if you have chosen to leave the YUI metadata enabled. To make a custom module dependent on an existing + YUI module simply default a requires key/value pair that lists out the desired YUI components.

+ +

Advanced Example with YUI Dependencies

+ +

For this example we will load some local JSON data and a custom CSS module via the + YUI PHP Loader Utility. The custom JavaScript module, customJS, + defines dependencies on the YUI DOM, Event, and JSON components so the YUI PHP loader will load these for us as well. When the document + is loaded we will process the JSON data with the JSON utility, create additional unordered list items with that data, and apply a CSS class + to the last item which will use custom styles defined in our custom CSS module.

+ +

An example without YUI dependencies can be found here. To make the examples easier to follow + the code preforms the exact same functionality. The biggest difference between these two examples is the usage of YUI Components.

+ +

Here's what that looks like in terms of raw source — this is the full source code for this example:

+ + +

This code executes the following steps in order:

+
    +
  1. The YUI PHP Loader class is included
  2. +
  3. A custom module set with some YUI component dependencies is defined
  4. +
  5. An instance of YUI PHP Loader is created: Our custom module set is passed to the Loader
  6. +
  7. YUI PHP Loader calculates the dependencies and order of our custom modules: The Loader knows + our customJS module is dependent on YUI Dom, Event, and JSON and thus these are automatically loaded as well.
  8. +
  9. YUI PHP Loader loads the modules and is used to output the CSS and JavaScript: The <link> + nodes are output in the document head and the <script> nodes are output just before the closing body node. This + is in accordance with the best practice performance recommendations outlined here.
  10. +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ \ No newline at end of file diff --git a/examples/phploader-custom-modules-with-yui_source.php b/examples/phploader-custom-modules-with-yui_source.php new file mode 100644 index 0000000..9027a27 --- /dev/null +++ b/examples/phploader-custom-modules-with-yui_source.php @@ -0,0 +1,93 @@ + array( + "name" => 'customJS', + "type" => 'js', // 'js' or 'css' + // "path" => 'path/to/file3.css', // includes base + "fullpath" => './assets/custom/data.js', // overrides path + "global" => true, // globals are always loaded + "requires" => array (0 => 'event', 1 => 'dom', 2 => 'json'), + // "supersedes" => array (0 => 'something'), // if a rollup + // "rollup" => 3 // the rollup threshold + ), + "customCSS" => array( + "name" => 'customCSS', + "type" => 'css', // 'js' or 'css' + // "path" => 'path/to/file3.css', // includes base + "fullpath" => './assets/custom/custom.css', // overrides path + "global" => true, // globals are always loaded + // "supersedes" => array (0 => 'something'), // if a rollup + // "rollup" => 3 // the rollup threshold + ) +); + +//Get a new YAHOO_util_Loader instance which includes our custom metadata along with the base YUI metadata +//Note: rand is used here to help cache bust the example +$loader = new YAHOO_util_Loader($yuiCurrentVersion, 'my_custom_config_'.rand(), $customConfig); +$loader->load("customJS", "customCSS"); +?> + + + + + + + YUI PHP Loader Utility Example: Adding Custom Modules with YUI Dependencies + css(); ?> + + +

YUI PHP Loader Utility Example: Adding Custom Modules with YUI Dependencies

+ +

The YUI PHP Loader Utility is designed, of course, to + help you put YUI components on the page. While the YUI PHP Loader is great at loading YUI resources it is important + to point out that it can also be a great resource for loading custom non-YUI JavaScript and CSS resources on the page + as well. These can be mixed in with YUI dependencies and/or be all custom modules.

+ +

This example shows you how to create a set of custom (non-YUI) modules that have YUI component dependencies and + load them via YUI PHP Loader.

+ +

For this example we will load some local JSON data and a custom CSS module via the + YUI PHP Loader Utility. The custom JavaScript module, customJS, + defines dependencies on the YUI DOM, Event, and JSON components so the YUI PHP loader will load these for us as well. When the document + is loaded we will process the JSON data with the JSON utility, create additional unordered list items with that data, and apply a CSS class + to the last item which will use custom styles defined in our custom CSS module.

+ +

An example without YUI dependencies can be found here. To make the examples easier to follow + the code preforms the exact same functionality. The biggest difference between these two examples is the usage of YUI Components. The + source for this example, including the server-side PHP code, can be seen here.

+ +
    +
  • This list starts with one static list item
  • +
+ + script(); ?> + + + + diff --git a/examples/phploader-custom-modules.php b/examples/phploader-custom-modules.php new file mode 100644 index 0000000..6b2a92d --- /dev/null +++ b/examples/phploader-custom-modules.php @@ -0,0 +1,192 @@ + + +
+
+
+
+ + +
+

YUI PHP Loader Utility: Adding Custom (Non-YUI) Content with YUI PHP Loader

+
+

The YUI PHP Loader Utility is designed, of course, to + help you put YUI components on the page. While the YUI PHP Loader is great at loading YUI resources it is important + to point out that it can also be a great resource for loading custom non-YUI JavaScript and CSS resources on the page + as well. These can be mixed in with YUI dependencies and/or be all custom modules.

+ +

This example shows you how to create a set of custom (non-YUI) modules and load them via YUI PHP Loader.

+
+ + + +

Defining a Custom Module

+ +

+ The YAHOO_util_Loader class constructor accepts three parameters: +

+
    +
  1. cacheKey: Unique name to use as the APC cache key. Module calculations + are cached for performance if the environment supports APC.
  2. +
  3. modules: A list of custom modules
  4. +
  5. noYUI: Enable or disable the base YUI metadata
  6. +
+ +

The modules parameter expects an associative array. The array should consist of custom JavaScript and/or + CSS modules defined using the following format:

+ + + +

Note: The module names must be unique and should not conflict with any of the existing YUI + component names if you have chosen to leave the YUI metadata enabled. To make a custom module dependant on an existing + YUI module simply default a requires key/value pair that lists out the desired YUI components.

+ +

Simple Example with no YUI Dependencies

+ +

For this example we will load a remote JavaScript resource (i.e.) Douglas Crockford's JSON utility from + JSON.org, some local JSON data, and a custom CSS module via the + YUI PHP Loader Utility. When the document is loaded will + process the JSON data with the JSON utility, create additional unordered list items with that data, and apply a CSS class + to the last item which will use custom styles defined in our custom CSS module.

+ +

Here's what that looks like in terms of raw source — this is the full source code for this example:

+ + +

This code executes the following steps in order:

+
    +
  1. The YUI PHP Loader class is included
  2. +
  3. A custom module set is defined
  4. +
  5. An instance of YUI PHP Loader is created: Our custom module set is passed to the Loader
  6. +
  7. YUI PHP Loader calculates the dependencies and order of our custom modules: The Loader knows + our customJS module is dependent on our dcJson module.
  8. +
  9. YUI PHP Loader loads the modules and is used to output the CSS and JavaScript: The <link> + nodes are output in the document head and the <script> nodes are output just before the closing body node. This + is in accordance with the best practice performance recommendations outlined here.
  10. +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ \ No newline at end of file diff --git a/examples/phploader-custom-modules_source.php b/examples/phploader-custom-modules_source.php new file mode 100644 index 0000000..f5e3883 --- /dev/null +++ b/examples/phploader-custom-modules_source.php @@ -0,0 +1,94 @@ + array( + "name" => 'dcJson', + "type" => 'js', // 'js' or 'css' + // "path" => 'path/to/file.js', // includes base + "fullpath" => 'http://www.json.org/json2.js', // overrides path + // "requires" => array (0 => 'event', 1 => 'dom'), + // "optional" => array (0 => 'connection'), + // "global" => true, // globals are always loaded + // "supersedes" => array (0 => 'something'), // if a rollup + // "rollup" => 3 // the rollup threshold + ), + "customJS" => array( + "name" => 'customJS', + "type" => 'js', // 'js' or 'css' + "fullpath" => './assets/custom/data.js', // overrides path + "global" => true, // globals are always loaded + "requires" => array (0 => 'dcJson') + ), + "customCSS" => array( + "name" => 'customCSS', + "type" => 'css', // 'js' or 'css' + "fullpath" => './assets/custom/custom.css', // overrides path + "global" => true // globals are always loaded + ) +); + +//Get a new YAHOO_util_Loader instance which includes just our custom metadata (No YUI metadata) +//Note: rand is used here to help cache bust the example +$loader = new YAHOO_util_Loader($yuiCurrentVersion, 'my_custom_config_'.rand(), $customConfig, true); +$loader->load("dcJson", "customJS", "customCSS"); +?> + + + + + + + YUI PHP Loader Utility Example: Adding Custom (Non-YUI) Content with YUI PHP Loader + css(); ?> + + +

YUI PHP Loader Utility Example: Adding Custom (Non-YUI) Content with YUI PHP Loader

+ +

The YUI PHP Loader Utility is designed, of course, to + help you put YUI components on the page. While the YUI PHP Loader is great at loading YUI resources it is important + to point out that it can also be a great resource for loading custom non-YUI JavaScript and CSS resources on the page + as well. These can be mixed in with YUI dependencies and/or be all custom modules.

+ +

This example shows you how to create a set of custom (non-YUI) modules and load them via YUI PHP Loader.

+ +

For this example we will load a remote JavaScript resource (i.e.) Douglas Crockford's JSON utility from + JSON.org, some local JSON data, and a custom CSS module via the + YUI PHP Loader Utility. When the document is loaded will + process the JSON data with the JSON utility, create additional unordered list items with that data, and apply a CSS class + to the last item which will use custom styles defined in our custom CSS module. The source for this example, including + the server-side PHP code, can be seen here.

+ +
    +
  • This list starts with one static list item
  • +
+ + script(); ?> + + + + diff --git a/examples/phploader-local-combo-handler.php b/examples/phploader-local-combo-handler.php new file mode 100644 index 0000000..42a9878 --- /dev/null +++ b/examples/phploader-local-combo-handler.php @@ -0,0 +1,101 @@ + + +
+
+
+
+ + +
+

YUI PHP Loader Utility: Local Combo Handler

+ +
+

In this example, we bring a number of YUI components onto the page using the YUI PHP Loader Utility. This example implements YUI PHP Loader via a YAHOO_util_Loader instance. We include the YUI PHP Loader script file, then specify in configuration which component we want loaded on the page. + The key difference between this and other samples is the use of a local combo handler. YUI PHP Loader ships with intrinsic combo-handling support. This feature will allow YUI PHP Loader to combine files without relying on a remote combo-service such as the one outlined here. It should also + prove useful in environments where SSL is required and/or where including scripts from remote servers is prohibited. +

+
+ +
+ +

Use Case: Using the Local Combo Handler

+ +

This example implements the YUI PHP Loader Utility to load +the Calendar Control. This example is almost identical to the advanced example +outlined here. The only major difference is that we are enabling the combo handling service and overriding the +default the combo service location. By default when combo handling is requested YUI PHP Loader will serve files from Yahoo! +servers; see "Serving YUI Files from Yahoo!" for important information about this service.

+ +

Here's what that looks like in terms of raw source — this is the full source code for this example:

+ + +

This code executes the following steps in order:

+
    +
  1. YUI PHP Loader loads taking the configuration settings into account. It gets instructions about what components are required and how to configure them.
  2. +
  3. Combine option is enabled and the local combo handler is requested. The combo request will be made to the local combo handler instead of the remote combo handling service. The local combo handler will disassemble the combo url and setup YUI PHP Loader with the desired version and components.
  4. +
  5. YUI PHP Loader checks the dependency tree. The local combo handler returns a single cacheable JavaScript or CSS file. Separate requests must be made for each resource type via the script and css methods.
  6. +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ \ No newline at end of file diff --git a/lib/meta/config_2.7.0.php b/lib/meta/config_2.7.0.php index 2eadcb7..4714d28 100644 --- a/lib/meta/config_2.7.0.php +++ b/lib/meta/config_2.7.0.php @@ -1,4 +1,4 @@ - - + @@ -111,7 +111,7 @@
    -modules as $name => $allmoddef) { $checked = (array_search($name, $modules) !== false) ? "checked" : ""; @@ -123,7 +123,7 @@
    -DEV; $prod = $yui_load_manager->PROD; @@ -139,8 +139,8 @@ ?> - - + +
    @@ -150,7 +150,7 @@
    -
    +
    diff --git a/phploader/test/loader-inc.php b/phploader/test/loader-inc.php index d2f472a..6d0f1bb 100644 --- a/phploader/test/loader-inc.php +++ b/phploader/test/loader-inc.php @@ -1,4 +1,4 @@ - - -
    "> +">
      -modules)); //foreach($loader->modules as $name => $allmoddef) { @@ -164,7 +164,7 @@
      -
      - +


      - +

      - /> + /> Use Combo Loader

      - /> + /> Embed enabled

      - /> + /> Load Optional

      @@ -237,7 +237,7 @@
      -
      +
      diff --git a/phploader/test/test.php b/phploader/test/test.php index 1981307..da7a947 100644 --- a/phploader/test/test.php +++ b/phploader/test/test.php @@ -1,4 +1,4 @@ - - + - + diff --git a/phploader/test/testcallback.php b/phploader/test/testcallback.php index 244afd0..418ec65 100644 --- a/phploader/test/testcallback.php +++ b/phploader/test/testcallback.php @@ -1,4 +1,4 @@ - - - + diff --git a/phploader/test/verify.php b/phploader/test/verify.php index 7a32118..b40d416 100644 --- a/phploader/test/verify.php +++ b/phploader/test/verify.php @@ -1,4 +1,4 @@ -
      - $value) { // if ( strstr($name, 'YUI_') == $name ) { // this works if ( strpos($name, 'YUI_') !== false ) { // this is faster