<script type="text/javascript" src="../../ui/effects.core.js"></script>
<script type="text/javascript" src="../../ui/effects.blind.js"></script>
<script type="text/javascript" src="../../ui/effects.explode.js"></script>
- <script type="text/javascript" src="../../external/bgiframe/jquery.bgiframe.js"></script>
+ <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$.ui.dialog.defaults.bgiframe = true;
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
- <script type="text/javascript" src="../../external/bgiframe/jquery.bgiframe.js"></script>
+ <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$.ui.dialog.defaults.bgiframe = true;
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
- <script type="text/javascript" src="../../external/bgiframe/jquery.bgiframe.js"></script>
+ <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
<script type="text/javascript" src="../../ui/effects.core.js"></script>
<script type="text/javascript" src="../../ui/effects.highlight.js"></script>
- <script type="text/javascript" src="../../external/bgiframe/jquery.bgiframe.js"></script>
+ <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<style type="text/css">
body { font-size: 62.5%; }
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
- <script type="text/javascript" src="../../external/bgiframe/jquery.bgiframe.js"></script>
+ <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
- <script type="text/javascript" src="../../external/bgiframe/jquery.bgiframe.js"></script>
+ <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
<link type="text/css" href="../themes/base/ui.all.css" rel="stylesheet" />
<link type="text/css" href="demos.css" rel="stylesheet" />
<script type="text/javascript" src="../jquery-1.3.2.js"></script>
- <script type="text/javascript" src="../external/bgiframe/jquery.bgiframe.js"></script>
+ <script type="text/javascript" src="../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../ui/ui.core.js"></script>
<script type="text/javascript" src="../ui/ui.accordion.js"></script>
<script type="text/javascript" src="../ui/ui.datepicker.js"></script>
+++ /dev/null
-== New and Noteworthy ==
-
-== 2.1.1 ==
-
-* Removed $.browser.version for jQuery < 1.1.3
-
-== 2.1 ==
-
-* Updated to work with jQuery 1.1.3
-* Added $.browser.version for jQuery < 1.1.3
-* Optimized duplication check by using child selector and using .length test
-
-== 2.0 ==
-
-* Added ability change settings like width, height, src and more.
-
-== 1.0 ==
-
-* Only adds iframe once per an element
-* Works with SSL enabled pages
\ No newline at end of file
+++ /dev/null
-{
- "name": "jQuery-bgiframe",
- "version": 2.1,
- "author": [
- "Brandon Aaron <brandon.aaron@gmail.com>"
- ],
- "abstract": "jQuery plugin for fixing z-index issues in IE6",
- "license": "mit, gpl",
- "distribution_type": "plugin",
- "requires": {
- "jQuery": ">=1.0.3"
- },
- "provides": {
- "jQuery.bgiframe": {
- "version": 2.1,
- "file": "jquery.bgiframe.js"
- }
- },
- "keywords": [
- "iframe",
- "hack",
- "zIndex",
- "z-index",
- "ie6"
- ],
- "stability": "Official",
- "meta-spec": {
- "version": 1.3,
- "url": "http://module-build.sourceforge.net/META-spec-v1.3.html"
- },
- "generated_by": "Brandon Aaron"
-}
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>bgiframe 2.1.1 docs</title>
- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css">
- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css">
- <style type="text/css" media="screen">
- body { margin: 25px; }
- h1 { margin: 1.0em 0; font-size: 167%; font-weight: bold; }
- #toc { margin: 0 0 3.0em; }
- #toc li { margin: 0.4em 0; font-size: 100%; }
- #qa { margin: 0 0 3.0em; }
- #qa dt.question { margin: 2.0em 0 1.0em; font-size: 122%; font-weight: bold; }
- #qa dd.answer { margin: 0 2.0em; }
- #qa dd.answer p { margin: 0 0 1.5em; }
- #qa dd.answer code { font-size: 92%; }
-
- #qa dd.answer #options dt { margin: 2.0em 0 1.0em; }
- #qa dd.answer #options dd { margin: 0 2.0em; }
-
- </style>
- </head>
- <body>
- <div id="wrapper">
- <div id="container">
- <h1>bgiframe 2.1.1</h1>
- <ul id="toc">
- <li><a href="#what_does_it_do">What does it do</a></li>
- <li><a href="#when_should_i_use_it">When should I use it</a></li>
- <li><a href="#how_do_i_use_it">How do I use it</a></li>
- <li><a href="#how_does_it_work">How does it work</a></li>
- <li><a href="#where_can_i_get_it">Where can I get it</a></li>
- <li><a href="#what_has_changed">What has changed</a></li>
- <li><a href="#suggestions_bugs_patches">Suggestions? Bugs? Patches?</a></li>
- </ul>
- <dl id="qa">
- <dt id="what_does_it_do" class="question">What does it do?</dt>
- <dd class="answer">
- <p>Have you ever experienced the select form element z-index issue in Internet Explorer 6? Most likely you have if you've implemented some sort of drop down menu navigation that shows up over a select form element.</p>
- <p>The background iframe (bgiframe) plugin provides a very small, quick and easy way to fix that problem so you don't have to worry about it. No matter the size, borders or position the bgiframe plugin can fix it.</p>
- </dd>
-
- <dt id="when_should_i_use_it" class="question">When should I use it?</dt>
- <dd class="answer">
- <p>The bgiframe plugin should be used when you are trying to show elements above a select form control in Internet Explorer 6.</p>
- </dd>
-
- <dt id="how_do_i_use_it" class="question">How do I use it?</dt>
- <dd class="answer">
- <p>The usage is simple. Just call <code>bgiframe</code> on a jQuery collection of elements.</p>
- <p><code>$('.fix-z-index').bgiframe();</code></p>
- <p>The plugin tries its best to handle most situations but sometimes some configuration is necessary. For example if your borders are defined in a unit other than pixels, you will need to manually set the <code>top</code> and <code>left</code> properties to the negative width of the border. Here are the options/settings available to configure the output.</p>
- <dl id="options">
- <dt><code>top</code></dt>
- <dd>
- <p>The iframe must be offset to the top by the width of the top border. This should be a negative number representing the border-top-width. If a number is is used here, pixels will be assumed. Otherwise, be sure to specify a unit. An expression could also be used. By default the value is "auto" which will use an expression to get the border-top-width if it is in pixels.</p>
- <p><code>$('.fix-z-index').bgiframe({ top: '-1em' });</code></p>
- </dd>
- <dt><code>left</code></dt>
- <dd>
- <p>The iframe must be offset to the left by the width of the left border. This should be a negative number representing the border-left-width. If a number is used here, pixels will be assumed. Otherwise, be sure to specify a unit. An expression could also be used. By default the value is "auto" which will use an expression to get the border-left-width if it is in pixels.</p>
- <p><code>$('.fix-z-index').bgiframe({ left: '-1em' });</code></p>
- </dd>
- <dt><code>width</code></dt>
- <dd>
- <p>This is the width of the iframe. If a number is used here, pixels will be assume. Otherwise, be sure to specify a unit. An expression could also be used. By default the value is "auto" which will use an expression to get the offsetWidth.</p>
- <p><code>$('.fix-z-index').bgiframe({ width: 100 });</code></p>
- </dd>
- <dt><code>height</code></dt>
- <dd>
- <p>This is the height of the iframe. If a number is used here, pixels will be assume. Otherwise, be sure to specify a unit. An expression could also be used. By default the value is "auto" which will use an expression to get the offsetHeight.</p>
- <p><code>$('.fix-z-index').bgiframe({ height: 100 });</code></p>
- </dd>
- <dt><code>opacity</code></dt>
- <dd>
- <p>This is a boolean representing whether or not to use opacity. If set to true, the opacity of 0 is applied. If set to false, the opacity filter is not applied. Default: true.</p>
- <p><code>$('.fix-z-index').bgiframe({ opacity: false });</code></p>
- </dd>
- <dt><code>src</code></dt>
- <dd>
- <p>This setting is provided so that one could change the src of the iframe to whatever they need. Default: "javascript:false;"</p>
- <p><code>$('.fix-z-index').bgiframe({ src: '#' });</code></p>
- </dd>
- </dl>
- </dd>
-
- <dt id="how_does_it_work" class="question">How does it work?</dt>
- <dd class="answer">
- <p>The bgiframe plugin works by prepending an iframe to the element. The iframe is given a class of bgiframe and positioned below all the other children of the element. In the default configuration it automatically adjusts to the width and height of the element (including the borders) and the opacity is set to 0. The element needs to have position (relative or absolute) and should have a background (color or image).</p>
- <p>Check out the <a href="http://brandonaaron.net/jquery/plugins/bgiframe/test/">test page</a> to see the plugin in action.</p>
- </dd>
-
- <dt id="where_can_i_get_it" class="question">Where can I get it?</dt>
- <dd class="answer">
- <ul>
- <li><a href="http://jquery.com/plugins/files/bgiframe-2.1.zip">2.1 zip</a> from the bgiframe <a href="http://jquery.com/plugins/project/bgiframe">project page</a>.</li>
- <li>Latest SVN: http://jqueryjs.googlecode.com/svn/trunk/plugins/bgiframe/</li>
- <li>Tagged Versions in SVN: Latest SVN: http://jqueryjs.googlecode.com/svn/tags/plugins/bgiframe/</li>
- </ul>
- </dd>
-
- <dt id="suggestions_bugs_patches" class="question">Suggestions? Bugs? Patches?</dt>
- <dd class="answer">
- <p>Feel free to make any suggestions, bug reports or add any patches via the <a href="http://jquery.com/plugins/project/bgiframe">project page</a>.</p>
- </dd>
- </dl>
- <p>The bgiframe plugin is authored by <a href="http://blog.brandonaaron.net/">Brandon Aaron (http://brandonaaron.net/)</a></p>
- </div>
- </div>
- </body>
-</html>
\ No newline at end of file
+++ /dev/null
-/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $
- * $Rev: 2446 $
- *
- * Version 2.1.1
- */
-
-(function($){
-
-/**
- * The bgiframe is chainable and applies the iframe hack to get
- * around zIndex issues in IE6. It will only apply itself in IE6
- * and adds a class to the iframe called 'bgiframe'. The iframe
- * is appeneded as the first child of the matched element(s)
- * with a tabIndex and zIndex of -1.
- *
- * By default the plugin will take borders, sized with pixel units,
- * into account. If a different unit is used for the border's width,
- * then you will need to use the top and left settings as explained below.
- *
- * NOTICE: This plugin has been reported to cause perfromance problems
- * when used on elements that change properties (like width, height and
- * opacity) a lot in IE6. Most of these problems have been caused by
- * the expressions used to calculate the elements width, height and
- * borders. Some have reported it is due to the opacity filter. All
- * these settings can be changed if needed as explained below.
- *
- * @example $('div').bgiframe();
- * @before <div><p>Paragraph</p></div>
- * @result <div><iframe class="bgiframe".../><p>Paragraph</p></div>
- *
- * @param Map settings Optional settings to configure the iframe.
- * @option String|Number top The iframe must be offset to the top
- * by the width of the top border. This should be a negative
- * number representing the border-top-width. If a number is
- * is used here, pixels will be assumed. Otherwise, be sure
- * to specify a unit. An expression could also be used.
- * By default the value is "auto" which will use an expression
- * to get the border-top-width if it is in pixels.
- * @option String|Number left The iframe must be offset to the left
- * by the width of the left border. This should be a negative
- * number representing the border-left-width. If a number is
- * is used here, pixels will be assumed. Otherwise, be sure
- * to specify a unit. An expression could also be used.
- * By default the value is "auto" which will use an expression
- * to get the border-left-width if it is in pixels.
- * @option String|Number width This is the width of the iframe. If
- * a number is used here, pixels will be assume. Otherwise, be sure
- * to specify a unit. An experssion could also be used.
- * By default the value is "auto" which will use an experssion
- * to get the offsetWidth.
- * @option String|Number height This is the height of the iframe. If
- * a number is used here, pixels will be assume. Otherwise, be sure
- * to specify a unit. An experssion could also be used.
- * By default the value is "auto" which will use an experssion
- * to get the offsetHeight.
- * @option Boolean opacity This is a boolean representing whether or not
- * to use opacity. If set to true, the opacity of 0 is applied. If
- * set to false, the opacity filter is not applied. Default: true.
- * @option String src This setting is provided so that one could change
- * the src of the iframe to whatever they need.
- * Default: "javascript:false;"
- *
- * @name bgiframe
- * @type jQuery
- * @cat Plugins/bgiframe
- * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
- */
-$.fn.bgIframe = $.fn.bgiframe = function(s) {
- // This is only for IE6
- if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) {
- s = $.extend({
- top : 'auto', // auto == .currentStyle.borderTopWidth
- left : 'auto', // auto == .currentStyle.borderLeftWidth
- width : 'auto', // auto == offsetWidth
- height : 'auto', // auto == offsetHeight
- opacity : true,
- src : 'javascript:false;'
- }, s || {});
- var prop = function(n){return n&&n.constructor==Number?n+'px':n;},
- html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
- 'style="display:block;position:absolute;z-index:-1;'+
- (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
- 'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
- 'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
- 'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
- 'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
- '"/>';
- return this.each(function() {
- if ( $('> iframe.bgiframe', this).length == 0 )
- this.insertBefore( document.createElement(html), this.firstChild );
- });
- }
- return this;
-};
-
-})(jQuery);
\ No newline at end of file
+++ /dev/null
-/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * $LastChangedDate: 2007-07-21 18:45:56 -0500 (Sat, 21 Jul 2007) $
- * $Rev: 2447 $
- *
- * Version 2.1.1
- */
-(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);
\ No newline at end of file
+++ /dev/null
-/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $
- * $Rev: 2446 $
- *
- * Version 2.1.1
- */
-eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(b($){$.m.E=$.m.g=b(s){h($.x.10&&/6.0/.I(D.B)){s=$.w({c:\'3\',5:\'3\',8:\'3\',d:\'3\',k:M,e:\'F:i;\'},s||{});C a=b(n){f n&&n.t==r?n+\'4\':n},p=\'<o Y="g"W="0"R="-1"e="\'+s.e+\'"\'+\'Q="P:O;N:L;z-H:-1;\'+(s.k!==i?\'G:J(K=\\\'0\\\');\':\'\')+\'c:\'+(s.c==\'3\'?\'7(((l(2.9.j.A)||0)*-1)+\\\'4\\\')\':a(s.c))+\';\'+\'5:\'+(s.5==\'3\'?\'7(((l(2.9.j.y)||0)*-1)+\\\'4\\\')\':a(s.5))+\';\'+\'8:\'+(s.8==\'3\'?\'7(2.9.S+\\\'4\\\')\':a(s.8))+\';\'+\'d:\'+(s.d==\'3\'?\'7(2.9.v+\\\'4\\\')\':a(s.d))+\';\'+\'"/>\';f 2.T(b(){h($(\'> o.g\',2).U==0)2.V(q.X(p),2.u)})}f 2}})(Z);',62,63,'||this|auto|px|left||expression|width|parentNode||function|top|height|src|return|bgiframe|if|false|currentStyle|opacity|parseInt|fn||iframe|html|document|Number||constructor|firstChild|offsetHeight|extend|browser|borderLeftWidth||borderTopWidth|userAgent|var|navigator|bgIframe|javascript|filter|index|test|Alpha|Opacity|absolute|true|position|block|display|style|tabindex|offsetWidth|each|length|insertBefore|frameborder|createElement|class|jQuery|msie'.split('|'),0,{}))
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html debug="true">
- <head>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>jQuery bgiframe Visual Test</title>
-
- <!-- load latest build of jquery.js -->
- <script type="text/javascript" src="../../../jquery/dist/jquery.js"></script>
-
- <!-- load dimensions.js (this is what we're testing! -->
- <script type="text/javascript" src="../jquery.bgiframe.js"></script>
-
- <!-- load firebug lite
- <script type="text/javascript" src="http://brandon.jquery.com/firebuglite/firebug.js"></script>-->
-
- <link rel="Stylesheet" media="screen" href="../../../jquery/test/data/testsuite.css" />
-
- <script type="text/javascript" charset="utf-8">
- $(function() {
- $('#userAgent').html(navigator.userAgent);
- $('#box2').bgiframe();
- $('#box3').bgiframe({top: -5, left: -5});
- $('#box4').bgiframe({top: -5, left: -5, width: 270, height: 120});
- $('#box5').bgiframe({top: 0, left: 0, width: 260, height: 110});
- $('#box6').bgiframe({top: '-5px', left: '-5px', width: '270px', height: '120px'});
- $('#box7').bgiframe({top: '-.5em', left: '-.5em', width: '17em', height: '12em'});
- $('#box8').bgiframe({top: '-.5em', left: '-.5em'});
- $('#box9').bgiframe({opacity:false});
- });
- </script>
-
- <style type="text/css" media="screen">
- #wrapper { position: relative; width: 100%; font: 12px Arial; }
- form { position: absolute; top: 0; left: 0; width: 100%; }
- select { position: relative; width: 100%; margin: 0 0 2px; z-index: 1; }
-
- .box { position: relative; z-index: 2; float: left; margin: 5px; border: 5px solid #666; padding: 5px; width: 250px; height: 100px; color: #000; background-color: #999; }
- dl { margin: 0; padding: 0; }
- dt { float: left; margin: 0; padding: 0; width: 50px; }
- dd { margin: 0; padding: 0; }
- #box7, #box8 { border-width: .5em; padding: .5em; width: 15em; height: 10em; }
- </style>
- </head>
- <body>
- <h1 id="banner">jQuery bgiframe - Visual Test</h1>
- <h2 id="userAgent"></h2>
- <div id="wrapper">
- <form action="#" method="get" accept-charset="utf-8">
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- <select name="test"><option>Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing</option></select>
- </form>
-
- <div id="box1" class="box">nothing</div>
- <div id="box2" class="box">
- <dl>
- <dt>top:</dt>
- <dd>'auto'</dd>
-
- <dt>left:</dt>
- <dd>'auto'</dd>
-
- <dt>width:</dt>
- <dd>'auto'</dd>
-
- <dt>height:</dt>
- <dd>'auto'</dd>
- </dl>
- </div>
- <div id="box3" class="box">
- <dl>
- <dt>top:</dt>
- <dd>0</dd>
-
- <dt>left:</dt>
- <dd>0</dd>
-
- <dt>width:</dt>
- <dd>'auto'</dd>
-
- <dt>height:</dt>
- <dd>'auto'</dd>
- </dl>
- </div>
- <div id="box4" class="box">
- <dl>
- <dt>top:</dt>
- <dd>-5</dd>
-
- <dt>left:</dt>
- <dd>-5</dd>
-
- <dt>width:</dt>
- <dd>270</dd>
-
- <dt>height:</dt>
- <dd>120</dd>
- </dl>
- </div>
- <div id="box5" class="box">
- <dl>
- <dt>top:</dt>
- <dd>0</dd>
-
- <dt>left:</dt>
- <dd>0</dd>
-
- <dt>width:</dt>
- <dd>260</dd>
-
- <dt>height:</dt>
- <dd>110</dd>
- </dl>
- </div>
- <div id="box6" class="box">
- <dl>
- <dt>top:</dt>
- <dd>'-5px'</dd>
-
- <dt>left:</dt>
- <dd>'-5px'</dd>
-
- <dt>width:</dt>
- <dd>'270px'</dd>
-
- <dt>height:</dt>
- <dd>'120px'</dd>
- </dl>
- </div>
- <div id="box7" class="box">
- <dl>
- <dt>top:</dt>
- <dd>'-.5em'</dd>
-
- <dt>left:</dt>
- <dd>'-.5em'</dd>
-
- <dt>width:</dt>
- <dd>'17em'</dd>
-
- <dt>height:</dt>
- <dd>'12em'</dd>
- </dl>
- </div>
- <div id="box8" class="box">
- <dl>
- <dt>top:</dt>
- <dd>'-.5em'</dd>
-
- <dt>left:</dt>
- <dd>'-.5em'</dd>
-
- <dt>width:</dt>
- <dd>'auto'</dd>
-
- <dt>height:</dt>
- <dd>'auto'</dd>
- </dl>
- </div>
- <div id="box9" class="box">
- <dl>
- <dt>top:</dt>
- <dd>'auto'</dd>
-
- <dt>left:</dt>
- <dd>'auto'</dd>
-
- <dt>width:</dt>
- <dd>'auto'</dd>
-
- <dt>height:</dt>
- <dd>'auto'</dd>
-
- <dt>opacity:</dt>
- <dd>false</dd>
- </dl>
- </div>
- </div>
- </body>
-</html>
\ No newline at end of file
--- /dev/null
+/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)\r
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) \r
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\r
+ *\r
+ * $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $\r
+ * $Rev: 2446 $\r
+ *\r
+ * Version 2.1.1\r
+ */\r
+\r
+(function($){\r
+\r
+/**\r
+ * The bgiframe is chainable and applies the iframe hack to get \r
+ * around zIndex issues in IE6. It will only apply itself in IE6 \r
+ * and adds a class to the iframe called 'bgiframe'. The iframe\r
+ * is appeneded as the first child of the matched element(s) \r
+ * with a tabIndex and zIndex of -1.\r
+ * \r
+ * By default the plugin will take borders, sized with pixel units,\r
+ * into account. If a different unit is used for the border's width,\r
+ * then you will need to use the top and left settings as explained below.\r
+ *\r
+ * NOTICE: This plugin has been reported to cause perfromance problems\r
+ * when used on elements that change properties (like width, height and\r
+ * opacity) a lot in IE6. Most of these problems have been caused by \r
+ * the expressions used to calculate the elements width, height and \r
+ * borders. Some have reported it is due to the opacity filter. All \r
+ * these settings can be changed if needed as explained below.\r
+ *\r
+ * @example $('div').bgiframe();\r
+ * @before <div><p>Paragraph</p></div>\r
+ * @result <div><iframe class="bgiframe".../><p>Paragraph</p></div>\r
+ *\r
+ * @param Map settings Optional settings to configure the iframe.\r
+ * @option String|Number top The iframe must be offset to the top\r
+ * by the width of the top border. This should be a negative \r
+ * number representing the border-top-width. If a number is \r
+ * is used here, pixels will be assumed. Otherwise, be sure\r
+ * to specify a unit. An expression could also be used. \r
+ * By default the value is "auto" which will use an expression \r
+ * to get the border-top-width if it is in pixels.\r
+ * @option String|Number left The iframe must be offset to the left\r
+ * by the width of the left border. This should be a negative \r
+ * number representing the border-left-width. If a number is \r
+ * is used here, pixels will be assumed. Otherwise, be sure\r
+ * to specify a unit. An expression could also be used. \r
+ * By default the value is "auto" which will use an expression \r
+ * to get the border-left-width if it is in pixels.\r
+ * @option String|Number width This is the width of the iframe. If\r
+ * a number is used here, pixels will be assume. Otherwise, be sure\r
+ * to specify a unit. An experssion could also be used.\r
+ * By default the value is "auto" which will use an experssion\r
+ * to get the offsetWidth.\r
+ * @option String|Number height This is the height of the iframe. If\r
+ * a number is used here, pixels will be assume. Otherwise, be sure\r
+ * to specify a unit. An experssion could also be used.\r
+ * By default the value is "auto" which will use an experssion\r
+ * to get the offsetHeight.\r
+ * @option Boolean opacity This is a boolean representing whether or not\r
+ * to use opacity. If set to true, the opacity of 0 is applied. If\r
+ * set to false, the opacity filter is not applied. Default: true.\r
+ * @option String src This setting is provided so that one could change \r
+ * the src of the iframe to whatever they need.\r
+ * Default: "javascript:false;"\r
+ *\r
+ * @name bgiframe\r
+ * @type jQuery\r
+ * @cat Plugins/bgiframe\r
+ * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)\r
+ */\r
+$.fn.bgIframe = $.fn.bgiframe = function(s) {\r
+ // This is only for IE6\r
+ if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) {\r
+ s = $.extend({\r
+ top : 'auto', // auto == .currentStyle.borderTopWidth\r
+ left : 'auto', // auto == .currentStyle.borderLeftWidth\r
+ width : 'auto', // auto == offsetWidth\r
+ height : 'auto', // auto == offsetHeight\r
+ opacity : true,\r
+ src : 'javascript:false;'\r
+ }, s || {});\r
+ var prop = function(n){return n&&n.constructor==Number?n+'px':n;},\r
+ html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+\r
+ 'style="display:block;position:absolute;z-index:-1;'+\r
+ (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+\r
+ 'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+\r
+ 'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+\r
+ 'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+\r
+ 'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+\r
+ '"/>';\r
+ return this.each(function() {\r
+ if ( $('> iframe.bgiframe', this).length == 0 )\r
+ this.insertBefore( document.createElement(html), this.firstChild );\r
+ });\r
+ }\r
+ return this;\r
+};\r
+\r
+})(jQuery);
\ No newline at end of file
--- /dev/null
+/**\r
+ * Cookie plugin\r
+ *\r
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)\r
+ * Dual licensed under the MIT and GPL licenses:\r
+ * http://www.opensource.org/licenses/mit-license.php\r
+ * http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ */\r
+\r
+/**\r
+ * Create a cookie with the given name and value and other optional parameters.\r
+ *\r
+ * @example $.cookie('the_cookie', 'the_value');\r
+ * @desc Set the value of a cookie.\r
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });\r
+ * @desc Create a cookie with all available options.\r
+ * @example $.cookie('the_cookie', 'the_value');\r
+ * @desc Create a session cookie.\r
+ * @example $.cookie('the_cookie', null);\r
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain\r
+ * used when the cookie was set.\r
+ *\r
+ * @param String name The name of the cookie.\r
+ * @param String value The value of the cookie.\r
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.\r
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.\r
+ * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.\r
+ * If set to null or omitted, the cookie will be a session cookie and will not be retained\r
+ * when the the browser exits.\r
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).\r
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).\r
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will\r
+ * require a secure protocol (like HTTPS).\r
+ * @type undefined\r
+ *\r
+ * @name $.cookie\r
+ * @cat Plugins/Cookie\r
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de\r
+ */\r
+\r
+/**\r
+ * Get the value of a cookie with the given name.\r
+ *\r
+ * @example $.cookie('the_cookie');\r
+ * @desc Get the value of a cookie.\r
+ *\r
+ * @param String name The name of the cookie.\r
+ * @return The value of the cookie.\r
+ * @type String\r
+ *\r
+ * @name $.cookie\r
+ * @cat Plugins/Cookie\r
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de\r
+ */\r
+jQuery.cookie = function(name, value, options) {\r
+ if (typeof value != 'undefined') { // name and value given, set cookie\r
+ options = options || {};\r
+ if (value === null) {\r
+ value = '';\r
+ options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed\r
+ options.expires = -1;\r
+ }\r
+ var expires = '';\r
+ if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {\r
+ var date;\r
+ if (typeof options.expires == 'number') {\r
+ date = new Date();\r
+ date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));\r
+ } else {\r
+ date = options.expires;\r
+ }\r
+ expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE\r
+ }\r
+ // NOTE Needed to parenthesize options.path and options.domain\r
+ // in the following expressions, otherwise they evaluate to undefined\r
+ // in the packed version for some reason...\r
+ var path = options.path ? '; path=' + (options.path) : '';\r
+ var domain = options.domain ? '; domain=' + (options.domain) : '';\r
+ var secure = options.secure ? '; secure' : '';\r
+ document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');\r
+ } else { // only name given, get cookie\r
+ var cookieValue = null;\r
+ if (document.cookie && document.cookie != '') {\r
+ var cookies = document.cookie.split(';');\r
+ for (var i = 0; i < cookies.length; i++) {\r
+ var cookie = jQuery.trim(cookies[i]);\r
+ // Does this cookie string begin with the name we want?\r
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {\r
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ return cookieValue;\r
+ }\r
+};
\ No newline at end of file
--- /dev/null
+/*\r
+ * jquery.simulate - simulate browser mouse and keyboard events\r
+ *\r
+ * Copyright (c) 2009 Eduardo Lundgren (eduardolundgren@gmail.com)\r
+ * and Richard D. Worth (rdworth@gmail.com)\r
+ *\r
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) \r
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\r
+ *\r
+ */\r
+\r
+;(function($) {\r
+\r
+$.fn.extend({\r
+ simulate: function(type, options) {\r
+ return this.each(function() {\r
+ var opt = $.extend({}, $.simulate.defaults, options || {});\r
+ new $.simulate(this, type, opt);\r
+ });\r
+ }\r
+});\r
+\r
+$.simulate = function(el, type, options) {\r
+ this.target = el;\r
+ this.options = options;\r
+\r
+ if (/^drag$/.test(type)) {\r
+ this[type].apply(this, [this.target, options]);\r
+ } else {\r
+ this.simulateEvent(el, type, options);\r
+ }\r
+}\r
+\r
+$.extend($.simulate.prototype, {\r
+ simulateEvent: function(el, type, options) {\r
+ var evt = this.createEvent(type, options);\r
+ this.dispatchEvent(el, type, evt, options);\r
+ return evt;\r
+ },\r
+ createEvent: function(type, options) {\r
+ if (/^mouse(over|out|down|up|move)|(dbl)?click$/.test(type)) {\r
+ return this.mouseEvent(type, options);\r
+ } else if (/^key(up|down|press)$/.test(type)) {\r
+ return this.keyboardEvent(type, options);\r
+ }\r
+ },\r
+ mouseEvent: function(type, options) {\r
+ var evt;\r
+ var e = $.extend({\r
+ bubbles: true, cancelable: (type != "mousemove"), view: window, detail: 0,\r
+ screenX: 0, screenY: 0, clientX: 0, clientY: 0,\r
+ ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,\r
+ button: 0, relatedTarget: undefined\r
+ }, options);\r
+\r
+ var relatedTarget = $(e.relatedTarget)[0];\r
+\r
+ if ($.isFunction(document.createEvent)) {\r
+ evt = document.createEvent("MouseEvents");\r
+ evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,\r
+ e.screenX, e.screenY, e.clientX, e.clientY,\r
+ e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,\r
+ e.button, e.relatedTarget || document.body.parentNode);\r
+ } else if (document.createEventObject) {\r
+ evt = document.createEventObject();\r
+ $.extend(evt, e);\r
+ evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;\r
+ }\r
+ return evt;\r
+ },\r
+ keyboardEvent: function(type, options) {\r
+ var evt;\r
+\r
+ var e = $.extend({ bubbles: true, cancelable: true, view: window,\r
+ ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,\r
+ keyCode: 0, charCode: 0\r
+ }, options);\r
+\r
+ if ($.isFunction(document.createEvent)) {\r
+ try {\r
+ evt = document.createEvent("KeyEvents");\r
+ evt.initKeyEvent(type, e.bubbles, e.cancelable, e.view,\r
+ e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,\r
+ e.keyCode, e.charCode);\r
+ } catch(err) {\r
+ evt = document.createEvent("Events");\r
+ evt.initEvent(type, e.bubbles, e.cancelable);\r
+ $.extend(evt, { view: e.view,\r
+ ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey,\r
+ keyCode: e.keyCode, charCode: e.charCode\r
+ });\r
+ }\r
+ } else if (document.createEventObject) {\r
+ evt = document.createEventObject();\r
+ $.extend(evt, e);\r
+ }\r
+ if ($.browser.msie || $.browser.opera) {\r
+ evt.keyCode = (e.charCode > 0) ? e.charCode : e.keyCode;\r
+ evt.charCode = undefined;\r
+ }\r
+ return evt;\r
+ },\r
+\r
+ dispatchEvent: function(el, type, evt) {\r
+ if (el.dispatchEvent) {\r
+ el.dispatchEvent(evt);\r
+ } else if (el.fireEvent) {\r
+ el.fireEvent('on' + type, evt);\r
+ }\r
+ return evt;\r
+ },\r
+\r
+ drag: function(el) {\r
+ var self = this, center = this.findCenter(this.target), \r
+ options = this.options, x = Math.floor(center.x), y = Math.floor(center.y), \r
+ dx = options.dx || 0, dy = options.dy || 0, target = this.target;\r
+ var coord = { clientX: x, clientY: y };\r
+ this.simulateEvent(target, "mousedown", coord);\r
+ coord = { clientX: x + 1, clientY: y + 1 };\r
+ this.simulateEvent(document, "mousemove", coord);\r
+ coord = { clientX: x + dx, clientY: y + dy };\r
+ this.simulateEvent(document, "mousemove", coord);\r
+ this.simulateEvent(document, "mousemove", coord);\r
+ this.simulateEvent(target, "mouseup", coord);\r
+ },\r
+ findCenter: function(el) {\r
+ var el = $(this.target), o = el.offset();\r
+ return {\r
+ x: o.left + el.outerWidth() / 2,\r
+ y: o.top + el.outerHeight() / 2\r
+ };\r
+ }\r
+});\r
+\r
+$.extend($.simulate, {\r
+ defaults: {\r
+ speed: 'sync'\r
+ },\r
+ VK_TAB: 9,\r
+ VK_ENTER: 13,\r
+ VK_ESC: 27,\r
+ VK_PGUP: 33,\r
+ VK_PGDN: 34,\r
+ VK_END: 35,\r
+ VK_HOME: 36,\r
+ VK_LEFT: 37,\r
+ VK_UP: 38,\r
+ VK_RIGHT: 39,\r
+ VK_DOWN: 40\r
+});\r
+\r
+})(jQuery);\r
--- /dev/null
+/*
+ * Javascript Diff Algorithm
+ * By John Resig (http://ejohn.org/)
+ * Modified by Chu Alan "sprite"
+ *
+ * More Info:
+ * http://ejohn.org/projects/javascript-diff-algorithm/
+ */
+
+function escape(s) {
+ var n = s;
+ n = n.replace(/&/g, "&");
+ n = n.replace(/</g, "<");
+ n = n.replace(/>/g, ">");
+ n = n.replace(/"/g, """);
+
+ return n;
+}
+
+function diffString( o, n ) {
+ o = o.replace(/\s+$/, '');
+ n = n.replace(/\s+$/, '');
+
+ var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/) );
+ var str = "";
+
+ var oSpace = o.match(/\s+/g);
+ if (oSpace == null) {
+ oSpace = ["\n"];
+ } else {
+ oSpace.push("\n");
+ }
+ var nSpace = n.match(/\s+/g);
+ if (nSpace == null) {
+ nSpace = ["\n"];
+ } else {
+ nSpace.push("\n");
+ }
+
+ if (out.n.length == 0) {
+ for (var i = 0; i < out.o.length; i++) {
+ str += '<del>' + escape(out.o[i]) + oSpace[i] + "</del>";
+ }
+ } else {
+ if (out.n[0].text == null) {
+ for (n = 0; n < out.o.length && out.o[n].text == null; n++) {
+ str += '<del>' + escape(out.o[n]) + oSpace[n] + "</del>";
+ }
+ }
+
+ for ( var i = 0; i < out.n.length; i++ ) {
+ if (out.n[i].text == null) {
+ str += '<ins>' + escape(out.n[i]) + nSpace[i] + "</ins>";
+ } else {
+ var pre = "";
+
+ for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) {
+ pre += '<del>' + escape(out.o[n]) + oSpace[n] + "</del>";
+ }
+ str += " " + out.n[i].text + nSpace[i] + pre;
+ }
+ }
+ }
+
+ return str;
+}
+
+function randomColor() {
+ return "rgb(" + (Math.random() * 100) + "%, " +
+ (Math.random() * 100) + "%, " +
+ (Math.random() * 100) + "%)";
+}
+function diffString2( o, n ) {
+ o = o.replace(/\s+$/, '');
+ n = n.replace(/\s+$/, '');
+
+ var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/) );
+
+ var oSpace = o.match(/\s+/g);
+ if (oSpace == null) {
+ oSpace = ["\n"];
+ } else {
+ oSpace.push("\n");
+ }
+ var nSpace = n.match(/\s+/g);
+ if (nSpace == null) {
+ nSpace = ["\n"];
+ } else {
+ nSpace.push("\n");
+ }
+
+ var os = "";
+ var colors = new Array();
+ for (var i = 0; i < out.o.length; i++) {
+ colors[i] = randomColor();
+
+ if (out.o[i].text != null) {
+ os += '<span style="background-color: ' +colors[i]+ '">' +
+ escape(out.o[i].text) + oSpace[i] + "</span>";
+ } else {
+ os += "<del>" + escape(out.o[i]) + oSpace[i] + "</del>";
+ }
+ }
+
+ var ns = "";
+ for (var i = 0; i < out.n.length; i++) {
+ if (out.n[i].text != null) {
+ ns += '<span style="background-color: ' +colors[out.n[i].row]+ '">' +
+ escape(out.n[i].text) + nSpace[i] + "</span>";
+ } else {
+ ns += "<ins>" + escape(out.n[i]) + nSpace[i] + "</ins>";
+ }
+ }
+
+ return { o : os , n : ns };
+}
+
+function diff( o, n ) {
+ var ns = new Object();
+ var os = new Object();
+
+ for ( var i = 0; i < n.length; i++ ) {
+ if ( ns[ n[i] ] == null )
+ ns[ n[i] ] = { rows: new Array(), o: null };
+ ns[ n[i] ].rows.push( i );
+ }
+
+ for ( var i = 0; i < o.length; i++ ) {
+ if ( os[ o[i] ] == null )
+ os[ o[i] ] = { rows: new Array(), n: null };
+ os[ o[i] ].rows.push( i );
+ }
+
+ for ( var i in ns ) {
+ if ( ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1 ) {
+ n[ ns[i].rows[0] ] = { text: n[ ns[i].rows[0] ], row: os[i].rows[0] };
+ o[ os[i].rows[0] ] = { text: o[ os[i].rows[0] ], row: ns[i].rows[0] };
+ }
+ }
+
+ for ( var i = 0; i < n.length - 1; i++ ) {
+ if ( n[i].text != null && n[i+1].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null &&
+ n[i+1] == o[ n[i].row + 1 ] ) {
+ n[i+1] = { text: n[i+1], row: n[i].row + 1 };
+ o[n[i].row+1] = { text: o[n[i].row+1], row: i + 1 };
+ }
+ }
+
+ for ( var i = n.length - 1; i > 0; i-- ) {
+ if ( n[i].text != null && n[i-1].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null &&
+ n[i-1] == o[ n[i].row - 1 ] ) {
+ n[i-1] = { text: n[i-1], row: n[i].row - 1 };
+ o[n[i].row-1] = { text: o[n[i].row-1], row: i - 1 };
+ }
+ }
+
+ return { o: o, n: n };
+}
+
+++ /dev/null
-/*
- * Javascript Diff Algorithm
- * By John Resig (http://ejohn.org/)
- * Modified by Chu Alan "sprite"
- *
- * More Info:
- * http://ejohn.org/projects/javascript-diff-algorithm/
- */
-
-function escape(s) {
- var n = s;
- n = n.replace(/&/g, "&");
- n = n.replace(/</g, "<");
- n = n.replace(/>/g, ">");
- n = n.replace(/"/g, """);
-
- return n;
-}
-
-function diffString( o, n ) {
- o = o.replace(/\s+$/, '');
- n = n.replace(/\s+$/, '');
-
- var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/) );
- var str = "";
-
- var oSpace = o.match(/\s+/g);
- if (oSpace == null) {
- oSpace = ["\n"];
- } else {
- oSpace.push("\n");
- }
- var nSpace = n.match(/\s+/g);
- if (nSpace == null) {
- nSpace = ["\n"];
- } else {
- nSpace.push("\n");
- }
-
- if (out.n.length == 0) {
- for (var i = 0; i < out.o.length; i++) {
- str += '<del>' + escape(out.o[i]) + oSpace[i] + "</del>";
- }
- } else {
- if (out.n[0].text == null) {
- for (n = 0; n < out.o.length && out.o[n].text == null; n++) {
- str += '<del>' + escape(out.o[n]) + oSpace[n] + "</del>";
- }
- }
-
- for ( var i = 0; i < out.n.length; i++ ) {
- if (out.n[i].text == null) {
- str += '<ins>' + escape(out.n[i]) + nSpace[i] + "</ins>";
- } else {
- var pre = "";
-
- for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) {
- pre += '<del>' + escape(out.o[n]) + oSpace[n] + "</del>";
- }
- str += " " + out.n[i].text + nSpace[i] + pre;
- }
- }
- }
-
- return str;
-}
-
-function randomColor() {
- return "rgb(" + (Math.random() * 100) + "%, " +
- (Math.random() * 100) + "%, " +
- (Math.random() * 100) + "%)";
-}
-function diffString2( o, n ) {
- o = o.replace(/\s+$/, '');
- n = n.replace(/\s+$/, '');
-
- var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/) );
-
- var oSpace = o.match(/\s+/g);
- if (oSpace == null) {
- oSpace = ["\n"];
- } else {
- oSpace.push("\n");
- }
- var nSpace = n.match(/\s+/g);
- if (nSpace == null) {
- nSpace = ["\n"];
- } else {
- nSpace.push("\n");
- }
-
- var os = "";
- var colors = new Array();
- for (var i = 0; i < out.o.length; i++) {
- colors[i] = randomColor();
-
- if (out.o[i].text != null) {
- os += '<span style="background-color: ' +colors[i]+ '">' +
- escape(out.o[i].text) + oSpace[i] + "</span>";
- } else {
- os += "<del>" + escape(out.o[i]) + oSpace[i] + "</del>";
- }
- }
-
- var ns = "";
- for (var i = 0; i < out.n.length; i++) {
- if (out.n[i].text != null) {
- ns += '<span style="background-color: ' +colors[out.n[i].row]+ '">' +
- escape(out.n[i].text) + nSpace[i] + "</span>";
- } else {
- ns += "<ins>" + escape(out.n[i]) + nSpace[i] + "</ins>";
- }
- }
-
- return { o : os , n : ns };
-}
-
-function diff( o, n ) {
- var ns = new Object();
- var os = new Object();
-
- for ( var i = 0; i < n.length; i++ ) {
- if ( ns[ n[i] ] == null )
- ns[ n[i] ] = { rows: new Array(), o: null };
- ns[ n[i] ].rows.push( i );
- }
-
- for ( var i = 0; i < o.length; i++ ) {
- if ( os[ o[i] ] == null )
- os[ o[i] ] = { rows: new Array(), n: null };
- os[ o[i] ].rows.push( i );
- }
-
- for ( var i in ns ) {
- if ( ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1 ) {
- n[ ns[i].rows[0] ] = { text: n[ ns[i].rows[0] ], row: os[i].rows[0] };
- o[ os[i].rows[0] ] = { text: o[ os[i].rows[0] ], row: ns[i].rows[0] };
- }
- }
-
- for ( var i = 0; i < n.length - 1; i++ ) {
- if ( n[i].text != null && n[i+1].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null &&
- n[i+1] == o[ n[i].row + 1 ] ) {
- n[i+1] = { text: n[i+1], row: n[i].row + 1 };
- o[n[i].row+1] = { text: o[n[i].row+1], row: i + 1 };
- }
- }
-
- for ( var i = n.length - 1; i > 0; i-- ) {
- if ( n[i].text != null && n[i-1].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null &&
- n[i-1] == o[ n[i].row - 1 ] ) {
- n[i-1] = { text: n[i-1], row: n[i].row - 1 };
- o[n[i].row-1] = { text: o[n[i].row-1], row: i - 1 };
- }
- }
-
- return { o: o, n: n };
-}
-
--- /dev/null
+/*\r
+ * QUnit - jQuery unit testrunner\r
+ * \r
+ * http://docs.jquery.com/QUnit\r
+ *\r
+ * Copyright (c) 2008 John Resig, Jörn Zaefferer\r
+ * Dual licensed under the MIT (MIT-LICENSE.txt)\r
+ * and GPL (GPL-LICENSE.txt) licenses.\r
+ *\r
+ * $Id: testrunner.js 6343 2009-05-06 15:09:22Z joern.zaefferer $\r
+ */\r
+\r
+(function($) {\r
+\r
+// Tests for equality any JavaScript type and structure without unexpected results.\r
+// Discussions and reference: http://philrathe.com/articles/equiv\r
+// Test suites: http://philrathe.com/tests/equiv\r
+// Author: Philippe Rathé <prathe@gmail.com>\r
+var equiv = function () {\r
+\r
+ var innerEquiv; // the real equiv function\r
+ var callers = []; // stack to decide between skip/abort functions\r
+\r
+ // Determine what is o.\r
+ function hoozit(o) {\r
+ if (typeof o === "string") {\r
+ return "string";\r
+\r
+ } else if (typeof o === "boolean") {\r
+ return "boolean";\r
+\r
+ } else if (typeof o === "number") {\r
+\r
+ if (isNaN(o)) {\r
+ return "nan";\r
+ } else {\r
+ return "number";\r
+ }\r
+\r
+ } else if (typeof o === "undefined") {\r
+ return "undefined";\r
+\r
+ // consider: typeof null === object\r
+ } else if (o === null) {\r
+ return "null";\r
+\r
+ // consider: typeof [] === object\r
+ } else if (o instanceof Array) {\r
+ return "array";\r
+ \r
+ // consider: typeof new Date() === object\r
+ } else if (o instanceof Date) {\r
+ return "date";\r
+\r
+ // consider: /./ instanceof Object;\r
+ // /./ instanceof RegExp;\r
+ // typeof /./ === "function"; // => false in IE and Opera,\r
+ // true in FF and Safari\r
+ } else if (o instanceof RegExp) {\r
+ return "regexp";\r
+\r
+ } else if (typeof o === "object") {\r
+ return "object";\r
+\r
+ } else if (o instanceof Function) {\r
+ return "function";\r
+ }\r
+ }\r
+\r
+ // Call the o related callback with the given arguments.\r
+ function bindCallbacks(o, callbacks, args) {\r
+ var prop = hoozit(o);\r
+ if (prop) {\r
+ if (hoozit(callbacks[prop]) === "function") {\r
+ return callbacks[prop].apply(callbacks, args);\r
+ } else {\r
+ return callbacks[prop]; // or undefined\r
+ }\r
+ }\r
+ }\r
+\r
+ var callbacks = function () {\r
+\r
+ // for string, boolean, number and null\r
+ function useStrictEquality(b, a) {\r
+ return a === b;\r
+ }\r
+\r
+ return {\r
+ "string": useStrictEquality,\r
+ "boolean": useStrictEquality,\r
+ "number": useStrictEquality,\r
+ "null": useStrictEquality,\r
+ "undefined": useStrictEquality,\r
+\r
+ "nan": function (b) {\r
+ return isNaN(b);\r
+ },\r
+\r
+ "date": function (b, a) {\r
+ return hoozit(b) === "date" && a.valueOf() === b.valueOf();\r
+ },\r
+\r
+ "regexp": function (b, a) {\r
+ return hoozit(b) === "regexp" &&\r
+ a.source === b.source && // the regex itself\r
+ a.global === b.global && // and its modifers (gmi) ...\r
+ a.ignoreCase === b.ignoreCase &&\r
+ a.multiline === b.multiline;\r
+ },\r
+\r
+ // - skip when the property is a method of an instance (OOP)\r
+ // - abort otherwise,\r
+ // initial === would have catch identical references anyway\r
+ "function": function () {\r
+ var caller = callers[callers.length - 1];\r
+ return caller !== Object &&\r
+ typeof caller !== "undefined";\r
+ },\r
+\r
+ "array": function (b, a) {\r
+ var i;\r
+ var len;\r
+\r
+ // b could be an object literal here\r
+ if ( ! (hoozit(b) === "array")) {\r
+ return false;\r
+ }\r
+\r
+ len = a.length;\r
+ if (len !== b.length) { // safe and faster\r
+ return false;\r
+ }\r
+ for (i = 0; i < len; i++) {\r
+ if( ! innerEquiv(a[i], b[i])) {\r
+ return false;\r
+ }\r
+ }\r
+ return true;\r
+ },\r
+\r
+ "object": function (b, a) {\r
+ var i;\r
+ var eq = true; // unless we can proove it\r
+ var aProperties = [], bProperties = []; // collection of strings\r
+\r
+ // comparing constructors is more strict than using instanceof\r
+ if ( a.constructor !== b.constructor) {\r
+ return false;\r
+ }\r
+\r
+ // stack constructor before traversing properties\r
+ callers.push(a.constructor);\r
+\r
+ for (i in a) { // be strict: don't ensures hasOwnProperty and go deep\r
+\r
+ aProperties.push(i); // collect a's properties\r
+\r
+ if ( ! innerEquiv(a[i], b[i])) {\r
+ eq = false;\r
+ }\r
+ }\r
+\r
+ callers.pop(); // unstack, we are done\r
+\r
+ for (i in b) {\r
+ bProperties.push(i); // collect b's properties\r
+ }\r
+\r
+ // Ensures identical properties name\r
+ return eq && innerEquiv(aProperties.sort(), bProperties.sort());\r
+ }\r
+ };\r
+ }();\r
+\r
+ innerEquiv = function () { // can take multiple arguments\r
+ var args = Array.prototype.slice.apply(arguments);\r
+ if (args.length < 2) {\r
+ return true; // end transition\r
+ }\r
+\r
+ return (function (a, b) {\r
+ if (a === b) {\r
+ return true; // catch the most you can\r
+\r
+ } else if (typeof a !== typeof b || a === null || b === null || typeof a === "undefined" || typeof b === "undefined") {\r
+ return false; // don't lose time with error prone cases\r
+\r
+ } else {\r
+ return bindCallbacks(a, callbacks, [b, a]);\r
+ }\r
+\r
+ // apply transition with (1..n) arguments\r
+ })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));\r
+ };\r
+\r
+ return innerEquiv;\r
+}(); // equiv\r
+\r
+var GETParams = $.map( location.search.slice(1).split('&'), decodeURIComponent ),\r
+ ngindex = $.inArray("noglobals", GETParams),\r
+ noglobals = ngindex !== -1;\r
+\r
+if( noglobals )\r
+ GETParams.splice( ngindex, 1 );\r
+ \r
+var config = {\r
+ stats: {\r
+ all: 0,\r
+ bad: 0\r
+ },\r
+ queue: [],\r
+ // block until document ready\r
+ blocking: true,\r
+ //restrict modules/tests by get parameters\r
+ filters: GETParams,\r
+ isLocal: !!(window.location.protocol == 'file:')\r
+};\r
+\r
+// public API as global methods\r
+$.extend(window, {\r
+ test: test,\r
+ module: module,\r
+ expect: expect,\r
+ ok: ok,\r
+ equals: equals,\r
+ start: start,\r
+ stop: stop,\r
+ reset: reset,\r
+ isLocal: config.isLocal,\r
+ same: function(a, b, message) {\r
+ push(equiv(a, b), a, b, message);\r
+ },\r
+ QUnit: {\r
+ equiv: equiv,\r
+ ok: ok,\r
+ done: function(failures, total){},\r
+ log: function(result, message){}\r
+ },\r
+ // legacy methods below\r
+ isSet: isSet,\r
+ isObj: isObj,\r
+ compare: function() {\r
+ throw "compare is deprecated - use same() instead";\r
+ },\r
+ compare2: function() {\r
+ throw "compare2 is deprecated - use same() instead";\r
+ },\r
+ serialArray: function() {\r
+ throw "serialArray is deprecated - use jsDump.parse() instead";\r
+ },\r
+ q: q,\r
+ t: t,\r
+ url: url,\r
+ triggerEvent: triggerEvent\r
+});\r
+\r
+$(window).load(function() {\r
+ \r
+ if (!$("#header, #banner, #userAgent, #tests").length) {\r
+ $('body').prepend(\r
+ '<h1 id="header">' + document.title + '</h1>' +\r
+ '<h2 id="banner"></h2>' +\r
+ '<h2 id="userAgent"></h2>' +\r
+ '<ol id="tests"></ol>'\r
+ );\r
+ }\r
+ \r
+ $('#userAgent').html(navigator.userAgent);\r
+ var head = $('<div class="testrunner-toolbar"><label for="filter-pass">Hide passed tests</label></div>').insertAfter("#userAgent");\r
+ $('<input type="checkbox" id="filter-pass" />').attr("disabled", true).prependTo(head).click(function() {\r
+ $('li.pass')[this.checked ? 'hide' : 'show']();\r
+ });\r
+ $('<input type="checkbox" id="filter-missing">').attr("disabled", true).appendTo(head).click(function() {\r
+ $("li.fail:contains('missing test - untested code is broken code')").parent('ol').parent('li.fail')[this.checked ? 'hide' : 'show']();\r
+ });\r
+ $("#filter-missing").after('<label for="filter-missing">Hide missing tests (untested code is broken code)</label>');\r
+ runTest(); \r
+});\r
+\r
+function synchronize(callback) {\r
+ config.queue.push(callback);\r
+ if(!config.blocking) {\r
+ process();\r
+ }\r
+}\r
+\r
+function process() {\r
+ while(config.queue.length && !config.blocking) {\r
+ config.queue.shift()();\r
+ }\r
+}\r
+\r
+function stop(timeout) {\r
+ config.blocking = true;\r
+ if (timeout)\r
+ config.timeout = setTimeout(function() {\r
+ QUnit.ok( false, "Test timed out" );\r
+ start();\r
+ }, timeout);\r
+}\r
+function start() {\r
+ // A slight delay, to avoid any current callbacks\r
+ setTimeout(function() {\r
+ if(config.timeout)\r
+ clearTimeout(config.timeout);\r
+ config.blocking = false;\r
+ process();\r
+ }, 13);\r
+}\r
+\r
+function validTest( name ) {\r
+ var i = config.filters.length,\r
+ run = false;\r
+\r
+ if( !i )\r
+ return true;\r
+ \r
+ while( i-- ){\r
+ var filter = config.filters[i],\r
+ not = filter.charAt(0) == '!';\r
+ if( not ) \r
+ filter = filter.slice(1);\r
+ if( name.indexOf(filter) != -1 )\r
+ return !not;\r
+ if( not )\r
+ run = true;\r
+ }\r
+ return run;\r
+}\r
+\r
+function runTest() {\r
+ config.blocking = false;\r
+ var started = +new Date;\r
+ config.fixture = document.getElementById('main').innerHTML;\r
+ config.ajaxSettings = $.ajaxSettings;\r
+ synchronize(function() {\r
+ $('<p id="testresult" class="result"/>').html(['Tests completed in ',\r
+ +new Date - started, ' milliseconds.<br/>',\r
+ '<span class="bad">', config.stats.bad, '</span> tests of <span class="all">', config.stats.all, '</span> failed.']\r
+ .join(''))\r
+ .appendTo("body");\r
+ $("#banner").addClass(config.stats.bad ? "fail" : "pass");\r
+ QUnit.done( config.stats.bad, config.stats.all );\r
+ });\r
+}\r
+\r
+var pollution;\r
+\r
+function saveGlobal(){\r
+ pollution = [ ];\r
+ \r
+ if( noglobals )\r
+ for( var key in window )\r
+ pollution.push(key);\r
+}\r
+function checkPollution( name ){\r
+ var old = pollution;\r
+ saveGlobal();\r
+ \r
+ if( pollution.length > old.length ){\r
+ ok( false, "Introduced global variable(s): " + diff(old, pollution).join(", ") );\r
+ config.expected++;\r
+ }\r
+}\r
+\r
+function diff( clean, dirty ){\r
+ return $.grep( dirty, function(name){\r
+ return $.inArray( name, clean ) == -1;\r
+ });\r
+}\r
+\r
+function test(name, callback) {\r
+ if(config.currentModule)\r
+ name = config.currentModule + " module: <span>" + name + "</span>";\r
+ var lifecycle = $.extend({\r
+ setup: function() {},\r
+ teardown: function() {}\r
+ }, config.moduleLifecycle);\r
+ \r
+ if ( !validTest(name) )\r
+ return;\r
+ \r
+ synchronize(function() {\r
+ config.assertions = [];\r
+ config.expected = null;\r
+ try {\r
+ if( !pollution )\r
+ saveGlobal();\r
+ lifecycle.setup();\r
+ } catch(e) {\r
+ QUnit.ok( false, "Setup failed on " + name + ": " + e.message );\r
+ }\r
+ })\r
+ synchronize(function() {\r
+ try {\r
+ callback();\r
+ } catch(e) {\r
+ if( typeof console != "undefined" && console.error && console.warn ) {\r
+ console.error("Test " + name + " died, exception and test follows");\r
+ console.error(e);\r
+ console.warn(callback.toString());\r
+ }\r
+ QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message );\r
+ // else next test will carry the responsibility\r
+ saveGlobal();\r
+ }\r
+ });\r
+ synchronize(function() {\r
+ try {\r
+ checkPollution();\r
+ lifecycle.teardown();\r
+ } catch(e) {\r
+ QUnit.ok( false, "Teardown failed on " + name + ": " + e.message );\r
+ }\r
+ })\r
+ synchronize(function() {\r
+ try {\r
+ reset();\r
+ } catch(e) {\r
+ if( typeof console != "undefined" && console.error && console.warn ) {\r
+ console.error("reset() failed, following Test " + name + ", exception and reset fn follows");\r
+ console.error(e);\r
+ console.warn(reset.toString());\r
+ }\r
+ }\r
+ \r
+ if(config.expected && config.expected != config.assertions.length) {\r
+ QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" );\r
+ }\r
+ \r
+ var good = 0, bad = 0;\r
+ var ol = $("<ol/>").hide();\r
+ config.stats.all += config.assertions.length;\r
+ for ( var i = 0; i < config.assertions.length; i++ ) {\r
+ var assertion = config.assertions[i];\r
+ $("<li/>").addClass(assertion.result ? "pass" : "fail").text(assertion.message || "(no message)").appendTo(ol);\r
+ assertion.result ? good++ : bad++;\r
+ }\r
+ config.stats.bad += bad;\r
+ \r
+ var b = $("<strong/>").html(name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>")\r
+ .click(function(){\r
+ $(this).next().toggle();\r
+ })\r
+ .dblclick(function(event) {\r
+ var target = $(event.target).filter("strong").clone();\r
+ if ( target.length ) {\r
+ target.children().remove();\r
+ location.href = location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent($.trim(target.text()));\r
+ }\r
+ });\r
+ \r
+ $("<li/>").addClass(bad ? "fail" : "pass").append(b).append(ol).appendTo("#tests");\r
+ \r
+ if(bad) {\r
+ $("#filter-pass").attr("disabled", null);\r
+ $("#filter-missing").attr("disabled", null);\r
+ }\r
+ });\r
+}\r
+\r
+// call on start of module test to prepend name to all tests\r
+function module(name, lifecycle) {\r
+ config.currentModule = name;\r
+ config.moduleLifecycle = lifecycle;\r
+}\r
+\r
+/**\r
+ * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.\r
+ */\r
+function expect(asserts) {\r
+ config.expected = asserts;\r
+}\r
+\r
+/**\r
+ * Resets the test setup. Useful for tests that modify the DOM.\r
+ */\r
+function reset() {\r
+ $("#main").html( config.fixture );\r
+ $.event.global = {};\r
+ $.ajaxSettings = $.extend({}, config.ajaxSettings);\r
+}\r
+\r
+/**\r
+ * Asserts true.\r
+ * @example ok( $("a").size() > 5, "There must be at least 5 anchors" );\r
+ */\r
+function ok(a, msg) {\r
+ QUnit.log(a, msg);\r
+\r
+ config.assertions.push({\r
+ result: !!a,\r
+ message: msg\r
+ });\r
+}\r
+\r
+/**\r
+ * Asserts that two arrays are the same\r
+ */\r
+function isSet(a, b, msg) {\r
+ function serialArray( a ) {\r
+ var r = [];\r
+ \r
+ if ( a && a.length )\r
+ for ( var i = 0; i < a.length; i++ ) {\r
+ var str = a[i].nodeName;\r
+ if ( str ) {\r
+ str = str.toLowerCase();\r
+ if ( a[i].id )\r
+ str += "#" + a[i].id;\r
+ } else\r
+ str = a[i];\r
+ r.push( str );\r
+ }\r
+ \r
+ return "[ " + r.join(", ") + " ]";\r
+ }\r
+ var ret = true;\r
+ if ( a && b && a.length != undefined && a.length == b.length ) {\r
+ for ( var i = 0; i < a.length; i++ )\r
+ if ( a[i] != b[i] )\r
+ ret = false;\r
+ } else\r
+ ret = false;\r
+ QUnit.ok( ret, !ret ? (msg + " expected: " + serialArray(b) + " result: " + serialArray(a)) : msg );\r
+}\r
+\r
+/**\r
+ * Asserts that two objects are equivalent\r
+ */\r
+function isObj(a, b, msg) {\r
+ var ret = true;\r
+ \r
+ if ( a && b ) {\r
+ for ( var i in a )\r
+ if ( a[i] != b[i] )\r
+ ret = false;\r
+\r
+ for ( i in b )\r
+ if ( a[i] != b[i] )\r
+ ret = false;\r
+ } else\r
+ ret = false;\r
+\r
+ QUnit.ok( ret, msg );\r
+}\r
+\r
+/**\r
+ * Returns an array of elements with the given IDs, eg.\r
+ * @example q("main", "foo", "bar")\r
+ * @result [<div id="main">, <span id="foo">, <input id="bar">]\r
+ */\r
+function q() {\r
+ var r = [];\r
+ for ( var i = 0; i < arguments.length; i++ )\r
+ r.push( document.getElementById( arguments[i] ) );\r
+ return r;\r
+}\r
+\r
+/**\r
+ * Asserts that a select matches the given IDs\r
+ * @example t("Check for something", "//[a]", ["foo", "baar"]);\r
+ * @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baar'\r
+ */\r
+function t(a,b,c) {\r
+ var f = $(b);\r
+ var s = "";\r
+ for ( var i = 0; i < f.length; i++ )\r
+ s += (s && ",") + '"' + f[i].id + '"';\r
+ isSet(f, q.apply(q,c), a + " (" + b + ")");\r
+}\r
+\r
+/**\r
+ * Add random number to url to stop IE from caching\r
+ *\r
+ * @example url("data/test.html")\r
+ * @result "data/test.html?10538358428943"\r
+ *\r
+ * @example url("data/test.php?foo=bar")\r
+ * @result "data/test.php?foo=bar&10538358345554"\r
+ */\r
+function url(value) {\r
+ return value + (/\?/.test(value) ? "&" : "?") + new Date().getTime() + "" + parseInt(Math.random()*100000);\r
+}\r
+\r
+/**\r
+ * Checks that the first two arguments are equal, with an optional message.\r
+ * Prints out both actual and expected values.\r
+ *\r
+ * Prefered to ok( actual == expected, message )\r
+ *\r
+ * @example equals( $.format("Received {0} bytes.", 2), "Received 2 bytes." );\r
+ *\r
+ * @param Object actual\r
+ * @param Object expected\r
+ * @param String message (optional)\r
+ */\r
+function equals(actual, expected, message) {\r
+ push(expected == actual, actual, expected, message);\r
+}\r
+\r
+function push(result, actual, expected, message) {\r
+ message = message || (result ? "okay" : "failed");\r
+ QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + jsDump.parse(expected) + " result: " + jsDump.parse(actual) );\r
+}\r
+\r
+/**\r
+ * Trigger an event on an element.\r
+ *\r
+ * @example triggerEvent( document.body, "click" );\r
+ *\r
+ * @param DOMElement elem\r
+ * @param String type\r
+ */\r
+function triggerEvent( elem, type, event ) {\r
+ if ( $.browser.mozilla || $.browser.opera ) {\r
+ event = document.createEvent("MouseEvents");\r
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,\r
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);\r
+ elem.dispatchEvent( event );\r
+ } else if ( $.browser.msie ) {\r
+ elem.fireEvent("on"+type);\r
+ }\r
+}\r
+\r
+})(jQuery);\r
+\r
+/**\r
+ * jsDump\r
+ * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com\r
+ * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)\r
+ * Date: 5/15/2008\r
+ * @projectDescription Advanced and extensible data dumping for Javascript.\r
+ * @version 1.0.0\r
+ * @author Ariel Flesler\r
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}\r
+ */\r
+(function(){\r
+ function quote( str ){\r
+ return '"' + str.toString().replace(/"/g, '\\"') + '"';\r
+ };\r
+ function literal( o ){\r
+ return o + ''; \r
+ };\r
+ function join( pre, arr, post ){\r
+ var s = jsDump.separator(),\r
+ base = jsDump.indent();\r
+ inner = jsDump.indent(1);\r
+ if( arr.join )\r
+ arr = arr.join( ',' + s + inner );\r
+ if( !arr )\r
+ return pre + post;\r
+ return [ pre, inner + arr, base + post ].join(s);\r
+ };\r
+ function array( arr ){\r
+ var i = arr.length, ret = Array(i); \r
+ this.up();\r
+ while( i-- )\r
+ ret[i] = this.parse( arr[i] ); \r
+ this.down();\r
+ return join( '[', ret, ']' );\r
+ };\r
+ \r
+ var reName = /^function (\w+)/;\r
+ \r
+ var jsDump = window.jsDump = {\r
+ parse:function( obj, type ){//type is used mostly internally, you can fix a (custom)type in advance\r
+ var parser = this.parsers[ type || this.typeOf(obj) ];\r
+ type = typeof parser; \r
+ \r
+ return type == 'function' ? parser.call( this, obj ) :\r
+ type == 'string' ? parser :\r
+ this.parsers.error;\r
+ },\r
+ typeOf:function( obj ){\r
+ var type = typeof obj,\r
+ f = 'function';//we'll use it 3 times, save it\r
+ return type != 'object' && type != f ? type :\r
+ !obj ? 'null' :\r
+ obj.exec ? 'regexp' :// some browsers (FF) consider regexps functions\r
+ obj.getHours ? 'date' :\r
+ obj.scrollBy ? 'window' :\r
+ obj.nodeName == '#document' ? 'document' :\r
+ obj.nodeName ? 'node' :\r
+ obj.item ? 'nodelist' : // Safari reports nodelists as functions\r
+ obj.callee ? 'arguments' :\r
+ obj.call || obj.constructor != Array && //an array would also fall on this hack\r
+ (obj+'').indexOf(f) != -1 ? f : //IE reports functions like alert, as objects\r
+ 'length' in obj ? 'array' :\r
+ type;\r
+ },\r
+ separator:function(){\r
+ return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' ';\r
+ },\r
+ indent:function( extra ){// extra can be a number, shortcut for increasing-calling-decreasing\r
+ if( !this.multiline )\r
+ return '';\r
+ var chr = this.indentChar;\r
+ if( this.HTML )\r
+ chr = chr.replace(/\t/g,' ').replace(/ /g,' ');\r
+ return Array( this._depth_ + (extra||0) ).join(chr);\r
+ },\r
+ up:function( a ){\r
+ this._depth_ += a || 1;\r
+ },\r
+ down:function( a ){\r
+ this._depth_ -= a || 1;\r
+ },\r
+ setParser:function( name, parser ){\r
+ this.parsers[name] = parser;\r
+ },\r
+ // The next 3 are exposed so you can use them\r
+ quote:quote, \r
+ literal:literal,\r
+ join:join,\r
+ //\r
+ _depth_: 1,\r
+ // This is the list of parsers, to modify them, use jsDump.setParser\r
+ parsers:{\r
+ window: '[Window]',\r
+ document: '[Document]',\r
+ error:'[ERROR]', //when no parser is found, shouldn't happen\r
+ unknown: '[Unknown]',\r
+ 'null':'null',\r
+ undefined:'undefined',\r
+ 'function':function( fn ){\r
+ var ret = 'function',\r
+ name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE\r
+ if( name )\r
+ ret += ' ' + name;\r
+ ret += '(';\r
+ \r
+ ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join('');\r
+ return join( ret, this.parse(fn,'functionCode'), '}' );\r
+ },\r
+ array: array,\r
+ nodelist: array,\r
+ arguments: array,\r
+ object:function( map ){\r
+ var ret = [ ];\r
+ this.up();\r
+ for( var key in map )\r
+ ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) );\r
+ this.down();\r
+ return join( '{', ret, '}' );\r
+ },\r
+ node:function( node ){\r
+ var open = this.HTML ? '<' : '<',\r
+ close = this.HTML ? '>' : '>';\r
+ \r
+ var tag = node.nodeName.toLowerCase(),\r
+ ret = open + tag;\r
+ \r
+ for( var a in this.DOMAttrs ){\r
+ var val = node[this.DOMAttrs[a]];\r
+ if( val )\r
+ ret += ' ' + a + '=' + this.parse( val, 'attribute' );\r
+ }\r
+ return ret + close + open + '/' + tag + close;\r
+ },\r
+ functionArgs:function( fn ){//function calls it internally, it's the arguments part of the function\r
+ var l = fn.length;\r
+ if( !l ) return ''; \r
+ \r
+ var args = Array(l);\r
+ while( l-- )\r
+ args[l] = String.fromCharCode(97+l);//97 is 'a'\r
+ return ' ' + args.join(', ') + ' ';\r
+ },\r
+ key:quote, //object calls it internally, the key part of an item in a map\r
+ functionCode:'[code]', //function calls it internally, it's the content of the function\r
+ attribute:quote, //node calls it internally, it's an html attribute value\r
+ string:quote,\r
+ date:quote,\r
+ regexp:literal, //regex\r
+ number:literal,\r
+ 'boolean':literal\r
+ },\r
+ DOMAttrs:{//attributes to dump from nodes, name=>realName\r
+ id:'id',\r
+ name:'name',\r
+ 'class':'className'\r
+ },\r
+ HTML:false,//if true, entities are escaped ( <, >, \t, space and \n )\r
+ indentChar:' ',//indentation unit\r
+ multiline:true //if true, items in a collection, are separated by a \n, else just a space.\r
+ };\r
+\r
+})();\r
--- /dev/null
+body, div, h1 { font-family: 'trebuchet ms', verdana, arial; margin: 0; padding: 0 }\r
+body {font-size: 10pt; }\r
+h1 { padding: 15px; font-size: large; background-color: #06b; color: white; }\r
+h1 a { color: white; }\r
+h2 { padding: 10px; background-color: #eee; color: black; margin: 0; font-size: small; font-weight: normal }\r
+\r
+.pass { color: green; } \r
+.fail { color: red; } \r
+p.result { margin-left: 1em; }\r
+\r
+#banner { height: 2em; border-bottom: 1px solid white; }\r
+h2.pass { background-color: green; }\r
+h2.fail { background-color: red; }\r
+\r
+div.testrunner-toolbar { background: #eee; border-top: 1px solid black; padding: 10px; }\r
+\r
+ol#tests > li > strong { cursor:pointer; }\r
+\r
+div#fx-tests h4 {\r
+ background: red;\r
+}\r
+\r
+div#fx-tests h4.pass {\r
+ background: green;\r
+}\r
+\r
+div#fx-tests div.box {\r
+ background: red url(data/cow.jpg) no-repeat;\r
+ overflow: hidden;\r
+ border: 2px solid #000;\r
+}\r
+\r
+div#fx-tests div.overflow {\r
+ overflow: visible;\r
+}\r
+\r
+div.inline {\r
+ display: inline;\r
+}\r
+\r
+div.autoheight {\r
+ height: auto;\r
+}\r
+\r
+div.autowidth {\r
+ width: auto;\r
+}\r
+\r
+div.autoopacity {\r
+ opacity: auto;\r
+}\r
+\r
+div.largewidth {\r
+ width: 100px;\r
+}\r
+\r
+div.largeheight {\r
+ height: 100px;\r
+}\r
+\r
+div.largeopacity {\r
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);\r
+}\r
+\r
+div.medwidth {\r
+ width: 50px;\r
+}\r
+\r
+div.medheight {\r
+ height: 50px;\r
+}\r
+\r
+div.medopacity {\r
+ opacity: 0.5;\r
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);\r
+}\r
+\r
+div.nowidth {\r
+ width: 0px;\r
+}\r
+\r
+div.noheight {\r
+ height: 0px;\r
+}\r
+\r
+div.noopacity {\r
+ opacity: 0;\r
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);\r
+}\r
+\r
+div.hidden {\r
+ display: none;\r
+}\r
+\r
+div#fx-tests div.widewidth {\r
+ background-repeat: repeat-x;\r
+}\r
+\r
+div#fx-tests div.wideheight {\r
+ background-repeat: repeat-y;\r
+}\r
+\r
+div#fx-tests div.widewidth.wideheight {\r
+ background-repeat: repeat;\r
+}\r
+\r
+div#fx-tests div.noback {\r
+ background-image: none;\r
+}\r
+\r
+div.chain, div.chain div { width: 100px; height: 20px; position: relative; float: left; }\r
+div.chain div { position: absolute; top: 0px; left: 0px; }\r
+\r
+div.chain.test { background: red; }\r
+div.chain.test div { background: green; }\r
+\r
+div.chain.out { background: green; }\r
+div.chain.out div { background: red; display: none; }\r
+\r
+div#show-tests * { display: none; }\r
<title>jQuery UI Tests</title>
<link rel="stylesheet" href="../themes/base/ui.all.css" type="text/css" />
<script type="text/javascript" src="../jquery-1.3.2.js"></script>
- <script type="text/javascript" src="../external/jsdiff/jsdiff.js"></script>
+ <script type="text/javascript" src="../external/jsdiff.js"></script>
<link rel="stylesheet" href="tests.css" type="text/css" />
<script type="text/javascript" src="tests.js"></script>
</head>
<title>jQuery UI Tests</title>
<link rel="stylesheet" href="../themes/base/ui.all.css" type="text/css" />
<script type="text/javascript" src="../jquery-1.3.2.js"></script>
- <script type="text/javascript" src="../external/jsdiff/jsdiff.js"></script>
+ <script type="text/javascript" src="../external/jsdiff.js"></script>
<link rel="stylesheet" href="tests.css" type="text/css" />
<script type="text/javascript" src="tests.js"></script>
</head>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="accordion_core.js"></script>
<script type="text/javascript" src="accordion_defaults.js"></script>
<script type="text/javascript" src="../../../ui/ui.sortable.js"></script>
<script type="text/javascript" src="../../../ui/ui.tabs.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="../../../external/cookie/jquery.cookie.js"></script>
<script type="text/javascript" src="../core/core.js"></script>
<script type="text/javascript" src="../../../ui/ui.sortable.js"></script>
<script type="text/javascript" src="../../../ui/ui.tabs.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
- <script type="text/javascript" src="../../../cookie/jquery.cookie.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.cookie-r6165.js"></script>
<style type="text/css">
@import "../../../themes/base/ui.datepicker.css";
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="core.js"></script>
<script type="text/javascript" src="selector.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="datepicker_core.js"></script>
<script type="text/javascript" src="datepicker_defaults.js"></script>
<link type="text/css" href="testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="testsuite.js"></script>
- <script type="text/javascript" src="../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../external/simulate/jquery.simulate.js"></script>
- <script type="text/javascript" src="../../external/cookie/jquery.cookie.js"></script>
+ <script type="text/javascript" src="../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../external/jquery.cookie-r6165.js"></script>
<script type="text/javascript" src="draggable/draggable_defaults.js"></script>
<script type="text/javascript" src="droppable/droppable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="dialog_core.js"></script>
<script type="text/javascript" src="dialog_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="draggable_core.js"></script>
<script type="text/javascript" src="draggable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="droppable_core.js"></script>
<script type="text/javascript" src="droppable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="progressbar_core.js"></script>
<script type="text/javascript" src="progressbar_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="resizable_core.js"></script>
<script type="text/javascript" src="resizable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="selectable_core.js"></script>
<script type="text/javascript" src="selectable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="slider_core.js"></script>
<script type="text/javascript" src="slider_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="sortable_core.js"></script>
<script type="text/javascript" src="sortable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
- <script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
+ <script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="../../../external/cookie/jquery.cookie.js"></script>
<script type="text/javascript" src="tabs_core.js"></script>