first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.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:.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}
Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;_margin:0;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a,.yui-skin-sam .yui-button a:visited{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:1.875;*padding-bottom:1px;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-focus button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-hover button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a,.yui-skin-sam .yui-button-disabled a:visited{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow-disabled.png);}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;text-align:center;}.yui-carousel-element li{border:1px solid #ccc;list-style:none;margin:1px;overflow:hidden;padding:0;position:absolute;text-align:center;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width{min-width:115px;}.yui-carousel-element{overflow:hidden;position:relative;margin:0 auto;padding:0;text-align:left;*margin:0;}.yui-carousel-horizontal .yui-carousel-element{width:320000px;}.yui-carousel-vertical .yui-carousel-element{height:320000px;}.yui-skin-sam .yui-carousel-nav select{position:static;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{position:static;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-skin-sam .yui-carousel-nav ul li a{display:block;width:100%;height:100%;text-indent:-10000px;text-align:left;overflow:hidden;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;}
Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-picker-panel{background:#e3e3e3;border-color:#888}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px}.yui-picker{position:relative}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute}.yui-picker-hue-bg{-moz-outline:0;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/hue_bg.png) no-repeat;top:4px}.yui-picker-bg{-moz-outline:0;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/picker_mask.png)}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/picker_mask.png',sizingMethod='scale')}.yui-picker-mask{position:absolute;z-index:1;top:0;left:0}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace}.yui-picker-controls .hd{background:transparent;border-width:0!important}.yui-picker-controls .bd{height:100px;border-width:0!important}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:.85em;width:2.4em}.yui-picker-hex-controls{clear:both;padding:2px}.yui-picker-hex-controls input{width:4.6em}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000}
@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2}.yui-panel{position:relative}.yui-panel-container form{margin:0}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0}.mask.block-scrollbars{overflow:auto}.masked select,.drag select,.hide-select select{_visibility:hidden}.yui-panel-container select{_visibility:inherit}.hide-scrollbars,.hide-scrollbars *{overflow:hidden}.hide-scrollbars select{display:none}.show-scrollbars{overflow:auto}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px}.yui-effect-fade .underlay,.yui-effect-fade .yui-tt-shadow{display:none}.yui-tt-shadow{position:absolute}.yui-override-padding{padding:0!important}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#f2f2f2}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -200px}.yui-skin-sam .yui-panel .bd{padding:10px}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;filter:alpha(opacity=12)}.yui-skin-sam .yui-dialog .ft{border-top:0;padding:0 10px 10px 10px;font-size:100%}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#d4c237 #A6982b #a6982b #A6982B;border-width:1px;border-style:solid;background-color:#ffee69}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;filter:alpha(opacity=12)}
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-crop{position:relative;}.yui-crop .yui-crop-mask{position:absolute;top:0;left:0;height:100%;width:100%;}.yui-crop .yui-resize{position:absolute;top:10px;left:10px;border:0;}.yui-crop .yui-crop-resize-mask{position:absolute;top:0;left:0;height:100%;width:100%;background-position:-10px -10px;overflow:hidden;}.yui-skin-sam .yui-crop .yui-crop-mask{background-color:#000;opacity:.5;filter:alpha(opacity=50);}.yui-skin-sam .yui-crop .yui-resize{border:1px dashed #fff;}
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto}.yui-skin-sam .yui-log p{margin:1px;padding:.1em}.yui-skin-sam .yui-log pre{margin:0;padding:0}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em}.yui-skin-sam .yui-log .info{background-color:#a7cc25}.yui-skin-sam .yui-log .warn{background-color:#f58516}.yui-skin-sam .yui-log .error{background-color:#e32f0b}.yui-skin-sam .yui-log .time{background-color:#a6c9d7}.yui-skin-sam .yui-log .window{background-color:#f2e886}
Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-skin-sam .yui-pg-container{display:block;margin:6px 0;white-space:nowrap}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1}.yui-skin-sam .yui-pg-pages{padding:0}.yui-skin-sam .yui-pg-current{padding:3px 0}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-skin-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:0;font-weight:bold;padding:3px 6px}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em}
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-skin-sam .yui-pv{background-color:#4a4a4a;font-family:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;}
@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-pb-bar,.yui-pb-mask{width:100%;height:100%}.yui-pb{position:relative;top:0;left:0;width:200px;height:20px;padding:0;border:0;margin:0;text-align:left}.yui-pb-mask{position:absolute;top:0;left:0;z-index:2}.yui-pb-mask div{width:50%;height:50%;background-repeat:no-repeat;padding:0;position:absolute}.yui-pb-tl{background-position:top left}.yui-pb-tr{background-position:top right;left:50%}.yui-pb-bl{background-position:bottom left;top:50%}.yui-pb-br{background-position:bottom right;left:50%;top:50%}.yui-pb-bar{margin:0;position:absolute;left:0;top:0;z-index:1}.yui-pb-ltr .yui-pb-bar{_position:static}.yui-pb-rtl .yui-pb-bar{background-position:right}.yui-pb-btt .yui-pb-bar{background-position:left bottom}.yui-pb-bar{background-color:blue}.yui-pb{border:thin solid #808080}.yui-skin-sam .yui-pb{background-color:transparent;border:solid #808080;border-width:1px 0}.yui-skin-sam .yui-pb-rtl,.yui-skin-sam .yui-pb-ltr{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/back-h.png);background-repeat:repeat-x}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/back-v.png);background-repeat:repeat-y}.yui-skin-sam .yui-pb-bar{background-color:transparent}.yui-skin-sam .yui-pb-ltr .yui-pb-bar,.yui-skin-sam .yui-pb-rtl .yui-pb-bar{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/bar-h.png);background-repeat:repeat-x}.yui-skin-sam .yui-pb-ttb .yui-pb-bar,.yui-skin-sam .yui-pb-btt .yui-pb-bar{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/bar-v.png);background-repeat:repeat-y}.yui-skin-sam .yui-pb-mask{border:solid #808080;border-width:0 1px;margin:0 -1px}.yui-skin-sam .yui-pb-caption{color:#000;text-align:center;margin:0 auto}.yui-skin-sam .yui-pb-range{color:#a6a6a6}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
.yui-h-slider,.yui-v-slider,.yui-region-slider{position:relative;}.yui-h-slider .yui-slider-thumb,.yui-v-slider .yui-slider-thumb,.yui-region-slider .yui-slider-thumb{position:absolute;cursor:default;}.yui-skin-sam .yui-h-slider{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/bg-h.gif) no-repeat 5px 0;height:28px;width:228px;}.yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}.yui-skin-sam .yui-v-slider{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/bg-v.gif) no-repeat 12px 0;height:228px;width:48px;}.yui-skin-sam .yui-region-slider{height:228px;width:228px;}
Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
table.ygtvtable{margin-bottom:0;border:0;border-collapse:collapse}td.ygtvcell{border:0;padding:0}a.ygtvspacer{text-decoration:none;outline-style:none;display:block}.ygtvtn{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -4000px no-repeat}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -4800px no-repeat}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -6400px no-repeat}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -7200px no-repeat}.ygtvln{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -1600px no-repeat;cursor:pointer}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 0 no-repeat}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -800px no-repeat}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -2400px no-repeat}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer}.ygtvloading{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-loading.gif) 0 0 no-repeat}.ygtvdepthcell{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8000px no-repeat}.ygtvblankdepthcell{width:18px;height:22px}* html .ygtvchildren{height:2%}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer}.ygtvcontent{cursor:default}.ygtvspacer{height:22px;width:18px}.ygtvfocus{background-color:#c0e0e0;border:0}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0}.ygtvfocus a{outline-style:none}.ygtvok{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8800px no-repeat}.ygtvok:hover{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8844px no-repeat}.ygtvcancel{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8822px no-repeat}.ygtvcancel:hover{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8866px no-repeat}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000}.ygtv-edit-TextNode{width:190px}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:0}.ygtv-edit-TextNode .ygtv-button-container{float:right}.ygtv-edit-TextNode .ygtv-input input{width:140px}.ygtv-edit-DateNode .ygtvcancel{border:0}.ygtv-edit-DateNode .ygtvok{display:none}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0}.ygtv-highlight .ygtvcontent{padding-right:1em}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/check0.gif) no-repeat}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/check1.gif) no-repeat}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/check2.gif) no-repeat}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
body{margin:10px}h1{font-size:138.5%}h2{font-size:123.1%}h3{font-size:108%}h1,h2,h3{margin:1em 0}h1,h2,h3,h4,h5,h6,strong,dt{font-weight:bold}optgroup{font-weight:normal}abbr,acronym{border-bottom:1px dotted #000;cursor:help}em{font-style:italic}del{text-decoration:line-through}blockquote,ul,ol,dl{margin:1em}ol,ul,dl{margin-left:2em}ol{list-style:decimal outside}ul{list-style:disc outside}dl dd{margin-left:1em}th,td{border:1px solid #000;padding:.5em}th{font-weight:bold;text-align:center}caption{margin-bottom:.5em;text-align:center}sup{vertical-align:super}sub{vertical-align:sub}p,fieldset,table,pre{margin-bottom:1em}button,input[type="checkbox"],input[type="radio"],input[type="reset"],input[type="submit"]{padding:1px}img{-ms-interpolation-mode:bicubic}
@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
body{margin:10px}h1{font-size:138.5%}h2{font-size:123.1%}h3{font-size:108%}h1,h2,h3{margin:1em 0}h1,h2,h3,h4,h5,h6,strong,dt{font-weight:bold}optgroup{font-weight:normal}abbr,acronym{border-bottom:1px dotted #000;cursor:help}em{font-style:italic}del{text-decoration:line-through}blockquote,ul,ol,dl{margin:1em}ol,ul,dl{margin-left:2em}ol{list-style:decimal outside}ul{list-style:disc outside}dl dd{margin-left:1em}th,td{border:1px solid #000;padding:.5em}th{font-weight:bold;text-align:center}caption{margin-bottom:.5em;text-align:center}sup{vertical-align:super}sub{vertical-align:sub}p,fieldset,table,pre{margin-bottom:1em}button,input[type="checkbox"],input[type="radio"],input[type="reset"],input[type="submit"]{padding:1px}img{-ms-interpolation-mode:bicubic}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,998 @@
YUI.add('yui2-connectioncore', function(Y) {
var YAHOO = Y.YUI2;
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
/**
* The Connection Manager provides a simplified interface to the XMLHttpRequest
* object. It handles cross-browser instantiantion of XMLHttpRequest, negotiates the
* interactive states and server response, returning the results to a pre-defined
* callback you create.
*
* @namespace YAHOO.util
* @module connection
* @requires yahoo
* @requires event
*/
/**
* The Connection Manager singleton provides methods for creating and managing
* asynchronous transactions.
*
* @class YAHOO.util.Connect
*/
YAHOO.util.Connect =
{
/**
* @description Array of MSFT ActiveX ids for XMLHttpRequest.
* @property _msxml_progid
* @private
* @static
* @type array
*/
_msxml_progid:[
'Microsoft.XMLHTTP',
'MSXML2.XMLHTTP.3.0',
'MSXML2.XMLHTTP'
],
/**
* @description Object literal of HTTP header(s)
* @property _http_header
* @private
* @static
* @type object
*/
_http_headers:{},
/**
* @description Determines if HTTP headers are set.
* @property _has_http_headers
* @private
* @static
* @type boolean
*/
_has_http_headers:false,
/**
* @description Determines if a default header of
* Content-Type of 'application/x-www-form-urlencoded'
* will be added to any client HTTP headers sent for POST
* transactions.
* @property _use_default_post_header
* @private
* @static
* @type boolean
*/
_use_default_post_header:true,
/**
* @description The default header used for POST transactions.
* @property _default_post_header
* @private
* @static
* @type boolean
*/
_default_post_header:'application/x-www-form-urlencoded; charset=UTF-8',
/**
* @description The default header used for transactions involving the
* use of HTML forms.
* @property _default_form_header
* @private
* @static
* @type boolean
*/
_default_form_header:'application/x-www-form-urlencoded',
/**
* @description Determines if a default header of
* 'X-Requested-With: XMLHttpRequest'
* will be added to each transaction.
* @property _use_default_xhr_header
* @private
* @static
* @type boolean
*/
_use_default_xhr_header:true,
/**
* @description The default header value for the label
* "X-Requested-With". This is sent with each
* transaction, by default, to identify the
* request as being made by YUI Connection Manager.
* @property _default_xhr_header
* @private
* @static
* @type boolean
*/
_default_xhr_header:'XMLHttpRequest',
/**
* @description Determines if custom, default headers
* are set for each transaction.
* @property _has_default_header
* @private
* @static
* @type boolean
*/
_has_default_headers:true,
/**
* @description Property modified by setForm() to determine if the data
* should be submitted as an HTML form.
* @property _isFormSubmit
* @private
* @static
* @type boolean
*/
_isFormSubmit:false,
/**
* @description Determines if custom, default headers
* are set for each transaction.
* @property _has_default_header
* @private
* @static
* @type boolean
*/
_default_headers:{},
/**
* @description Collection of polling references to the polling mechanism in handleReadyState.
* @property _poll
* @private
* @static
* @type object
*/
_poll:{},
/**
* @description Queue of timeout values for each transaction callback with a defined timeout value.
* @property _timeOut
* @private
* @static
* @type object
*/
_timeOut:{},
/**
* @description The polling frequency, in milliseconds, for HandleReadyState.
* when attempting to determine a transaction's XHR readyState.
* The default is 50 milliseconds.
* @property _polling_interval
* @private
* @static
* @type int
*/
_polling_interval:50,
/**
* @description A transaction counter that increments the transaction id for each transaction.
* @property _transaction_id
* @private
* @static
* @type int
*/
_transaction_id:0,
/**
* @description Custom event that fires at the start of a transaction
* @property startEvent
* @private
* @static
* @type CustomEvent
*/
startEvent: new YAHOO.util.CustomEvent('start'),
/**
* @description Custom event that fires when a transaction response has completed.
* @property completeEvent
* @private
* @static
* @type CustomEvent
*/
completeEvent: new YAHOO.util.CustomEvent('complete'),
/**
* @description Custom event that fires when handleTransactionResponse() determines a
* response in the HTTP 2xx range.
* @property successEvent
* @private
* @static
* @type CustomEvent
*/
successEvent: new YAHOO.util.CustomEvent('success'),
/**
* @description Custom event that fires when handleTransactionResponse() determines a
* response in the HTTP 4xx/5xx range.
* @property failureEvent
* @private
* @static
* @type CustomEvent
*/
failureEvent: new YAHOO.util.CustomEvent('failure'),
/**
* @description Custom event that fires when a transaction is successfully aborted.
* @property abortEvent
* @private
* @static
* @type CustomEvent
*/
abortEvent: new YAHOO.util.CustomEvent('abort'),
/**
* @description A reference table that maps callback custom events members to its specific
* event name.
* @property _customEvents
* @private
* @static
* @type object
*/
_customEvents:
{
onStart:['startEvent', 'start'],
onComplete:['completeEvent', 'complete'],
onSuccess:['successEvent', 'success'],
onFailure:['failureEvent', 'failure'],
onUpload:['uploadEvent', 'upload'],
onAbort:['abortEvent', 'abort']
},
/**
* @description Member to add an ActiveX id to the existing xml_progid array.
* In the event(unlikely) a new ActiveX id is introduced, it can be added
* without internal code modifications.
* @method setProgId
* @public
* @static
* @param {string} id The ActiveX id to be added to initialize the XHR object.
* @return void
*/
setProgId:function(id)
{
this._msxml_progid.unshift(id);
YAHOO.log('ActiveX Program Id ' + id + ' added to _msxml_progid.', 'info', 'Connection');
},
/**
* @description Member to override the default POST header.
* @method setDefaultPostHeader
* @public
* @static
* @param {boolean} b Set and use default header - true or false .
* @return void
*/
setDefaultPostHeader:function(b)
{
if(typeof b == 'string'){
this._default_post_header = b;
this._use_default_post_header = true;
YAHOO.log('Default POST header set to ' + b, 'info', 'Connection');
}
else if(typeof b == 'boolean'){
this._use_default_post_header = b;
}
},
/**
* @description Member to override the default transaction header..
* @method setDefaultXhrHeader
* @public
* @static
* @param {boolean} b Set and use default header - true or false .
* @return void
*/
setDefaultXhrHeader:function(b)
{
if(typeof b == 'string'){
this._default_xhr_header = b;
YAHOO.log('Default XHR header set to ' + b, 'info', 'Connection');
}
else{
this._use_default_xhr_header = b;
}
},
/**
* @description Member to modify the default polling interval.
* @method setPollingInterval
* @public
* @static
* @param {int} i The polling interval in milliseconds.
* @return void
*/
setPollingInterval:function(i)
{
if(typeof i == 'number' && isFinite(i)){
this._polling_interval = i;
YAHOO.log('Default polling interval set to ' + i +'ms', 'info', 'Connection');
}
},
/**
* @description Instantiates a XMLHttpRequest object and returns an object with two properties:
* the XMLHttpRequest instance and the transaction id.
* @method createXhrObject
* @private
* @static
* @param {int} transactionId Property containing the transaction id for this transaction.
* @return object
*/
createXhrObject:function(transactionId)
{
var obj,http,i;
try
{
// Instantiates XMLHttpRequest in non-IE browsers and assigns to http.
http = new XMLHttpRequest();
// Object literal with http and tId properties
obj = { conn:http, tId:transactionId, xhr: true };
YAHOO.log('XHR object created for transaction ' + transactionId, 'info', 'Connection');
}
catch(e)
{
for(i=0; i<this._msxml_progid.length; ++i){
try
{
// Instantiates XMLHttpRequest for IE and assign to http
http = new ActiveXObject(this._msxml_progid[i]);
// Object literal with conn and tId properties
obj = { conn:http, tId:transactionId, xhr: true };
YAHOO.log('ActiveX XHR object created for transaction ' + transactionId, 'info', 'Connection');
break;
}
catch(e1){}
}
}
finally
{
return obj;
}
},
/**
* @description This method is called by asyncRequest to create a
* valid connection object for the transaction. It also passes a
* transaction id and increments the transaction id counter.
* @method getConnectionObject
* @private
* @static
* @return {object}
*/
getConnectionObject:function(t)
{
var o, tId = this._transaction_id;
try
{
if(!t){
o = this.createXhrObject(tId);
}
else{
o = {tId:tId};
if(t==='xdr'){
o.conn = this._transport;
o.xdr = true;
}
else if(t==='upload'){
o.upload = true;
}
}
if(o){
this._transaction_id++;
}
}
catch(e){}
return o;
},
/**
* @description Method for initiating an asynchronous request via the XHR object.
* @method asyncRequest
* @public
* @static
* @param {string} method HTTP transaction method
* @param {string} uri Fully qualified path of resource
* @param {callback} callback User-defined callback function or object
* @param {string} postData POST body
* @return {object} Returns the connection object
*/
asyncRequest:function(method, uri, callback, postData)
{
var args = callback&&callback.argument?callback.argument:null,
YCM = this,
o, t;
if(this._isFileUpload){
t = 'upload';
}
else if(callback && callback.xdr){
t = 'xdr';
}
o = this.getConnectionObject(t);
if(!o){
YAHOO.log('Unable to create connection object.', 'error', 'Connection');
return null;
}
else{
// Intialize any transaction-specific custom events, if provided.
if(callback && callback.customevents){
this.initCustomEvents(o, callback);
}
if(this._isFormSubmit){
if(this._isFileUpload){
window.setTimeout(function(){YCM.uploadFile(o, callback, uri, postData);}, 10);
return o;
}
// If the specified HTTP method is GET, setForm() will return an
// encoded string that is concatenated to the uri to
// create a querystring.
if(method.toUpperCase() == 'GET'){
if(this._sFormData.length !== 0){
// If the URI already contains a querystring, append an ampersand
// and then concatenate _sFormData to the URI.
uri += ((uri.indexOf('?') == -1)?'?':'&') + this._sFormData;
}
}
else if(method.toUpperCase() == 'POST'){
// If POST data exist in addition to the HTML form data,
// it will be concatenated to the form data.
postData = postData?this._sFormData + "&" + postData:this._sFormData;
}
}
if(method.toUpperCase() == 'GET' && (callback && callback.cache === false)){
// If callback.cache is defined and set to false, a
// timestamp value will be added to the querystring.
uri += ((uri.indexOf('?') == -1)?'?':'&') + "rnd=" + new Date().valueOf().toString();
}
// Each transaction will automatically include a custom header of
// "X-Requested-With: XMLHttpRequest" to identify the request as
// having originated from Connection Manager.
if(this._use_default_xhr_header){
if(!this._default_headers['X-Requested-With']){
this.initHeader('X-Requested-With', this._default_xhr_header, true);
YAHOO.log('Initialize transaction header X-Request-Header to XMLHttpRequest.', 'info', 'Connection');
}
}
//If the transaction method is POST and the POST header value is set to true
//or a custom value, initalize the Content-Type header to this value.
if((method.toUpperCase() === 'POST' && this._use_default_post_header) && this._isFormSubmit === false){
this.initHeader('Content-Type', this._default_post_header);
YAHOO.log('Initialize header Content-Type to application/x-www-form-urlencoded; UTF-8 for POST transaction.', 'info', 'Connection');
}
if(o.xdr){
this.xdr(o, method, uri, callback, postData);
return o;
}
o.conn.open(method, uri, true);
//Initialize all default and custom HTTP headers,
if(this._has_default_headers || this._has_http_headers){
this.setHeader(o);
}
this.handleReadyState(o, callback);
o.conn.send(postData || '');
YAHOO.log('Transaction ' + o.tId + ' sent.', 'info', 'Connection');
// Reset the HTML form data and state properties as
// soon as the data are submitted.
if(this._isFormSubmit === true){
this.resetFormState();
}
// Fire global custom event -- startEvent
this.startEvent.fire(o, args);
if(o.startEvent){
// Fire transaction custom event -- startEvent
o.startEvent.fire(o, args);
}
return o;
}
},
/**
* @description This method creates and subscribes custom events,
* specific to each transaction
* @method initCustomEvents
* @private
* @static
* @param {object} o The connection object
* @param {callback} callback The user-defined callback object
* @return {void}
*/
initCustomEvents:function(o, callback)
{
var prop;
// Enumerate through callback.customevents members and bind/subscribe
// events that match in the _customEvents table.
for(prop in callback.customevents){
if(this._customEvents[prop][0]){
// Create the custom event
o[this._customEvents[prop][0]] = new YAHOO.util.CustomEvent(this._customEvents[prop][1], (callback.scope)?callback.scope:null);
YAHOO.log('Transaction-specific Custom Event ' + o[this._customEvents[prop][1]] + ' created.', 'info', 'Connection');
// Subscribe the custom event
o[this._customEvents[prop][0]].subscribe(callback.customevents[prop]);
YAHOO.log('Transaction-specific Custom Event ' + o[this._customEvents[prop][1]] + ' subscribed.', 'info', 'Connection');
}
}
},
/**
* @description This method serves as a timer that polls the XHR object's readyState
* property during a transaction, instead of binding a callback to the
* onreadystatechange event. Upon readyState 4, handleTransactionResponse
* will process the response, and the timer will be cleared.
* @method handleReadyState
* @private
* @static
* @param {object} o The connection object
* @param {callback} callback The user-defined callback object
* @return {void}
*/
handleReadyState:function(o, callback)
{
var oConn = this,
args = (callback && callback.argument)?callback.argument:null;
if(callback && callback.timeout){
this._timeOut[o.tId] = window.setTimeout(function(){ oConn.abort(o, callback, true); }, callback.timeout);
}
this._poll[o.tId] = window.setInterval(
function(){
if(o.conn && o.conn.readyState === 4){
// Clear the polling interval for the transaction
// and remove the reference from _poll.
window.clearInterval(oConn._poll[o.tId]);
delete oConn._poll[o.tId];
if(callback && callback.timeout){
window.clearTimeout(oConn._timeOut[o.tId]);
delete oConn._timeOut[o.tId];
}
// Fire global custom event -- completeEvent
oConn.completeEvent.fire(o, args);
if(o.completeEvent){
// Fire transaction custom event -- completeEvent
o.completeEvent.fire(o, args);
}
oConn.handleTransactionResponse(o, callback);
}
}
,this._polling_interval);
},
/**
* @description This method attempts to interpret the server response and
* determine whether the transaction was successful, or if an error or
* exception was encountered.
* @method handleTransactionResponse
* @private
* @static
* @param {object} o The connection object
* @param {object} callback The user-defined callback object
* @param {boolean} isAbort Determines if the transaction was terminated via abort().
* @return {void}
*/
handleTransactionResponse:function(o, callback, isAbort)
{
var httpStatus, responseObject,
args = (callback && callback.argument)?callback.argument:null,
xdrS = (o.r && o.r.statusText === 'xdr:success')?true:false,
xdrF = (o.r && o.r.statusText === 'xdr:failure')?true:false,
xdrA = isAbort;
try
{
if((o.conn.status !== undefined && o.conn.status !== 0) || xdrS){
// XDR requests will not have HTTP status defined. The
// statusText property will define the response status
// set by the Flash transport.
httpStatus = o.conn.status;
}
else if(xdrF && !xdrA){
// Set XDR transaction failure to a status of 0, which
// resolves as an HTTP failure, instead of an exception.
httpStatus = 0;
}
else{
httpStatus = 13030;
}
}
catch(e){
// 13030 is a custom code to indicate the condition -- in Mozilla/FF --
// when the XHR object's status and statusText properties are
// unavailable, and a query attempt throws an exception.
httpStatus = 13030;
}
if((httpStatus >= 200 && httpStatus < 300) || httpStatus === 1223 || xdrS){
responseObject = o.xdr ? o.r : this.createResponseObject(o, args);
if(callback && callback.success){
if(!callback.scope){
callback.success(responseObject);
YAHOO.log('Success callback. HTTP code is ' + httpStatus, 'info', 'Connection');
}
else{
// If a scope property is defined, the callback will be fired from
// the context of the object.
callback.success.apply(callback.scope, [responseObject]);
YAHOO.log('Success callback with scope. HTTP code is ' + httpStatus, 'info', 'Connection');
}
}
// Fire global custom event -- successEvent
this.successEvent.fire(responseObject);
if(o.successEvent){
// Fire transaction custom event -- successEvent
o.successEvent.fire(responseObject);
}
}
else{
switch(httpStatus){
// The following cases are wininet.dll error codes that may be encountered.
case 12002: // Server timeout
case 12029: // 12029 to 12031 correspond to dropped connections.
case 12030:
case 12031:
case 12152: // Connection closed by server.
case 13030: // See above comments for variable status.
// XDR transactions will not resolve to this case, since the
// response object is already built in the xdr response.
responseObject = this.createExceptionObject(o.tId, args, (isAbort?isAbort:false));
if(callback && callback.failure){
if(!callback.scope){
callback.failure(responseObject);
YAHOO.log('Failure callback. Exception detected. Status code is ' + httpStatus, 'warn', 'Connection');
}
else{
callback.failure.apply(callback.scope, [responseObject]);
YAHOO.log('Failure callback with scope. Exception detected. Status code is ' + httpStatus, 'warn', 'Connection');
}
}
break;
default:
responseObject = (o.xdr) ? o.response : this.createResponseObject(o, args);
if(callback && callback.failure){
if(!callback.scope){
callback.failure(responseObject);
YAHOO.log('Failure callback. HTTP status code is ' + httpStatus, 'warn', 'Connection');
}
else{
callback.failure.apply(callback.scope, [responseObject]);
YAHOO.log('Failure callback with scope. HTTP status code is ' + httpStatus, 'warn', 'Connection');
}
}
}
// Fire global custom event -- failureEvent
this.failureEvent.fire(responseObject);
if(o.failureEvent){
// Fire transaction custom event -- failureEvent
o.failureEvent.fire(responseObject);
}
}
this.releaseObject(o);
responseObject = null;
},
/**
* @description This method evaluates the server response, creates and returns the results via
* its properties. Success and failure cases will differ in the response
* object's property values.
* @method createResponseObject
* @private
* @static
* @param {object} o The connection object
* @param {callbackArg} callbackArg The user-defined argument or arguments to be passed to the callback
* @return {object}
*/
createResponseObject:function(o, callbackArg)
{
var obj = {}, headerObj = {},
i, headerStr, header, delimitPos;
try
{
headerStr = o.conn.getAllResponseHeaders();
header = headerStr.split('\n');
for(i=0; i<header.length; i++){
delimitPos = header[i].indexOf(':');
if(delimitPos != -1){
headerObj[header[i].substring(0,delimitPos)] = YAHOO.lang.trim(header[i].substring(delimitPos+2));
}
}
}
catch(e){}
obj.tId = o.tId;
// Normalize IE's response to HTTP 204 when Win error 1223.
obj.status = (o.conn.status == 1223)?204:o.conn.status;
// Normalize IE's statusText to "No Content" instead of "Unknown".
obj.statusText = (o.conn.status == 1223)?"No Content":o.conn.statusText;
obj.getResponseHeader = headerObj;
obj.getAllResponseHeaders = headerStr;
obj.responseText = o.conn.responseText;
obj.responseXML = o.conn.responseXML;
if(callbackArg){
obj.argument = callbackArg;
}
return obj;
},
/**
* @description If a transaction cannot be completed due to dropped or closed connections,
* there may be not be enough information to build a full response object.
* The failure callback will be fired and this specific condition can be identified
* by a status property value of 0.
*
* If an abort was successful, the status property will report a value of -1.
*
* @method createExceptionObject
* @private
* @static
* @param {int} tId The Transaction Id
* @param {callbackArg} callbackArg The user-defined argument or arguments to be passed to the callback
* @param {boolean} isAbort Determines if the exception case is caused by a transaction abort
* @return {object}
*/
createExceptionObject:function(tId, callbackArg, isAbort)
{
var COMM_CODE = 0,
COMM_ERROR = 'communication failure',
ABORT_CODE = -1,
ABORT_ERROR = 'transaction aborted',
obj = {};
obj.tId = tId;
if(isAbort){
obj.status = ABORT_CODE;
obj.statusText = ABORT_ERROR;
}
else{
obj.status = COMM_CODE;
obj.statusText = COMM_ERROR;
}
if(callbackArg){
obj.argument = callbackArg;
}
return obj;
},
/**
* @description Method that initializes the custom HTTP headers for the each transaction.
* @method initHeader
* @public
* @static
* @param {string} label The HTTP header label
* @param {string} value The HTTP header value
* @param {string} isDefault Determines if the specific header is a default header
* automatically sent with each transaction.
* @return {void}
*/
initHeader:function(label, value, isDefault)
{
var headerObj = (isDefault)?this._default_headers:this._http_headers;
headerObj[label] = value;
if(isDefault){
this._has_default_headers = true;
}
else{
this._has_http_headers = true;
}
},
/**
* @description Accessor that sets the HTTP headers for each transaction.
* @method setHeader
* @private
* @static
* @param {object} o The connection object for the transaction.
* @return {void}
*/
setHeader:function(o)
{
var prop;
if(this._has_default_headers){
for(prop in this._default_headers){
if(YAHOO.lang.hasOwnProperty(this._default_headers, prop)){
o.conn.setRequestHeader(prop, this._default_headers[prop]);
YAHOO.log('Default HTTP header ' + prop + ' set with value of ' + this._default_headers[prop], 'info', 'Connection');
}
}
}
if(this._has_http_headers){
for(prop in this._http_headers){
if(YAHOO.lang.hasOwnProperty(this._http_headers, prop)){
o.conn.setRequestHeader(prop, this._http_headers[prop]);
YAHOO.log('HTTP header ' + prop + ' set with value of ' + this._http_headers[prop], 'info', 'Connection');
}
}
this._http_headers = {};
this._has_http_headers = false;
}
},
/**
* @description Resets the default HTTP headers object
* @method resetDefaultHeaders
* @public
* @static
* @return {void}
*/
resetDefaultHeaders:function(){
this._default_headers = {};
this._has_default_headers = false;
},
/**
* @description Method to terminate a transaction, if it has not reached readyState 4.
* @method abort
* @public
* @static
* @param {object} o The connection object returned by asyncRequest.
* @param {object} callback User-defined callback object.
* @param {string} isTimeout boolean to indicate if abort resulted from a callback timeout.
* @return {boolean}
*/
abort:function(o, callback, isTimeout)
{
var abortStatus,
args = (callback && callback.argument)?callback.argument:null;
o = o || {};
if(o.conn){
if(o.xhr){
if(this.isCallInProgress(o)){
// Issue abort request
o.conn.abort();
window.clearInterval(this._poll[o.tId]);
delete this._poll[o.tId];
if(isTimeout){
window.clearTimeout(this._timeOut[o.tId]);
delete this._timeOut[o.tId];
}
abortStatus = true;
}
}
else if(o.xdr){
o.conn.abort(o.tId);
abortStatus = true;
}
}
else if(o.upload){
var frameId = 'yuiIO' + o.tId;
var io = document.getElementById(frameId);
if(io){
// Remove all listeners on the iframe prior to
// its destruction.
YAHOO.util.Event.removeListener(io, "load");
// Destroy the iframe facilitating the transaction.
document.body.removeChild(io);
YAHOO.log('File upload iframe destroyed. Id is:' + frameId, 'info', 'Connection');
if(isTimeout){
window.clearTimeout(this._timeOut[o.tId]);
delete this._timeOut[o.tId];
}
abortStatus = true;
}
}
else{
abortStatus = false;
}
if(abortStatus === true){
// Fire global custom event -- abortEvent
this.abortEvent.fire(o, args);
if(o.abortEvent){
// Fire transaction custom event -- abortEvent
o.abortEvent.fire(o, args);
}
this.handleTransactionResponse(o, callback, true);
YAHOO.log('Transaction ' + o.tId + ' aborted.', 'info', 'Connection');
}
return abortStatus;
},
/**
* @description Determines if the transaction is still being processed.
* @method isCallInProgress
* @public
* @static
* @param {object} o The connection object returned by asyncRequest
* @return {boolean}
*/
isCallInProgress:function(o)
{
o = o || {};
// if the XHR object assigned to the transaction has not been dereferenced,
// then check its readyState status. Otherwise, return false.
if(o.xhr && o.conn){
return o.conn.readyState !== 4 && o.conn.readyState !== 0;
}
else if(o.xdr && o.conn){
return o.conn.isCallInProgress(o.tId);
}
else if(o.upload === true){
return document.getElementById('yuiIO' + o.tId)?true:false;
}
else{
return false;
}
},
/**
* @description Dereference the XHR instance and the connection object after the transaction is completed.
* @method releaseObject
* @private
* @static
* @param {object} o The connection object
* @return {void}
*/
releaseObject:function(o)
{
if(o && o.conn){
//dereference the XHR instance.
o.conn = null;
YAHOO.log('Connection object for transaction ' + o.tId + ' destroyed.', 'info', 'Connection');
//dereference the connection object.
o = null;
}
}
};
YAHOO.register("connection_core", YAHOO.util.Connect, {version: "2.9.0", build: "2800"});
}, '2.9.0' ,{"requires": ["yui2-yahoo", "yui2-event"]});
File diff suppressed because one or more lines are too long
@@ -0,0 +1,975 @@
YUI.add('yui2-connectioncore', function(Y) {
var YAHOO = Y.YUI2;
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
/**
* The Connection Manager provides a simplified interface to the XMLHttpRequest
* object. It handles cross-browser instantiantion of XMLHttpRequest, negotiates the
* interactive states and server response, returning the results to a pre-defined
* callback you create.
*
* @namespace YAHOO.util
* @module connection
* @requires yahoo
* @requires event
*/
/**
* The Connection Manager singleton provides methods for creating and managing
* asynchronous transactions.
*
* @class YAHOO.util.Connect
*/
YAHOO.util.Connect =
{
/**
* @description Array of MSFT ActiveX ids for XMLHttpRequest.
* @property _msxml_progid
* @private
* @static
* @type array
*/
_msxml_progid:[
'Microsoft.XMLHTTP',
'MSXML2.XMLHTTP.3.0',
'MSXML2.XMLHTTP'
],
/**
* @description Object literal of HTTP header(s)
* @property _http_header
* @private
* @static
* @type object
*/
_http_headers:{},
/**
* @description Determines if HTTP headers are set.
* @property _has_http_headers
* @private
* @static
* @type boolean
*/
_has_http_headers:false,
/**
* @description Determines if a default header of
* Content-Type of 'application/x-www-form-urlencoded'
* will be added to any client HTTP headers sent for POST
* transactions.
* @property _use_default_post_header
* @private
* @static
* @type boolean
*/
_use_default_post_header:true,
/**
* @description The default header used for POST transactions.
* @property _default_post_header
* @private
* @static
* @type boolean
*/
_default_post_header:'application/x-www-form-urlencoded; charset=UTF-8',
/**
* @description The default header used for transactions involving the
* use of HTML forms.
* @property _default_form_header
* @private
* @static
* @type boolean
*/
_default_form_header:'application/x-www-form-urlencoded',
/**
* @description Determines if a default header of
* 'X-Requested-With: XMLHttpRequest'
* will be added to each transaction.
* @property _use_default_xhr_header
* @private
* @static
* @type boolean
*/
_use_default_xhr_header:true,
/**
* @description The default header value for the label
* "X-Requested-With". This is sent with each
* transaction, by default, to identify the
* request as being made by YUI Connection Manager.
* @property _default_xhr_header
* @private
* @static
* @type boolean
*/
_default_xhr_header:'XMLHttpRequest',
/**
* @description Determines if custom, default headers
* are set for each transaction.
* @property _has_default_header
* @private
* @static
* @type boolean
*/
_has_default_headers:true,
/**
* @description Property modified by setForm() to determine if the data
* should be submitted as an HTML form.
* @property _isFormSubmit
* @private
* @static
* @type boolean
*/
_isFormSubmit:false,
/**
* @description Determines if custom, default headers
* are set for each transaction.
* @property _has_default_header
* @private
* @static
* @type boolean
*/
_default_headers:{},
/**
* @description Collection of polling references to the polling mechanism in handleReadyState.
* @property _poll
* @private
* @static
* @type object
*/
_poll:{},
/**
* @description Queue of timeout values for each transaction callback with a defined timeout value.
* @property _timeOut
* @private
* @static
* @type object
*/
_timeOut:{},
/**
* @description The polling frequency, in milliseconds, for HandleReadyState.
* when attempting to determine a transaction's XHR readyState.
* The default is 50 milliseconds.
* @property _polling_interval
* @private
* @static
* @type int
*/
_polling_interval:50,
/**
* @description A transaction counter that increments the transaction id for each transaction.
* @property _transaction_id
* @private
* @static
* @type int
*/
_transaction_id:0,
/**
* @description Custom event that fires at the start of a transaction
* @property startEvent
* @private
* @static
* @type CustomEvent
*/
startEvent: new YAHOO.util.CustomEvent('start'),
/**
* @description Custom event that fires when a transaction response has completed.
* @property completeEvent
* @private
* @static
* @type CustomEvent
*/
completeEvent: new YAHOO.util.CustomEvent('complete'),
/**
* @description Custom event that fires when handleTransactionResponse() determines a
* response in the HTTP 2xx range.
* @property successEvent
* @private
* @static
* @type CustomEvent
*/
successEvent: new YAHOO.util.CustomEvent('success'),
/**
* @description Custom event that fires when handleTransactionResponse() determines a
* response in the HTTP 4xx/5xx range.
* @property failureEvent
* @private
* @static
* @type CustomEvent
*/
failureEvent: new YAHOO.util.CustomEvent('failure'),
/**
* @description Custom event that fires when a transaction is successfully aborted.
* @property abortEvent
* @private
* @static
* @type CustomEvent
*/
abortEvent: new YAHOO.util.CustomEvent('abort'),
/**
* @description A reference table that maps callback custom events members to its specific
* event name.
* @property _customEvents
* @private
* @static
* @type object
*/
_customEvents:
{
onStart:['startEvent', 'start'],
onComplete:['completeEvent', 'complete'],
onSuccess:['successEvent', 'success'],
onFailure:['failureEvent', 'failure'],
onUpload:['uploadEvent', 'upload'],
onAbort:['abortEvent', 'abort']
},
/**
* @description Member to add an ActiveX id to the existing xml_progid array.
* In the event(unlikely) a new ActiveX id is introduced, it can be added
* without internal code modifications.
* @method setProgId
* @public
* @static
* @param {string} id The ActiveX id to be added to initialize the XHR object.
* @return void
*/
setProgId:function(id)
{
this._msxml_progid.unshift(id);
},
/**
* @description Member to override the default POST header.
* @method setDefaultPostHeader
* @public
* @static
* @param {boolean} b Set and use default header - true or false .
* @return void
*/
setDefaultPostHeader:function(b)
{
if(typeof b == 'string'){
this._default_post_header = b;
this._use_default_post_header = true;
}
else if(typeof b == 'boolean'){
this._use_default_post_header = b;
}
},
/**
* @description Member to override the default transaction header..
* @method setDefaultXhrHeader
* @public
* @static
* @param {boolean} b Set and use default header - true or false .
* @return void
*/
setDefaultXhrHeader:function(b)
{
if(typeof b == 'string'){
this._default_xhr_header = b;
}
else{
this._use_default_xhr_header = b;
}
},
/**
* @description Member to modify the default polling interval.
* @method setPollingInterval
* @public
* @static
* @param {int} i The polling interval in milliseconds.
* @return void
*/
setPollingInterval:function(i)
{
if(typeof i == 'number' && isFinite(i)){
this._polling_interval = i;
}
},
/**
* @description Instantiates a XMLHttpRequest object and returns an object with two properties:
* the XMLHttpRequest instance and the transaction id.
* @method createXhrObject
* @private
* @static
* @param {int} transactionId Property containing the transaction id for this transaction.
* @return object
*/
createXhrObject:function(transactionId)
{
var obj,http,i;
try
{
// Instantiates XMLHttpRequest in non-IE browsers and assigns to http.
http = new XMLHttpRequest();
// Object literal with http and tId properties
obj = { conn:http, tId:transactionId, xhr: true };
}
catch(e)
{
for(i=0; i<this._msxml_progid.length; ++i){
try
{
// Instantiates XMLHttpRequest for IE and assign to http
http = new ActiveXObject(this._msxml_progid[i]);
// Object literal with conn and tId properties
obj = { conn:http, tId:transactionId, xhr: true };
break;
}
catch(e1){}
}
}
finally
{
return obj;
}
},
/**
* @description This method is called by asyncRequest to create a
* valid connection object for the transaction. It also passes a
* transaction id and increments the transaction id counter.
* @method getConnectionObject
* @private
* @static
* @return {object}
*/
getConnectionObject:function(t)
{
var o, tId = this._transaction_id;
try
{
if(!t){
o = this.createXhrObject(tId);
}
else{
o = {tId:tId};
if(t==='xdr'){
o.conn = this._transport;
o.xdr = true;
}
else if(t==='upload'){
o.upload = true;
}
}
if(o){
this._transaction_id++;
}
}
catch(e){}
return o;
},
/**
* @description Method for initiating an asynchronous request via the XHR object.
* @method asyncRequest
* @public
* @static
* @param {string} method HTTP transaction method
* @param {string} uri Fully qualified path of resource
* @param {callback} callback User-defined callback function or object
* @param {string} postData POST body
* @return {object} Returns the connection object
*/
asyncRequest:function(method, uri, callback, postData)
{
var args = callback&&callback.argument?callback.argument:null,
YCM = this,
o, t;
if(this._isFileUpload){
t = 'upload';
}
else if(callback && callback.xdr){
t = 'xdr';
}
o = this.getConnectionObject(t);
if(!o){
return null;
}
else{
// Intialize any transaction-specific custom events, if provided.
if(callback && callback.customevents){
this.initCustomEvents(o, callback);
}
if(this._isFormSubmit){
if(this._isFileUpload){
window.setTimeout(function(){YCM.uploadFile(o, callback, uri, postData);}, 10);
return o;
}
// If the specified HTTP method is GET, setForm() will return an
// encoded string that is concatenated to the uri to
// create a querystring.
if(method.toUpperCase() == 'GET'){
if(this._sFormData.length !== 0){
// If the URI already contains a querystring, append an ampersand
// and then concatenate _sFormData to the URI.
uri += ((uri.indexOf('?') == -1)?'?':'&') + this._sFormData;
}
}
else if(method.toUpperCase() == 'POST'){
// If POST data exist in addition to the HTML form data,
// it will be concatenated to the form data.
postData = postData?this._sFormData + "&" + postData:this._sFormData;
}
}
if(method.toUpperCase() == 'GET' && (callback && callback.cache === false)){
// If callback.cache is defined and set to false, a
// timestamp value will be added to the querystring.
uri += ((uri.indexOf('?') == -1)?'?':'&') + "rnd=" + new Date().valueOf().toString();
}
// Each transaction will automatically include a custom header of
// "X-Requested-With: XMLHttpRequest" to identify the request as
// having originated from Connection Manager.
if(this._use_default_xhr_header){
if(!this._default_headers['X-Requested-With']){
this.initHeader('X-Requested-With', this._default_xhr_header, true);
}
}
//If the transaction method is POST and the POST header value is set to true
//or a custom value, initalize the Content-Type header to this value.
if((method.toUpperCase() === 'POST' && this._use_default_post_header) && this._isFormSubmit === false){
this.initHeader('Content-Type', this._default_post_header);
}
if(o.xdr){
this.xdr(o, method, uri, callback, postData);
return o;
}
o.conn.open(method, uri, true);
//Initialize all default and custom HTTP headers,
if(this._has_default_headers || this._has_http_headers){
this.setHeader(o);
}
this.handleReadyState(o, callback);
o.conn.send(postData || '');
// Reset the HTML form data and state properties as
// soon as the data are submitted.
if(this._isFormSubmit === true){
this.resetFormState();
}
// Fire global custom event -- startEvent
this.startEvent.fire(o, args);
if(o.startEvent){
// Fire transaction custom event -- startEvent
o.startEvent.fire(o, args);
}
return o;
}
},
/**
* @description This method creates and subscribes custom events,
* specific to each transaction
* @method initCustomEvents
* @private
* @static
* @param {object} o The connection object
* @param {callback} callback The user-defined callback object
* @return {void}
*/
initCustomEvents:function(o, callback)
{
var prop;
// Enumerate through callback.customevents members and bind/subscribe
// events that match in the _customEvents table.
for(prop in callback.customevents){
if(this._customEvents[prop][0]){
// Create the custom event
o[this._customEvents[prop][0]] = new YAHOO.util.CustomEvent(this._customEvents[prop][1], (callback.scope)?callback.scope:null);
// Subscribe the custom event
o[this._customEvents[prop][0]].subscribe(callback.customevents[prop]);
}
}
},
/**
* @description This method serves as a timer that polls the XHR object's readyState
* property during a transaction, instead of binding a callback to the
* onreadystatechange event. Upon readyState 4, handleTransactionResponse
* will process the response, and the timer will be cleared.
* @method handleReadyState
* @private
* @static
* @param {object} o The connection object
* @param {callback} callback The user-defined callback object
* @return {void}
*/
handleReadyState:function(o, callback)
{
var oConn = this,
args = (callback && callback.argument)?callback.argument:null;
if(callback && callback.timeout){
this._timeOut[o.tId] = window.setTimeout(function(){ oConn.abort(o, callback, true); }, callback.timeout);
}
this._poll[o.tId] = window.setInterval(
function(){
if(o.conn && o.conn.readyState === 4){
// Clear the polling interval for the transaction
// and remove the reference from _poll.
window.clearInterval(oConn._poll[o.tId]);
delete oConn._poll[o.tId];
if(callback && callback.timeout){
window.clearTimeout(oConn._timeOut[o.tId]);
delete oConn._timeOut[o.tId];
}
// Fire global custom event -- completeEvent
oConn.completeEvent.fire(o, args);
if(o.completeEvent){
// Fire transaction custom event -- completeEvent
o.completeEvent.fire(o, args);
}
oConn.handleTransactionResponse(o, callback);
}
}
,this._polling_interval);
},
/**
* @description This method attempts to interpret the server response and
* determine whether the transaction was successful, or if an error or
* exception was encountered.
* @method handleTransactionResponse
* @private
* @static
* @param {object} o The connection object
* @param {object} callback The user-defined callback object
* @param {boolean} isAbort Determines if the transaction was terminated via abort().
* @return {void}
*/
handleTransactionResponse:function(o, callback, isAbort)
{
var httpStatus, responseObject,
args = (callback && callback.argument)?callback.argument:null,
xdrS = (o.r && o.r.statusText === 'xdr:success')?true:false,
xdrF = (o.r && o.r.statusText === 'xdr:failure')?true:false,
xdrA = isAbort;
try
{
if((o.conn.status !== undefined && o.conn.status !== 0) || xdrS){
// XDR requests will not have HTTP status defined. The
// statusText property will define the response status
// set by the Flash transport.
httpStatus = o.conn.status;
}
else if(xdrF && !xdrA){
// Set XDR transaction failure to a status of 0, which
// resolves as an HTTP failure, instead of an exception.
httpStatus = 0;
}
else{
httpStatus = 13030;
}
}
catch(e){
// 13030 is a custom code to indicate the condition -- in Mozilla/FF --
// when the XHR object's status and statusText properties are
// unavailable, and a query attempt throws an exception.
httpStatus = 13030;
}
if((httpStatus >= 200 && httpStatus < 300) || httpStatus === 1223 || xdrS){
responseObject = o.xdr ? o.r : this.createResponseObject(o, args);
if(callback && callback.success){
if(!callback.scope){
callback.success(responseObject);
}
else{
// If a scope property is defined, the callback will be fired from
// the context of the object.
callback.success.apply(callback.scope, [responseObject]);
}
}
// Fire global custom event -- successEvent
this.successEvent.fire(responseObject);
if(o.successEvent){
// Fire transaction custom event -- successEvent
o.successEvent.fire(responseObject);
}
}
else{
switch(httpStatus){
// The following cases are wininet.dll error codes that may be encountered.
case 12002: // Server timeout
case 12029: // 12029 to 12031 correspond to dropped connections.
case 12030:
case 12031:
case 12152: // Connection closed by server.
case 13030: // See above comments for variable status.
// XDR transactions will not resolve to this case, since the
// response object is already built in the xdr response.
responseObject = this.createExceptionObject(o.tId, args, (isAbort?isAbort:false));
if(callback && callback.failure){
if(!callback.scope){
callback.failure(responseObject);
}
else{
callback.failure.apply(callback.scope, [responseObject]);
}
}
break;
default:
responseObject = (o.xdr) ? o.response : this.createResponseObject(o, args);
if(callback && callback.failure){
if(!callback.scope){
callback.failure(responseObject);
}
else{
callback.failure.apply(callback.scope, [responseObject]);
}
}
}
// Fire global custom event -- failureEvent
this.failureEvent.fire(responseObject);
if(o.failureEvent){
// Fire transaction custom event -- failureEvent
o.failureEvent.fire(responseObject);
}
}
this.releaseObject(o);
responseObject = null;
},
/**
* @description This method evaluates the server response, creates and returns the results via
* its properties. Success and failure cases will differ in the response
* object's property values.
* @method createResponseObject
* @private
* @static
* @param {object} o The connection object
* @param {callbackArg} callbackArg The user-defined argument or arguments to be passed to the callback
* @return {object}
*/
createResponseObject:function(o, callbackArg)
{
var obj = {}, headerObj = {},
i, headerStr, header, delimitPos;
try
{
headerStr = o.conn.getAllResponseHeaders();
header = headerStr.split('\n');
for(i=0; i<header.length; i++){
delimitPos = header[i].indexOf(':');
if(delimitPos != -1){
headerObj[header[i].substring(0,delimitPos)] = YAHOO.lang.trim(header[i].substring(delimitPos+2));
}
}
}
catch(e){}
obj.tId = o.tId;
// Normalize IE's response to HTTP 204 when Win error 1223.
obj.status = (o.conn.status == 1223)?204:o.conn.status;
// Normalize IE's statusText to "No Content" instead of "Unknown".
obj.statusText = (o.conn.status == 1223)?"No Content":o.conn.statusText;
obj.getResponseHeader = headerObj;
obj.getAllResponseHeaders = headerStr;
obj.responseText = o.conn.responseText;
obj.responseXML = o.conn.responseXML;
if(callbackArg){
obj.argument = callbackArg;
}
return obj;
},
/**
* @description If a transaction cannot be completed due to dropped or closed connections,
* there may be not be enough information to build a full response object.
* The failure callback will be fired and this specific condition can be identified
* by a status property value of 0.
*
* If an abort was successful, the status property will report a value of -1.
*
* @method createExceptionObject
* @private
* @static
* @param {int} tId The Transaction Id
* @param {callbackArg} callbackArg The user-defined argument or arguments to be passed to the callback
* @param {boolean} isAbort Determines if the exception case is caused by a transaction abort
* @return {object}
*/
createExceptionObject:function(tId, callbackArg, isAbort)
{
var COMM_CODE = 0,
COMM_ERROR = 'communication failure',
ABORT_CODE = -1,
ABORT_ERROR = 'transaction aborted',
obj = {};
obj.tId = tId;
if(isAbort){
obj.status = ABORT_CODE;
obj.statusText = ABORT_ERROR;
}
else{
obj.status = COMM_CODE;
obj.statusText = COMM_ERROR;
}
if(callbackArg){
obj.argument = callbackArg;
}
return obj;
},
/**
* @description Method that initializes the custom HTTP headers for the each transaction.
* @method initHeader
* @public
* @static
* @param {string} label The HTTP header label
* @param {string} value The HTTP header value
* @param {string} isDefault Determines if the specific header is a default header
* automatically sent with each transaction.
* @return {void}
*/
initHeader:function(label, value, isDefault)
{
var headerObj = (isDefault)?this._default_headers:this._http_headers;
headerObj[label] = value;
if(isDefault){
this._has_default_headers = true;
}
else{
this._has_http_headers = true;
}
},
/**
* @description Accessor that sets the HTTP headers for each transaction.
* @method setHeader
* @private
* @static
* @param {object} o The connection object for the transaction.
* @return {void}
*/
setHeader:function(o)
{
var prop;
if(this._has_default_headers){
for(prop in this._default_headers){
if(YAHOO.lang.hasOwnProperty(this._default_headers, prop)){
o.conn.setRequestHeader(prop, this._default_headers[prop]);
}
}
}
if(this._has_http_headers){
for(prop in this._http_headers){
if(YAHOO.lang.hasOwnProperty(this._http_headers, prop)){
o.conn.setRequestHeader(prop, this._http_headers[prop]);
}
}
this._http_headers = {};
this._has_http_headers = false;
}
},
/**
* @description Resets the default HTTP headers object
* @method resetDefaultHeaders
* @public
* @static
* @return {void}
*/
resetDefaultHeaders:function(){
this._default_headers = {};
this._has_default_headers = false;
},
/**
* @description Method to terminate a transaction, if it has not reached readyState 4.
* @method abort
* @public
* @static
* @param {object} o The connection object returned by asyncRequest.
* @param {object} callback User-defined callback object.
* @param {string} isTimeout boolean to indicate if abort resulted from a callback timeout.
* @return {boolean}
*/
abort:function(o, callback, isTimeout)
{
var abortStatus,
args = (callback && callback.argument)?callback.argument:null;
o = o || {};
if(o.conn){
if(o.xhr){
if(this.isCallInProgress(o)){
// Issue abort request
o.conn.abort();
window.clearInterval(this._poll[o.tId]);
delete this._poll[o.tId];
if(isTimeout){
window.clearTimeout(this._timeOut[o.tId]);
delete this._timeOut[o.tId];
}
abortStatus = true;
}
}
else if(o.xdr){
o.conn.abort(o.tId);
abortStatus = true;
}
}
else if(o.upload){
var frameId = 'yuiIO' + o.tId;
var io = document.getElementById(frameId);
if(io){
// Remove all listeners on the iframe prior to
// its destruction.
YAHOO.util.Event.removeListener(io, "load");
// Destroy the iframe facilitating the transaction.
document.body.removeChild(io);
if(isTimeout){
window.clearTimeout(this._timeOut[o.tId]);
delete this._timeOut[o.tId];
}
abortStatus = true;
}
}
else{
abortStatus = false;
}
if(abortStatus === true){
// Fire global custom event -- abortEvent
this.abortEvent.fire(o, args);
if(o.abortEvent){
// Fire transaction custom event -- abortEvent
o.abortEvent.fire(o, args);
}
this.handleTransactionResponse(o, callback, true);
}
return abortStatus;
},
/**
* @description Determines if the transaction is still being processed.
* @method isCallInProgress
* @public
* @static
* @param {object} o The connection object returned by asyncRequest
* @return {boolean}
*/
isCallInProgress:function(o)
{
o = o || {};
// if the XHR object assigned to the transaction has not been dereferenced,
// then check its readyState status. Otherwise, return false.
if(o.xhr && o.conn){
return o.conn.readyState !== 4 && o.conn.readyState !== 0;
}
else if(o.xdr && o.conn){
return o.conn.isCallInProgress(o.tId);
}
else if(o.upload === true){
return document.getElementById('yuiIO' + o.tId)?true:false;
}
else{
return false;
}
},
/**
* @description Dereference the XHR instance and the connection object after the transaction is completed.
* @method releaseObject
* @private
* @static
* @param {object} o The connection object
* @return {void}
*/
releaseObject:function(o)
{
if(o && o.conn){
//dereference the XHR instance.
o.conn = null;
//dereference the connection object.
o = null;
}
}
};
YAHOO.register("connection_core", YAHOO.util.Connect, {version: "2.9.0", build: "2800"});
}, '2.9.0' ,{"requires": ["yui2-yahoo", "yui2-event"]});
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,486 @@
YUI.add('yui2-cookie', function(Y) {
var YAHOO = Y.YUI2;
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
/**
* Utilities for cookie management
* @namespace YAHOO.util
* @module cookie
*/
YAHOO.namespace("util");
/**
* Cookie utility.
* @class Cookie
* @static
*/
YAHOO.util.Cookie = {
//-------------------------------------------------------------------------
// Private Methods
//-------------------------------------------------------------------------
/**
* Creates a cookie string that can be assigned into document.cookie.
* @param {String} name The name of the cookie.
* @param {String} value The value of the cookie.
* @param {Boolean} encodeValue True to encode the value, false to leave as-is.
* @param {Object} options (Optional) Options for the cookie.
* @return {String} The formatted cookie string.
* @method _createCookieString
* @private
* @static
*/
_createCookieString : function (name /*:String*/, value /*:Variant*/, encodeValue /*:Boolean*/, options /*:Object*/) /*:String*/ {
//shortcut
var lang = YAHOO.lang,
text = encodeURIComponent(name) + "=" + (encodeValue ? encodeURIComponent(value) : value);
if (lang.isObject(options)){
//expiration date
if (options.expires instanceof Date){
text += "; expires=" + options.expires.toUTCString();
}
//path
if (lang.isString(options.path) && options.path !== ""){
text += "; path=" + options.path;
}
//domain
if (lang.isString(options.domain) && options.domain !== ""){
text += "; domain=" + options.domain;
}
//secure
if (options.secure === true){
text += "; secure";
}
}
return text;
},
/**
* Formats a cookie value for an object containing multiple values.
* @param {Object} hash An object of key-value pairs to create a string for.
* @return {String} A string suitable for use as a cookie value.
* @method _createCookieHashString
* @private
* @static
*/
_createCookieHashString : function (hash /*:Object*/) /*:String*/ {
//shortcuts
var lang = YAHOO.lang;
if (!lang.isObject(hash)){
throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");
}
var text /*:Array*/ = [];
for (var key in hash){
if (lang.hasOwnProperty(hash, key) && !lang.isFunction(hash[key]) && !lang.isUndefined(hash[key])){
text.push(encodeURIComponent(key) + "=" + encodeURIComponent(String(hash[key])));
}
}
return text.join("&");
},
/**
* Parses a cookie hash string into an object.
* @param {String} text The cookie hash string to parse. The string should already be URL-decoded.
* @return {Object} An object containing entries for each cookie value.
* @method _parseCookieHash
* @private
* @static
*/
_parseCookieHash : function (text /*:String*/) /*:Object*/ {
var hashParts /*:Array*/ = text.split("&"),
hashPart /*:Array*/ = null,
hash /*:Object*/ = {};
if (text.length > 0){
for (var i=0, len=hashParts.length; i < len; i++){
hashPart = hashParts[i].split("=");
hash[decodeURIComponent(hashPart[0])] = decodeURIComponent(hashPart[1]);
}
}
return hash;
},
/**
* Parses a cookie string into an object representing all accessible cookies.
* @param {String} text The cookie string to parse.
* @param {Boolean} decode (Optional) Indicates if the cookie values should be decoded or not. Default is true.
* @return {Object} An object containing entries for each accessible cookie.
* @method _parseCookieString
* @private
* @static
*/
_parseCookieString : function (text /*:String*/, decode /*:Boolean*/) /*:Object*/ {
var cookies /*:Object*/ = {};
if (YAHOO.lang.isString(text) && text.length > 0) {
var decodeValue = (decode === false ? function(s){return s;} : decodeURIComponent);
//if (/[^=]+=[^=;]?(?:; [^=]+=[^=]?)?/.test(text)){
var cookieParts /*:Array*/ = text.split(/;\s/g),
cookieName /*:String*/ = null,
cookieValue /*:String*/ = null,
cookieNameValue /*:Array*/ = null;
for (var i=0, len=cookieParts.length; i < len; i++){
//check for normally-formatted cookie (name-value)
cookieNameValue = cookieParts[i].match(/([^=]+)=/i);
if (cookieNameValue instanceof Array){
try {
cookieName = decodeURIComponent(cookieNameValue[1]);
cookieValue = decodeValue(cookieParts[i].substring(cookieNameValue[1].length+1));
} catch (ex){
//ignore the entire cookie - encoding is likely invalid
}
} else {
//means the cookie does not have an "=", so treat it as a boolean flag
cookieName = decodeURIComponent(cookieParts[i]);
cookieValue = "";
}
cookies[cookieName] = cookieValue;
}
//}
}
return cookies;
},
//-------------------------------------------------------------------------
// Public Methods
//-------------------------------------------------------------------------
/**
* Determines if the cookie with the given name exists. This is useful for
* Boolean cookies (those that do not follow the name=value convention).
* @param {String} name The name of the cookie to check.
* @return {Boolean} True if the cookie exists, false if not.
* @method exists
* @static
*/
exists: function(name) {
if (!YAHOO.lang.isString(name) || name === ""){
throw new TypeError("Cookie.exists(): Cookie name must be a non-empty string.");
}
var cookies /*:Object*/ = this._parseCookieString(document.cookie, true);
return cookies.hasOwnProperty(name);
},
/**
* Returns the cookie value for the given name.
* @param {String} name The name of the cookie to retrieve.
* @param {Object|Function} options (Optional) An object containing one or more
* cookie options: raw (true/false) and converter (a function).
* The converter function is run on the value before returning it. The
* function is not used if the cookie doesn't exist. The function can be
* passed instead of the options object for backwards compatibility.
* @return {Variant} If no converter is specified, returns a string or null if
* the cookie doesn't exist. If the converter is specified, returns the value
* returned from the converter or null if the cookie doesn't exist.
* @method get
* @static
*/
get : function (name /*:String*/, options /*:Variant*/) /*:Variant*/{
var lang = YAHOO.lang,
converter;
if (lang.isFunction(options)) {
converter = options;
options = {};
} else if (lang.isObject(options)) {
converter = options.converter;
} else {
options = {};
}
var cookies /*:Object*/ = this._parseCookieString(document.cookie, !options.raw);
if (!lang.isString(name) || name === ""){
throw new TypeError("Cookie.get(): Cookie name must be a non-empty string.");
}
if (lang.isUndefined(cookies[name])) {
return null;
}
if (!lang.isFunction(converter)){
return cookies[name];
} else {
return converter(cookies[name]);
}
},
/**
* Returns the value of a subcookie.
* @param {String} name The name of the cookie to retrieve.
* @param {String} subName The name of the subcookie to retrieve.
* @param {Function} converter (Optional) A function to run on the value before returning
* it. The function is not used if the cookie doesn't exist.
* @return {Variant} If the cookie doesn't exist, null is returned. If the subcookie
* doesn't exist, null if also returned. If no converter is specified and the
* subcookie exists, a string is returned. If a converter is specified and the
* subcookie exists, the value returned from the converter is returned.
* @method getSub
* @static
*/
getSub : function (name, subName, converter) {
var lang = YAHOO.lang,
hash = this.getSubs(name);
if (hash !== null) {
if (!lang.isString(subName) || subName === ""){
throw new TypeError("Cookie.getSub(): Subcookie name must be a non-empty string.");
}
if (lang.isUndefined(hash[subName])){
return null;
}
if (!lang.isFunction(converter)){
return hash[subName];
} else {
return converter(hash[subName]);
}
} else {
return null;
}
},
/**
* Returns an object containing name-value pairs stored in the cookie with the given name.
* @param {String} name The name of the cookie to retrieve.
* @return {Object} An object of name-value pairs if the cookie with the given name
* exists, null if it does not.
* @method getSubs
* @static
*/
getSubs : function (name /*:String*/) /*:Object*/ {
var isString = YAHOO.lang.isString;
//check cookie name
if (!isString(name) || name === ""){
throw new TypeError("Cookie.getSubs(): Cookie name must be a non-empty string.");
}
var cookies = this._parseCookieString(document.cookie, false);
if (isString(cookies[name])){
return this._parseCookieHash(cookies[name]);
}
return null;
},
/**
* Removes a cookie from the machine by setting its expiration date to
* sometime in the past.
* @param {String} name The name of the cookie to remove.
* @param {Object} options (Optional) An object containing one or more
* cookie options: path (a string), domain (a string),
* and secure (true/false). The expires option will be overwritten
* by the method.
* @return {String} The created cookie string.
* @method remove
* @static
*/
remove : function (name /*:String*/, options /*:Object*/) /*:String*/ {
//check cookie name
if (!YAHOO.lang.isString(name) || name === ""){
throw new TypeError("Cookie.remove(): Cookie name must be a non-empty string.");
}
//set options - clone options so the original isn't affected
options = YAHOO.lang.merge(options || {}, {
expires: new Date(0)
});
//set cookie
return this.set(name, "", options);
},
/**
* Removes a subcookie with a given name. Removing the last subcookie
* won't remove the entire cookie unless options.removeIfEmpty is true.
* @param {String} name The name of the cookie in which the subcookie exists.
* @param {String} subName The name of the subcookie to remove.
* @param {Object} options (Optional) An object containing one or more
* cookie options: path (a string), domain (a string), expires (a Date object),
* removeIfEmpty (true/false), and secure (true/false). This must be the same
* settings as the original subcookie.
* @return {String} The created cookie string.
* @method removeSub
* @static
*/
removeSub : function(name /*:String*/, subName /*:String*/, options /*:Object*/) /*:String*/ {
var lang = YAHOO.lang;
options = options || {};
//check cookie name
if (!lang.isString(name) || name === ""){
throw new TypeError("Cookie.removeSub(): Cookie name must be a non-empty string.");
}
//check subcookie name
if (!lang.isString(subName) || subName === ""){
throw new TypeError("Cookie.removeSub(): Subcookie name must be a non-empty string.");
}
//get all subcookies for this cookie
var subs = this.getSubs(name);
//delete the indicated subcookie
if (lang.isObject(subs) && lang.hasOwnProperty(subs, subName)){
delete subs[subName];
if (!options.removeIfEmpty) {
//reset the cookie
return this.setSubs(name, subs, options);
} else {
//reset the cookie if there are subcookies left, else remove
for (var key in subs){
if (lang.hasOwnProperty(subs, key) && !lang.isFunction(subs[key]) && !lang.isUndefined(subs[key])){
return this.setSubs(name, subs, options);
}
}
return this.remove(name, options);
}
} else {
return "";
}
},
/**
* Sets a cookie with a given name and value.
* @param {String} name The name of the cookie to set.
* @param {Variant} value The value to set for the cookie.
* @param {Object} options (Optional) An object containing one or more
* cookie options: path (a string), domain (a string), expires (a Date object),
* raw (true/false), and secure (true/false).
* @return {String} The created cookie string.
* @method set
* @static
*/
set : function (name /*:String*/, value /*:Variant*/, options /*:Object*/) /*:String*/ {
var lang = YAHOO.lang;
options = options || {};
if (!lang.isString(name)){
throw new TypeError("Cookie.set(): Cookie name must be a string.");
}
if (lang.isUndefined(value)){
throw new TypeError("Cookie.set(): Value cannot be undefined.");
}
var text /*:String*/ = this._createCookieString(name, value, !options.raw, options);
document.cookie = text;
return text;
},
/**
* Sets a sub cookie with a given name to a particular value.
* @param {String} name The name of the cookie to set.
* @param {String} subName The name of the subcookie to set.
* @param {Variant} value The value to set.
* @param {Object} options (Optional) An object containing one or more
* cookie options: path (a string), domain (a string), expires (a Date object),
* and secure (true/false).
* @return {String} The created cookie string.
* @method setSub
* @static
*/
setSub : function (name /*:String*/, subName /*:String*/, value /*:Variant*/, options /*:Object*/) /*:String*/ {
var lang = YAHOO.lang;
if (!lang.isString(name) || name === ""){
throw new TypeError("Cookie.setSub(): Cookie name must be a non-empty string.");
}
if (!lang.isString(subName) || subName === ""){
throw new TypeError("Cookie.setSub(): Subcookie name must be a non-empty string.");
}
if (lang.isUndefined(value)){
throw new TypeError("Cookie.setSub(): Subcookie value cannot be undefined.");
}
var hash /*:Object*/ = this.getSubs(name);
if (!lang.isObject(hash)){
hash = {};
}
hash[subName] = value;
return this.setSubs(name, hash, options);
},
/**
* Sets a cookie with a given name to contain a hash of name-value pairs.
* @param {String} name The name of the cookie to set.
* @param {Object} value An object containing name-value pairs.
* @param {Object} options (Optional) An object containing one or more
* cookie options: path (a string), domain (a string), expires (a Date object),
* and secure (true/false).
* @return {String} The created cookie string.
* @method setSubs
* @static
*/
setSubs : function (name /*:String*/, value /*:Object*/, options /*:Object*/) /*:String*/ {
var lang = YAHOO.lang;
if (!lang.isString(name)){
throw new TypeError("Cookie.setSubs(): Cookie name must be a string.");
}
if (!lang.isObject(value)){
throw new TypeError("Cookie.setSubs(): Cookie value must be an object.");
}
var text /*:String*/ = this._createCookieString(name, this._createCookieHashString(value), false, options);
document.cookie = text;
return text;
}
};
YAHOO.register("cookie", YAHOO.util.Cookie, {version: "2.9.0", build: "2800"});
}, '2.9.0' ,{"requires": ["yui2-yahoo"]});
@@ -0,0 +1,10 @@
YUI.add('yui2-cookie', function(Y) {
var YAHOO = Y.YUI2;
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
YAHOO.namespace("util");YAHOO.util.Cookie={_createCookieString:function(B,D,C,A){var F=YAHOO.lang,E=encodeURIComponent(B)+"="+(C?encodeURIComponent(D):D);if(F.isObject(A)){if(A.expires instanceof Date){E+="; expires="+A.expires.toUTCString();}if(F.isString(A.path)&&A.path!==""){E+="; path="+A.path;}if(F.isString(A.domain)&&A.domain!==""){E+="; domain="+A.domain;}if(A.secure===true){E+="; secure";}}return E;},_createCookieHashString:function(B){var D=YAHOO.lang;if(!D.isObject(B)){throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");}var C=[];for(var A in B){if(D.hasOwnProperty(B,A)&&!D.isFunction(B[A])&&!D.isUndefined(B[A])){C.push(encodeURIComponent(A)+"="+encodeURIComponent(String(B[A])));}}return C.join("&");},_parseCookieHash:function(E){var D=E.split("&"),F=null,C={};if(E.length>0){for(var B=0,A=D.length;B<A;B++){F=D[B].split("=");C[decodeURIComponent(F[0])]=decodeURIComponent(F[1]);}}return C;},_parseCookieString:function(J,A){var K={};if(YAHOO.lang.isString(J)&&J.length>0){var B=(A===false?function(L){return L;}:decodeURIComponent);var H=J.split(/;\s/g),I=null,C=null,E=null;for(var D=0,F=H.length;D<F;D++){E=H[D].match(/([^=]+)=/i);if(E instanceof Array){try{I=decodeURIComponent(E[1]);C=B(H[D].substring(E[1].length+1));}catch(G){}}else{I=decodeURIComponent(H[D]);C="";}K[I]=C;}}return K;},exists:function(A){if(!YAHOO.lang.isString(A)||A===""){throw new TypeError("Cookie.exists(): Cookie name must be a non-empty string.");}var B=this._parseCookieString(document.cookie,true);return B.hasOwnProperty(A);},get:function(B,A){var E=YAHOO.lang,C;if(E.isFunction(A)){C=A;A={};}else{if(E.isObject(A)){C=A.converter;}else{A={};}}var D=this._parseCookieString(document.cookie,!A.raw);if(!E.isString(B)||B===""){throw new TypeError("Cookie.get(): Cookie name must be a non-empty string.");}if(E.isUndefined(D[B])){return null;}if(!E.isFunction(C)){return D[B];}else{return C(D[B]);}},getSub:function(A,C,B){var E=YAHOO.lang,D=this.getSubs(A);if(D!==null){if(!E.isString(C)||C===""){throw new TypeError("Cookie.getSub(): Subcookie name must be a non-empty string.");}if(E.isUndefined(D[C])){return null;}if(!E.isFunction(B)){return D[C];}else{return B(D[C]);}}else{return null;}},getSubs:function(B){var A=YAHOO.lang.isString;if(!A(B)||B===""){throw new TypeError("Cookie.getSubs(): Cookie name must be a non-empty string.");}var C=this._parseCookieString(document.cookie,false);if(A(C[B])){return this._parseCookieHash(C[B]);}return null;},remove:function(B,A){if(!YAHOO.lang.isString(B)||B===""){throw new TypeError("Cookie.remove(): Cookie name must be a non-empty string.");}A=YAHOO.lang.merge(A||{},{expires:new Date(0)});return this.set(B,"",A);},removeSub:function(B,E,A){var F=YAHOO.lang;A=A||{};if(!F.isString(B)||B===""){throw new TypeError("Cookie.removeSub(): Cookie name must be a non-empty string.");}if(!F.isString(E)||E===""){throw new TypeError("Cookie.removeSub(): Subcookie name must be a non-empty string.");}var D=this.getSubs(B);if(F.isObject(D)&&F.hasOwnProperty(D,E)){delete D[E];if(!A.removeIfEmpty){return this.setSubs(B,D,A);}else{for(var C in D){if(F.hasOwnProperty(D,C)&&!F.isFunction(D[C])&&!F.isUndefined(D[C])){return this.setSubs(B,D,A);}}return this.remove(B,A);}}else{return"";}},set:function(B,C,A){var E=YAHOO.lang;A=A||{};if(!E.isString(B)){throw new TypeError("Cookie.set(): Cookie name must be a string.");}if(E.isUndefined(C)){throw new TypeError("Cookie.set(): Value cannot be undefined.");}var D=this._createCookieString(B,C,!A.raw,A);document.cookie=D;return D;},setSub:function(B,D,C,A){var F=YAHOO.lang;if(!F.isString(B)||B===""){throw new TypeError("Cookie.setSub(): Cookie name must be a non-empty string.");}if(!F.isString(D)||D===""){throw new TypeError("Cookie.setSub(): Subcookie name must be a non-empty string.");}if(F.isUndefined(C)){throw new TypeError("Cookie.setSub(): Subcookie value cannot be undefined.");}var E=this.getSubs(B);if(!F.isObject(E)){E={};}E[D]=C;return this.setSubs(B,E,A);},setSubs:function(B,C,A){var E=YAHOO.lang;if(!E.isString(B)){throw new TypeError("Cookie.setSubs(): Cookie name must be a string.");}if(!E.isObject(C)){throw new TypeError("Cookie.setSubs(): Cookie value must be an object.");}var D=this._createCookieString(B,this._createCookieHashString(C),false,A);document.cookie=D;return D;}};YAHOO.register("cookie",YAHOO.util.Cookie,{version:"2.9.0",build:"2800"});
}, '2.9.0' ,{"requires": ["yui2-yahoo"]});

Some files were not shown because too many files have changed in this diff Show More