Merge branch 'w41_MDL-28454_m21_yuibackport' of git://github.com/skodak/moodle into MOODLE_21_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2011-10-17 16:24:10 +02:00
2602 changed files with 420237 additions and 306064 deletions
+25 -11
View File
@@ -105,7 +105,7 @@ class page_requirements_manager {
protected $yui2loader;
/** YUI PHPLoader instance responsible for YUI3 loading from PHP only */
protected $yui3loader;
/** YUI PHPLoader instance responsible for YUI3 loading from javascript */
/** YUI loader information for YUI3 loading from javascript */
protected $M_yui_loader;
/** some config vars exposed in JS, please no secret stuff there */
protected $M_cfg;
@@ -120,7 +120,7 @@ class page_requirements_manager {
require_once("$CFG->libdir/yui/phploader/phploader/loader.php");
$this->yui3loader = new YAHOO_util_Loader($CFG->yui3version);
$this->yui3loader = new stdClass();
$this->yui2loader = new YAHOO_util_Loader($CFG->yui2version);
// set up some loader options
@@ -201,11 +201,6 @@ class page_requirements_manager {
$this->js_module($this->find_module('core_filepicker'));
$this->js_module($this->find_module('core_dock'));
// YUI3 init code
$libs = array('cssreset', 'cssbase', 'cssfonts', 'cssgrids', 'node', 'loader'); // full CSS reset + basic libs
foreach ($libs as $lib) {
$this->yui3loader->load($lib);
}
}
/**
@@ -965,10 +960,29 @@ class page_requirements_manager {
* @return string
*/
protected function get_yui3lib_headcode() {
$code = $this->yui3loader->tags();
// unfortunately yui loader does not produce xhtml strict code, so let's fix it for now
$code = str_replace('&', '&', $code);
$code = str_replace('&', '&', $code);
global $CFG;
$code = '';
if ($this->yui3loader->combine) {
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->comboBase
.$CFG->yui3version.'/build/cssreset/reset-min.css&amp;'
.$CFG->yui3version.'/build/cssfonts/fonts-min.css&amp;'
.$CFG->yui3version.'/build/cssgrids/grids-min.css&amp;'
.$CFG->yui3version.'/build/cssbase/base-min.css" />';
} else {
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.'cssreset/reset-min.css" />';
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.'cssfonts/fonts-min.css" />';
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.'cssgrids/grids-min.css" />';
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.'cssbase/base-min.css" />';
}
if (debugging('', DEBUG_DEVELOPER)) {
$code .= '<script src="'.$this->yui3loader->base.'yui/yui-debug.js"></script>';
} else {
$code .= '<script src="'.$this->yui3loader->base.'yui/yui-min.js"></script>';
}
return $code;
}
+2 -2
View File
@@ -210,8 +210,8 @@ if (empty($CFG->filepermissions)) {
umask(0000);
// exact version of currently used yui2 and 3 library
$CFG->yui2version = '2.8.2';
$CFG->yui3version = '3.2.0';
$CFG->yui2version = '2.9.0';
$CFG->yui3version = '3.4.1';
// special support for highly optimised scripts that do not need libraries and DB connection
+1 -1
View File
@@ -228,7 +228,7 @@
<location>yui</location>
<name>YUI</name>
<license>BSD</license>
<version>3.3.2</version>
<version>3.4.1</version>
<licenseversion></licenseversion>
</library>
<library>
File diff suppressed because one or more lines are too long
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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;}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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(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(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(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(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(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(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(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}
File diff suppressed because one or more lines are too long
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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(sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(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(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(ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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:none;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/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;}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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(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(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:none;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(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
File diff suppressed because one or more lines are too long
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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;}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-overlay.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubaritemlabel:visited{color:#000;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled,.yui-skin-sam .yuimenubaritemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel:visited{color:#000;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled,.yui-skin-sam .yuimenuitemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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:none;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;}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(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(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(asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(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;}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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:none;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(back-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(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(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(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
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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(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(bg-v.gif) no-repeat 12px 0;height:228px;width:48px;}.yui-skin-sam .yui-region-slider{height:228px;width:228px;}
File diff suppressed because one or more lines are too long
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
table.ygtvtable{margin-bottom:0;border:none;border-collapse:collapse;}td.ygtvcell{border:none;padding:0;}a.ygtvspacer{text-decoration:none;outline-style:none;display:block;}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;cursor:pointer;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0 no-repeat;}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(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:none;}.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(treeview-sprite.gif) 0 -8800px no-repeat;}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat;}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat;}.ygtvcancel:hover{background:url(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:none;}.ygtv-edit-TextNode .ygtv-button-container{float:right;}.ygtv-edit-TextNode .ygtv-input input{width:140px;}.ygtv-edit-DateNode .ygtvcancel{border:none;}.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(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(check1.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(check2.gif) no-repeat;}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/* This file intentionally left blank */
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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;}
File diff suppressed because one or more lines are too long
-7
View File
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
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 li{list-style:decimal outside;}ul li{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;}
-131
View File
@@ -1,131 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* YUI Base
* @module base
* @namespace yui-
* @requires reset, fonts
*/
body {
/* For breathing room between content and viewport. */
margin:10px;
}
h1 {
/* 18px via YUI Fonts CSS foundation. */
font-size: 138.5%;
}
h2 {
/* 16px via YUI Fonts CSS foundation. */
font-size: 123.1%;
}
h3 {
/* 14px via YUI Fonts CSS foundation. */
font-size: 108%;
}
h1,h2,h3 {
/* Top & bottom margin based on font size. */
margin: 1em 0;
}
h1,h2,h3,h4,h5,h6,strong,dt {
/* Bringing boldness back to headers and the strong element. */
font-weight: bold;
}
optgroup {
font-weight:normal;
}
abbr,acronym {
/* Indicating to users that more info is available. */
border-bottom: 1px dotted #000;
cursor: help;
}
em {
/* Bringing italics back to the em element. */
font-style: italic;
}
del {
/* Striking deleted phrases. */
text-decoration: line-through;
}
blockquote,ul,ol,dl {
/* Giving blockquotes and lists room to breath. */
margin: 1em;
}
ol,ul,dl {
/* Bringing lists on to the page with breathing room. */
margin-left: 2em;
}
ol li {
/* Giving OL's LIs generated numbers. */
list-style: decimal outside;
}
ul li {
/* Giving UL's LIs generated disc markers. */
list-style: disc outside;
}
dl dd {
/* Giving UL's LIs generated numbers. */
margin-left: 1em;
}
th,td {
/* Borders and padding to make the table readable. */
border: 1px solid #000;
padding: .5em;
}
th {
/* Distinguishing table headers from data cells. */
font-weight: bold;
text-align: center;
}
caption {
/* Coordinated margin to match cell's padding. */
margin-bottom: .5em;
/* Centered so it doesn't blend in to other content. */
text-align: center;
}
sup {
/* to preserve line-height and selector appearance */
vertical-align: super;
}
sub {
/* to preserve line-height and selector appearance */
vertical-align: sub;
}
p,
fieldset,
table,
pre {
/* So things don't run into each other. */
margin-bottom: 1em;
}
/* Opera requires 1px of passing to render with contemporary native chrome */
button,
input[type="checkbox"],
input[type="radio"],
input[type="reset"],
input[type="submit"] {
padding:1px;
}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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(../../../../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(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(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(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(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(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(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}
File diff suppressed because one or more lines are too long
@@ -1,132 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* CORE
*
* This is the set of CSS rules required by Calendar to drive core functionality and structure.
* Changes to these rules may result in the Calendar not functioning or rendering correctly.
*
* They should not be modified for skinning.
**/
/* CALENDAR BOUNDING BOX */
.yui-calcontainer {
position:relative;
float:left;
_overflow:hidden; /* IE6 only, to clip iframe shim */
}
/* IFRAME SHIM */
.yui-calcontainer iframe {
position:absolute;
border:none;
margin:0;padding:0;
z-index:0;
width:100%;
height:100%;
left:0px;
top:0px;
}
/* IFRAME SHIM IE6 only */
.yui-calcontainer iframe.fixedsize {
width:50em;
height:50em;
top:-1px;
left:-1px;
}
/* BOUNDING BOX FOR EACH CALENDAR GROUP PAGE */
.yui-calcontainer.multi .groupcal {
z-index:1;
float:left;
position:relative;
}
/* TITLE BAR */
.yui-calcontainer .title {
position:relative;
z-index:1;
}
/* CLOSE ICON CONTAINER */
.yui-calcontainer .close-icon {
position:absolute;
z-index:1;
text-indent:-10000em;
overflow:hidden;
}
/* CALENDAR TABLE */
.yui-calendar {
position:relative;
}
/* NAVBAR LEFT ARROW CONTAINER */
.yui-calendar .calnavleft {
position:absolute;
z-index:1;
text-indent:-10000em;
overflow:hidden;
}
/* NAVBAR RIGHT ARROW CONTAINER */
.yui-calendar .calnavright {
position:absolute;
z-index:1;
text-indent:-10000em;
overflow:hidden;
}
/* NAVBAR TEXT CONTAINER */
.yui-calendar .calheader {
position:relative;
width:100%;
text-align:center;
}
/* CalendarNavigator */
.yui-calcontainer .yui-cal-nav-mask {
position:absolute;
z-index:2;
margin:0;
padding:0;
width:100%;
height:100%;
_width:0; /* IE6, IE7 quirks - width/height set programmatically to match container */
_height:0;
left:0;
top:0;
display:none;
}
/* NAVIGATOR BOUNDING BOX */
.yui-calcontainer .yui-cal-nav {
position:absolute;
z-index:3;
top:0;
display:none;
}
/* NAVIGATOR BUTTONS (based on button-core.css) */
.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn {
display: -moz-inline-box; /* Gecko */
display: inline-block; /* IE, Opera and Safari */
}
.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button {
display: block;
*display: inline-block; /* IE */
*overflow: visible; /* Remove superfluous padding for IE */
border: none;
background-color: transparent;
cursor: pointer;
}
/* Specific changes for calendar running under fonts/reset */
.yui-calendar .calbody a:hover {background:inherit;}
p#clear {clear:left; padding-top:10px;}
@@ -1,320 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.yui-calcontainer {
position:relative;
padding:5px;
background-color:#F7F9FB;
border:1px solid #7B9EBD;
float:left;
_overflow:hidden; /* IE6 only, to clip iframe shim */
}
.yui-calcontainer iframe {
position:absolute;
border:none;
margin:0;padding:0;
z-index:0;
width:100%;
height:100%;
left:0px;
top:0px;
}
/* IE6 only */
.yui-calcontainer iframe.fixedsize {
width:50em;
height:50em;
top:-1px;
left:-1px;
}
.yui-calcontainer.multi {
padding:0;
}
.yui-calcontainer.multi .groupcal {
padding:5px;
background-color:transparent;
z-index:1;
float:left;
position:relative;
border:none;
}
.yui-calcontainer .title {
font:100% sans-serif;
color:#000;
font-weight:bold;
margin-bottom:5px;
height:25px;
position:absolute;
top:3px;left:5px;
z-index:1;
}
.yui-calcontainer .close-icon {
position:absolute;
overflow:hidden;
text-indent:-10000em;
right:3px;
top:3px;
border:none;
z-index:1;
}
.yui-calcontainer .calclose {
background: url("calx.gif") no-repeat;
width:17px;
height:13px;
cursor:pointer;
}
/* Calendar element styles */
.yui-calendar {
font:100% sans-serif;
text-align:center;
border-spacing:0;
border-collapse:separate;
position:relative;
}
.yui-calcontainer.withtitle {
padding-top:1.5em;
}
.yui-calendar .calnavleft {
position:absolute;
overflow:hidden;
text-indent:-10000em;
cursor:pointer;
top:2px;
bottom:0;
width:9px;
height:12px;
left:2px;
z-index:1;
background: url("callt.gif") no-repeat;
}
.yui-calendar .calnavright {
position:absolute;
overflow:hidden;
text-indent:-10000em;
cursor:pointer;
top:2px;
bottom:0;
width:9px;
height:12px;
right:2px;
z-index:1;
background: url("calrt.gif") no-repeat;
}
.yui-calendar td.calcell {
padding:.1em .2em;
border:1px solid #E0E0E0;
text-align:center;
}
.yui-calendar td.calcell a {
color:#003DB8;
text-decoration:none;
}
.yui-calendar td.calcell.today {
border:1px solid #000;
}
.yui-calendar td.calcell.oom {
cursor:default;
color:#999;
background-color:#EEE;
border:1px solid #E0E0E0;
}
.yui-calendar td.calcell.selected {
color:#003DB8;
background-color:#FFF19F;
border:1px solid #FF9900;
}
.yui-calendar td.calcell.calcellhover {
cursor:pointer;
color:#FFF;
background-color:#FF9900;
border:1px solid #FF9900;
}
.yui-calendar td.calcell.calcellhover a {
color:#FFF;
}
.yui-calendar td.calcell.restricted {
text-decoration:line-through;
}
.yui-calendar td.calcell.previous {
color:#CCC;
}
.yui-calendar td.calcell.highlight1 { background-color:#CCFF99; }
.yui-calendar td.calcell.highlight2 { background-color:#99CCFF; }
.yui-calendar td.calcell.highlight3 { background-color:#FFCCCC; }
.yui-calendar td.calcell.highlight4 { background-color:#CCFF99; }
.yui-calendar .calhead {
border:1px solid #E0E0E0;
vertical-align:middle;
background-color:#FFF;
}
.yui-calendar .calheader {
position:relative;
width:100%;
text-align:center;
}
.yui-calendar .calheader img {
border:none;
}
.yui-calendar .calweekdaycell {
color:#666;
font-weight:normal;
text-align:center;
width:1.5em;
}
.yui-calendar .calfoot {
background-color:#EEE;
}
.yui-calendar .calrowhead, .yui-calendar .calrowfoot {
color:#666;
font-size:9px;
font-style:italic;
font-weight:normal;
width:15px;
}
.yui-calendar .calrowhead {
border-right-width:2px;
}
/* CalendarNavigator */
.yui-calendar a.calnav {
_position:relative;
padding-left:2px;
padding-right:2px;
text-decoration:none;
color:#000;
}
.yui-calendar a.calnav:hover {
border:1px solid #003366;
background-color:#6699cc;
background: url(calgrad.png) repeat-x;
color:#fff;
cursor:pointer;
}
.yui-calcontainer .yui-cal-nav-mask {
position:absolute;
z-index:2;
display:none;
margin:0;
padding:0;
left:0;
top:0;
width:100%;
height:100%;
_width:0; /* IE6, IE7 Quirks - width/height set programmatically to match container */
_height:0;
background-color:#000;
opacity:0.25;
*filter:alpha(opacity=25);
}
.yui-calcontainer .yui-cal-nav {
position:absolute;
z-index:3;
display:none;
padding:0;
top:1.5em;
left:50%;
width:12em;
margin-left:-6em;
border:1px solid #7B9EBD;
background-color:#F7F9FB;
font-size:93%;
}
.yui-calcontainer.withtitle .yui-cal-nav {
top:3.5em;
}
.yui-calcontainer .yui-cal-nav-y,
.yui-calcontainer .yui-cal-nav-m,
.yui-calcontainer .yui-cal-nav-b {
padding:2px 5px 2px 5px;
}
.yui-calcontainer .yui-cal-nav-b {
text-align:center;
}
.yui-calcontainer .yui-cal-nav-e {
margin-top:2px;
padding:2px;
background-color:#EDF5FF;
border-top:1px solid black;
display:none;
}
.yui-calcontainer .yui-cal-nav label {
display:block;
font-weight:bold;
}
.yui-calcontainer .yui-cal-nav-mc {
width:100%;
_width:auto; /* IE6 doesn't like width 100% */
}
.yui-calcontainer .yui-cal-nav-y input.yui-invalid {
background-color:#FFEE69;
border: 1px solid #000;
}
.yui-calcontainer .yui-cal-nav-yc {
width:3em;
}
.yui-calcontainer .yui-cal-nav-b button {
font-size:93%;
text-decoration:none;
cursor: pointer;
background-color: #79b2ea;
border: 1px solid #003366;
border-top-color:#FFF;
border-left-color:#FFF;
margin:1px;
}
.yui-calcontainer .yui-cal-nav-b .yui-default button {
/* not implemented */
}
/* Specific changes for calendar running under fonts/reset */
.yui-calendar .calbody a:hover {background:inherit;}
p#clear {clear:left; padding-top:10px;}
@@ -1,361 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* SAM
*
* Skin colors used:
*
* - Control Border : 808080
* - Control Chrome : f2f2f2
* - Cell Borders : cccccc
* - Normal Cell BG : ffffff
* - Date Links : 0066cc
* - Selected Cells BG : b3d4ff
* - Cell Hover BG : 426fd9
* - Disabled BG : cccccc
* - Disabled Text Color : a6a6a6
**/
/* CALENDAR BOUNDING BOX */
.yui-skin-sam .yui-calcontainer {
background-color:#f2f2f2;
border:1px solid #808080;
padding:10px;
}
/* CALENDARGROUP BOUNDING BOX */
.yui-skin-sam .yui-calcontainer.multi {
padding:0 5px 0 5px;
}
/* BOUNDING BOX FOR EACH CALENDAR GROUP PAGE */
.yui-skin-sam .yui-calcontainer.multi .groupcal {
background-color:transparent;
border:none;
padding:10px 5px 10px 5px;
margin:0;
}
/* TITLE BAR */
.yui-skin-sam .yui-calcontainer .title {
background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;
border-bottom:1px solid #cccccc;
font:100% sans-serif;
color:#000;
font-weight:bold;
height:auto;
padding:.4em;
margin:0 -10px 10px -10px;
top:0;
left:0;
text-align:left;
}
.yui-skin-sam .yui-calcontainer.multi .title {
margin:0 -5px 0 -5px;
}
.yui-skin-sam .yui-calcontainer.withtitle {
padding-top:0;
}
/* CLOSE BUTTON */
.yui-skin-sam .yui-calcontainer .calclose {
background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;
width:25px;
height:15px;
top:.4em;
right:.4em;
cursor:pointer;
}
/* CALENDAR TABLE */
.yui-skin-sam .yui-calendar {
border-spacing:0;
border-collapse:collapse;
font:100% sans-serif;
text-align:center;
margin:0;
}
/* NAVBAR BOUNDING BOX */
.yui-skin-sam .yui-calendar .calhead {
background:transparent;
border:none;
vertical-align:middle;
padding:0;
}
/* NAVBAR TEXT CONTAINER */
.yui-skin-sam .yui-calendar .calheader {
background:transparent;
font-weight:bold;
padding:0 0 .6em 0;
text-align:center;
}
.yui-skin-sam .yui-calendar .calheader img {
border:none;
}
/* NAVBAR LEFT ARROW */
.yui-skin-sam .yui-calendar .calnavleft {
background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -450px;
width:25px;
height:15px;
top:0;
bottom:0;
left:-10px;
margin-left:.4em;
cursor:pointer;
}
/* NAVBAR RIGHT ARROW */
.yui-skin-sam .yui-calendar .calnavright {
background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -500px;
width:25px;
height:15px;
top:0;
bottom:0;
right:-10px;
margin-right:.4em;
cursor:pointer;
}
/* WEEKDAY HEADER ROW */
.yui-skin-sam .yui-calendar .calweekdayrow {
height:2em;
}
.yui-skin-sam .yui-calendar .calweekdayrow th {
padding:0;
border:none;
}
/* WEEKDAY (Su, Mo, Tu...) HEADER CELLS */
.yui-skin-sam .yui-calendar .calweekdaycell {
color:#000;
font-weight:bold;
text-align:center;
width:2em;
}
/* CALENDAR FOOTER. NOT IMPLEMENTED BY DEFAULT */
.yui-skin-sam .yui-calendar .calfoot {
background-color:#f2f2f2;
}
/* WEEK NUMBERS (ROW HEADERS/FOOTERS) */
.yui-skin-sam .yui-calendar .calrowhead, .yui-skin-sam .yui-calendar .calrowfoot {
color:#a6a6a6;
font-size:85%;
font-style:normal;
font-weight:normal;
border:none;
}
.yui-skin-sam .yui-calendar .calrowhead {
text-align:right;
padding:0 2px 0 0;
}
.yui-skin-sam .yui-calendar .calrowfoot {
text-align:left;
padding:0 0 0 2px;
}
/* NORMAL CELLS */
.yui-skin-sam .yui-calendar td.calcell {
border:1px solid #cccccc;
background:#fff;
padding:1px;
height:1.6em;
line-height:1.6em; /* set line height equal to cell height to center vertically */
text-align:center;
white-space:nowrap;
}
/* LINK INSIDE NORMAL CELLS */
.yui-skin-sam .yui-calendar td.calcell a {
color:#0066cc;
display:block;
height:100%;
text-decoration:none;
}
/* TODAY'S DATE */
.yui-skin-sam .yui-calendar td.calcell.today {
background-color:#000;
}
.yui-skin-sam .yui-calendar td.calcell.today a {
background-color:#fff;
}
/* OOM DATES */
.yui-skin-sam .yui-calendar td.calcell.oom {
background-color:#cccccc;
color:#a6a6a6;
cursor:default;
}
/* SELECTED DATE */
.yui-skin-sam .yui-calendar td.calcell.selected {
background-color:#fff;
color:#000;
}
.yui-skin-sam .yui-calendar td.calcell.selected a {
background-color:#b3d4ff;
color:#000;
}
/* HOVER DATE */
.yui-skin-sam .yui-calendar td.calcell.calcellhover {
background-color:#426fd9;
color:#fff;
cursor:pointer;
}
.yui-skin-sam .yui-calendar td.calcell.calcellhover a {
background-color:#426fd9;
color:#fff;
}
/* DEFAULT OOB DATES */
.yui-skin-sam .yui-calendar td.calcell.previous {
color:#e0e0e0;
}
/* CUSTOM RENDERERS */
.yui-skin-sam .yui-calendar td.calcell.restricted { text-decoration:line-through; }
.yui-skin-sam .yui-calendar td.calcell.highlight1 { background-color:#ccff99; }
.yui-skin-sam .yui-calendar td.calcell.highlight2 { background-color:#99ccff; }
.yui-skin-sam .yui-calendar td.calcell.highlight3 { background-color:#ffcccc; }
.yui-skin-sam .yui-calendar td.calcell.highlight4 { background-color:#ccff99; }
/* CalendarNavigator */
/* MONTH/YEAR LABEL */
.yui-skin-sam .yui-calendar a.calnav {
border: 1px solid #f2f2f2;
padding:0 4px;
text-decoration:none;
color:#000;
zoom:1;
}
.yui-skin-sam .yui-calendar a.calnav:hover {
background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;
border-color:#A0A0A0;
cursor:pointer;
}
/* NAVIGATOR MASK */
.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask {
background-color:#000;
opacity:0.25;
filter:alpha(opacity=25); /* IE */
}
/* NAVIGATOR BOUNDING BOX */
.yui-skin-sam .yui-calcontainer .yui-cal-nav {
font-family:arial,helvetica,clean,sans-serif;
font-size:93%;
border:1px solid #808080;
left:50%;
margin-left:-7em;
width:14em;
padding:0;
top:2.5em;
background-color:#f2f2f2;
}
.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav {
top:4.5em;
}
/* NAVIGATOR BOUNDING BOX */
.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav {
width:16em;
margin-left:-8em;
}
/* NAVIGATOR YEAR/MONTH/BUTTON/ERROR BOUNDING BLOCKS */
.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,
.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,
.yui-skin-sam .yui-calcontainer .yui-cal-nav-b {
padding:5px 10px 5px 10px;
}
.yui-skin-sam .yui-calcontainer .yui-cal-nav-b {
text-align:center;
}
.yui-skin-sam .yui-calcontainer .yui-cal-nav-e {
margin-top:5px;
padding:5px;
background-color:#EDF5FF;
border-top:1px solid black;
display:none;
}
/* NAVIGATOR LABELS */
.yui-skin-sam .yui-calcontainer .yui-cal-nav label {
display:block;
font-weight:bold;
}
/* NAVIGATOR MONTH CONTROL */
.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc {
width:100%;
_width:auto; /* IE6, IE7 Quirks don't handle 100% well */
}
/* NAVIGATOR MONTH CONTROL, VALIDATION ERROR */
.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid {
background-color:#FFEE69;
border: 1px solid #000;
}
/* NAVIGATOR YEAR CONTROL */
.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc {
width:4em;
}
/* NAVIGATOR BUTTONS */
/* BUTTON WRAPPER */
.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn {
border:1px solid #808080;
background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;
background-color:#ccc;
margin: auto .15em;
}
/* BUTTON (based on button-skin.css) */
.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button {
padding:0 8px;
font-size:93%;
line-height: 2; /* ~24px */
*line-height: 1.7; /* For IE */
min-height: 2em; /* For Gecko */
*min-height: auto; /* For IE */
color: #000;
}
/* DEFAULT BUTTONS */
/* NOTE: IE6 will only pickup the yui-default specifier from the multiple class specifier */
.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default {
border:1px solid #304369;
background-color: #426fd9;
background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px;
}
.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button {
color:#fff;
}
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 one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(../../../../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(../../../../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(ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;}
File diff suppressed because one or more lines are too long
Binary file not shown.
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
@@ -1,6 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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:none;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/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;}
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 one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -1,980 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* 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 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 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;
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 o,t,args = (callback && callback.argument)?callback.argument:null;
if(this._isFileUpload){
t = 'upload';
}
else if(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){
this.uploadFile(o, callback, uri, postData);
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.8.1", build: "19"});
File diff suppressed because one or more lines are too long
@@ -1,957 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* 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 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 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;
}
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 o,t,args = (callback && callback.argument)?callback.argument:null;
if(this._isFileUpload){
t = 'upload';
}
else if(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){
this.uploadFile(o, callback, uri, postData);
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.8.1", build: "19"});
@@ -1,324 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.yui-overlay,
.yui-panel-container {
visibility:hidden;
position:absolute;
z-index: 2;
}
.yui-tt {
visibility:hidden;
position:absolute;
color:#333;
background-color:#FDFFB4;
font-family:arial,helvetica,verdana,sans-serif;
padding:2px;
border:1px solid #FCC90D;
font:100% sans-serif;
width:auto;
}
/*
PLEASE NOTE: The <DIV> element used for a Tooltip's shadow is appended
to its root element via JavaScript once it has been rendered. The
code that creates the shadow lives in the Tooltip's public "onRender"
event handler that is a prototype method of YAHOO.widget.Tooltip.
Implementers wishing to remove a Tooltip's shadow or add any other markup
required for a given skin for Tooltip should override the "onRender" method.
*/
.yui-tt-shadow {
display: none;
}
* html body.masked select {
visibility:hidden;
}
* html div.yui-panel-container select {
visibility:inherit;
}
* html div.drag select {
visibility:hidden;
}
* html div.hide-select select {
visibility:hidden;
}
.mask {
z-index: 1;
display:none;
position:absolute;
top:0;
left:0;
-moz-opacity: 0.5;
opacity:.50;
filter: alpha(opacity=50);
background-color:#CCC;
}
/*
There are two known issues with YAHOO.widget.Overlay (and its subclasses) that
manifest in Gecko-based browsers on Mac OS X:
1) Elements with scrollbars will poke through Overlay instances floating
above them.
2) An Overlay's scrollbars and the scrollbars of its child nodes remain
visible when the Overlay is hidden.
To fix these bugs:
1) The "overflow" property of an Overlay instance's root element and child
nodes is toggled between "hidden" and "auto" (through the application
and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes)
as its "visibility" configuration property is toggled between
"false" and "true."
2) The "display" property of <SELECT> elements that are child nodes of the
Overlay instance's root element is set to "none" when it is hidden.
PLEASE NOTE:
1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are
applied only for Gecko on Mac OS X and are added/removed to/from the
Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and
"showMacGeckoScrollbars" methods of YAHOO.widget.Overlay.
2) There may be instances where the CSS for a web page or application
contains style rules whose specificity override the rules implemented by
the Container CSS files to fix this bug. In such cases, is necessary to
leverage the provided "hide-scrollbars" and "show-scrollbars" classes to
write custom style rules to guard against this bug.
** For more information on this issue, see:
+ https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+ YUILibrary bug #1723530
*/
.hide-scrollbars,
.hide-scrollbars * {
overflow: hidden;
}
.hide-scrollbars select {
display: none;
}
.show-scrollbars {
overflow: auto;
}
.yui-panel-container.show-scrollbars {
overflow: visible;
}
.yui-panel-container.show-scrollbars .underlay {
overflow: auto;
}
.yui-panel-container.focused {
}
/* Panel underlay styles */
.yui-panel-container .underlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.yui-panel-container.matte {
padding: 3px;
background-color: #fff;
}
.yui-panel-container.shadow .underlay {
top: 3px;
bottom: -3px;
right: -3px;
left: 3px;
background-color: #000;
opacity: .12;
filter: alpha(opacity=12); /* For IE */
}
/*
Workaround for Safari 2.x - the yui-force-redraw class is applied, and then removed when
the Panel's content changes, to force Safari 2.x to redraw the underlay.
We attempt to choose a CSS property which has no visual impact when added,
removed, but still causes Safari to redraw
*/
.yui-panel-container.shadow .underlay.yui-force-redraw {
padding-bottom: 1px;
}
.yui-effect-fade .underlay {
display:none;
}
.yui-panel {
visibility:hidden;
border-collapse:separate;
position:relative;
left:0;
top:0;
font:1em Arial;
background-color:#FFF;
border:1px solid #000;
z-index:1;
overflow:hidden;
}
.yui-panel .hd {
background-color:#3d77cb;
color:#FFF;
font-size:100%;
line-height:100%;
border:1px solid #FFF;
border-bottom:1px solid #000;
font-weight:bold;
padding:4px;
white-space:nowrap;
}
.yui-panel .bd {
overflow:hidden;
padding:4px;
}
.yui-panel .bd p {
margin:0 0 1em;
}
.yui-panel .container-close {
position:absolute;
top:5px;
right:4px;
z-index:6;
height:12px;
width:12px;
margin:0px;
padding:0px;
background:url(close12_1.gif) no-repeat;
cursor:pointer;
visibility:inherit;
text-indent:-10000em;
overflow:hidden;
text-decoration:none;
}
.yui-panel .ft {
padding:4px;
overflow:hidden;
}
.yui-simple-dialog .bd .yui-icon {
background-repeat:no-repeat;
width:16px;
height:16px;
margin-right:10px;
float:left;
}
.yui-simple-dialog .bd span.blckicon {
background: url("blck16_1.gif") no-repeat;
}
.yui-simple-dialog .bd span.alrticon {
background: url("alrt16_1.gif") no-repeat;
}
.yui-simple-dialog .bd span.hlpicon {
background: url("hlp16_1.gif") no-repeat;
}
.yui-simple-dialog .bd span.infoicon {
background: url("info16_1.gif") no-repeat;
}
.yui-simple-dialog .bd span.warnicon {
background: url("warn16_1.gif") no-repeat;
}
.yui-simple-dialog .bd span.tipicon {
background: url("tip16_1.gif") no-repeat;
}
.yui-dialog .ft,
.yui-simple-dialog .ft {
padding-bottom:5px;
padding-right:5px;
text-align:right;
}
.yui-dialog form,
.yui-simple-dialog form {
margin:0;
}
.button-group button {
font:100 76% verdana;
text-decoration:none;
background-color: #E4E4E4;
color: #333;
cursor: hand;
vertical-align: middle;
border: 2px solid #797979;
border-top-color:#FFF;
border-left-color:#FFF;
margin:2px;
padding:2px;
}
.button-group button.default {
font-weight:bold;
}
.button-group button:hover,
.button-group button.hover {
border:2px solid #90A029;
background-color:#EBF09E;
border-top-color:#FFF;
border-left-color:#FFF;
}
.button-group button:active {
border:2px solid #E4E4E4;
background-color:#BBB;
border-top-color:#333;
border-left-color:#333;
}
.yui-override-padding {
padding:0 !important;
}
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
.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(../../../../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(../../../../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:none;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(../../../../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
File diff suppressed because one or more lines are too long
-482
View File
@@ -1,482 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* 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.8.1", build: "19"});
-7
View File
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
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.8.1",build:"19"});
-482
View File
@@ -1,482 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* 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.8.1", build: "19"});
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
@@ -1,49 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/*foundational css*/
.yui-dt-table th, .yui-dt-table td {
overflow:hidden;
}
th .yui-dt-header {
position:relative;
}
th .yui-dt-label {
position:relative;
border-right:10px;
}
th .yui-dt-resizer {
position:absolute;
margin-right:-6px;
right:0;
bottom:0;
width:6px;
height:100%;
cursor:w-resize;
cursor:col-resize;
}
/* foundational scrolling css */
.yui-dt-scrollable {
*overflow-y:auto; /* for ie */
}
.yui-dt-scrollable thead {
display:block; /* for safari and opera */
}
.yui-dt-scrollable thead tr {
position:relative; /* for ie */
}
.yui-dt-scrollbody {
display:block; /* for safari and opera */
overflow:auto; /* for gecko */
}
.yui-dt-editor {
position:absolute;
}
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 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 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
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 one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,283 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* Augments the Event Utility with a <code>delegate</code> method that
* facilitates easy creation of delegated event listeners. (Note: Using CSS
* selectors as the filtering criteria for delegated event listeners requires
* inclusion of the Selector Utility.)
*
* @module event-delegate
* @title Event Utility Event Delegation Module
* @namespace YAHOO.util
* @requires event
*/
(function () {
var Event = YAHOO.util.Event,
Lang = YAHOO.lang,
delegates = [],
getMatch = function(el, selector, container) {
var returnVal;
if (!el || el === container) {
returnVal = false;
}
else {
returnVal = YAHOO.util.Selector.test(el, selector) ? el: getMatch(el.parentNode, selector, container);
}
return returnVal;
};
Lang.augmentObject(Event, {
/**
* Creates a delegate function used to call event listeners specified
* via the <code>YAHOO.util.Event.delegate</code> method.
*
* @method _createDelegate
*
* @param {Function} fn The method (event listener) to call.
* @param {Function|string} filter Function or CSS selector used to
* determine for what element(s) the event listener should be called.
* @param {Object} obj An arbitrary object that will be
* passed as a parameter to the listener.
* @param {Boolean|object} overrideContext If true, the value of the
* obj parameter becomes the execution context
* of the listener. If an object, this object
* becomes the execution context.
* @return {Function} Function that will call the event listener
* specified by the <code>YAHOO.util.Event.delegate</code> method.
* @private
* @for Event
* @static
*/
_createDelegate: function (fn, filter, obj, overrideContext) {
return function (event) {
var container = this,
target = Event.getTarget(event),
selector = filter,
// The user might have specified the document object
// as the delegation container, in which case it is not
// nessary to scope the provided CSS selector(s) to the
// delegation container
bDocument = (container.nodeType === 9),
matchedEl,
context,
sID,
sIDSelector;
if (Lang.isFunction(filter)) {
matchedEl = filter(target);
}
else if (Lang.isString(filter)) {
if (!bDocument) {
sID = container.id;
if (!sID) {
sID = Event.generateId(container);
}
// Scope all selectors to the container
sIDSelector = ("#" + sID + " ");
selector = (sIDSelector + filter).replace(/,/gi, ("," + sIDSelector));
}
if (YAHOO.util.Selector.test(target, selector)) {
matchedEl = target;
}
else if (YAHOO.util.Selector.test(target, ((selector.replace(/,/gi, " *,")) + " *"))) {
// The target is a descendant of an element matching
// the selector, so crawl up to find the ancestor that
// matches the selector
matchedEl = getMatch(target, selector, container);
}
}
if (matchedEl) {
// The default context for delegated listeners is the
// element that matched the filter.
context = matchedEl;
if (overrideContext) {
if (overrideContext === true) {
context = obj;
} else {
context = overrideContext;
}
}
// Call the listener passing in the container and the
// element that matched the filter in case the user
// needs those.
return fn.call(context, event, matchedEl, container, obj);
}
};
},
/**
* Appends a delegated event listener. Delegated event listeners
* receive three arguments by default: the DOM event, the element
* specified by the filtering function or CSS selector, and the
* container element (the element to which the event listener is
* bound). (Note: Using the delegate method requires the event-delegate
* module. Using CSS selectors as the filtering criteria for delegated
* event listeners requires inclusion of the Selector Utility.)
*
* @method delegate
*
* @param {String|HTMLElement|Array|NodeList} container An id, an element
* reference, or a collection of ids and/or elements to assign the
* listener to.
* @param {String} type The type of event listener to append
* @param {Function} fn The method the event invokes
* @param {Function|string} filter Function or CSS selector used to
* determine for what element(s) the event listener should be called.
* When a function is specified, the function should return an
* HTML element. Using a CSS Selector requires the inclusion of the
* CSS Selector Utility.
* @param {Object} obj An arbitrary object that will be
* passed as a parameter to the listener
* @param {Boolean|object} overrideContext If true, the value of the obj parameter becomes
* the execution context of the listener. If an
* object, this object becomes the execution
* context.
* @return {Boolean} Returns true if the action was successful or defered,
* false if one or more of the elements
* could not have the listener attached,
* or if the operation throws an exception.
* @static
* @for Event
*/
delegate: function (container, type, fn, filter, obj, overrideContext) {
var sType = type,
fnMouseDelegate,
fnDelegate;
if (Lang.isString(filter) && !YAHOO.util.Selector) {
YAHOO.log("Using a CSS selector to define the filtering criteria for a delegated listener requires the Selector Utility.", "error", "Event");
return false;
}
if (type == "mouseenter" || type == "mouseleave") {
if (!Event._createMouseDelegate) {
YAHOO.log("Delegating a " + type + " event requires the event-mouseenter module.", "error", "Event");
return false;
}
// Look up the real event--either mouseover or mouseout
sType = Event._getType(type);
fnMouseDelegate = Event._createMouseDelegate(fn, obj, overrideContext);
fnDelegate = Event._createDelegate(function (event, matchedEl, container) {
return fnMouseDelegate.call(matchedEl, event, container);
}, filter, obj, overrideContext);
}
else {
fnDelegate = Event._createDelegate(fn, filter, obj, overrideContext);
}
delegates.push([container, sType, fn, fnDelegate]);
return Event.on(container, sType, fnDelegate);
},
/**
* Removes a delegated event listener.
*
* @method removeDelegate
*
* @param {String|HTMLElement|Array|NodeList} container An id, an element
* reference, or a collection of ids and/or elements to remove
* the listener from.
* @param {String} type The type of event to remove.
* @param {Function} fn The method the event invokes. If fn is
* undefined, then all event listeners for the type of event are
* removed.
* @return {boolean} Returns true if the unbind was successful, false
* otherwise.
* @static
* @for Event
*/
removeDelegate: function (container, type, fn) {
var sType = type,
returnVal = false,
index,
cacheItem;
// Look up the real event--either mouseover or mouseout
if (type == "mouseenter" || type == "mouseleave") {
sType = Event._getType(type);
}
index = Event._getCacheIndex(delegates, container, sType, fn);
if (index >= 0) {
cacheItem = delegates[index];
}
if (container && cacheItem) {
returnVal = Event.removeListener(cacheItem[0], cacheItem[1], cacheItem[3]);
if (returnVal) {
delete delegates[index][2];
delete delegates[index][3];
delegates.splice(index, 1);
}
}
return returnVal;
}
});
}());
YAHOO.register("event-delegate", YAHOO.util.Event, {version: "2.8.1", build: "19"});
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
(function(){var A=YAHOO.util.Event,C=YAHOO.lang,B=[],D=function(H,E,F){var G;if(!H||H===F){G=false;}else{G=YAHOO.util.Selector.test(H,E)?H:D(H.parentNode,E,F);}return G;};C.augmentObject(A,{_createDelegate:function(F,E,G,H){return function(I){var J=this,N=A.getTarget(I),L=E,P=(J.nodeType===9),Q,K,O,M;if(C.isFunction(E)){Q=E(N);}else{if(C.isString(E)){if(!P){O=J.id;if(!O){O=A.generateId(J);}M=("#"+O+" ");L=(M+E).replace(/,/gi,(","+M));}if(YAHOO.util.Selector.test(N,L)){Q=N;}else{if(YAHOO.util.Selector.test(N,((L.replace(/,/gi," *,"))+" *"))){Q=D(N,L,J);}}}}if(Q){K=Q;if(H){if(H===true){K=G;}else{K=H;}}return F.call(K,I,Q,J,G);}};},delegate:function(F,J,L,G,H,I){var E=J,K,M;if(C.isString(G)&&!YAHOO.util.Selector){return false;}if(J=="mouseenter"||J=="mouseleave"){if(!A._createMouseDelegate){return false;}E=A._getType(J);K=A._createMouseDelegate(L,H,I);M=A._createDelegate(function(P,O,N){return K.call(O,P,N);},G,H,I);}else{M=A._createDelegate(L,G,H,I);}B.push([F,E,L,M]);return A.on(F,E,M);},removeDelegate:function(F,J,I){var K=J,H=false,G,E;if(J=="mouseenter"||J=="mouseleave"){K=A._getType(J);}G=A._getCacheIndex(B,F,K,I);if(G>=0){E=B[G];}if(F&&E){H=A.removeListener(E[0],E[1],E[3]);if(H){delete B[G][2];delete B[G][3];B.splice(G,1);}}return H;}});}());YAHOO.register("event-delegate",YAHOO.util.Event,{version:"2.8.1",build:"19"});
@@ -1,281 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* Augments the Event Utility with a <code>delegate</code> method that
* facilitates easy creation of delegated event listeners. (Note: Using CSS
* selectors as the filtering criteria for delegated event listeners requires
* inclusion of the Selector Utility.)
*
* @module event-delegate
* @title Event Utility Event Delegation Module
* @namespace YAHOO.util
* @requires event
*/
(function () {
var Event = YAHOO.util.Event,
Lang = YAHOO.lang,
delegates = [],
getMatch = function(el, selector, container) {
var returnVal;
if (!el || el === container) {
returnVal = false;
}
else {
returnVal = YAHOO.util.Selector.test(el, selector) ? el: getMatch(el.parentNode, selector, container);
}
return returnVal;
};
Lang.augmentObject(Event, {
/**
* Creates a delegate function used to call event listeners specified
* via the <code>YAHOO.util.Event.delegate</code> method.
*
* @method _createDelegate
*
* @param {Function} fn The method (event listener) to call.
* @param {Function|string} filter Function or CSS selector used to
* determine for what element(s) the event listener should be called.
* @param {Object} obj An arbitrary object that will be
* passed as a parameter to the listener.
* @param {Boolean|object} overrideContext If true, the value of the
* obj parameter becomes the execution context
* of the listener. If an object, this object
* becomes the execution context.
* @return {Function} Function that will call the event listener
* specified by the <code>YAHOO.util.Event.delegate</code> method.
* @private
* @for Event
* @static
*/
_createDelegate: function (fn, filter, obj, overrideContext) {
return function (event) {
var container = this,
target = Event.getTarget(event),
selector = filter,
// The user might have specified the document object
// as the delegation container, in which case it is not
// nessary to scope the provided CSS selector(s) to the
// delegation container
bDocument = (container.nodeType === 9),
matchedEl,
context,
sID,
sIDSelector;
if (Lang.isFunction(filter)) {
matchedEl = filter(target);
}
else if (Lang.isString(filter)) {
if (!bDocument) {
sID = container.id;
if (!sID) {
sID = Event.generateId(container);
}
// Scope all selectors to the container
sIDSelector = ("#" + sID + " ");
selector = (sIDSelector + filter).replace(/,/gi, ("," + sIDSelector));
}
if (YAHOO.util.Selector.test(target, selector)) {
matchedEl = target;
}
else if (YAHOO.util.Selector.test(target, ((selector.replace(/,/gi, " *,")) + " *"))) {
// The target is a descendant of an element matching
// the selector, so crawl up to find the ancestor that
// matches the selector
matchedEl = getMatch(target, selector, container);
}
}
if (matchedEl) {
// The default context for delegated listeners is the
// element that matched the filter.
context = matchedEl;
if (overrideContext) {
if (overrideContext === true) {
context = obj;
} else {
context = overrideContext;
}
}
// Call the listener passing in the container and the
// element that matched the filter in case the user
// needs those.
return fn.call(context, event, matchedEl, container, obj);
}
};
},
/**
* Appends a delegated event listener. Delegated event listeners
* receive three arguments by default: the DOM event, the element
* specified by the filtering function or CSS selector, and the
* container element (the element to which the event listener is
* bound). (Note: Using the delegate method requires the event-delegate
* module. Using CSS selectors as the filtering criteria for delegated
* event listeners requires inclusion of the Selector Utility.)
*
* @method delegate
*
* @param {String|HTMLElement|Array|NodeList} container An id, an element
* reference, or a collection of ids and/or elements to assign the
* listener to.
* @param {String} type The type of event listener to append
* @param {Function} fn The method the event invokes
* @param {Function|string} filter Function or CSS selector used to
* determine for what element(s) the event listener should be called.
* When a function is specified, the function should return an
* HTML element. Using a CSS Selector requires the inclusion of the
* CSS Selector Utility.
* @param {Object} obj An arbitrary object that will be
* passed as a parameter to the listener
* @param {Boolean|object} overrideContext If true, the value of the obj parameter becomes
* the execution context of the listener. If an
* object, this object becomes the execution
* context.
* @return {Boolean} Returns true if the action was successful or defered,
* false if one or more of the elements
* could not have the listener attached,
* or if the operation throws an exception.
* @static
* @for Event
*/
delegate: function (container, type, fn, filter, obj, overrideContext) {
var sType = type,
fnMouseDelegate,
fnDelegate;
if (Lang.isString(filter) && !YAHOO.util.Selector) {
return false;
}
if (type == "mouseenter" || type == "mouseleave") {
if (!Event._createMouseDelegate) {
return false;
}
// Look up the real event--either mouseover or mouseout
sType = Event._getType(type);
fnMouseDelegate = Event._createMouseDelegate(fn, obj, overrideContext);
fnDelegate = Event._createDelegate(function (event, matchedEl, container) {
return fnMouseDelegate.call(matchedEl, event, container);
}, filter, obj, overrideContext);
}
else {
fnDelegate = Event._createDelegate(fn, filter, obj, overrideContext);
}
delegates.push([container, sType, fn, fnDelegate]);
return Event.on(container, sType, fnDelegate);
},
/**
* Removes a delegated event listener.
*
* @method removeDelegate
*
* @param {String|HTMLElement|Array|NodeList} container An id, an element
* reference, or a collection of ids and/or elements to remove
* the listener from.
* @param {String} type The type of event to remove.
* @param {Function} fn The method the event invokes. If fn is
* undefined, then all event listeners for the type of event are
* removed.
* @return {boolean} Returns true if the unbind was successful, false
* otherwise.
* @static
* @for Event
*/
removeDelegate: function (container, type, fn) {
var sType = type,
returnVal = false,
index,
cacheItem;
// Look up the real event--either mouseover or mouseout
if (type == "mouseenter" || type == "mouseleave") {
sType = Event._getType(type);
}
index = Event._getCacheIndex(delegates, container, sType, fn);
if (index >= 0) {
cacheItem = delegates[index];
}
if (container && cacheItem) {
returnVal = Event.removeListener(cacheItem[0], cacheItem[1], cacheItem[3]);
if (returnVal) {
delete delegates[index][2];
delete delegates[index][3];
delegates.splice(index, 1);
}
}
return returnVal;
}
});
}());
YAHOO.register("event-delegate", YAHOO.util.Event, {version: "2.8.1", build: "19"});
@@ -1,219 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* Augments the Event Utility with support for the mouseenter and mouseleave
* events: A mouseenter event fires the first time the mouse enters an
* element; a mouseleave event first the first time the mouse leaves an
* element.
*
* @module event-mouseenter
* @title Event Utility mouseenter and mouseout Module
* @namespace YAHOO.util
* @requires event
*/
(function () {
var Event = YAHOO.util.Event,
Lang = YAHOO.lang,
addListener = Event.addListener,
removeListener = Event.removeListener,
getListeners = Event.getListeners,
delegates = [],
specialTypes = {
mouseenter: "mouseover",
mouseleave: "mouseout"
},
remove = function(el, type, fn) {
var index = Event._getCacheIndex(delegates, el, type, fn),
cacheItem,
returnVal;
if (index >= 0) {
cacheItem = delegates[index];
}
if (el && cacheItem) {
// removeListener will translate the value of type
returnVal = removeListener.call(Event, cacheItem[0], type, cacheItem[3]);
if (returnVal) {
delete delegates[index][2];
delete delegates[index][3];
delegates.splice(index, 1);
}
}
return returnVal;
};
Lang.augmentObject(Event._specialTypes, specialTypes);
Lang.augmentObject(Event, {
/**
* Creates a delegate function used to call mouseover and mouseleave
* event listeners specified via the
* <code>YAHOO.util.Event.addListener</code>
* or <code>YAHOO.util.Event.on</code> method.
*
* @method _createMouseDelegate
*
* @param {Function} fn The method (event listener) to call
* @param {Object} obj An arbitrary object that will be
* passed as a parameter to the listener
* @param {Boolean|object} overrideContext If true, the value of the
* obj parameter becomes the execution context
* of the listener. If an object, this object
* becomes the execution context.
* @return {Function} Function that will call the event listener
* specified by either the <code>YAHOO.util.Event.addListener</code>
* or <code>YAHOO.util.Event.on</code> method.
* @private
* @static
* @for Event
*/
_createMouseDelegate: function (fn, obj, overrideContext) {
return function (event, container) {
var el = this,
relatedTarget = Event.getRelatedTarget(event),
context,
args;
if (el != relatedTarget && !YAHOO.util.Dom.isAncestor(el, relatedTarget)) {
context = el;
if (overrideContext) {
if (overrideContext === true) {
context = obj;
} else {
context = overrideContext;
}
}
// The default args passed back to a mouseenter or
// mouseleave listener are: the event, the element
// to which the listener is bound, and any object the
// user passed when subscribing
args = [event, el, obj];
// Add the delegation container as an argument when
// delegating mouseenter and mouseleave
if (container) {
args.splice(2, 0, container);
}
return fn.apply(context, args);
}
};
},
addListener: function (el, type, fn, obj, overrideContext) {
var fnDelegate,
returnVal;
if (specialTypes[type]) {
fnDelegate = Event._createMouseDelegate(fn, obj, overrideContext);
fnDelegate.mouseDelegate = true;
delegates.push([el, type, fn, fnDelegate]);
// addListener will translate the value of type
returnVal = addListener.call(Event, el, type, fnDelegate);
}
else {
returnVal = addListener.apply(Event, arguments);
}
return returnVal;
},
removeListener: function (el, type, fn) {
var returnVal;
if (specialTypes[type]) {
returnVal = remove.apply(Event, arguments);
}
else {
returnVal = removeListener.apply(Event, arguments);
}
return returnVal;
},
getListeners: function (el, type) {
// If the user specified the type as mouseover or mouseout,
// need to filter out those used by mouseenter and mouseleave.
// If the user specified the type as mouseenter or mouseleave,
// need to filter out the true mouseover and mouseout listeners.
var listeners = [],
elListeners,
bMouseOverOrOut = (type === "mouseover" || type === "mouseout"),
bMouseDelegate,
i,
l;
if (type && (bMouseOverOrOut || specialTypes[type])) {
elListeners = getListeners.call(Event, el, this._getType(type));
if (elListeners) {
for (i=elListeners.length-1; i>-1; i--) {
l = elListeners[i];
bMouseDelegate = l.fn.mouseDelegate;
if ((specialTypes[type] && bMouseDelegate) || (bMouseOverOrOut && !bMouseDelegate)) {
listeners.push(l);
}
}
}
}
else {
listeners = getListeners.apply(Event, arguments);
}
return (listeners && listeners.length) ? listeners : null;
}
}, true);
Event.on = Event.addListener;
}());
YAHOO.register("event-mouseenter", YAHOO.util.Event, {version: "2.8.1", build: "19"});
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
(function(){var B=YAHOO.util.Event,G=YAHOO.lang,E=B.addListener,F=B.removeListener,C=B.getListeners,D=[],H={mouseenter:"mouseover",mouseleave:"mouseout"},A=function(N,M,L){var J=B._getCacheIndex(D,N,M,L),I,K;if(J>=0){I=D[J];}if(N&&I){K=F.call(B,I[0],M,I[3]);if(K){delete D[J][2];delete D[J][3];D.splice(J,1);}}return K;};G.augmentObject(B._specialTypes,H);G.augmentObject(B,{_createMouseDelegate:function(I,J,K){return function(Q,M){var P=this,L=B.getRelatedTarget(Q),O,N;if(P!=L&&!YAHOO.util.Dom.isAncestor(P,L)){O=P;if(K){if(K===true){O=J;}else{O=K;}}N=[Q,P,J];if(M){N.splice(2,0,M);}return I.apply(O,N);}};},addListener:function(M,L,K,N,O){var I,J;if(H[L]){I=B._createMouseDelegate(K,N,O);I.mouseDelegate=true;D.push([M,L,K,I]);J=E.call(B,M,L,I);}else{J=E.apply(B,arguments);}return J;},removeListener:function(L,K,J){var I;if(H[K]){I=A.apply(B,arguments);}else{I=F.apply(B,arguments);}return I;},getListeners:function(N,M){var L=[],P,K=(M==="mouseover"||M==="mouseout"),O,J,I;if(M&&(K||H[M])){P=C.call(B,N,this._getType(M));if(P){for(J=P.length-1;J>-1;J--){I=P[J];O=I.fn.mouseDelegate;if((H[M]&&O)||(K&&!O)){L.push(I);}}}}else{L=C.apply(B,arguments);}return(L&&L.length)?L:null;}},true);B.on=B.addListener;}());YAHOO.register("event-mouseenter",YAHOO.util.Event,{version:"2.8.1",build:"19"});
@@ -1,219 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* Augments the Event Utility with support for the mouseenter and mouseleave
* events: A mouseenter event fires the first time the mouse enters an
* element; a mouseleave event first the first time the mouse leaves an
* element.
*
* @module event-mouseenter
* @title Event Utility mouseenter and mouseout Module
* @namespace YAHOO.util
* @requires event
*/
(function () {
var Event = YAHOO.util.Event,
Lang = YAHOO.lang,
addListener = Event.addListener,
removeListener = Event.removeListener,
getListeners = Event.getListeners,
delegates = [],
specialTypes = {
mouseenter: "mouseover",
mouseleave: "mouseout"
},
remove = function(el, type, fn) {
var index = Event._getCacheIndex(delegates, el, type, fn),
cacheItem,
returnVal;
if (index >= 0) {
cacheItem = delegates[index];
}
if (el && cacheItem) {
// removeListener will translate the value of type
returnVal = removeListener.call(Event, cacheItem[0], type, cacheItem[3]);
if (returnVal) {
delete delegates[index][2];
delete delegates[index][3];
delegates.splice(index, 1);
}
}
return returnVal;
};
Lang.augmentObject(Event._specialTypes, specialTypes);
Lang.augmentObject(Event, {
/**
* Creates a delegate function used to call mouseover and mouseleave
* event listeners specified via the
* <code>YAHOO.util.Event.addListener</code>
* or <code>YAHOO.util.Event.on</code> method.
*
* @method _createMouseDelegate
*
* @param {Function} fn The method (event listener) to call
* @param {Object} obj An arbitrary object that will be
* passed as a parameter to the listener
* @param {Boolean|object} overrideContext If true, the value of the
* obj parameter becomes the execution context
* of the listener. If an object, this object
* becomes the execution context.
* @return {Function} Function that will call the event listener
* specified by either the <code>YAHOO.util.Event.addListener</code>
* or <code>YAHOO.util.Event.on</code> method.
* @private
* @static
* @for Event
*/
_createMouseDelegate: function (fn, obj, overrideContext) {
return function (event, container) {
var el = this,
relatedTarget = Event.getRelatedTarget(event),
context,
args;
if (el != relatedTarget && !YAHOO.util.Dom.isAncestor(el, relatedTarget)) {
context = el;
if (overrideContext) {
if (overrideContext === true) {
context = obj;
} else {
context = overrideContext;
}
}
// The default args passed back to a mouseenter or
// mouseleave listener are: the event, the element
// to which the listener is bound, and any object the
// user passed when subscribing
args = [event, el, obj];
// Add the delegation container as an argument when
// delegating mouseenter and mouseleave
if (container) {
args.splice(2, 0, container);
}
return fn.apply(context, args);
}
};
},
addListener: function (el, type, fn, obj, overrideContext) {
var fnDelegate,
returnVal;
if (specialTypes[type]) {
fnDelegate = Event._createMouseDelegate(fn, obj, overrideContext);
fnDelegate.mouseDelegate = true;
delegates.push([el, type, fn, fnDelegate]);
// addListener will translate the value of type
returnVal = addListener.call(Event, el, type, fnDelegate);
}
else {
returnVal = addListener.apply(Event, arguments);
}
return returnVal;
},
removeListener: function (el, type, fn) {
var returnVal;
if (specialTypes[type]) {
returnVal = remove.apply(Event, arguments);
}
else {
returnVal = removeListener.apply(Event, arguments);
}
return returnVal;
},
getListeners: function (el, type) {
// If the user specified the type as mouseover or mouseout,
// need to filter out those used by mouseenter and mouseleave.
// If the user specified the type as mouseenter or mouseleave,
// need to filter out the true mouseover and mouseout listeners.
var listeners = [],
elListeners,
bMouseOverOrOut = (type === "mouseover" || type === "mouseout"),
bMouseDelegate,
i,
l;
if (type && (bMouseOverOrOut || specialTypes[type])) {
elListeners = getListeners.call(Event, el, this._getType(type));
if (elListeners) {
for (i=elListeners.length-1; i>-1; i--) {
l = elListeners[i];
bMouseDelegate = l.fn.mouseDelegate;
if ((specialTypes[type] && bMouseDelegate) || (bMouseOverOrOut && !bMouseDelegate)) {
listeners.push(l);
}
}
}
}
else {
listeners = getListeners.apply(Event, arguments);
}
return (listeners && listeners.length) ? listeners : null;
}
}, true);
Event.on = Event.addListener;
}());
YAHOO.register("event-mouseenter", YAHOO.util.Event, {version: "2.8.1", build: "19"});
@@ -1,622 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* DOM event simulation utility
* @module event-simulate
* @namespace YAHOO.util
* @requires yahoo,dom,event
*/
/**
* The UserAction object provides functions that simulate events occurring in
* the browser. Since these are simulated events, they do not behave exactly
* as regular, user-initiated events do, but can be used to test simple
* user interactions safely.
*
* @namespace YAHOO.util
* @class UserAction
* @static
*/
YAHOO.util.UserAction = {
//--------------------------------------------------------------------------
// Generic event methods
//--------------------------------------------------------------------------
/**
* Simulates a key event using the given event information to populate
* the generated event object. This method does browser-equalizing
* calculations to account for differences in the DOM and IE event models
* as well as different browser quirks. Note: keydown causes Safari 2.x to
* crash.
* @method simulateKeyEvent
* @private
* @static
* @param {HTMLElement} target The target of the given event.
* @param {String} type The type of event to fire. This can be any one of
* the following: keyup, keydown, and keypress.
* @param {Boolean} bubbles (Optional) Indicates if the event can be
* bubbled up. DOM Level 3 specifies that all key events bubble by
* default. The default is true.
* @param {Boolean} cancelable (Optional) Indicates if the event can be
* canceled using preventDefault(). DOM Level 3 specifies that all
* key events can be cancelled. The default
* is true.
* @param {Window} view (Optional) The view containing the target. This is
* typically the window object. The default is window.
* @param {Boolean} ctrlKey (Optional) Indicates if one of the CTRL keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} altKey (Optional) Indicates if one of the ALT keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} shiftKey (Optional) Indicates if one of the SHIFT keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} metaKey (Optional) Indicates if one of the META keys
* is pressed while the event is firing. The default is false.
* @param {int} keyCode (Optional) The code for the key that is in use.
* The default is 0.
* @param {int} charCode (Optional) The Unicode code for the character
* associated with the key being used. The default is 0.
*/
simulateKeyEvent : function (target /*:HTMLElement*/, type /*:String*/,
bubbles /*:Boolean*/, cancelable /*:Boolean*/,
view /*:Window*/,
ctrlKey /*:Boolean*/, altKey /*:Boolean*/,
shiftKey /*:Boolean*/, metaKey /*:Boolean*/,
keyCode /*:int*/, charCode /*:int*/) /*:Void*/
{
//check target
target = YAHOO.util.Dom.get(target);
if (!target){
throw new Error("simulateKeyEvent(): Invalid target.");
}
//check event type
if (YAHOO.lang.isString(type)){
type = type.toLowerCase();
switch(type){
case "keyup":
case "keydown":
case "keypress":
break;
case "textevent": //DOM Level 3
type = "keypress";
break;
// @TODO was the fallthrough intentional, if so throw error
default:
throw new Error("simulateKeyEvent(): Event type '" + type + "' not supported.");
}
} else {
throw new Error("simulateKeyEvent(): Event type must be a string.");
}
//setup default values
if (!YAHOO.lang.isBoolean(bubbles)){
bubbles = true; //all key events bubble
}
if (!YAHOO.lang.isBoolean(cancelable)){
cancelable = true; //all key events can be cancelled
}
if (!YAHOO.lang.isObject(view)){
view = window; //view is typically window
}
if (!YAHOO.lang.isBoolean(ctrlKey)){
ctrlKey = false;
}
if (!YAHOO.lang.isBoolean(altKey)){
altKey = false;
}
if (!YAHOO.lang.isBoolean(shiftKey)){
shiftKey = false;
}
if (!YAHOO.lang.isBoolean(metaKey)){
metaKey = false;
}
if (!YAHOO.lang.isNumber(keyCode)){
keyCode = 0;
}
if (!YAHOO.lang.isNumber(charCode)){
charCode = 0;
}
//try to create a mouse event
var customEvent /*:MouseEvent*/ = null;
//check for DOM-compliant browsers first
if (YAHOO.lang.isFunction(document.createEvent)){
try {
//try to create key event
customEvent = document.createEvent("KeyEvents");
/*
* Interesting problem: Firefox implemented a non-standard
* version of initKeyEvent() based on DOM Level 2 specs.
* Key event was removed from DOM Level 2 and re-introduced
* in DOM Level 3 with a different interface. Firefox is the
* only browser with any implementation of Key Events, so for
* now, assume it's Firefox if the above line doesn't error.
*/
//TODO: Decipher between Firefox's implementation and a correct one.
customEvent.initKeyEvent(type, bubbles, cancelable, view, ctrlKey,
altKey, shiftKey, metaKey, keyCode, charCode);
} catch (ex /*:Error*/){
/*
* If it got here, that means key events aren't officially supported.
* Safari/WebKit is a real problem now. WebKit 522 won't let you
* set keyCode, charCode, or other properties if you use a
* UIEvent, so we first must try to create a generic event. The
* fun part is that this will throw an error on Safari 2.x. The
* end result is that we need another try...catch statement just to
* deal with this mess.
*/
try {
//try to create generic event - will fail in Safari 2.x
customEvent = document.createEvent("Events");
} catch (uierror /*:Error*/){
//the above failed, so create a UIEvent for Safari 2.x
customEvent = document.createEvent("UIEvents");
} finally {
customEvent.initEvent(type, bubbles, cancelable);
//initialize
customEvent.view = view;
customEvent.altKey = altKey;
customEvent.ctrlKey = ctrlKey;
customEvent.shiftKey = shiftKey;
customEvent.metaKey = metaKey;
customEvent.keyCode = keyCode;
customEvent.charCode = charCode;
}
}
//fire the event
target.dispatchEvent(customEvent);
} else if (YAHOO.lang.isObject(document.createEventObject)){ //IE
//create an IE event object
customEvent = document.createEventObject();
//assign available properties
customEvent.bubbles = bubbles;
customEvent.cancelable = cancelable;
customEvent.view = view;
customEvent.ctrlKey = ctrlKey;
customEvent.altKey = altKey;
customEvent.shiftKey = shiftKey;
customEvent.metaKey = metaKey;
/*
* IE doesn't support charCode explicitly. CharCode should
* take precedence over any keyCode value for accurate
* representation.
*/
customEvent.keyCode = (charCode > 0) ? charCode : keyCode;
//fire the event
target.fireEvent("on" + type, customEvent);
} else {
throw new Error("simulateKeyEvent(): No event simulation framework present.");
}
},
/**
* Simulates a mouse event using the given event information to populate
* the generated event object. This method does browser-equalizing
* calculations to account for differences in the DOM and IE event models
* as well as different browser quirks.
* @method simulateMouseEvent
* @private
* @static
* @param {HTMLElement} target The target of the given event.
* @param {String} type The type of event to fire. This can be any one of
* the following: click, dblclick, mousedown, mouseup, mouseout,
* mouseover, and mousemove.
* @param {Boolean} bubbles (Optional) Indicates if the event can be
* bubbled up. DOM Level 2 specifies that all mouse events bubble by
* default. The default is true.
* @param {Boolean} cancelable (Optional) Indicates if the event can be
* canceled using preventDefault(). DOM Level 2 specifies that all
* mouse events except mousemove can be cancelled. The default
* is true for all events except mousemove, for which the default
* is false.
* @param {Window} view (Optional) The view containing the target. This is
* typically the window object. The default is window.
* @param {int} detail (Optional) The number of times the mouse button has
* been used. The default value is 1.
* @param {int} screenX (Optional) The x-coordinate on the screen at which
* point the event occured. The default is 0.
* @param {int} screenY (Optional) The y-coordinate on the screen at which
* point the event occured. The default is 0.
* @param {int} clientX (Optional) The x-coordinate on the client at which
* point the event occured. The default is 0.
* @param {int} clientY (Optional) The y-coordinate on the client at which
* point the event occured. The default is 0.
* @param {Boolean} ctrlKey (Optional) Indicates if one of the CTRL keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} altKey (Optional) Indicates if one of the ALT keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} shiftKey (Optional) Indicates if one of the SHIFT keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} metaKey (Optional) Indicates if one of the META keys
* is pressed while the event is firing. The default is false.
* @param {int} button (Optional) The button being pressed while the event
* is executing. The value should be 0 for the primary mouse button
* (typically the left button), 1 for the terciary mouse button
* (typically the middle button), and 2 for the secondary mouse button
* (typically the right button). The default is 0.
* @param {HTMLElement} relatedTarget (Optional) For mouseout events,
* this is the element that the mouse has moved to. For mouseover
* events, this is the element that the mouse has moved from. This
* argument is ignored for all other events. The default is null.
*/
simulateMouseEvent : function (target /*:HTMLElement*/, type /*:String*/,
bubbles /*:Boolean*/, cancelable /*:Boolean*/,
view /*:Window*/, detail /*:int*/,
screenX /*:int*/, screenY /*:int*/,
clientX /*:int*/, clientY /*:int*/,
ctrlKey /*:Boolean*/, altKey /*:Boolean*/,
shiftKey /*:Boolean*/, metaKey /*:Boolean*/,
button /*:int*/, relatedTarget /*:HTMLElement*/) /*:Void*/
{
//check target
target = YAHOO.util.Dom.get(target);
if (!target){
throw new Error("simulateMouseEvent(): Invalid target.");
}
//check event type
if (YAHOO.lang.isString(type)){
type = type.toLowerCase();
switch(type){
case "mouseover":
case "mouseout":
case "mousedown":
case "mouseup":
case "click":
case "dblclick":
case "mousemove":
break;
default:
throw new Error("simulateMouseEvent(): Event type '" + type + "' not supported.");
}
} else {
throw new Error("simulateMouseEvent(): Event type must be a string.");
}
//setup default values
if (!YAHOO.lang.isBoolean(bubbles)){
bubbles = true; //all mouse events bubble
}
if (!YAHOO.lang.isBoolean(cancelable)){
cancelable = (type != "mousemove"); //mousemove is the only one that can't be cancelled
}
if (!YAHOO.lang.isObject(view)){
view = window; //view is typically window
}
if (!YAHOO.lang.isNumber(detail)){
detail = 1; //number of mouse clicks must be at least one
}
if (!YAHOO.lang.isNumber(screenX)){
screenX = 0;
}
if (!YAHOO.lang.isNumber(screenY)){
screenY = 0;
}
if (!YAHOO.lang.isNumber(clientX)){
clientX = 0;
}
if (!YAHOO.lang.isNumber(clientY)){
clientY = 0;
}
if (!YAHOO.lang.isBoolean(ctrlKey)){
ctrlKey = false;
}
if (!YAHOO.lang.isBoolean(altKey)){
altKey = false;
}
if (!YAHOO.lang.isBoolean(shiftKey)){
shiftKey = false;
}
if (!YAHOO.lang.isBoolean(metaKey)){
metaKey = false;
}
if (!YAHOO.lang.isNumber(button)){
button = 0;
}
//try to create a mouse event
var customEvent /*:MouseEvent*/ = null;
//check for DOM-compliant browsers first
if (YAHOO.lang.isFunction(document.createEvent)){
customEvent = document.createEvent("MouseEvents");
//Safari 2.x (WebKit 418) still doesn't implement initMouseEvent()
if (customEvent.initMouseEvent){
customEvent.initMouseEvent(type, bubbles, cancelable, view, detail,
screenX, screenY, clientX, clientY,
ctrlKey, altKey, shiftKey, metaKey,
button, relatedTarget);
} else { //Safari
//the closest thing available in Safari 2.x is UIEvents
customEvent = document.createEvent("UIEvents");
customEvent.initEvent(type, bubbles, cancelable);
customEvent.view = view;
customEvent.detail = detail;
customEvent.screenX = screenX;
customEvent.screenY = screenY;
customEvent.clientX = clientX;
customEvent.clientY = clientY;
customEvent.ctrlKey = ctrlKey;
customEvent.altKey = altKey;
customEvent.metaKey = metaKey;
customEvent.shiftKey = shiftKey;
customEvent.button = button;
customEvent.relatedTarget = relatedTarget;
}
/*
* Check to see if relatedTarget has been assigned. Firefox
* versions less than 2.0 don't allow it to be assigned via
* initMouseEvent() and the property is readonly after event
* creation, so in order to keep YAHOO.util.getRelatedTarget()
* working, assign to the IE proprietary toElement property
* for mouseout event and fromElement property for mouseover
* event.
*/
if (relatedTarget && !customEvent.relatedTarget){
if (type == "mouseout"){
customEvent.toElement = relatedTarget;
} else if (type == "mouseover"){
customEvent.fromElement = relatedTarget;
}
}
//fire the event
target.dispatchEvent(customEvent);
} else if (YAHOO.lang.isObject(document.createEventObject)){ //IE
//create an IE event object
customEvent = document.createEventObject();
//assign available properties
customEvent.bubbles = bubbles;
customEvent.cancelable = cancelable;
customEvent.view = view;
customEvent.detail = detail;
customEvent.screenX = screenX;
customEvent.screenY = screenY;
customEvent.clientX = clientX;
customEvent.clientY = clientY;
customEvent.ctrlKey = ctrlKey;
customEvent.altKey = altKey;
customEvent.metaKey = metaKey;
customEvent.shiftKey = shiftKey;
//fix button property for IE's wacky implementation
switch(button){
case 0:
customEvent.button = 1;
break;
case 1:
customEvent.button = 4;
break;
case 2:
//leave as is
break;
default:
customEvent.button = 0;
}
/*
* Have to use relatedTarget because IE won't allow assignment
* to toElement or fromElement on generic events. This keeps
* YAHOO.util.customEvent.getRelatedTarget() functional.
*/
customEvent.relatedTarget = relatedTarget;
//fire the event
target.fireEvent("on" + type, customEvent);
} else {
throw new Error("simulateMouseEvent(): No event simulation framework present.");
}
},
//--------------------------------------------------------------------------
// Mouse events
//--------------------------------------------------------------------------
/**
* Simulates a mouse event on a particular element.
* @param {HTMLElement} target The element to click on.
* @param {String} type The type of event to fire. This can be any one of
* the following: click, dblclick, mousedown, mouseup, mouseout,
* mouseover, and mousemove.
* @param {Object} options Additional event options (use DOM standard names).
* @method mouseEvent
* @static
*/
fireMouseEvent : function (target /*:HTMLElement*/, type /*:String*/,
options /*:Object*/) /*:Void*/
{
options = options || {};
this.simulateMouseEvent(target, type, options.bubbles,
options.cancelable, options.view, options.detail, options.screenX,
options.screenY, options.clientX, options.clientY, options.ctrlKey,
options.altKey, options.shiftKey, options.metaKey, options.button,
options.relatedTarget);
},
/**
* Simulates a click on a particular element.
* @param {HTMLElement} target The element to click on.
* @param {Object} options Additional event options (use DOM standard names).
* @method click
* @static
*/
click : function (target /*:HTMLElement*/, options /*:Object*/) /*:Void*/ {
this.fireMouseEvent(target, "click", options);
},
/**
* Simulates a double click on a particular element.
* @param {HTMLElement} target The element to double click on.
* @param {Object} options Additional event options (use DOM standard names).
* @method dblclick
* @static
*/
dblclick : function (target /*:HTMLElement*/, options /*:Object*/) /*:Void*/ {
this.fireMouseEvent( target, "dblclick", options);
},
/**
* Simulates a mousedown on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mousedown
* @static
*/
mousedown : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mousedown", options);
},
/**
* Simulates a mousemove on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mousemove
* @static
*/
mousemove : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mousemove", options);
},
/**
* Simulates a mouseout event on a particular element. Use "relatedTarget"
* on the options object to specify where the mouse moved to.
* Quirks: Firefox less than 2.0 doesn't set relatedTarget properly, so
* toElement is assigned in its place. IE doesn't allow toElement to be
* be assigned, so relatedTarget is assigned in its place. Both of these
* concessions allow YAHOO.util.Event.getRelatedTarget() to work correctly
* in both browsers.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mouseout
* @static
*/
mouseout : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mouseout", options);
},
/**
* Simulates a mouseover event on a particular element. Use "relatedTarget"
* on the options object to specify where the mouse moved from.
* Quirks: Firefox less than 2.0 doesn't set relatedTarget properly, so
* fromElement is assigned in its place. IE doesn't allow fromElement to be
* be assigned, so relatedTarget is assigned in its place. Both of these
* concessions allow YAHOO.util.Event.getRelatedTarget() to work correctly
* in both browsers.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mouseover
* @static
*/
mouseover : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mouseover", options);
},
/**
* Simulates a mouseup on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mouseup
* @static
*/
mouseup : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mouseup", options);
},
//--------------------------------------------------------------------------
// Key events
//--------------------------------------------------------------------------
/**
* Fires an event that normally would be fired by the keyboard (keyup,
* keydown, keypress). Make sure to specify either keyCode or charCode as
* an option.
* @private
* @param {String} type The type of event ("keyup", "keydown" or "keypress").
* @param {HTMLElement} target The target of the event.
* @param {Object} options Options for the event. Either keyCode or charCode
* are required.
* @method fireKeyEvent
* @static
*/
fireKeyEvent : function (type /*:String*/, target /*:HTMLElement*/,
options /*:Object*/) /*:Void*/
{
options = options || {};
this.simulateKeyEvent(target, type, options.bubbles,
options.cancelable, options.view, options.ctrlKey,
options.altKey, options.shiftKey, options.metaKey,
options.keyCode, options.charCode);
},
/**
* Simulates a keydown event on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method keydown
* @static
*/
keydown : function (target /*:HTMLElement*/, options /*:Object*/) /*:Void*/ {
this.fireKeyEvent("keydown", target, options);
},
/**
* Simulates a keypress on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method keypress
* @static
*/
keypress : function (target /*:HTMLElement*/, options /*:Object*/) /*:Void*/ {
this.fireKeyEvent("keypress", target, options);
},
/**
* Simulates a keyup event on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method keyup
* @static
*/
keyup : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireKeyEvent("keyup", target, options);
}
};
YAHOO.register("event-simulate", YAHOO.util.UserAction, {version: "2.8.1", build: "19"});
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
YAHOO.util.UserAction={simulateKeyEvent:function(F,J,E,C,L,B,A,K,H,N,M){F=YAHOO.util.Dom.get(F);if(!F){throw new Error("simulateKeyEvent(): Invalid target.");}if(YAHOO.lang.isString(J)){J=J.toLowerCase();switch(J){case"keyup":case"keydown":case"keypress":break;case"textevent":J="keypress";break;default:throw new Error("simulateKeyEvent(): Event type '"+J+"' not supported.");}}else{throw new Error("simulateKeyEvent(): Event type must be a string.");}if(!YAHOO.lang.isBoolean(E)){E=true;}if(!YAHOO.lang.isBoolean(C)){C=true;}if(!YAHOO.lang.isObject(L)){L=window;}if(!YAHOO.lang.isBoolean(B)){B=false;}if(!YAHOO.lang.isBoolean(A)){A=false;}if(!YAHOO.lang.isBoolean(K)){K=false;}if(!YAHOO.lang.isBoolean(H)){H=false;}if(!YAHOO.lang.isNumber(N)){N=0;}if(!YAHOO.lang.isNumber(M)){M=0;}var I=null;if(YAHOO.lang.isFunction(document.createEvent)){try{I=document.createEvent("KeyEvents");I.initKeyEvent(J,E,C,L,B,A,K,H,N,M);}catch(G){try{I=document.createEvent("Events");}catch(D){I=document.createEvent("UIEvents");}finally{I.initEvent(J,E,C);I.view=L;I.altKey=A;I.ctrlKey=B;I.shiftKey=K;I.metaKey=H;I.keyCode=N;I.charCode=M;}}F.dispatchEvent(I);}else{if(YAHOO.lang.isObject(document.createEventObject)){I=document.createEventObject();I.bubbles=E;I.cancelable=C;I.view=L;I.ctrlKey=B;I.altKey=A;I.shiftKey=K;I.metaKey=H;I.keyCode=(M>0)?M:N;F.fireEvent("on"+J,I);}else{throw new Error("simulateKeyEvent(): No event simulation framework present.");}}},simulateMouseEvent:function(K,P,H,E,Q,J,G,F,D,B,C,A,O,M,I,L){K=YAHOO.util.Dom.get(K);if(!K){throw new Error("simulateMouseEvent(): Invalid target.");}if(YAHOO.lang.isString(P)){P=P.toLowerCase();switch(P){case"mouseover":case"mouseout":case"mousedown":case"mouseup":case"click":case"dblclick":case"mousemove":break;default:throw new Error("simulateMouseEvent(): Event type '"+P+"' not supported.");}}else{throw new Error("simulateMouseEvent(): Event type must be a string.");}if(!YAHOO.lang.isBoolean(H)){H=true;}if(!YAHOO.lang.isBoolean(E)){E=(P!="mousemove");}if(!YAHOO.lang.isObject(Q)){Q=window;}if(!YAHOO.lang.isNumber(J)){J=1;}if(!YAHOO.lang.isNumber(G)){G=0;}if(!YAHOO.lang.isNumber(F)){F=0;}if(!YAHOO.lang.isNumber(D)){D=0;}if(!YAHOO.lang.isNumber(B)){B=0;}if(!YAHOO.lang.isBoolean(C)){C=false;}if(!YAHOO.lang.isBoolean(A)){A=false;}if(!YAHOO.lang.isBoolean(O)){O=false;}if(!YAHOO.lang.isBoolean(M)){M=false;}if(!YAHOO.lang.isNumber(I)){I=0;}var N=null;if(YAHOO.lang.isFunction(document.createEvent)){N=document.createEvent("MouseEvents");if(N.initMouseEvent){N.initMouseEvent(P,H,E,Q,J,G,F,D,B,C,A,O,M,I,L);}else{N=document.createEvent("UIEvents");N.initEvent(P,H,E);N.view=Q;N.detail=J;N.screenX=G;N.screenY=F;N.clientX=D;N.clientY=B;N.ctrlKey=C;N.altKey=A;N.metaKey=M;N.shiftKey=O;N.button=I;N.relatedTarget=L;}if(L&&!N.relatedTarget){if(P=="mouseout"){N.toElement=L;}else{if(P=="mouseover"){N.fromElement=L;}}}K.dispatchEvent(N);}else{if(YAHOO.lang.isObject(document.createEventObject)){N=document.createEventObject();N.bubbles=H;N.cancelable=E;N.view=Q;N.detail=J;N.screenX=G;N.screenY=F;N.clientX=D;N.clientY=B;N.ctrlKey=C;N.altKey=A;N.metaKey=M;N.shiftKey=O;switch(I){case 0:N.button=1;break;case 1:N.button=4;break;case 2:break;default:N.button=0;}N.relatedTarget=L;K.fireEvent("on"+P,N);}else{throw new Error("simulateMouseEvent(): No event simulation framework present.");}}},fireMouseEvent:function(C,B,A){A=A||{};this.simulateMouseEvent(C,B,A.bubbles,A.cancelable,A.view,A.detail,A.screenX,A.screenY,A.clientX,A.clientY,A.ctrlKey,A.altKey,A.shiftKey,A.metaKey,A.button,A.relatedTarget);},click:function(B,A){this.fireMouseEvent(B,"click",A);},dblclick:function(B,A){this.fireMouseEvent(B,"dblclick",A);},mousedown:function(B,A){this.fireMouseEvent(B,"mousedown",A);},mousemove:function(B,A){this.fireMouseEvent(B,"mousemove",A);},mouseout:function(B,A){this.fireMouseEvent(B,"mouseout",A);},mouseover:function(B,A){this.fireMouseEvent(B,"mouseover",A);},mouseup:function(B,A){this.fireMouseEvent(B,"mouseup",A);},fireKeyEvent:function(B,C,A){A=A||{};this.simulateKeyEvent(C,B,A.bubbles,A.cancelable,A.view,A.ctrlKey,A.altKey,A.shiftKey,A.metaKey,A.keyCode,A.charCode);},keydown:function(B,A){this.fireKeyEvent("keydown",B,A);},keypress:function(B,A){this.fireKeyEvent("keypress",B,A);},keyup:function(B,A){this.fireKeyEvent("keyup",B,A);}};YAHOO.register("event-simulate",YAHOO.util.UserAction,{version:"2.8.1",build:"19"});
@@ -1,622 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* DOM event simulation utility
* @module event-simulate
* @namespace YAHOO.util
* @requires yahoo,dom,event
*/
/**
* The UserAction object provides functions that simulate events occurring in
* the browser. Since these are simulated events, they do not behave exactly
* as regular, user-initiated events do, but can be used to test simple
* user interactions safely.
*
* @namespace YAHOO.util
* @class UserAction
* @static
*/
YAHOO.util.UserAction = {
//--------------------------------------------------------------------------
// Generic event methods
//--------------------------------------------------------------------------
/**
* Simulates a key event using the given event information to populate
* the generated event object. This method does browser-equalizing
* calculations to account for differences in the DOM and IE event models
* as well as different browser quirks. Note: keydown causes Safari 2.x to
* crash.
* @method simulateKeyEvent
* @private
* @static
* @param {HTMLElement} target The target of the given event.
* @param {String} type The type of event to fire. This can be any one of
* the following: keyup, keydown, and keypress.
* @param {Boolean} bubbles (Optional) Indicates if the event can be
* bubbled up. DOM Level 3 specifies that all key events bubble by
* default. The default is true.
* @param {Boolean} cancelable (Optional) Indicates if the event can be
* canceled using preventDefault(). DOM Level 3 specifies that all
* key events can be cancelled. The default
* is true.
* @param {Window} view (Optional) The view containing the target. This is
* typically the window object. The default is window.
* @param {Boolean} ctrlKey (Optional) Indicates if one of the CTRL keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} altKey (Optional) Indicates if one of the ALT keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} shiftKey (Optional) Indicates if one of the SHIFT keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} metaKey (Optional) Indicates if one of the META keys
* is pressed while the event is firing. The default is false.
* @param {int} keyCode (Optional) The code for the key that is in use.
* The default is 0.
* @param {int} charCode (Optional) The Unicode code for the character
* associated with the key being used. The default is 0.
*/
simulateKeyEvent : function (target /*:HTMLElement*/, type /*:String*/,
bubbles /*:Boolean*/, cancelable /*:Boolean*/,
view /*:Window*/,
ctrlKey /*:Boolean*/, altKey /*:Boolean*/,
shiftKey /*:Boolean*/, metaKey /*:Boolean*/,
keyCode /*:int*/, charCode /*:int*/) /*:Void*/
{
//check target
target = YAHOO.util.Dom.get(target);
if (!target){
throw new Error("simulateKeyEvent(): Invalid target.");
}
//check event type
if (YAHOO.lang.isString(type)){
type = type.toLowerCase();
switch(type){
case "keyup":
case "keydown":
case "keypress":
break;
case "textevent": //DOM Level 3
type = "keypress";
break;
// @TODO was the fallthrough intentional, if so throw error
default:
throw new Error("simulateKeyEvent(): Event type '" + type + "' not supported.");
}
} else {
throw new Error("simulateKeyEvent(): Event type must be a string.");
}
//setup default values
if (!YAHOO.lang.isBoolean(bubbles)){
bubbles = true; //all key events bubble
}
if (!YAHOO.lang.isBoolean(cancelable)){
cancelable = true; //all key events can be cancelled
}
if (!YAHOO.lang.isObject(view)){
view = window; //view is typically window
}
if (!YAHOO.lang.isBoolean(ctrlKey)){
ctrlKey = false;
}
if (!YAHOO.lang.isBoolean(altKey)){
altKey = false;
}
if (!YAHOO.lang.isBoolean(shiftKey)){
shiftKey = false;
}
if (!YAHOO.lang.isBoolean(metaKey)){
metaKey = false;
}
if (!YAHOO.lang.isNumber(keyCode)){
keyCode = 0;
}
if (!YAHOO.lang.isNumber(charCode)){
charCode = 0;
}
//try to create a mouse event
var customEvent /*:MouseEvent*/ = null;
//check for DOM-compliant browsers first
if (YAHOO.lang.isFunction(document.createEvent)){
try {
//try to create key event
customEvent = document.createEvent("KeyEvents");
/*
* Interesting problem: Firefox implemented a non-standard
* version of initKeyEvent() based on DOM Level 2 specs.
* Key event was removed from DOM Level 2 and re-introduced
* in DOM Level 3 with a different interface. Firefox is the
* only browser with any implementation of Key Events, so for
* now, assume it's Firefox if the above line doesn't error.
*/
//TODO: Decipher between Firefox's implementation and a correct one.
customEvent.initKeyEvent(type, bubbles, cancelable, view, ctrlKey,
altKey, shiftKey, metaKey, keyCode, charCode);
} catch (ex /*:Error*/){
/*
* If it got here, that means key events aren't officially supported.
* Safari/WebKit is a real problem now. WebKit 522 won't let you
* set keyCode, charCode, or other properties if you use a
* UIEvent, so we first must try to create a generic event. The
* fun part is that this will throw an error on Safari 2.x. The
* end result is that we need another try...catch statement just to
* deal with this mess.
*/
try {
//try to create generic event - will fail in Safari 2.x
customEvent = document.createEvent("Events");
} catch (uierror /*:Error*/){
//the above failed, so create a UIEvent for Safari 2.x
customEvent = document.createEvent("UIEvents");
} finally {
customEvent.initEvent(type, bubbles, cancelable);
//initialize
customEvent.view = view;
customEvent.altKey = altKey;
customEvent.ctrlKey = ctrlKey;
customEvent.shiftKey = shiftKey;
customEvent.metaKey = metaKey;
customEvent.keyCode = keyCode;
customEvent.charCode = charCode;
}
}
//fire the event
target.dispatchEvent(customEvent);
} else if (YAHOO.lang.isObject(document.createEventObject)){ //IE
//create an IE event object
customEvent = document.createEventObject();
//assign available properties
customEvent.bubbles = bubbles;
customEvent.cancelable = cancelable;
customEvent.view = view;
customEvent.ctrlKey = ctrlKey;
customEvent.altKey = altKey;
customEvent.shiftKey = shiftKey;
customEvent.metaKey = metaKey;
/*
* IE doesn't support charCode explicitly. CharCode should
* take precedence over any keyCode value for accurate
* representation.
*/
customEvent.keyCode = (charCode > 0) ? charCode : keyCode;
//fire the event
target.fireEvent("on" + type, customEvent);
} else {
throw new Error("simulateKeyEvent(): No event simulation framework present.");
}
},
/**
* Simulates a mouse event using the given event information to populate
* the generated event object. This method does browser-equalizing
* calculations to account for differences in the DOM and IE event models
* as well as different browser quirks.
* @method simulateMouseEvent
* @private
* @static
* @param {HTMLElement} target The target of the given event.
* @param {String} type The type of event to fire. This can be any one of
* the following: click, dblclick, mousedown, mouseup, mouseout,
* mouseover, and mousemove.
* @param {Boolean} bubbles (Optional) Indicates if the event can be
* bubbled up. DOM Level 2 specifies that all mouse events bubble by
* default. The default is true.
* @param {Boolean} cancelable (Optional) Indicates if the event can be
* canceled using preventDefault(). DOM Level 2 specifies that all
* mouse events except mousemove can be cancelled. The default
* is true for all events except mousemove, for which the default
* is false.
* @param {Window} view (Optional) The view containing the target. This is
* typically the window object. The default is window.
* @param {int} detail (Optional) The number of times the mouse button has
* been used. The default value is 1.
* @param {int} screenX (Optional) The x-coordinate on the screen at which
* point the event occured. The default is 0.
* @param {int} screenY (Optional) The y-coordinate on the screen at which
* point the event occured. The default is 0.
* @param {int} clientX (Optional) The x-coordinate on the client at which
* point the event occured. The default is 0.
* @param {int} clientY (Optional) The y-coordinate on the client at which
* point the event occured. The default is 0.
* @param {Boolean} ctrlKey (Optional) Indicates if one of the CTRL keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} altKey (Optional) Indicates if one of the ALT keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} shiftKey (Optional) Indicates if one of the SHIFT keys
* is pressed while the event is firing. The default is false.
* @param {Boolean} metaKey (Optional) Indicates if one of the META keys
* is pressed while the event is firing. The default is false.
* @param {int} button (Optional) The button being pressed while the event
* is executing. The value should be 0 for the primary mouse button
* (typically the left button), 1 for the terciary mouse button
* (typically the middle button), and 2 for the secondary mouse button
* (typically the right button). The default is 0.
* @param {HTMLElement} relatedTarget (Optional) For mouseout events,
* this is the element that the mouse has moved to. For mouseover
* events, this is the element that the mouse has moved from. This
* argument is ignored for all other events. The default is null.
*/
simulateMouseEvent : function (target /*:HTMLElement*/, type /*:String*/,
bubbles /*:Boolean*/, cancelable /*:Boolean*/,
view /*:Window*/, detail /*:int*/,
screenX /*:int*/, screenY /*:int*/,
clientX /*:int*/, clientY /*:int*/,
ctrlKey /*:Boolean*/, altKey /*:Boolean*/,
shiftKey /*:Boolean*/, metaKey /*:Boolean*/,
button /*:int*/, relatedTarget /*:HTMLElement*/) /*:Void*/
{
//check target
target = YAHOO.util.Dom.get(target);
if (!target){
throw new Error("simulateMouseEvent(): Invalid target.");
}
//check event type
if (YAHOO.lang.isString(type)){
type = type.toLowerCase();
switch(type){
case "mouseover":
case "mouseout":
case "mousedown":
case "mouseup":
case "click":
case "dblclick":
case "mousemove":
break;
default:
throw new Error("simulateMouseEvent(): Event type '" + type + "' not supported.");
}
} else {
throw new Error("simulateMouseEvent(): Event type must be a string.");
}
//setup default values
if (!YAHOO.lang.isBoolean(bubbles)){
bubbles = true; //all mouse events bubble
}
if (!YAHOO.lang.isBoolean(cancelable)){
cancelable = (type != "mousemove"); //mousemove is the only one that can't be cancelled
}
if (!YAHOO.lang.isObject(view)){
view = window; //view is typically window
}
if (!YAHOO.lang.isNumber(detail)){
detail = 1; //number of mouse clicks must be at least one
}
if (!YAHOO.lang.isNumber(screenX)){
screenX = 0;
}
if (!YAHOO.lang.isNumber(screenY)){
screenY = 0;
}
if (!YAHOO.lang.isNumber(clientX)){
clientX = 0;
}
if (!YAHOO.lang.isNumber(clientY)){
clientY = 0;
}
if (!YAHOO.lang.isBoolean(ctrlKey)){
ctrlKey = false;
}
if (!YAHOO.lang.isBoolean(altKey)){
altKey = false;
}
if (!YAHOO.lang.isBoolean(shiftKey)){
shiftKey = false;
}
if (!YAHOO.lang.isBoolean(metaKey)){
metaKey = false;
}
if (!YAHOO.lang.isNumber(button)){
button = 0;
}
//try to create a mouse event
var customEvent /*:MouseEvent*/ = null;
//check for DOM-compliant browsers first
if (YAHOO.lang.isFunction(document.createEvent)){
customEvent = document.createEvent("MouseEvents");
//Safari 2.x (WebKit 418) still doesn't implement initMouseEvent()
if (customEvent.initMouseEvent){
customEvent.initMouseEvent(type, bubbles, cancelable, view, detail,
screenX, screenY, clientX, clientY,
ctrlKey, altKey, shiftKey, metaKey,
button, relatedTarget);
} else { //Safari
//the closest thing available in Safari 2.x is UIEvents
customEvent = document.createEvent("UIEvents");
customEvent.initEvent(type, bubbles, cancelable);
customEvent.view = view;
customEvent.detail = detail;
customEvent.screenX = screenX;
customEvent.screenY = screenY;
customEvent.clientX = clientX;
customEvent.clientY = clientY;
customEvent.ctrlKey = ctrlKey;
customEvent.altKey = altKey;
customEvent.metaKey = metaKey;
customEvent.shiftKey = shiftKey;
customEvent.button = button;
customEvent.relatedTarget = relatedTarget;
}
/*
* Check to see if relatedTarget has been assigned. Firefox
* versions less than 2.0 don't allow it to be assigned via
* initMouseEvent() and the property is readonly after event
* creation, so in order to keep YAHOO.util.getRelatedTarget()
* working, assign to the IE proprietary toElement property
* for mouseout event and fromElement property for mouseover
* event.
*/
if (relatedTarget && !customEvent.relatedTarget){
if (type == "mouseout"){
customEvent.toElement = relatedTarget;
} else if (type == "mouseover"){
customEvent.fromElement = relatedTarget;
}
}
//fire the event
target.dispatchEvent(customEvent);
} else if (YAHOO.lang.isObject(document.createEventObject)){ //IE
//create an IE event object
customEvent = document.createEventObject();
//assign available properties
customEvent.bubbles = bubbles;
customEvent.cancelable = cancelable;
customEvent.view = view;
customEvent.detail = detail;
customEvent.screenX = screenX;
customEvent.screenY = screenY;
customEvent.clientX = clientX;
customEvent.clientY = clientY;
customEvent.ctrlKey = ctrlKey;
customEvent.altKey = altKey;
customEvent.metaKey = metaKey;
customEvent.shiftKey = shiftKey;
//fix button property for IE's wacky implementation
switch(button){
case 0:
customEvent.button = 1;
break;
case 1:
customEvent.button = 4;
break;
case 2:
//leave as is
break;
default:
customEvent.button = 0;
}
/*
* Have to use relatedTarget because IE won't allow assignment
* to toElement or fromElement on generic events. This keeps
* YAHOO.util.customEvent.getRelatedTarget() functional.
*/
customEvent.relatedTarget = relatedTarget;
//fire the event
target.fireEvent("on" + type, customEvent);
} else {
throw new Error("simulateMouseEvent(): No event simulation framework present.");
}
},
//--------------------------------------------------------------------------
// Mouse events
//--------------------------------------------------------------------------
/**
* Simulates a mouse event on a particular element.
* @param {HTMLElement} target The element to click on.
* @param {String} type The type of event to fire. This can be any one of
* the following: click, dblclick, mousedown, mouseup, mouseout,
* mouseover, and mousemove.
* @param {Object} options Additional event options (use DOM standard names).
* @method mouseEvent
* @static
*/
fireMouseEvent : function (target /*:HTMLElement*/, type /*:String*/,
options /*:Object*/) /*:Void*/
{
options = options || {};
this.simulateMouseEvent(target, type, options.bubbles,
options.cancelable, options.view, options.detail, options.screenX,
options.screenY, options.clientX, options.clientY, options.ctrlKey,
options.altKey, options.shiftKey, options.metaKey, options.button,
options.relatedTarget);
},
/**
* Simulates a click on a particular element.
* @param {HTMLElement} target The element to click on.
* @param {Object} options Additional event options (use DOM standard names).
* @method click
* @static
*/
click : function (target /*:HTMLElement*/, options /*:Object*/) /*:Void*/ {
this.fireMouseEvent(target, "click", options);
},
/**
* Simulates a double click on a particular element.
* @param {HTMLElement} target The element to double click on.
* @param {Object} options Additional event options (use DOM standard names).
* @method dblclick
* @static
*/
dblclick : function (target /*:HTMLElement*/, options /*:Object*/) /*:Void*/ {
this.fireMouseEvent( target, "dblclick", options);
},
/**
* Simulates a mousedown on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mousedown
* @static
*/
mousedown : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mousedown", options);
},
/**
* Simulates a mousemove on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mousemove
* @static
*/
mousemove : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mousemove", options);
},
/**
* Simulates a mouseout event on a particular element. Use "relatedTarget"
* on the options object to specify where the mouse moved to.
* Quirks: Firefox less than 2.0 doesn't set relatedTarget properly, so
* toElement is assigned in its place. IE doesn't allow toElement to be
* be assigned, so relatedTarget is assigned in its place. Both of these
* concessions allow YAHOO.util.Event.getRelatedTarget() to work correctly
* in both browsers.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mouseout
* @static
*/
mouseout : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mouseout", options);
},
/**
* Simulates a mouseover event on a particular element. Use "relatedTarget"
* on the options object to specify where the mouse moved from.
* Quirks: Firefox less than 2.0 doesn't set relatedTarget properly, so
* fromElement is assigned in its place. IE doesn't allow fromElement to be
* be assigned, so relatedTarget is assigned in its place. Both of these
* concessions allow YAHOO.util.Event.getRelatedTarget() to work correctly
* in both browsers.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mouseover
* @static
*/
mouseover : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mouseover", options);
},
/**
* Simulates a mouseup on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method mouseup
* @static
*/
mouseup : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireMouseEvent(target, "mouseup", options);
},
//--------------------------------------------------------------------------
// Key events
//--------------------------------------------------------------------------
/**
* Fires an event that normally would be fired by the keyboard (keyup,
* keydown, keypress). Make sure to specify either keyCode or charCode as
* an option.
* @private
* @param {String} type The type of event ("keyup", "keydown" or "keypress").
* @param {HTMLElement} target The target of the event.
* @param {Object} options Options for the event. Either keyCode or charCode
* are required.
* @method fireKeyEvent
* @static
*/
fireKeyEvent : function (type /*:String*/, target /*:HTMLElement*/,
options /*:Object*/) /*:Void*/
{
options = options || {};
this.simulateKeyEvent(target, type, options.bubbles,
options.cancelable, options.view, options.ctrlKey,
options.altKey, options.shiftKey, options.metaKey,
options.keyCode, options.charCode);
},
/**
* Simulates a keydown event on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method keydown
* @static
*/
keydown : function (target /*:HTMLElement*/, options /*:Object*/) /*:Void*/ {
this.fireKeyEvent("keydown", target, options);
},
/**
* Simulates a keypress on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method keypress
* @static
*/
keypress : function (target /*:HTMLElement*/, options /*:Object*/) /*:Void*/ {
this.fireKeyEvent("keypress", target, options);
},
/**
* Simulates a keyup event on a particular element.
* @param {HTMLElement} target The element to act on.
* @param {Object} options Additional event options (use DOM standard names).
* @method keyup
* @static
*/
keyup : function (target /*:HTMLElement*/, options /*Object*/) /*:Void*/ {
this.fireKeyEvent("keyup", target, options);
}
};
YAHOO.register("event-simulate", YAHOO.util.UserAction, {version: "2.8.1", build: "19"});
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
-7
View File
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
-56
View File
@@ -1,56 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* YUI Fonts
* @module fonts
* @namespace yui-
* @requires
*/
/**
* Percents could work for IE, but for backCompat purposes, we are using keywords.
* x-small is for IE6/7 quirks mode.
*/
body {
font:13px/1.231 arial,helvetica,clean,sans-serif;
/* for IE6/7 */
*font-size:small;
/* for IE Quirks Mode */
*font:x-small;
}
/**
* Nudge down to get to 13px equivalent for these form elements
*/
select,
input,
button,
textarea,
button {
font:99% arial,helvetica,clean,sans-serif;
}
/**
* To help tables remember to inherit
*/
table {
font-size:inherit;
font:100%;
}
/**
* Bump up IE to get to 13px equivalent for these fixed-width elements
*/
pre,
code,
kbd,
samp,
tt {
font-family:monospace;
*font-size:108%;
line-height:100%;
}
-773
View File
@@ -1,773 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* Provides a mechanism to fetch remote resources and
* insert them into a document
* @module get
* @requires yahoo
*/
/**
* Fetches and inserts one or more script or link nodes into the document
* @namespace YAHOO.util
* @class YAHOO.util.Get
*/
YAHOO.util.Get = function() {
/**
* hash of queues to manage multiple requests
* @property queues
* @private
*/
var queues={},
/**
* queue index used to generate transaction ids
* @property qidx
* @type int
* @private
*/
qidx=0,
/**
* node index used to generate unique node ids
* @property nidx
* @type int
* @private
*/
nidx=0,
// ridx=0,
// sandboxFrame=null,
/**
* interal property used to prevent multiple simultaneous purge
* processes
* @property purging
* @type boolean
* @private
*/
purging=false,
ua=YAHOO.env.ua,
lang=YAHOO.lang;
/**
* Generates an HTML element, this is not appended to a document
* @method _node
* @param type {string} the type of element
* @param attr {string} the attributes
* @param win {Window} optional window to create the element in
* @return {HTMLElement} the generated node
* @private
*/
var _node = function(type, attr, win) {
var w = win || window, d=w.document, n=d.createElement(type);
for (var i in attr) {
if (attr[i] && YAHOO.lang.hasOwnProperty(attr, i)) {
n.setAttribute(i, attr[i]);
}
}
return n;
};
/**
* Generates a link node
* @method _linkNode
* @param url {string} the url for the css file
* @param win {Window} optional window to create the node in
* @return {HTMLElement} the generated node
* @private
*/
var _linkNode = function(url, win, attributes) {
var o = {
id: "yui__dyn_" + (nidx++),
type: "text/css",
rel: "stylesheet",
href: url
};
if (attributes) {
lang.augmentObject(o, attributes);
}
return _node("link", o, win);
};
/**
* Generates a script node
* @method _scriptNode
* @param url {string} the url for the script file
* @param win {Window} optional window to create the node in
* @return {HTMLElement} the generated node
* @private
*/
var _scriptNode = function(url, win, attributes) {
var o = {
id: "yui__dyn_" + (nidx++),
type: "text/javascript",
src: url
};
if (attributes) {
lang.augmentObject(o, attributes);
}
return _node("script", o, win);
};
/**
* Returns the data payload for callback functions
* @method _returnData
* @private
*/
var _returnData = function(q, msg) {
return {
tId: q.tId,
win: q.win,
data: q.data,
nodes: q.nodes,
msg: msg,
purge: function() {
_purge(this.tId);
}
};
};
var _get = function(nId, tId) {
var q = queues[tId],
n = (lang.isString(nId)) ? q.win.document.getElementById(nId) : nId;
if (!n) {
_fail(tId, "target node not found: " + nId);
}
return n;
};
/*
* The request failed, execute fail handler with whatever
* was accomplished. There isn't a failure case at the
* moment unless you count aborted transactions
* @method _fail
* @param id {string} the id of the request
* @private
*/
var _fail = function(id, msg) {
YAHOO.log("get failure: " + msg, "warn", "Get");
var q = queues[id];
// execute failure callback
if (q.onFailure) {
var sc=q.scope || q.win;
q.onFailure.call(sc, _returnData(q, msg));
}
};
/**
* The request is complete, so executing the requester's callback
* @method _finish
* @param id {string} the id of the request
* @private
*/
var _finish = function(id) {
YAHOO.log("Finishing transaction " + id);
var q = queues[id];
q.finished = true;
if (q.aborted) {
var msg = "transaction " + id + " was aborted";
_fail(id, msg);
return;
}
// execute success callback
if (q.onSuccess) {
var sc=q.scope || q.win;
q.onSuccess.call(sc, _returnData(q));
}
};
/**
* Timeout detected
* @method _timeout
* @param id {string} the id of the request
* @private
*/
var _timeout = function(id) {
YAHOO.log("Timeout " + id, "info", "get");
var q = queues[id];
if (q.onTimeout) {
var sc=q.scope || q;
q.onTimeout.call(sc, _returnData(q));
}
};
/**
* Loads the next item for a given request
* @method _next
* @param id {string} the id of the request
* @param loaded {string} the url that was just loaded, if any
* @private
*/
var _next = function(id, loaded) {
YAHOO.log("_next: " + id + ", loaded: " + loaded, "info", "Get");
var q = queues[id];
if (q.timer) {
// Y.log('cancel timer');
q.timer.cancel();
}
if (q.aborted) {
var msg = "transaction " + id + " was aborted";
_fail(id, msg);
return;
}
if (loaded) {
q.url.shift();
if (q.varName) {
q.varName.shift();
}
} else {
// This is the first pass: make sure the url is an array
q.url = (lang.isString(q.url)) ? [q.url] : q.url;
if (q.varName) {
q.varName = (lang.isString(q.varName)) ? [q.varName] : q.varName;
}
}
var w=q.win, d=w.document, h=d.getElementsByTagName("head")[0], n;
if (q.url.length === 0) {
// Safari 2.x workaround - There is no way to know when
// a script is ready in versions of Safari prior to 3.x.
// Adding an extra node reduces the problem, but doesn't
// eliminate it completely because the browser executes
// them asynchronously.
if (q.type === "script" && ua.webkit && ua.webkit < 420 &&
!q.finalpass && !q.varName) {
// Add another script node. This does not guarantee that the
// scripts will execute in order, but it does appear to fix the
// problem on fast connections more effectively than using an
// arbitrary timeout. It is possible that the browser does
// block subsequent script execution in this case for a limited
// time.
var extra = _scriptNode(null, q.win, q.attributes);
extra.innerHTML='YAHOO.util.Get._finalize("' + id + '");';
q.nodes.push(extra); h.appendChild(extra);
} else {
_finish(id);
}
return;
}
var url = q.url[0];
// if the url is undefined, this is probably a trailing comma problem in IE
if (!url) {
q.url.shift();
YAHOO.log('skipping empty url');
return _next(id);
}
YAHOO.log("attempting to load " + url, "info", "Get");
if (q.timeout) {
// Y.log('create timer');
q.timer = lang.later(q.timeout, q, _timeout, id);
}
if (q.type === "script") {
n = _scriptNode(url, w, q.attributes);
} else {
n = _linkNode(url, w, q.attributes);
}
// track this node's load progress
_track(q.type, n, id, url, w, q.url.length);
// add the node to the queue so we can return it to the user supplied callback
q.nodes.push(n);
// add it to the head or insert it before 'insertBefore'
if (q.insertBefore) {
var s = _get(q.insertBefore, id);
if (s) {
s.parentNode.insertBefore(n, s);
}
} else {
h.appendChild(n);
}
YAHOO.log("Appending node: " + url, "info", "Get");
// FireFox does not support the onload event for link nodes, so there is
// no way to make the css requests synchronous. This means that the css
// rules in multiple files could be applied out of order in this browser
// if a later request returns before an earlier one. Safari too.
if ((ua.webkit || ua.gecko) && q.type === "css") {
_next(id, url);
}
};
/**
* Removes processed queues and corresponding nodes
* @method _autoPurge
* @private
*/
var _autoPurge = function() {
if (purging) {
return;
}
purging = true;
for (var i in queues) {
var q = queues[i];
if (q.autopurge && q.finished) {
_purge(q.tId);
delete queues[i];
}
}
purging = false;
};
/**
* Removes the nodes for the specified queue
* @method _purge
* @private
*/
var _purge = function(tId) {
if (queues[tId]) {
var q = queues[tId],
nodes = q.nodes,
l = nodes.length,
d = q.win.document,
h = d.getElementsByTagName("head")[0],
sib, i, node, attr;
if (q.insertBefore) {
sib = _get(q.insertBefore, tId);
if (sib) {
h = sib.parentNode;
}
}
for (i=0; i<l; i=i+1) {
node = nodes[i];
if (node.clearAttributes) {
node.clearAttributes();
} else {
for (attr in node) {
delete node[attr];
}
}
h.removeChild(node);
}
q.nodes = [];
}
};
/**
* Saves the state for the request and begins loading
* the requested urls
* @method queue
* @param type {string} the type of node to insert
* @param url {string} the url to load
* @param opts the hash of options for this request
* @private
*/
var _queue = function(type, url, opts) {
var id = "q" + (qidx++);
opts = opts || {};
if (qidx % YAHOO.util.Get.PURGE_THRESH === 0) {
_autoPurge();
}
queues[id] = lang.merge(opts, {
tId: id,
type: type,
url: url,
finished: false,
aborted: false,
nodes: []
});
var q = queues[id];
q.win = q.win || window;
q.scope = q.scope || q.win;
q.autopurge = ("autopurge" in q) ? q.autopurge :
(type === "script") ? true : false;
if (opts.charset) {
q.attributes = q.attributes || {};
q.attributes.charset = opts.charset;
}
lang.later(0, q, _next, id);
return {
tId: id
};
};
/**
* Detects when a node has been loaded. In the case of
* script nodes, this does not guarantee that contained
* script is ready to use.
* @method _track
* @param type {string} the type of node to track
* @param n {HTMLElement} the node to track
* @param id {string} the id of the request
* @param url {string} the url that is being loaded
* @param win {Window} the targeted window
* @param qlength the number of remaining items in the queue,
* including this one
* @param trackfn {Function} function to execute when finished
* the default is _next
* @private
*/
var _track = function(type, n, id, url, win, qlength, trackfn) {
var f = trackfn || _next;
// IE supports the readystatechange event for script and css nodes
if (ua.ie) {
n.onreadystatechange = function() {
var rs = this.readyState;
if ("loaded" === rs || "complete" === rs) {
YAHOO.log(id + " onload " + url, "info", "Get");
n.onreadystatechange = null;
f(id, url);
}
};
// webkit prior to 3.x is problemmatic
} else if (ua.webkit) {
if (type === "script") {
// Safari 3.x supports the load event for script nodes (DOM2)
if (ua.webkit >= 420) {
n.addEventListener("load", function() {
YAHOO.log(id + " DOM2 onload " + url, "info", "Get");
f(id, url);
});
// Nothing can be done with Safari < 3.x except to pause and hope
// for the best, particularly after last script is inserted. The
// scripts will always execute in the order they arrive, not
// necessarily the order in which they were inserted. To support
// script nodes with complete reliability in these browsers, script
// nodes either need to invoke a function in the window once they
// are loaded or the implementer needs to provide a well-known
// property that the utility can poll for.
} else {
// Poll for the existence of the named variable, if it
// was supplied.
var q = queues[id];
if (q.varName) {
var freq=YAHOO.util.Get.POLL_FREQ;
YAHOO.log("Polling for " + q.varName[0]);
q.maxattempts = YAHOO.util.Get.TIMEOUT/freq;
q.attempts = 0;
q._cache = q.varName[0].split(".");
q.timer = lang.later(freq, q, function(o) {
var a=this._cache, l=a.length, w=this.win, i;
for (i=0; i<l; i=i+1) {
w = w[a[i]];
if (!w) {
// if we have exausted our attempts, give up
this.attempts++;
if (this.attempts++ > this.maxattempts) {
var msg = "Over retry limit, giving up";
q.timer.cancel();
_fail(id, msg);
} else {
YAHOO.log(a[i] + " failed, retrying");
}
return;
}
}
YAHOO.log("Safari poll complete");
q.timer.cancel();
f(id, url);
}, null, true);
} else {
lang.later(YAHOO.util.Get.POLL_FREQ, null, f, [id, url]);
}
}
}
// FireFox and Opera support onload (but not DOM2 in FF) handlers for
// script nodes. Opera, but not FF, supports the onload event for link
// nodes.
} else {
n.onload = function() {
YAHOO.log(id + " onload " + url, "info", "Get");
f(id, url);
};
}
};
return {
/**
* The default poll freqency in ms, when needed
* @property POLL_FREQ
* @static
* @type int
* @default 10
*/
POLL_FREQ: 10,
/**
* The number of request required before an automatic purge.
* property PURGE_THRESH
* @static
* @type int
* @default 20
*/
PURGE_THRESH: 20,
/**
* The length time to poll for varName when loading a script in
* Safari 2.x before the transaction fails.
* property TIMEOUT
* @static
* @type int
* @default 2000
*/
TIMEOUT: 2000,
/**
* Called by the the helper for detecting script load in Safari
* @method _finalize
* @param id {string} the transaction id
* @private
*/
_finalize: function(id) {
YAHOO.log(id + " finalized ", "info", "Get");
lang.later(0, null, _finish, id);
},
/**
* Abort a transaction
* @method abort
* @param {string|object} either the tId or the object returned from
* script() or css()
*/
abort: function(o) {
var id = (lang.isString(o)) ? o : o.tId;
var q = queues[id];
if (q) {
YAHOO.log("Aborting " + id, "info", "Get");
q.aborted = true;
}
},
/**
* Fetches and inserts one or more script nodes into the head
* of the current document or the document in a specified window.
*
* @method script
* @static
* @param url {string|string[]} the url or urls to the script(s)
* @param opts {object} Options:
* <dl>
* <dt>onSuccess</dt>
* <dd>
* callback to execute when the script(s) are finished loading
* The callback receives an object back with the following
* data:
* <dl>
* <dt>win</dt>
* <dd>the window the script(s) were inserted into</dd>
* <dt>data</dt>
* <dd>the data object passed in when the request was made</dd>
* <dt>nodes</dt>
* <dd>An array containing references to the nodes that were
* inserted</dd>
* <dt>purge</dt>
* <dd>A function that, when executed, will remove the nodes
* that were inserted</dd>
* <dt>
* </dl>
* </dd>
* <dt>onFailure</dt>
* <dd>
* callback to execute when the script load operation fails
* The callback receives an object back with the following
* data:
* <dl>
* <dt>win</dt>
* <dd>the window the script(s) were inserted into</dd>
* <dt>data</dt>
* <dd>the data object passed in when the request was made</dd>
* <dt>nodes</dt>
* <dd>An array containing references to the nodes that were
* inserted successfully</dd>
* <dt>purge</dt>
* <dd>A function that, when executed, will remove any nodes
* that were inserted</dd>
* <dt>
* </dl>
* </dd>
* <dt>onTimeout</dt>
* <dd>
* callback to execute when a timeout occurs.
* The callback receives an object back with the following
* data:
* <dl>
* <dt>win</dt>
* <dd>the window the script(s) were inserted into</dd>
* <dt>data</dt>
* <dd>the data object passed in when the request was made</dd>
* <dt>nodes</dt>
* <dd>An array containing references to the nodes that were
* inserted</dd>
* <dt>purge</dt>
* <dd>A function that, when executed, will remove the nodes
* that were inserted</dd>
* <dt>
* </dl>
* </dd>
* <dt>scope</dt>
* <dd>the execution context for the callbacks</dd>
* <dt>win</dt>
* <dd>a window other than the one the utility occupies</dd>
* <dt>autopurge</dt>
* <dd>
* setting to true will let the utilities cleanup routine purge
* the script once loaded
* </dd>
* <dt>data</dt>
* <dd>
* data that is supplied to the callback when the script(s) are
* loaded.
* </dd>
* <dt>varName</dt>
* <dd>
* variable that should be available when a script is finished
* loading. Used to help Safari 2.x and below with script load
* detection. The type of this property should match what was
* passed into the url parameter: if loading a single url, a
* string can be supplied. If loading multiple scripts, you
* must supply an array that contains the variable name for
* each script.
* </dd>
* <dt>insertBefore</dt>
* <dd>node or node id that will become the new node's nextSibling</dd>
* </dl>
* <dt>charset</dt>
* <dd>Node charset, deprecated, use 'attributes'</dd>
* <dt>attributes</dt>
* <dd>A hash of attributes to apply to dynamic nodes.</dd>
* <dt>timeout</dt>
* <dd>Number of milliseconds to wait before aborting and firing the timeout event</dd>
* <pre>
* // assumes yahoo, dom, and event are already on the page
* &nbsp;&nbsp;YAHOO.util.Get.script(
* &nbsp;&nbsp;["http://yui.yahooapis.com/2.7.0/build/dragdrop/dragdrop-min.js",
* &nbsp;&nbsp;&nbsp;"http://yui.yahooapis.com/2.7.0/build/animation/animation-min.js"], &#123;
* &nbsp;&nbsp;&nbsp;&nbsp;onSuccess: function(o) &#123;
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YAHOO.log(o.data); // foo
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new YAHOO.util.DDProxy("dd1"); // also new o.reference("dd1"); would work
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.log("won't cause error because YAHOO is the scope");
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.log(o.nodes.length === 2) // true
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// o.purge(); // optionally remove the script nodes immediately
* &nbsp;&nbsp;&nbsp;&nbsp;&#125;,
* &nbsp;&nbsp;&nbsp;&nbsp;onFailure: function(o) &#123;
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YAHOO.log("transaction failed");
* &nbsp;&nbsp;&nbsp;&nbsp;&#125;,
* &nbsp;&nbsp;&nbsp;&nbsp;data: "foo",
* &nbsp;&nbsp;&nbsp;&nbsp;timeout: 10000, // 10 second timeout
* &nbsp;&nbsp;&nbsp;&nbsp;scope: YAHOO,
* &nbsp;&nbsp;&nbsp;&nbsp;// win: otherframe // target another window/frame
* &nbsp;&nbsp;&nbsp;&nbsp;autopurge: true // allow the utility to choose when to remove the nodes
* &nbsp;&nbsp;&#125;);
* </pre>
* @return {tId: string} an object containing info about the transaction
*/
script: function(url, opts) { return _queue("script", url, opts); },
/**
* Fetches and inserts one or more css link nodes into the
* head of the current document or the document in a specified
* window.
* @method css
* @static
* @param url {string} the url or urls to the css file(s)
* @param opts Options:
* <dl>
* <dt>onSuccess</dt>
* <dd>
* callback to execute when the css file(s) are finished loading
* The callback receives an object back with the following
* data:
* <dl>win</dl>
* <dd>the window the link nodes(s) were inserted into</dd>
* <dt>data</dt>
* <dd>the data object passed in when the request was made</dd>
* <dt>nodes</dt>
* <dd>An array containing references to the nodes that were
* inserted</dd>
* <dt>purge</dt>
* <dd>A function that, when executed, will remove the nodes
* that were inserted</dd>
* <dt>
* </dl>
* </dd>
* <dt>scope</dt>
* <dd>the execution context for the callbacks</dd>
* <dt>win</dt>
* <dd>a window other than the one the utility occupies</dd>
* <dt>data</dt>
* <dd>
* data that is supplied to the callbacks when the nodes(s) are
* loaded.
* </dd>
* <dt>insertBefore</dt>
* <dd>node or node id that will become the new node's nextSibling</dd>
* <dt>charset</dt>
* <dd>Node charset, deprecated, use 'attributes'</dd>
* <dt>attributes</dt>
* <dd>A hash of attributes to apply to dynamic nodes.</dd>
* </dl>
* <pre>
* YAHOO.util.Get.css("http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css");
* </pre>
* <pre>
* YAHOO.util.Get.css(["http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css",
* "http://yui.yahooapis.com/2.7.0/build/logger/assets/skins/sam/logger.css"]);
* </pre>
* @return {tId: string} an object containing info about the transaction
*/
css: function(url, opts) {
return _queue("css", url, opts);
}
};
}();
YAHOO.register("get", YAHOO.util.Get, {version: "2.8.1", build: "19"});
-7
View File
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V]);}}return Z;};var I=function(U,V,T){var W={id:"yui__dyn_"+(R++),type:"text/css",rel:"stylesheet",href:U};if(T){S.augmentObject(W,T);}return J("link",W,V);};var P=function(U,V,T){var W={id:"yui__dyn_"+(R++),type:"text/javascript",src:U};if(T){S.augmentObject(W,T);}return J("script",W,V);};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId);}};};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T);}return V;};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V));}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return;}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T));}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.scope||T;T.onTimeout.call(U,A(T));}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel();}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return;}if(Z){U.url.shift();if(U.varName){U.varName.shift();}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName;}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.attributes);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y);}else{C(V);}return;}var T=U.url[0];if(!T){U.url.shift();return G(V);}if(U.timeout){U.timer=S.later(U.timeout,U,O,V);}if(U.type==="script"){W=P(T,c,U.attributes);}else{W=I(T,c,U.attributes);}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e);}}else{a.appendChild(W);}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T);}};var K=function(){if(E){return;}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T];}}E=false;};var D=function(Z){if(M[Z]){var T=M[Z],U=T.nodes,X=U.length,c=T.win.document,a=c.getElementsByTagName("head")[0],V,Y,W,b;if(T.insertBefore){V=B(T.insertBefore,Z);if(V){a=V.parentNode;}}for(Y=0;Y<X;Y=Y+1){W=U[Y];if(W.clearAttributes){W.clearAttributes();}else{for(b in W){delete W[b];}}a.removeChild(W);}T.nodes=[];}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K();}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge" in W)?W.autopurge:(U==="script")?true:false;if(V.charset){W.attributes=W.attributes||{};W.attributes.charset=V.charset;}S.later(0,W,G,X);return{tId:X};};var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=null;a(W,U);}};}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if(this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h);}else{}return;}}T.timer.cancel();a(W,U);},null,true);}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U]);}}}}else{X.onload=function(){a(W,U);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T);},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:function(T,U){return H("css",T,U);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.8.1",build:"19"});
-755
View File
@@ -1,755 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* Provides a mechanism to fetch remote resources and
* insert them into a document
* @module get
* @requires yahoo
*/
/**
* Fetches and inserts one or more script or link nodes into the document
* @namespace YAHOO.util
* @class YAHOO.util.Get
*/
YAHOO.util.Get = function() {
/**
* hash of queues to manage multiple requests
* @property queues
* @private
*/
var queues={},
/**
* queue index used to generate transaction ids
* @property qidx
* @type int
* @private
*/
qidx=0,
/**
* node index used to generate unique node ids
* @property nidx
* @type int
* @private
*/
nidx=0,
// ridx=0,
// sandboxFrame=null,
/**
* interal property used to prevent multiple simultaneous purge
* processes
* @property purging
* @type boolean
* @private
*/
purging=false,
ua=YAHOO.env.ua,
lang=YAHOO.lang;
/**
* Generates an HTML element, this is not appended to a document
* @method _node
* @param type {string} the type of element
* @param attr {string} the attributes
* @param win {Window} optional window to create the element in
* @return {HTMLElement} the generated node
* @private
*/
var _node = function(type, attr, win) {
var w = win || window, d=w.document, n=d.createElement(type);
for (var i in attr) {
if (attr[i] && YAHOO.lang.hasOwnProperty(attr, i)) {
n.setAttribute(i, attr[i]);
}
}
return n;
};
/**
* Generates a link node
* @method _linkNode
* @param url {string} the url for the css file
* @param win {Window} optional window to create the node in
* @return {HTMLElement} the generated node
* @private
*/
var _linkNode = function(url, win, attributes) {
var o = {
id: "yui__dyn_" + (nidx++),
type: "text/css",
rel: "stylesheet",
href: url
};
if (attributes) {
lang.augmentObject(o, attributes);
}
return _node("link", o, win);
};
/**
* Generates a script node
* @method _scriptNode
* @param url {string} the url for the script file
* @param win {Window} optional window to create the node in
* @return {HTMLElement} the generated node
* @private
*/
var _scriptNode = function(url, win, attributes) {
var o = {
id: "yui__dyn_" + (nidx++),
type: "text/javascript",
src: url
};
if (attributes) {
lang.augmentObject(o, attributes);
}
return _node("script", o, win);
};
/**
* Returns the data payload for callback functions
* @method _returnData
* @private
*/
var _returnData = function(q, msg) {
return {
tId: q.tId,
win: q.win,
data: q.data,
nodes: q.nodes,
msg: msg,
purge: function() {
_purge(this.tId);
}
};
};
var _get = function(nId, tId) {
var q = queues[tId],
n = (lang.isString(nId)) ? q.win.document.getElementById(nId) : nId;
if (!n) {
_fail(tId, "target node not found: " + nId);
}
return n;
};
/*
* The request failed, execute fail handler with whatever
* was accomplished. There isn't a failure case at the
* moment unless you count aborted transactions
* @method _fail
* @param id {string} the id of the request
* @private
*/
var _fail = function(id, msg) {
var q = queues[id];
// execute failure callback
if (q.onFailure) {
var sc=q.scope || q.win;
q.onFailure.call(sc, _returnData(q, msg));
}
};
/**
* The request is complete, so executing the requester's callback
* @method _finish
* @param id {string} the id of the request
* @private
*/
var _finish = function(id) {
var q = queues[id];
q.finished = true;
if (q.aborted) {
var msg = "transaction " + id + " was aborted";
_fail(id, msg);
return;
}
// execute success callback
if (q.onSuccess) {
var sc=q.scope || q.win;
q.onSuccess.call(sc, _returnData(q));
}
};
/**
* Timeout detected
* @method _timeout
* @param id {string} the id of the request
* @private
*/
var _timeout = function(id) {
var q = queues[id];
if (q.onTimeout) {
var sc=q.scope || q;
q.onTimeout.call(sc, _returnData(q));
}
};
/**
* Loads the next item for a given request
* @method _next
* @param id {string} the id of the request
* @param loaded {string} the url that was just loaded, if any
* @private
*/
var _next = function(id, loaded) {
var q = queues[id];
if (q.timer) {
// Y.log('cancel timer');
q.timer.cancel();
}
if (q.aborted) {
var msg = "transaction " + id + " was aborted";
_fail(id, msg);
return;
}
if (loaded) {
q.url.shift();
if (q.varName) {
q.varName.shift();
}
} else {
// This is the first pass: make sure the url is an array
q.url = (lang.isString(q.url)) ? [q.url] : q.url;
if (q.varName) {
q.varName = (lang.isString(q.varName)) ? [q.varName] : q.varName;
}
}
var w=q.win, d=w.document, h=d.getElementsByTagName("head")[0], n;
if (q.url.length === 0) {
// Safari 2.x workaround - There is no way to know when
// a script is ready in versions of Safari prior to 3.x.
// Adding an extra node reduces the problem, but doesn't
// eliminate it completely because the browser executes
// them asynchronously.
if (q.type === "script" && ua.webkit && ua.webkit < 420 &&
!q.finalpass && !q.varName) {
// Add another script node. This does not guarantee that the
// scripts will execute in order, but it does appear to fix the
// problem on fast connections more effectively than using an
// arbitrary timeout. It is possible that the browser does
// block subsequent script execution in this case for a limited
// time.
var extra = _scriptNode(null, q.win, q.attributes);
extra.innerHTML='YAHOO.util.Get._finalize("' + id + '");';
q.nodes.push(extra); h.appendChild(extra);
} else {
_finish(id);
}
return;
}
var url = q.url[0];
// if the url is undefined, this is probably a trailing comma problem in IE
if (!url) {
q.url.shift();
return _next(id);
}
if (q.timeout) {
// Y.log('create timer');
q.timer = lang.later(q.timeout, q, _timeout, id);
}
if (q.type === "script") {
n = _scriptNode(url, w, q.attributes);
} else {
n = _linkNode(url, w, q.attributes);
}
// track this node's load progress
_track(q.type, n, id, url, w, q.url.length);
// add the node to the queue so we can return it to the user supplied callback
q.nodes.push(n);
// add it to the head or insert it before 'insertBefore'
if (q.insertBefore) {
var s = _get(q.insertBefore, id);
if (s) {
s.parentNode.insertBefore(n, s);
}
} else {
h.appendChild(n);
}
// FireFox does not support the onload event for link nodes, so there is
// no way to make the css requests synchronous. This means that the css
// rules in multiple files could be applied out of order in this browser
// if a later request returns before an earlier one. Safari too.
if ((ua.webkit || ua.gecko) && q.type === "css") {
_next(id, url);
}
};
/**
* Removes processed queues and corresponding nodes
* @method _autoPurge
* @private
*/
var _autoPurge = function() {
if (purging) {
return;
}
purging = true;
for (var i in queues) {
var q = queues[i];
if (q.autopurge && q.finished) {
_purge(q.tId);
delete queues[i];
}
}
purging = false;
};
/**
* Removes the nodes for the specified queue
* @method _purge
* @private
*/
var _purge = function(tId) {
if (queues[tId]) {
var q = queues[tId],
nodes = q.nodes,
l = nodes.length,
d = q.win.document,
h = d.getElementsByTagName("head")[0],
sib, i, node, attr;
if (q.insertBefore) {
sib = _get(q.insertBefore, tId);
if (sib) {
h = sib.parentNode;
}
}
for (i=0; i<l; i=i+1) {
node = nodes[i];
if (node.clearAttributes) {
node.clearAttributes();
} else {
for (attr in node) {
delete node[attr];
}
}
h.removeChild(node);
}
q.nodes = [];
}
};
/**
* Saves the state for the request and begins loading
* the requested urls
* @method queue
* @param type {string} the type of node to insert
* @param url {string} the url to load
* @param opts the hash of options for this request
* @private
*/
var _queue = function(type, url, opts) {
var id = "q" + (qidx++);
opts = opts || {};
if (qidx % YAHOO.util.Get.PURGE_THRESH === 0) {
_autoPurge();
}
queues[id] = lang.merge(opts, {
tId: id,
type: type,
url: url,
finished: false,
aborted: false,
nodes: []
});
var q = queues[id];
q.win = q.win || window;
q.scope = q.scope || q.win;
q.autopurge = ("autopurge" in q) ? q.autopurge :
(type === "script") ? true : false;
if (opts.charset) {
q.attributes = q.attributes || {};
q.attributes.charset = opts.charset;
}
lang.later(0, q, _next, id);
return {
tId: id
};
};
/**
* Detects when a node has been loaded. In the case of
* script nodes, this does not guarantee that contained
* script is ready to use.
* @method _track
* @param type {string} the type of node to track
* @param n {HTMLElement} the node to track
* @param id {string} the id of the request
* @param url {string} the url that is being loaded
* @param win {Window} the targeted window
* @param qlength the number of remaining items in the queue,
* including this one
* @param trackfn {Function} function to execute when finished
* the default is _next
* @private
*/
var _track = function(type, n, id, url, win, qlength, trackfn) {
var f = trackfn || _next;
// IE supports the readystatechange event for script and css nodes
if (ua.ie) {
n.onreadystatechange = function() {
var rs = this.readyState;
if ("loaded" === rs || "complete" === rs) {
n.onreadystatechange = null;
f(id, url);
}
};
// webkit prior to 3.x is problemmatic
} else if (ua.webkit) {
if (type === "script") {
// Safari 3.x supports the load event for script nodes (DOM2)
if (ua.webkit >= 420) {
n.addEventListener("load", function() {
f(id, url);
});
// Nothing can be done with Safari < 3.x except to pause and hope
// for the best, particularly after last script is inserted. The
// scripts will always execute in the order they arrive, not
// necessarily the order in which they were inserted. To support
// script nodes with complete reliability in these browsers, script
// nodes either need to invoke a function in the window once they
// are loaded or the implementer needs to provide a well-known
// property that the utility can poll for.
} else {
// Poll for the existence of the named variable, if it
// was supplied.
var q = queues[id];
if (q.varName) {
var freq=YAHOO.util.Get.POLL_FREQ;
q.maxattempts = YAHOO.util.Get.TIMEOUT/freq;
q.attempts = 0;
q._cache = q.varName[0].split(".");
q.timer = lang.later(freq, q, function(o) {
var a=this._cache, l=a.length, w=this.win, i;
for (i=0; i<l; i=i+1) {
w = w[a[i]];
if (!w) {
// if we have exausted our attempts, give up
this.attempts++;
if (this.attempts++ > this.maxattempts) {
var msg = "Over retry limit, giving up";
q.timer.cancel();
_fail(id, msg);
} else {
}
return;
}
}
q.timer.cancel();
f(id, url);
}, null, true);
} else {
lang.later(YAHOO.util.Get.POLL_FREQ, null, f, [id, url]);
}
}
}
// FireFox and Opera support onload (but not DOM2 in FF) handlers for
// script nodes. Opera, but not FF, supports the onload event for link
// nodes.
} else {
n.onload = function() {
f(id, url);
};
}
};
return {
/**
* The default poll freqency in ms, when needed
* @property POLL_FREQ
* @static
* @type int
* @default 10
*/
POLL_FREQ: 10,
/**
* The number of request required before an automatic purge.
* property PURGE_THRESH
* @static
* @type int
* @default 20
*/
PURGE_THRESH: 20,
/**
* The length time to poll for varName when loading a script in
* Safari 2.x before the transaction fails.
* property TIMEOUT
* @static
* @type int
* @default 2000
*/
TIMEOUT: 2000,
/**
* Called by the the helper for detecting script load in Safari
* @method _finalize
* @param id {string} the transaction id
* @private
*/
_finalize: function(id) {
lang.later(0, null, _finish, id);
},
/**
* Abort a transaction
* @method abort
* @param {string|object} either the tId or the object returned from
* script() or css()
*/
abort: function(o) {
var id = (lang.isString(o)) ? o : o.tId;
var q = queues[id];
if (q) {
q.aborted = true;
}
},
/**
* Fetches and inserts one or more script nodes into the head
* of the current document or the document in a specified window.
*
* @method script
* @static
* @param url {string|string[]} the url or urls to the script(s)
* @param opts {object} Options:
* <dl>
* <dt>onSuccess</dt>
* <dd>
* callback to execute when the script(s) are finished loading
* The callback receives an object back with the following
* data:
* <dl>
* <dt>win</dt>
* <dd>the window the script(s) were inserted into</dd>
* <dt>data</dt>
* <dd>the data object passed in when the request was made</dd>
* <dt>nodes</dt>
* <dd>An array containing references to the nodes that were
* inserted</dd>
* <dt>purge</dt>
* <dd>A function that, when executed, will remove the nodes
* that were inserted</dd>
* <dt>
* </dl>
* </dd>
* <dt>onFailure</dt>
* <dd>
* callback to execute when the script load operation fails
* The callback receives an object back with the following
* data:
* <dl>
* <dt>win</dt>
* <dd>the window the script(s) were inserted into</dd>
* <dt>data</dt>
* <dd>the data object passed in when the request was made</dd>
* <dt>nodes</dt>
* <dd>An array containing references to the nodes that were
* inserted successfully</dd>
* <dt>purge</dt>
* <dd>A function that, when executed, will remove any nodes
* that were inserted</dd>
* <dt>
* </dl>
* </dd>
* <dt>onTimeout</dt>
* <dd>
* callback to execute when a timeout occurs.
* The callback receives an object back with the following
* data:
* <dl>
* <dt>win</dt>
* <dd>the window the script(s) were inserted into</dd>
* <dt>data</dt>
* <dd>the data object passed in when the request was made</dd>
* <dt>nodes</dt>
* <dd>An array containing references to the nodes that were
* inserted</dd>
* <dt>purge</dt>
* <dd>A function that, when executed, will remove the nodes
* that were inserted</dd>
* <dt>
* </dl>
* </dd>
* <dt>scope</dt>
* <dd>the execution context for the callbacks</dd>
* <dt>win</dt>
* <dd>a window other than the one the utility occupies</dd>
* <dt>autopurge</dt>
* <dd>
* setting to true will let the utilities cleanup routine purge
* the script once loaded
* </dd>
* <dt>data</dt>
* <dd>
* data that is supplied to the callback when the script(s) are
* loaded.
* </dd>
* <dt>varName</dt>
* <dd>
* variable that should be available when a script is finished
* loading. Used to help Safari 2.x and below with script load
* detection. The type of this property should match what was
* passed into the url parameter: if loading a single url, a
* string can be supplied. If loading multiple scripts, you
* must supply an array that contains the variable name for
* each script.
* </dd>
* <dt>insertBefore</dt>
* <dd>node or node id that will become the new node's nextSibling</dd>
* </dl>
* <dt>charset</dt>
* <dd>Node charset, deprecated, use 'attributes'</dd>
* <dt>attributes</dt>
* <dd>A hash of attributes to apply to dynamic nodes.</dd>
* <dt>timeout</dt>
* <dd>Number of milliseconds to wait before aborting and firing the timeout event</dd>
* <pre>
* // assumes yahoo, dom, and event are already on the page
* &nbsp;&nbsp;YAHOO.util.Get.script(
* &nbsp;&nbsp;["http://yui.yahooapis.com/2.7.0/build/dragdrop/dragdrop-min.js",
* &nbsp;&nbsp;&nbsp;"http://yui.yahooapis.com/2.7.0/build/animation/animation-min.js"], &#123;
* &nbsp;&nbsp;&nbsp;&nbsp;onSuccess: function(o) &#123;
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new YAHOO.util.DDProxy("dd1"); // also new o.reference("dd1"); would work
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.log("won't cause error because YAHOO is the scope");
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.log(o.nodes.length === 2) // true
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// o.purge(); // optionally remove the script nodes immediately
* &nbsp;&nbsp;&nbsp;&nbsp;&#125;,
* &nbsp;&nbsp;&nbsp;&nbsp;onFailure: function(o) &#123;
* &nbsp;&nbsp;&nbsp;&nbsp;&#125;,
* &nbsp;&nbsp;&nbsp;&nbsp;data: "foo",
* &nbsp;&nbsp;&nbsp;&nbsp;timeout: 10000, // 10 second timeout
* &nbsp;&nbsp;&nbsp;&nbsp;scope: YAHOO,
* &nbsp;&nbsp;&nbsp;&nbsp;// win: otherframe // target another window/frame
* &nbsp;&nbsp;&nbsp;&nbsp;autopurge: true // allow the utility to choose when to remove the nodes
* &nbsp;&nbsp;&#125;);
* </pre>
* @return {tId: string} an object containing info about the transaction
*/
script: function(url, opts) { return _queue("script", url, opts); },
/**
* Fetches and inserts one or more css link nodes into the
* head of the current document or the document in a specified
* window.
* @method css
* @static
* @param url {string} the url or urls to the css file(s)
* @param opts Options:
* <dl>
* <dt>onSuccess</dt>
* <dd>
* callback to execute when the css file(s) are finished loading
* The callback receives an object back with the following
* data:
* <dl>win</dl>
* <dd>the window the link nodes(s) were inserted into</dd>
* <dt>data</dt>
* <dd>the data object passed in when the request was made</dd>
* <dt>nodes</dt>
* <dd>An array containing references to the nodes that were
* inserted</dd>
* <dt>purge</dt>
* <dd>A function that, when executed, will remove the nodes
* that were inserted</dd>
* <dt>
* </dl>
* </dd>
* <dt>scope</dt>
* <dd>the execution context for the callbacks</dd>
* <dt>win</dt>
* <dd>a window other than the one the utility occupies</dd>
* <dt>data</dt>
* <dd>
* data that is supplied to the callbacks when the nodes(s) are
* loaded.
* </dd>
* <dt>insertBefore</dt>
* <dd>node or node id that will become the new node's nextSibling</dd>
* <dt>charset</dt>
* <dd>Node charset, deprecated, use 'attributes'</dd>
* <dt>attributes</dt>
* <dd>A hash of attributes to apply to dynamic nodes.</dd>
* </dl>
* <pre>
* YAHOO.util.Get.css("http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css");
* </pre>
* <pre>
* YAHOO.util.Get.css(["http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css",
* </pre>
* @return {tId: string} an object containing info about the transaction
*/
css: function(url, opts) {
return _queue("css", url, opts);
}
};
}();
YAHOO.register("get", YAHOO.util.Get, {version: "2.8.1", build: "19"});
-7
View File
@@ -1,7 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}
-467
View File
@@ -1,467 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* YUI Grids
* @module grids
* @namespace yui-
* @requires reset, fonts
*/
/**
* Note: Throughout this file, the *property (star-property) filter is used
* to give a value to IE that other browsers do not see. _property is only seen
* by IE7, so the combo of *prop and _prop can target between IE6 and IE7.
*
* More information on these filters and related validation errors:
* http://tech.groups.yahoo.com/group/ydn-javascript/message/40059
*/
/**
* Section: General Rules
*/
body {
text-align: center;
}
/**
* Section: Page Width Rules (#doc, #doc2, #doc3, #doc4)
*/
#doc,#doc2,#doc3,#doc4,
.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7 {
margin: auto;
text-align: left;
width: 57.69em;
*width: 56.25em;
}
/* 950 Centered (doc2) */
#doc2 {
width: 73.076em;
*width: 71.25em;
}
/* 100% (doc3) */
#doc3 {
/**
* Left and Right margins are not a structural part of Grids. Without them
* Grids works fine, but content bleeds to the very edge of the document, which
* often impairs readability and usability. They are provided because they
* prevent the content from "bleeding" into the browser's chrome.
*/
margin: auto 10px;
width: auto;
}
/* 974 Centered (doc4) */
#doc4 {
width: 74.923em;
*width: 73.05em;
}
/**
* Section: Preset Template Rules (.yui-t[1-6])
*/
.yui-b {
/* to preserve source-order independence for Gecko */
position: relative;
}
.yui-b {
/* to preserve source-order independence for IE */
_position: static;
}
#yui-main .yui-b {
/* to preserve source-order independence for Gecko */
position: static;
}
#yui-main,
.yui-g .yui-u .yui-g {
width: 100%;
}
.yui-t1 #yui-main,
.yui-t2 #yui-main,
.yui-t3 #yui-main {
float: right;
/* IE: preserve layout at narrow widths */
margin-left: -25em;
}
.yui-t4 #yui-main,
.yui-t5 #yui-main,
.yui-t6 #yui-main {
float: left;
/* IE: preserve layout at narrow widths */
margin-right: -25em;
}
/**
* For Specific Template Presets
*/
.yui-t1 .yui-b {
float: left;
width: 12.30769em;
*width: 12.00em;
}
.yui-t1 #yui-main .yui-b {
margin-left: 13.30769em;
*margin-left: 13.05em;
}
.yui-t2 .yui-b {
float: left;
width: 13.8461em;
*width: 13.50em;
}
.yui-t2 #yui-main .yui-b {
margin-left: 14.8461em;
*margin-left: 14.55em;
}
.yui-t3 .yui-b {
float: left;
width: 23.0769em;
*width: 22.50em;
}
.yui-t3 #yui-main .yui-b {
margin-left: 24.0769em;
*margin-left: 23.62em;
}
.yui-t4 .yui-b {
float: right;
width: 13.8456em;
*width: 13.50em;
}
.yui-t4 #yui-main .yui-b {
margin-right: 14.8456em;
*margin-right: 14.55em;
}
.yui-t5 .yui-b {
float: right;
width: 18.4615em;
*width: 18.00em;
}
.yui-t5 #yui-main .yui-b {
margin-right: 19.4615em;
*margin-right: 19.125em;
}
.yui-t6 .yui-b {
float: right;
width: 23.0769em;
*width: 22.50em;
}
.yui-t6 #yui-main .yui-b {
margin-right: 24.0769em;
*margin-right: 23.62em;
}
.yui-t7 #yui-main .yui-b {
display: block;
margin: 0 0 1em 0;
}
#yui-main .yui-b {
float: none;
width: auto;
}
/**
* Section: Grids and Nesting Grids
*/
/* Children generally take half the available space */
.yui-gb .yui-u,
.yui-g .yui-gb .yui-u,
.yui-gb .yui-g,
.yui-gb .yui-gb,
.yui-gb .yui-gc,
.yui-gb .yui-gd,
.yui-gb .yui-ge,
.yui-gb .yui-gf,
.yui-gc .yui-u,
.yui-gc .yui-g,
.yui-gd .yui-u {
float: left;
}
/* Float units (and sub grids) to the right */
.yui-g .yui-u,
.yui-g .yui-g,
.yui-g .yui-gb,
.yui-g .yui-gc,
.yui-g .yui-gd,
.yui-g .yui-ge,
.yui-g .yui-gf,
.yui-gc .yui-u,
.yui-gd .yui-g,
.yui-g .yui-gc .yui-u,
.yui-ge .yui-u,
.yui-ge .yui-g,
.yui-gf .yui-g,
.yui-gf .yui-u {
float: right;
}
/*Float units (and sub grids) to the left */
.yui-g div.first,
.yui-gb div.first,
.yui-gc div.first,
.yui-gd div.first,
.yui-ge div.first,
.yui-gf div.first,
.yui-g .yui-gc div.first,
.yui-g .yui-ge div.first,
.yui-gc div.first div.first {
float: left;
}
.yui-g .yui-u,
.yui-g .yui-g,
.yui-g .yui-gb,
.yui-g .yui-gc,
.yui-g .yui-gd,
.yui-g .yui-ge,
.yui-g .yui-gf {
width: 49.1%;
}
.yui-gb .yui-u,
.yui-g .yui-gb .yui-u,
.yui-gb .yui-g,
.yui-gb .yui-gb,
.yui-gb .yui-gc,
.yui-gb .yui-gd,
.yui-gb .yui-ge,
.yui-gb .yui-gf,
.yui-gc .yui-u,
.yui-gc .yui-g,
.yui-gd .yui-u {
width: 32%;
margin-left: 1.99%;
}
/* Give IE some extra breathing room for 1/3-based rounding issues */
.yui-gb .yui-u {
*margin-left: 1.9%;
*width: 31.9%;
}
.yui-gc div.first,
.yui-gd .yui-u {
width: 66%;
}
.yui-gd div.first {
width: 32%;
}
.yui-ge div.first,
.yui-gf .yui-u {
width: 74.2%;
}
.yui-ge .yui-u,
.yui-gf div.first {
width: 24%;
}
.yui-g .yui-gb div.first,
.yui-gb div.first,
.yui-gc div.first,
.yui-gd div.first {
margin-left: 0;
}
/**
* Section: Deep Nesting
*/
.yui-g .yui-g .yui-u,
.yui-gb .yui-g .yui-u,
.yui-gc .yui-g .yui-u,
.yui-gd .yui-g .yui-u,
.yui-ge .yui-g .yui-u,
.yui-gf .yui-g .yui-u {
width: 49%;
*width: 48.1%;
*margin-left: 0;
}
.yui-g .yui-g .yui-u {
width: 48.1%;
}
/*YUILibrary bug #1927599 from 1.14 to 2.6.0*/
.yui-g .yui-gb div.first,
.yui-gb .yui-gb div.first {
*margin-right: 0;
*width: 32%;
_width: 31.7%;
}
.yui-g .yui-gc div.first,
.yui-gd .yui-g {
width: 66%;
}
.yui-gb .yui-g div.first {
*margin-right: 4%;
_margin-right: 1.3%;
}
.yui-gb .yui-gc div.first,
.yui-gb .yui-gd div.first {
*margin-right: 0;
}
.yui-gb .yui-gb .yui-u,
.yui-gb .yui-gc .yui-u {
*margin-left: 1.8%;
_margin-left: 4%;
}
.yui-g .yui-gb .yui-u {
_margin-left: 1.0%;
}
.yui-gb .yui-gd .yui-u {
*width: 66%;
_width: 61.2%;
}
.yui-gb .yui-gd div.first {
*width: 31%;
_width: 29.5%;
}
.yui-g .yui-gc .yui-u,
.yui-gb .yui-gc .yui-u {
width: 32%;
_float: right;
margin-right: 0;
_margin-left: 0;
}
.yui-gb .yui-gc div.first {
width: 66%;
*float: left;
*margin-left: 0;
}
.yui-gb .yui-ge .yui-u,
.yui-gb .yui-gf .yui-u {
margin: 0;
}
.yui-gb .yui-gb .yui-u {
_margin-left: .7%;
}
.yui-gb .yui-g div.first,
.yui-gb .yui-gb div.first {
*margin-left: 0;
}
.yui-gc .yui-g .yui-u,
.yui-gd .yui-g .yui-u {
*width: 48.1%;
*margin-left: 0;
}
.yui-gb .yui-gd div.first {
width: 32%;
}
.yui-g .yui-gd div.first {
_width: 29.9%;
}
.yui-ge .yui-g {
width: 24%;
}
.yui-gf .yui-g {
width: 74.2%;
}
.yui-gb .yui-ge div.yui-u,
.yui-gb .yui-gf div.yui-u {
float: right;
}
.yui-gb .yui-ge div.first,
.yui-gb .yui-gf div.first {
float: left;
}
/* Width Accommodation for Nested Contexts */
.yui-gb .yui-ge .yui-u,
.yui-gb .yui-gf div.first {
*width: 24%;
_width: 20%;
}
/* Width Accommodation for Nested Contexts */
.yui-gb .yui-ge div.first,
.yui-gb .yui-gf .yui-u {
*width: 73.5%;
_width: 65.5%;
}
/* Patch for GD within GE */
.yui-ge div.first .yui-gd .yui-u {
width: 65%;
}
.yui-ge div.first .yui-gd div.first {
width: 32%;
}
/* @group Clearing */
#hd:after,
#bd:after,
#ft:after,
.yui-g:after,
.yui-gb:after,
.yui-gc:after,
.yui-gd:after,
.yui-ge:after,
.yui-gf:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
#hd,
#bd,
#ft,
.yui-g,
.yui-gb,
.yui-gc,
.yui-gd,
.yui-ge,
.yui-gf {
zoom: 1;
}
@@ -1 +0,0 @@
<html><head><title>bhm</title></head><body>&#160;</body></html>
@@ -1,808 +0,0 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
/**
* The Browser History Manager provides the ability to use the back/forward
* navigation buttons in a DHTML application. It also allows a DHTML
* application to be bookmarked in a specific state.
*
* This library requires the following static markup:
*
* &lt;iframe id="yui-history-iframe" src="path-to-real-asset-in-same-domain"&gt;&lt;/iframe&gt;
* &lt;input id="yui-history-field" type="hidden"&gt;
*
* @module history
* @requires yahoo,event
* @namespace YAHOO.util
* @title Browser History Manager
*/
/**
* The History class provides the ability to use the back/forward navigation
* buttons in a DHTML application. It also allows a DHTML application to
* be bookmarked in a specific state.
*
* @class History
* @constructor
*/
YAHOO.util.History = (function () {
/**
* Our hidden IFrame used to store the browsing history.
*
* @property _histFrame
* @type HTMLIFrameElement
* @default null
* @private
*/
var _histFrame = null;
/**
* INPUT field (with type="hidden" or type="text") or TEXTAREA.
* This field keeps the value of the initial state, current state
* the list of all states across pages within a single browser session.
*
* @property _stateField
* @type HTMLInputElement|HTMLTextAreaElement
* @default null
* @private
*/
var _stateField = null;
/**
* Flag used to tell whether YAHOO.util.History.initialize has been called.
*
* @property _initialized
* @type boolean
* @default false
* @private
*/
var _initialized = false;
/**
* List of registered modules.
*
* @property _modules
* @type array
* @default []
* @private
*/
var _modules = [];
/**
* List of fully qualified states. This is used only by Safari.
*
* @property _fqstates
* @type array
* @default []
* @private
*/
var _fqstates = [];
/**
* location.hash is a bit buggy on Opera. I have seen instances where
* navigating the history using the back/forward buttons, and hence
* changing the URL, would not change location.hash. That's ok, the
* implementation of an equivalent is trivial.
*
* @method _getHash
* @return {string} The hash portion of the document's location
* @private
*/
function _getHash() {
var i, href;
href = top.location.href;
i = href.indexOf("#");
return i >= 0 ? href.substr(i + 1) : null;
}
/**
* Stores all the registered modules' initial state and current state.
* On Safari, we also store all the fully qualified states visited by
* the application within a single browser session. The storage takes
* place in the form field specified during initialization.
*
* @method _storeStates
* @private
*/
function _storeStates() {
var moduleName, moduleObj, initialStates = [], currentStates = [];
for (moduleName in _modules) {
if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
moduleObj = _modules[moduleName];
initialStates.push(moduleName + "=" + moduleObj.initialState);
currentStates.push(moduleName + "=" + moduleObj.currentState);
}
}
_stateField.value = initialStates.join("&") + "|" + currentStates.join("&");
if (YAHOO.env.ua.webkit) {
_stateField.value += "|" + _fqstates.join(",");
}
}
/**
* Sets the new currentState attribute of all modules depending on the new
* fully qualified state. Also notifies the modules which current state has
* changed.
*
* @method _handleFQStateChange
* @param {string} fqstate Fully qualified state
* @private
*/
function _handleFQStateChange(fqstate) {
var i, len, moduleName, moduleObj, modules, states, tokens, currentState;
if (!fqstate) {
// Notifies all modules
for (moduleName in _modules) {
if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
moduleObj = _modules[moduleName];
moduleObj.currentState = moduleObj.initialState;
moduleObj.onStateChange(unescape(moduleObj.currentState));
}
}
return;
}
modules = [];
states = fqstate.split("&");
for (i = 0, len = states.length; i < len; i++) {
tokens = states[i].split("=");
if (tokens.length === 2) {
moduleName = tokens[0];
currentState = tokens[1];
modules[moduleName] = currentState;
}
}
for (moduleName in _modules) {
if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
moduleObj = _modules[moduleName];
currentState = modules[moduleName];
if (!currentState || moduleObj.currentState !== currentState) {
moduleObj.currentState = currentState || moduleObj.initialState;
moduleObj.onStateChange(unescape(moduleObj.currentState));
}
}
}
}
/**
* Update the IFrame with our new state.
*
* @method _updateIFrame
* @private
* @return {boolean} true if successful. false otherwise.
*/
function _updateIFrame (fqstate) {
var html, doc;
html = '<html><body><div id="state">' +
fqstate.replace(/&/g,'&amp;').
replace(/</g,'&lt;').
replace(/>/g,'&gt;').
replace(/"/g,'&quot;') +
'</div></body></html>';
try {
doc = _histFrame.contentWindow.document;
doc.open();
doc.write(html);
doc.close();
return true;
} catch (e) {
return false;
}
}
/**
* Periodically checks whether our internal IFrame is ready to be used.
*
* @method _checkIframeLoaded
* @private
*/
function _checkIframeLoaded() {
var doc, elem, fqstate, hash;
if (!_histFrame.contentWindow || !_histFrame.contentWindow.document) {
// Check again in 10 msec...
setTimeout(_checkIframeLoaded, 10);
return;
}
// Start the thread that will have the responsibility to
// periodically check whether a navigate operation has been
// requested on the main window. This will happen when
// YAHOO.util.History.navigate has been called or after
// the user has hit the back/forward button.
doc = _histFrame.contentWindow.document;
elem = doc.getElementById("state");
// We must use innerText, and not innerHTML because our string contains
// the "&" character (which would end up being escaped as "&amp;") and
// the string comparison would fail...
fqstate = elem ? elem.innerText : null;
hash = _getHash();
setInterval(function () {
var newfqstate, states, moduleName, moduleObj, newHash, historyLength;
doc = _histFrame.contentWindow.document;
elem = doc.getElementById("state");
// See my comment above about using innerText instead of innerHTML...
newfqstate = elem ? elem.innerText : null;
newHash = _getHash();
if (newfqstate !== fqstate) {
fqstate = newfqstate;
_handleFQStateChange(fqstate);
if (!fqstate) {
states = [];
for (moduleName in _modules) {
if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
moduleObj = _modules[moduleName];
states.push(moduleName + "=" + moduleObj.initialState);
}
}
newHash = states.join("&");
} else {
newHash = fqstate;
}
// Allow the state to be bookmarked by setting the top window's
// URL fragment identifier. Note that here, we are on IE, and
// IE does not touch the browser history when setting the hash
// (unlike all the other browsers). I used to write:
// top.location.replace( "#" + hash );
// but this had a side effect when the page was not the top frame.
top.location.hash = newHash;
hash = newHash;
_storeStates();
} else if (newHash !== hash) {
// The hash has changed. The user might have clicked on a link,
// or modified the URL directly, or opened the same application
// bookmarked in a specific state using a bookmark. However, we
// know the hash change was not caused by a hit on the back or
// forward buttons, or by a call to navigate() (because it would
// have been handled above) We must handle these cases, which is
// why we also need to keep track of hash changes on IE!
// Note that IE6 has some major issues with this kind of user
// interaction (the history stack gets completely messed up)
// but it seems to work fine on IE7.
hash = newHash;
// Now, store a new history entry. The following will cause the
// code above to execute, doing all the dirty work for us...
_updateIFrame(newHash);
}
}, 50);
_initialized = true;
YAHOO.util.History.onLoadEvent.fire();
}
/**
* Finish up the initialization of the Browser History Manager.
*
* @method _initialize
* @private
*/
function _initialize() {
var i, len, parts, tokens, moduleName, moduleObj, initialStates, initialState, currentStates, currentState, counter, hash;
// Decode the content of our storage field...
parts = _stateField.value.split("|");
if (parts.length > 1) {
initialStates = parts[0].split("&");
for (i = 0, len = initialStates.length; i < len; i++) {
tokens = initialStates[i].split("=");
if (tokens.length === 2) {
moduleName = tokens[0];
initialState = tokens[1];
moduleObj = _modules[moduleName];
if (moduleObj) {
moduleObj.initialState = initialState;
}
}
}
currentStates = parts[1].split("&");
for (i = 0, len = currentStates.length; i < len; i++) {
tokens = currentStates[i].split("=");
if (tokens.length >= 2) {
moduleName = tokens[0];
currentState = tokens[1];
moduleObj = _modules[moduleName];
if (moduleObj) {
moduleObj.currentState = currentState;
}
}
}
}
if (parts.length > 2) {
_fqstates = parts[2].split(",");
}
if (YAHOO.env.ua.ie) {
if (typeof document.documentMode === "undefined" || document.documentMode < 8) {
// IE < 8 or IE8 in quirks mode or IE7 standards mode
_checkIframeLoaded();
} else {
// IE8 in IE8 standards mode
YAHOO.util.Event.on(top, "hashchange",
function () {
var hash = _getHash();
_handleFQStateChange(hash);
_storeStates();
});
_initialized = true;
YAHOO.util.History.onLoadEvent.fire();
}
} else {
// Start the thread that will have the responsibility to
// periodically check whether a navigate operation has been
// requested on the main window. This will happen when
// YAHOO.util.History.navigate has been called or after
// the user has hit the back/forward button.
// On Safari 1.x and 2.0, the only way to catch a back/forward
// operation is to watch history.length... We basically exploit
// what I consider to be a bug (history.length is not supposed
// to change when going back/forward in the history...) This is
// why, in the following thread, we first compare the hash,
// because the hash thing will be fixed in the next major
// version of Safari. So even if they fix the history.length
// bug, all this will still work!
counter = history.length;
// On Gecko and Opera, we just need to watch the hash...
hash = _getHash();
setInterval(function () {
var state, newHash, newCounter;
newHash = _getHash();
newCounter = history.length;
if (newHash !== hash) {
hash = newHash;
counter = newCounter;
_handleFQStateChange(hash);
_storeStates();
} else if (newCounter !== counter && YAHOO.env.ua.webkit) {
hash = newHash;
counter = newCounter;
state = _fqstates[counter - 1];
_handleFQStateChange(state);
_storeStates();
}
}, 50);
_initialized = true;
YAHOO.util.History.onLoadEvent.fire();
}
}
return {
/**
* Fired when the Browser History Manager is ready. If you subscribe to
* this event after the Browser History Manager has been initialized,
* it will not fire. Therefore, it is recommended to use the onReady
* method instead.
*
* @event onLoadEvent
* @see onReady
*/
onLoadEvent: new YAHOO.util.CustomEvent("onLoad"),
/**
* Executes the supplied callback when the Browser History Manager is
* ready. This will execute immediately if called after the Browser
* History Manager onLoad event has fired.
*
* @method onReady
* @param {function} fn what to execute when the Browser History Manager is ready.
* @param {object} obj an optional object to be passed back as a parameter to fn.
* @param {boolean|object} overrideContext If true, the obj passed in becomes fn's execution scope.
* @see onLoadEvent
*/
onReady: function (fn, obj, overrideContext) {
if (_initialized) {
setTimeout(function () {
var ctx = window;
if (overrideContext) {
if (overrideContext === true) {
ctx = obj;
} else {
ctx = overrideContext;
}
}
fn.call(ctx, "onLoad", [], obj);
}, 0);
} else {
YAHOO.util.History.onLoadEvent.subscribe(fn, obj, overrideContext);
}
},
/**
* Registers a new module.
*
* @method register
* @param {string} module Non-empty string uniquely identifying the
* module you wish to register.
* @param {string} initialState The initial state of the specified
* module corresponding to its earliest history entry.
* @param {function} onStateChange Callback called when the
* state of the specified module has changed.
* @param {object} obj An arbitrary object that will be passed as a
* parameter to the handler.
* @param {boolean} overrideContext If true, the obj passed in becomes the
* execution scope of the listener.
*/
register: function (module, initialState, onStateChange, obj, overrideContext) {
var scope, wrappedFn;
if (typeof module !== "string" || YAHOO.lang.trim(module) === "" ||
typeof initialState !== "string" ||
typeof onStateChange !== "function") {
throw new Error("Missing or invalid argument");
}
if (_modules[module]) {
// Here, we used to throw an exception. However, users have
// complained about this behavior, so we now just return.
return;
}
// Note: A module CANNOT be registered after calling
// YAHOO.util.History.initialize. Indeed, we set the initial state
// of each registered module in YAHOO.util.History.initialize.
// If you could register a module after initializing the Browser
// History Manager, you would not read the correct state using
// YAHOO.util.History.getCurrentState when coming back to the
// page using the back button.
if (_initialized) {
throw new Error("All modules must be registered before calling YAHOO.util.History.initialize");
}
// Make sure the strings passed in do not contain our separators "," and "|"
module = escape(module);
initialState = escape(initialState);
// If the user chooses to override the scope, we use the
// custom object passed in as the execution scope.
scope = null;
if (overrideContext === true) {
scope = obj;
} else {
scope = overrideContext;
}
wrappedFn = function (state) {
return onStateChange.call(scope, state, obj);
};
_modules[module] = {
name: module,
initialState: initialState,
currentState: initialState,
onStateChange: wrappedFn
};
},
/**
* Initializes the Browser History Manager. Call this method
* from a script block located right after the opening body tag.
*
* @method initialize
* @param {string|HTML Element} stateField <input type="hidden"> used
* to store application states. Must be in the static markup.
* @param {string|HTML Element} histFrame IFrame used to store
* the history (only required on Internet Explorer)
* @public
*/
initialize: function (stateField, histFrame) {
if (_initialized) {
// The browser history manager has already been initialized.
return;
}
if (YAHOO.env.ua.opera && typeof history.navigationMode !== "undefined") {
// Disable Opera's fast back/forward navigation mode and puts
// it in compatible mode. This makes anchor-based history
// navigation work after the page has been navigated away
// from and re-activated, at the cost of slowing down
// back/forward navigation to and from that page.
history.navigationMode = "compatible";
}
if (typeof stateField === "string") {
stateField = document.getElementById(stateField);
}
if (!stateField ||
stateField.tagName.toUpperCase() !== "TEXTAREA" &&
(stateField.tagName.toUpperCase() !== "INPUT" ||
stateField.type !== "hidden" &&
stateField.type !== "text")) {
throw new Error("Missing or invalid argument");
}
_stateField = stateField;
// IE < 8 or IE8 in quirks mode or IE7 standards mode
if (YAHOO.env.ua.ie && (typeof document.documentMode === "undefined" || document.documentMode < 8)) {
if (typeof histFrame === "string") {
histFrame = document.getElementById(histFrame);
}
if (!histFrame || histFrame.tagName.toUpperCase() !== "IFRAME") {
throw new Error("Missing or invalid argument");
}
_histFrame = histFrame;
}
// Note that the event utility MUST be included inline in the page.
// If it gets loaded later (which you may want to do to improve the
// loading speed of your site), the onDOMReady event never fires,
// and the history library never gets fully initialized.
YAHOO.util.Event.onDOMReady(_initialize);
},
/**
* Call this method when you want to store a new entry in the browser's history.
*
* @method navigate
* @param {string} module Non-empty string representing your module.
* @param {string} state String representing the new state of the specified module.
* @return {boolean} Indicates whether the new state was successfully added to the history.
* @public
*/
navigate: function (module, state) {
var states;
if (typeof module !== "string" || typeof state !== "string") {
throw new Error("Missing or invalid argument");
}
states = {};
states[module] = state;
return YAHOO.util.History.multiNavigate(states);
},
/**
* Call this method when you want to store a new entry in the browser's history.
*
* @method multiNavigate
* @param {object} states Associative array of module-state pairs to set simultaneously.
* @return {boolean} Indicates whether the new state was successfully added to the history.
* @public
*/
multiNavigate: function (states) {
var currentStates, moduleName, moduleObj, currentState, fqstate;
if (typeof states !== "object") {
throw new Error("Missing or invalid argument");
}
if (!_initialized) {
throw new Error("The Browser History Manager is not initialized");
}
for (moduleName in states) {
if (!_modules[moduleName]) {
throw new Error("The following module has not been registered: " + moduleName);
}
}
// Generate our new full state string mod1=xxx&mod2=yyy
currentStates = [];
for (moduleName in _modules) {
if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
moduleObj = _modules[moduleName];
if (YAHOO.lang.hasOwnProperty(states, moduleName)) {
currentState = states[unescape(moduleName)];
} else {
currentState = unescape(moduleObj.currentState);
}
// Make sure the strings passed in do not contain our separators "," and "|"
moduleName = escape(moduleName);
currentState = escape(currentState);
currentStates.push(moduleName + "=" + currentState);
}
}
fqstate = currentStates.join("&");
if (YAHOO.env.ua.ie && (typeof document.documentMode === "undefined" || document.documentMode < 8)) {
return _updateIFrame(fqstate);
} else {
// Known bug: On Safari 1.x and 2.0, if you have tab browsing
// enabled, Safari will show an endless loading icon in the
// tab. This has apparently been fixed in recent WebKit builds.
// One work around found by Dav Glass is to submit a form that
// points to the same document. This indeed works on Safari 1.x
// and 2.0 but creates bigger problems on WebKit. So for now,
// we'll consider this an acceptable bug, and hope that Apple
// comes out with their next version of Safari very soon.
top.location.hash = fqstate;
if (YAHOO.env.ua.webkit) {
// The following two lines are only useful for Safari 1.x
// and 2.0. Recent nightly builds of WebKit do not require
// that, but unfortunately, it is not easy to differentiate
// between the two. Once Safari 2.0 departs the A-grade
// list, we can remove the following two lines...
_fqstates[history.length] = fqstate;
_storeStates();
}
return true;
}
},
/**
* Returns the current state of the specified module.
*
* @method getCurrentState
* @param {string} module Non-empty string representing your module.
* @return {string} The current state of the specified module.
* @public
*/
getCurrentState: function (module) {
var moduleObj;
if (typeof module !== "string") {
throw new Error("Missing or invalid argument");
}
if (!_initialized) {
throw new Error("The Browser History Manager is not initialized");
}
moduleObj = _modules[module];
if (!moduleObj) {
throw new Error("No such registered module: " + module);
}
return unescape(moduleObj.currentState);
},
/**
* Returns the state of a module according to the URL fragment
* identifier. This method is useful to initialize your modules
* if your application was bookmarked from a particular state.
*
* @method getBookmarkedState
* @param {string} module Non-empty string representing your module.
* @return {string} The bookmarked state of the specified module.
* @public
*/
getBookmarkedState: function (module) {
var i, len, idx, hash, states, tokens, moduleName;
if (typeof module !== "string") {
throw new Error("Missing or invalid argument");
}
// Use location.href instead of location.hash which is already
// URL-decoded, which creates problems if the state value
// contained special characters...
idx = top.location.href.indexOf("#");
if (idx >= 0) {
hash = top.location.href.substr(idx + 1);
states = hash.split("&");
for (i = 0, len = states.length; i < len; i++) {
tokens = states[i].split("=");
if (tokens.length === 2) {
moduleName = tokens[0];
if (moduleName === module) {
return unescape(tokens[1]);
}
}
}
}
return null;
},
/**
* Returns the value of the specified query string parameter.
* This method is not used internally by the Browser History Manager.
* However, it is provided here as a helper since many applications
* using the Browser History Manager will want to read the value of
* url parameters to initialize themselves.
*
* @method getQueryStringParameter
* @param {string} paramName Name of the parameter we want to look up.
* @param {string} queryString Optional URL to look at. If not specified,
* this method uses the URL in the address bar.
* @return {string} The value of the specified parameter, or null.
* @public
*/
getQueryStringParameter: function (paramName, url) {
var i, len, idx, queryString, params, tokens;
url = url || top.location.href;
idx = url.indexOf("?");
queryString = idx >= 0 ? url.substr(idx + 1) : url;
// Remove the hash if any
idx = queryString.lastIndexOf("#");
queryString = idx >= 0 ? queryString.substr(0, idx) : queryString;
params = queryString.split("&");
for (i = 0, len = params.length; i < len; i++) {
tokens = params[i].split("=");
if (tokens.length >= 2) {
if (tokens[0] === paramName) {
return unescape(tokens[1]);
}
}
}
return null;
}
};
})();
YAHOO.register("history", YAHOO.util.History, {version: "2.8.1", build: "19"});

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